/* ===================================================================================
======================================================================================
                           RE-ROOFS EXTENSIONS SOC
======================================================================================
=================================================================================== */

.reroofs-sec {
  background-image: url("../images/extension-refurbishments-page/reroofs-bg.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.reroofs-sec .reroofs-wrapper {
  grid-template-columns: auto auto auto auto;
  gap: 24px;
}

.reroofs-sec .reroofs-wrapper .gridcard-2,
.reroofs-sec .reroofs-wrapper .gridcard-3 {
  min-height: 392px;
  max-height: 392px;
}

.reroofs-sec .reroofs-wrapper .gridcard-1 {
  grid-row: 1 / span 2;
  grid-column: 1 / span 2;
  min-height: 808px;
  max-height: 808px;
}

.reroofs-sec .reroofs-wrapper .gridcard-2 {
  grid-row: 1 / span 1;
  grid-column: 3 / span 2;
}

.reroofs-sec .reroofs-wrapper .gridcard-3 {
  grid-row: 2 / span 1;
  grid-column: 3 / span 2;
}

.reroofs-sec .reroofs-wrapper .reroofs-card .reroof-card-body {
  padding: 24px;
  background-color: var(--black-text-op5);
  backdrop-filter: blur(15px);
  overflow: hidden;
  max-height: 78px;
  transition: all 0.5s ease-in-out;
  z-index: 2;
  width: 100%;
}

.reroofs-sec .reroofs-wrapper .reroofs-card:hover .reroof-card-body {
  max-height: 200px;
}

.reroofs-sec .reroofs-wrapper .reroofs-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--main-black-op2);
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s ease-in-out;
  z-index: 1;
}

.reroofs-sec .reroofs-wrapper .reroofs-card:hover::after {
  opacity: 1;
  visibility: visible;
}

.reroofs-card .reroof-card-body .reroof-card-desc {
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-in-out;
}

.reroofs-card:hover .reroof-card-body .reroof-card-desc {
  opacity: 1;
  visibility: visible;
}

/* ===================================================================================
======================================================================================
                           BEFORE AFTER EXCELLENCE SOC
======================================================================================
=================================================================================== */

.before-after-wrapper {
  --slider-position: 49%;
  position: relative;
  width: 100%;
  height: 940px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

.before-after-wrapper .before-after-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.before-after-wrapper .original-img {
  z-index: 1;
}

.before-after-wrapper .grayscale-img {
  z-index: 2;
  filter: grayscale(100%);
  clip-path: inset(0 calc(100% - var(--slider-position)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--slider-position)) 0 0);
}

.before-after-wrapper .before-after-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  touch-action: none;
}

.before-after-wrapper .before-after-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 4px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
}

.before-after-wrapper .before-after-slider::-moz-range-thumb {
  width: 4px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
}

.before-after-wrapper .before-after-divider {
  position: absolute;
  top: 0;
  left: var(--slider-position);
  width: 8px;
  height: 100%;
  background: var(--white-color);
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.before-after-wrapper .before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
  left: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--white-color);
  background: var(--primary-color);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
}

.before-after-wrapper .before-after-handle span {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.before-after-wrapper .before-after-handle span .chevron-icon {
  width: 14px;
  height: 14px;
  color: var(--white-color);
}

.before-after-wrapper .before-after-handle span:nth-child(2) .chevron-icon {
  transform: rotate(180deg);
}

.before-after-label {
  position: absolute;
  top: 30px;
  padding: 12px 45px;
  z-index: 6;
  pointer-events: none;
}

@media (max-width: 1699.98px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper .gridcard-2,
  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    min-height: 378px;
    max-height: 378px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    min-height: 780px;
    max-height: 780px;
  }

  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-wrapper {
    height: 870px;
  }
}

@media (max-width: 1599.98px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper {
    gap: 20px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-2,
  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    min-height: 370px;
    max-height: 370px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    min-height: 760px;
    max-height: 760px;
  }

  .reroofs-sec .reroofs-wrapper .reroofs-card .reroof-card-body {
    padding: 20px;
    max-height: 68px;
  }

  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-wrapper {
    height: 800px;
  }

  .before-after-wrapper .before-after-divider {
    width: 7px;
  }

  .before-after-wrapper .before-after-handle {
    width: 52px;
    height: 52px;
  }

  .before-after-label {
    padding: 10px 36px;
  }
}

@media (max-width: 1399.98px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper {
    gap: 16px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-2,
  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    min-height: 300px;
    max-height: 300px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    min-height: 616px;
    max-height: 616px;
  }

  .reroofs-sec .reroofs-wrapper .reroofs-card .reroof-card-body {
    padding: 16px;
    max-height: 60px;
  }

  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-wrapper {
    height: 700px;
  }
}

@media (max-width: 1199.98px) {
  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-label {
    top: 20px;
    padding: 7px 27px;
  }
}

@media (max-width: 991.98px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper {
    gap: 10px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-2,
  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    min-height: 300px;
    max-height: 300px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    min-height: 500px;
    max-height: 500px;
    grid-row: 1 / span 1;
    grid-column: 1 / span 4;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-2 {
    grid-row: 2 / span 1;
    grid-column: 1 / span 2;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    grid-row: 2 / span 1;
    grid-column: 3 / span 2;
  }

  .reroofs-sec .reroofs-wrapper .reroofs-card .reroof-card-body {
    padding: 16px;
    max-height: 56px;
  }

  .reroofs-sec
    .reroofs-wrapper
    .reroofs-card
    .reroof-card-body
    .reroof-card-desc {
    font-size: 16px;
    line-height: 22px;
  }

  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-wrapper {
    height: 620px;
  }

  .before-after-wrapper .before-after-divider {
    width: 5px;
  }

  .before-after-wrapper .before-after-handle {
    width: 44px;
    height: 44px;
    border-width: 2px;
  }

  .before-after-label {
    padding: 7px 20px;
  }

  .before-after-label .font_24 {
    font-size: 16px;
    line-height: 18px;
  }
}

@media (max-width: 767px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    grid-row: 1 / span 1;
    grid-column: 1 / span 4;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-2 {
    grid-row: 2 / span 1;
    grid-column: 1 / span 4;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    grid-row: 3 / span 1;
    grid-column: 1 / span 4;
  }
}

@media (max-width: 575px) {
  /* ======================================================
                    RE-ROOFS EXTENSIONS SOC
  ====================================================== */

  .reroofs-sec .reroofs-wrapper .gridcard-2,
  .reroofs-sec .reroofs-wrapper .gridcard-3 {
    min-height: 280px;
    max-height: 280px;
  }

  .reroofs-sec .reroofs-wrapper .gridcard-1 {
    min-height: 450px;
    max-height: 450px;
  }

  .reroofs-sec .reroofs-wrapper .reroofs-card .reroof-card-body {
    padding: 14px;
    max-height: 49px;
  }

  /* ======================================================
                  BEFORE AFTER EXCELLENCE SOC
  ====================================================== */

  .before-after-wrapper {
    height: 500px;
  }

  .before-after-wrapper .before-after-divider {
    width: 4px;
  }

  .before-after-wrapper .before-after-handle {
    width: 36px;
    height: 36px;
    border-width: 2px;
  }

  .before-after-wrapper .before-after-handle span,
  .before-after-wrapper .before-after-handle span .chevron-icon {
    width: 12px;
    height: 12px;
  }

  .before-after-label {
    padding: 5px 12px;
    top: 12px;
  }

  .before-after-label .font_24 {
    font-size: 13px;
    line-height: 16px;
  }
}
