/* =========================================================
   TBR RECTIFIER TECH
   REPAIR & REFURBISHMENT
   VERSION AJUSTADA A LAS CAPTURAS DE WIX
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #061b36;
}

.repair-page {
  width: 100%;
  overflow-x: hidden;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: 355px;

  /* Cambia esta imagen si quieres otra foto industrial */
  background:
    linear-gradient(
      90deg,
      rgba(2, 20, 44, 0.98) 0%,
      rgba(2, 22, 48, 0.92) 44%,
      rgba(3, 31, 62, 0.30) 100%
    ),
    url("assets/before-transformer.png");

  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 15, 38, 0.52),
      rgba(0, 15, 38, 0.10)
    );
}

.hero-content {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 1178px;
  min-height: 355px;

  margin: 0 auto;

  display: grid;
  grid-template-columns: 54% 46%;
  align-items: stretch;
}

.hero-copy {
  padding: 35px 0 24px 34px;
  color: #ffffff;
}

.hero-copy h1 {
  font-size: 62px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-line {
  width: 75px;
  height: 5px;
  background: #0b5cff;
  margin: 14px 0 14px;
}

.hero-description {
  font-size: 20px;
  line-height: 1.34;
  font-weight: 500;
}

.hero-points {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  width: 100%;
  max-width: 600px;
  margin-top: 29px;

  color: #ffffff;
  font-size: 12px;
  white-space: nowrap;
}

.hero-point {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  border: 1px solid #1680ff;
  border-radius: 50%;

  color: #1680ff;
  font-weight: 800;
  font-size: 12px;
  flex: 0 0 auto;
}

.separator {
  width: 1px;
  height: 27px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.42);
  flex: 0 0 auto;
}

.hero-machine {
  display: flex;
  align-items: flex-end;
  justify-content: center;

  overflow: hidden;
}

.hero-machine img {
  width: 88%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(1.15);
}


/* =========================================================
   BLUE RECTIFIER SECTION
   ========================================================= */

.rectifier-section {
  background: #1559cf;
  padding: 47px 8px 18px;
}

.rectifier-grid {
  max-width: 1178px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.rectifier-card {
  color: #ffffff;
}

.card-title {
  height: 86px;

  background: #f7f5ef;

  border-radius: 18px 18px 0 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: #0343a0;
}

.card-title h2 {
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 14px;
}

.card-title h3 {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.card-image-hover {
  position: relative;
  width: 100%;
  height: 218px;
  overflow: hidden;
  background: #e7e7e7;
}

.card-image {
  width: 100%;
  height: 218px;
  display: block;
  transition: opacity 0.45s ease;
}

.card-image-default {
  object-fit: cover;
}

.card-image-before-after {
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: #f3f3f3;
  opacity: 0;
}

.card-image-hover:hover .card-image-default {
  opacity: 0;
}

.card-image-hover:hover .card-image-before-after {
  opacity: 1;
}

.rectifier-card ul {
  list-style: none;
  padding: 10px 7px 0 9px;
}

.rectifier-card li {
  position: relative;

  padding-left: 25px;
  margin: 5px 0;

  font-size: 16px;
  line-height: 1.32;
}

.rectifier-card li::before {
  content: "✓";

  position: absolute;
  left: 0;
  top: 0;

  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #0b6cff;
  color: white;

  border-radius: 50%;

  font-size: 13px;
  font-weight: 800;
}


/* =========================================================
   LEGACY / DON'T REPLACE
   ========================================================= */

.legacy-section {
  background: #1559cf;
  padding: 2px 0 35px;
}

.legacy-grid {
  width: 100%;
  max-width: 1178px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 39% 61%;
  align-items: stretch;
}

.legacy-photo {
  min-height: 385px;
}

.legacy-photo img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  display: block;
}

.legacy-content {
  padding: 24px 30px 14px 30px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.legacy-content h2 {
  width: 100%;
  margin: 0 auto 10px;

  color: #061b36;

  font-size: clamp(25px, 2.45vw, 31px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.3px;

  text-align: center;
}

.legacy-content p {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;

  color: #061b36;

  font-size: 17px;
  line-height: 1.45;
  font-weight: 500;

  text-align: center;
}

.legacy-benefits {
  margin-top: 30px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 14px;
}

.legacy-benefit {
  text-align: center;
}

.legacy-benefit img {
  width: 82px;
  height: 82px;

  object-fit: contain;

  display: block;
  margin: 0 auto 13px;
}

.legacy-benefit h3 {
  color: #ffffff;

  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;

  text-align: center;
}



/* SOLO CORRECCION: icono Lower Replacement Costs en blanco */
.legacy-benefit:nth-child(4) img {
  filter: brightness(0) invert(1);
}

/* =========================================================
   REPAIR PROCESS
   ========================================================= */

.process-section {
  position: relative;

  background: #1559cf;

  padding: 35px 16px 0;
}

.process-label {
  position: relative;
  z-index: 2;

  width: 57%;
  min-width: 620px;
  max-width: 675px;

  margin: 0 auto -18px;

  padding: 8px 20px;

  background: #073681;
  color: white;

  text-align: center;

  font-size: 29px;
  font-weight: 800;

  clip-path: polygon(
    3% 0,
    97% 0,
    100% 50%,
    97% 100%,
    3% 100%,
    0 50%
  );
}

.process-image-wrap {
  max-width: 1178px;
  margin: 0 auto;

  background: #eff6ff;

  border-radius: 42px 42px 0 0;

  overflow: hidden;

  border: 1px solid rgba(3, 58, 126, 0.18);
}

.process-image-wrap img {
  width: 100%;
  height: auto;

  display: block;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 30px;
  }

  .hero-machine {
    display: none;
  }

  .rectifier-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .legacy-grid {
    grid-template-columns: 1fr;
  }

  .legacy-content {
    padding: 25px;
  }

  .legacy-benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-label {
    min-width: 0;
    width: 80%;
  }

}


/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 620px) {

  .hero-copy {
    padding: 30px 22px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-description {
    font-size: 17px;
  }

  .hero-points {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    white-space: normal;
    padding: 0;
  }

  .separator {
    display: none;
  }

  .rectifier-grid {
    grid-template-columns: 1fr;
  }

  .card-image {
    height: auto;
  }

  .legacy-benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  .legacy-content h2 {
    font-size: 26px;
  }

  .process-label {
    width: 95%;
    font-size: 20px;
  }

}

/* BEFORE / AFTER: enlarge to 2x while cursor remains over the photo */
@media (min-width: 621px) {
  .rectifier-card {
    position: relative;
  }

  .rectifier-card:hover {
    z-index: 50;
  }

  .card-image-hover {
    overflow: visible;
    z-index: 1;
  }

  .card-image-before-after {
    z-index: 10;
    transform: scale(1);
    transform-origin: center center;
    transition: opacity 0.45s ease, transform 0.45s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.30);
  }

  .card-image-hover:hover .card-image-before-after {
    opacity: 1;
    transform: scale(2);
  }

  /* Keep the outside cards from expanding beyond the page edges */
  .rectifier-card:first-child .card-image-before-after {
    transform-origin: left center;
  }

  .rectifier-card:last-child .card-image-before-after {
    transform-origin: right center;
  }
}
