/* =========================================================
   HERRERA ACOUSTICS · Maqueta 2026
   Pagina de solucion: ECO Y REVERBERACION
   Hoja especifica; depende de los tokens de styles.css
   ========================================================= */

.eco {
  --eco-blue: #2b7fd4;
  --eco-panel: #f2f2f3;
}

/* ---------- Titulo de seccion con regla roja ---------- */
.eco-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.05;
  margin: 0;
}
.eco-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
}
.eco-title-sub {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

/* =========================================================
   01 · HERO
   ========================================================= */
.eco-hero {
  display: grid;
  grid-template-columns: minmax(380px, 48%) 1fr;
  align-items: stretch;
  background: var(--eco-panel);
  border-bottom: 1px solid var(--line);
}
.eco-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 88px) clamp(20px, 2.5vw, 40px) clamp(40px, 6vw, 88px) var(--pad);
  margin-left: auto;
  width: 100%;
  max-width: calc(var(--maxw) * 0.54);
}
.eco-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.eco-breadcrumb a:hover { color: var(--accent); }
.eco-breadcrumb span { margin: 0 7px; opacity: .5; }

.eco-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(27px, 2.5vw, 37px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}
.eco-h1 em { display: block; font-style: normal; color: var(--accent); }

.eco-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.25;
  margin: 26px 0 0;
}
.eco-rule {
  width: 56px;
  height: 3px;
  background: var(--accent);
  border: 0;
  margin: 22px 0;
}
.eco-hero-copy p.eco-body {
  color: var(--text-muted);
  max-width: 34ch;
  margin: 0 0 30px;
  line-height: 1.75;
}

/* ---------- Comparador antes / despues ---------- */
.compare {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  min-height: clamp(430px, 44vw, 620px);
  background: var(--dark);
  cursor: ew-resize;
}
.compare-pane {
  position: absolute;
  inset: 0;
}
.compare-pane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* la mitad "controlado" queda de fondo; la de "sin control" se recorta con
   clip-path para que la imagen nunca se deforme al mover el tirador. */
.compare-pane-front {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.compare-tag {
  position: absolute;
  top: 18px;
  z-index: 3;
  background: rgba(16,16,20,.86);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 14px;
}
.compare-tag-a { left: 18px; }
.compare-tag-b { right: 18px; }

.compare-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  z-index: 4;
  pointer-events: none;
}
.compare-handle {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  color: var(--dark);
  cursor: ew-resize;
}
.compare-handle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.compare-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(16,16,20,.6);
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity .25s ease;
}
.compare.is-touched .compare-hint { opacity: 0; }

/* =========================================================
   02 · SINTOMAS
   ========================================================= */
.sintomas {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(28px, 3.6vw, 42px);
}
.sintoma img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft-2);
}
.sintoma b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 14px 0 8px;
}
.sintoma p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* =========================================================
   03 · QUE ESTA OCURRIENDO
   ========================================================= */
.ocurre {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.legend {
  list-style: none;
  margin: 26px 0 28px;
  padding: 0;
  display: grid;
  gap: 15px;
}
.legend li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.legend svg { display: block; }
.ocurre p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}
.ocurre-figure {
  margin: 0;
  border: 9px solid var(--dark);
  border-radius: 4px;
  overflow: hidden;
  background: var(--dark);
}
.ocurre-figure img { width: 100%; display: block; }

/* =========================================================
   04 · TRES ESTADOS
   ========================================================= */
.estados {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
  margin-top: clamp(26px, 3.4vw, 40px);
  text-align: center;
}
.estado { position: relative; }
.estado + .estado::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(12px, 1.7vw, 24px));
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.estado p.estado-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.3;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  /* dos lineas reservadas para que las tres imagenes queden a la misma altura */
  min-height: 2.6em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.estado p.estado-tag-ok { color: var(--eco-blue); }
.estado img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft-2);
}
.estado b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  margin: 18px 0 8px;
}
.estado p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* =========================================================
   05 · POR QUE OCURRE + ERROR COMUN
   ========================================================= */
