/* =========================================================
   YES I CAN ROOFING & EXTERIORS
   BLOCK 04 — BEFORE / AFTER
   DOS IMÁGENES FIJAS
   ========================================================= */

.transformation {
  width: 100%;
  padding: 14px 0 28px;
  background: #ffffff;
}

.transformation__inner {
  width: min(calc(100% - 72px), var(--content-max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.transformation-card,
.estimate-shell__card {
  background: #ffffff;
  border: 1px solid #e2e8ee;
  border-radius: 11px;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(3, 23, 43, 0.055),
    0 2px 7px rgba(3, 23, 43, 0.035);
}


.transformation-card {
  height: 100%;
  display: grid;
  grid-template-rows: 305px minmax(102px, 1fr);
  background: linear-gradient(180deg, #ffffff 0 305px, #04192f 305px 100%);
}

.transformation-card__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  height: 100%;
  overflow: hidden;
  background: #dfe5eb;
}

.transformation-card__panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #dfe5eb;
}

.transformation-card__panel--after {
  border-left: 0;
  margin-left: -2px;
}

.transformation-card__image {
  position: absolute;
  inset: -4px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transform-origin: center;
}

.transformation-card__image--before {
  background-image: url("../../imagenes/before-home.webp");
  background-position: 54% center;
}

.transformation-card__image--after {
  background-image: url("../../imagenes/after-home.webp");
  background-position: 46% center;
}

.transformation-card__badge {
  position: absolute;
  top: 12px;
  z-index: 5;
  min-height: 30px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.14);
}

.transformation-card__badge--before {
  left: 12px;
  background: #071b31;
}

.transformation-card__badge--after {
  right: 12px;
  background: #e3131b;
}

.transformation-card__benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  background: linear-gradient(90deg, #03172b 0%, #07203a 52%, #04192f 100%);
  color: #ffffff;
  margin-top: -1px;
}

.transformation-card__benefit {
  min-width: 0;
  min-height: 86px;
  padding: 16px 16px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.transformation-card__benefit:last-child {
  border-right: 0;
}

.transformation-card__benefit svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: #ffffff;
}

.transformation-card__benefit strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.1;
}

.transformation-card__benefit span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  line-height: 1.3;
}

.estimate-shell {
  min-width: 0;
}

.estimate-shell__card {
  min-height: 100%;
  padding: 16px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fa 100%);
}

.estimate-shell__title {
  margin: 0 0 14px;
  color: #081a2d;
  text-align: center;
  font-size: clamp(23px, 1.7vw, 31px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.estimate-shell__placeholder {
  min-height: 360px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estimate-shell__ghost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.estimate-shell__ghost-grid span {
  height: 60px;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  background: #ffffff;
}

.estimate-shell__ghost-result {
  flex: 1;
  min-height: 92px;
  border: 1px solid #d8e0e7;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(249, 251, 252, 1) 100%);
}

.estimate-shell__ghost-button {
  height: 44px;
  border-radius: 7px;
  background: linear-gradient(90deg, #159f35 0%, #0f8d2f 100%);
  opacity: 0.22;
}

@media (max-width: 1120px) {
  .transformation__inner {
    width: min(calc(100% - 40px), var(--content-max-width));
    grid-template-columns: 1fr;
  }

  .estimate-shell__placeholder {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .transformation {
    padding: 12px 0 22px;
  }

  .transformation__inner {
    width: min(calc(100% - 24px), var(--content-max-width));
    gap: 14px;
  }

  .transformation-card__media {
    height: auto;
    grid-template-columns: 1fr;
  }

  .transformation-card__panel {
    min-height: 220px;
  }

  .transformation-card__panel--after {
    border-left: 0;
    border-top: 0;
  }

  .transformation-card__benefits {
    grid-template-columns: 1fr;
  }

  .transformation-card__benefit {
    min-height: 0;
    padding: 14px 14px 13px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .transformation-card__benefit:last-child {
    border-bottom: 0;
  }

  .estimate-shell__card {
    padding: 14px;
  }

  .estimate-shell__title {
    font-size: clamp(20px, 6vw, 28px);
  }

  .estimate-shell__placeholder {
    min-height: 270px;
    padding: 4px;
  }

  .estimate-shell__ghost-grid {
    grid-template-columns: 1fr;
  }
}