.porque {
  display: grid;
  grid-template-columns: minmax(280px, 37%) 1fr;
  gap: clamp(30px, 4vw, 60px);
  align-items: start;
}
.porque-diagram {
  margin: clamp(18px, 2.4vw, 30px) 0 0;
  width: 100%;
}
.porque-diagram img { width: 100%; }
.porque-note {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.error-card {
  margin-top: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: clamp(22px, 2.6vw, 34px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 2.6vw, 34px);
  box-shadow: var(--shadow);
}
.error-item + .error-item {
  border-left: 1px solid var(--line);
  padding-left: clamp(22px, 2.6vw, 34px);
}
.error-head {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
  min-height: 72px;
}
.error-x {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
}
.error-head b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.32;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--accent);
}
.error-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-soft-2);
}
.error-item p {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* =========================================================
   06 · COMO LO RESOLVEMOS
   ========================================================= */
.pasos-wrap { margin-top: clamp(26px, 3.4vw, 40px); }
.pasos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.6vw, 24px);
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.paso { position: relative; padding: 0 4px; }
.paso + .paso::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(6px, .8vw, 12px) - 6px);
  top: 92px;
  width: 13px; height: 9px;
  background: var(--text-dim);
  clip-path: polygon(0 40%, 62% 40%, 62% 0, 100% 50%, 62% 100%, 62% 60%, 0 60%);
}
.paso-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 8px;
}
.paso b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin-bottom: 10px;
  min-height: 2.6em;
}
.paso p {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.55;
  color: var(--text-muted);
}
.pasos-rail {
  position: relative;
  height: 12px;
  margin-top: clamp(24px, 3vw, 36px);
}
.pasos-rail::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%;
  top: 50%;
  height: 2px;
  background: var(--accent);
  transform: translateY(-50%);
}
.pasos-rail span {
  position: absolute;
  top: 50%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* =========================================================
   07 · CTA OSCURO
   ========================================================= */
.eco-cta {
  position: relative;
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}
.eco-cta-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(250px, 1fr) auto;
  gap: clamp(26px, 3.4vw, 48px);
  align-items: center;
  padding: clamp(44px, 5.6vw, 72px) 0;
  padding-right: clamp(0px, 12vw, 180px);
}
.eco-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}
.eco-cta h2 em { font-style: normal; color: var(--accent); }
.eco-cta p {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.62);
  margin: 0 0 12px;
}
.eco-cta p:last-of-type { margin-bottom: 0; }
.eco-wave {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(15%, 220px);
  z-index: 1;
  opacity: .45;
  pointer-events: none;
}
.eco-wave svg { width: 100%; height: 100%; }

/* =========================================================
   Crosslinks
   ========================================================= */
.eco-next {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
  margin-top: clamp(24px, 3vw, 34px);
}
.eco-next a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--bg);
  transition: border-color .18s ease, transform .18s ease;
}
.eco-next a:hover { border-color: var(--text); transform: translateY(-2px); }
.eco-next b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 7px;
}
.eco-next span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .sintomas { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .pasos { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .paso + .paso::before { display: none; }
  .pasos-rail { display: none; }
}

@media (max-width: 900px) {
  .eco-hero { grid-template-columns: 1fr; }
  .eco-hero-copy { max-width: var(--maxw); padding: 44px var(--pad) 34px; }
  .compare { min-height: 0; aspect-ratio: 16 / 10; }
  .ocurre { grid-template-columns: 1fr; }
  .porque { grid-template-columns: 1fr; }
  .estados { grid-template-columns: 1fr; gap: 34px; }
  .estado + .estado::before { display: none; }
  .error-card { grid-template-columns: 1fr; }
  .error-item + .error-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 26px; }
  .error-head { min-height: 0; }
  .eco-cta-inner { grid-template-columns: 1fr; gap: 24px; }
  .eco-wave { display: none; }
  .eco-next { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .sintomas { grid-template-columns: repeat(2, 1fr); }
  .pasos { grid-template-columns: 1fr; text-align: left; }
  .paso b { min-height: 0; }
  .compare-tag { font-size: 10.5px; padding: 5px 10px; top: 12px; }
  .compare-tag-a { left: 12px; }
  .compare-tag-b { right: 12px; }
}
