/* ============================================================================
   VoltLlano · Refactor visual 2026-05-24
   Branch: refactor/web-design-2026-05-24
   Base: main @ da9a7fc

   Este archivo agrupa las clases NUEVAS y los OVERRIDES sobre design-tokens.css.
   Cargar DESPUÉS de design-tokens.css en cada página que las use.

   <link rel="stylesheet" href="css/design-tokens.css">
   <link rel="stylesheet" href="css/refactor-2026-05-24.css">

   Componentes:
     [A] .retie-badge (sm · lg · gold)        — diferenciador #1 visual
     [B] .hero-v2 (overrides .hero)           — simplificación + RETIE-lg + side card
     [C] .stats-bar overrides                 — números 2.5rem · separadores · teal
     [D] .prop-card-v2 / .vl-service          — precio jerarquizado + checks + RETIE-sm
     [E] .combo-flagship                      — Combo Residencial BYD $4.290.000
     [F] .testimonials-grid + .testimonial    — placeholder 3 cards
     [G] .footer-v2 overrides                 — RETIE inline + cobertura clara
     [H] media queries 768 / 1024             — mobile-first responsive
   ============================================================================ */


/* ─── [A] RETIE BADGE — componente recurrente ─────────────────────────── */
.retie-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--vl-radius-pill, 9999px);
  font-family: var(--vl-font-sans, 'Inter', sans-serif);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.retie-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.retie-badge--sm {
  padding: 5px 10px;
  font-size: 0.7rem;
  background: rgba(0, 208, 132, 0.08);
  border: 1px solid rgba(0, 208, 132, 0.28);
  color: var(--vl-success, #00D084);
}
.retie-badge--sm .dot {
  background: var(--vl-success, #00D084);
  box-shadow: 0 0 6px var(--vl-success, #00D084);
}
.retie-badge--lg {
  padding: 9px 16px;
  font-size: 0.85rem;
  background: rgba(0, 208, 132, 0.10);
  border: 1.5px solid rgba(0, 208, 132, 0.35);
  color: var(--vl-success, #00D084);
  box-shadow: 0 0 20px rgba(0, 208, 132, 0.15);
}
.retie-badge--lg .dot {
  background: var(--vl-success, #00D084);
  box-shadow: 0 0 8px var(--vl-success, #00D084);
}
.retie-badge--gold {
  padding: 10px 18px;
  font-size: 0.88rem;
  background: rgba(255, 184, 0, 0.10);
  border: 1.5px solid rgba(255, 184, 0, 0.38);
  color: var(--vl-warning, #FFB800);
  box-shadow: 0 0 28px rgba(255, 184, 0, 0.25);
}
.retie-badge--gold .dot {
  background: var(--vl-warning, #FFB800);
  box-shadow: 0 0 8px var(--vl-warning, #FFB800);
}


/* ─── [B] HERO V2 — overrides + side card ──────────────────────────────── */
.hero.hero-v2 {
  /* Use grid not flex to position the new side card */
  display: grid;
  grid-template-columns: 1fr 480px;
  align-items: center;
  gap: 3rem;
  padding: 8rem 1.5rem 4rem;
}
.hero-v2 .hero-content {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
  z-index: 2;
}
.hero-v2 .hero-trust { display: none; }     /* old 4-badge trust row replaced by retie-badge--lg */
.hero-v2 .hero-visual { display: none; }    /* old bolt/battery SVG removed */
/* The animated rotating word still works under .hero-v2 — but we render only ONE static word */
.hero-v2 .hero-rotator-wrap { display: inline-block; }

.hero-v2-side {
  position: relative;
  z-index: 2;
}
.hero-v2-side-card {
  background: var(--vl-card, #0F2640);
  border: 1.5px solid rgba(255, 184, 0, 0.38);
  border-radius: var(--vl-radius-xl, 32px);
  padding: 1.4rem;
  box-shadow: 0 0 28px rgba(255, 184, 0, 0.25), 0 4px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.hero-v2-side-card .ribbon {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  background: var(--vl-warning, #FFB800);
  color: var(--vl-dark, #0A1929);
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-v2-side-card .img {
  background: var(--vl-dark-3, #132D47);
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;            /* foto edge-to-edge dentro del card */
  overflow: hidden;      /* clip al border-radius (la foto llena al 100%) */
}
.hero-v2-side-card .img img {
  max-height: 100%;
  max-width: 80%;
  object-fit: contain;
}
/* Cuando la tarjeta contiene una foto (envuelta en <picture>) en lugar
   de un ícono SVG, dejamos que la imagen llene el área padded del
   contenedor (object-fit:cover via inline style). */
.hero-v2-side-card .img picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-v2-side-card .img picture img {
  max-width: 100%;
}
.hero-v2-side-card .name {
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.2;
}
.hero-v2-side-card .sub {
  font-size: 0.78rem;
  color: var(--vl-muted, #7B93B0);
}
.hero-v2-side-card .price {
  font-family: var(--vl-font-mono, 'JetBrains Mono', monospace);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--vl-warning, #FFB800);
  line-height: 1;
}
.hero-v2-side-card .price-lbl {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vl-muted, #7B93B0);
  font-weight: 600;
}
.hero-v2-side-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}


/* ─── [C] STATS BAR refinement ─────────────────────────────────────────── */
.stats-bar-v2 .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stats-bar-v2 .stats-grid > div {
  position: relative;
}
.stats-bar-v2 .stats-grid > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.5rem;
  transform: translateY(-50%);
  width: 1px;
  height: 56px;
  background: var(--vl-border, rgba(255, 255, 255, 0.09));
}
.stats-bar-v2 .stat-num {
  font-family: var(--vl-font-mono, 'JetBrains Mono', monospace);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--vl-teal, #2DBFA8);
  line-height: 1;
  background: none;            /* override any gradient-text leak from old version */
  -webkit-text-fill-color: var(--vl-teal, #2DBFA8);
}
.stats-bar-v2 .stat-label {
  font-size: 0.82rem;
  color: var(--vl-muted, #7B93B0);
  margin-top: 0.5rem;
}


/* ─── [D] SERVICE CARDS V2 — precio jerárquico ─────────────────────────── */
.prop-card-v2 {
  background: var(--vl-card, #0F2640);
  border: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
  border-radius: var(--vl-radius-lg, 20px);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.prop-card-v2:hover {
  border-color: rgba(45, 191, 168, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.prop-card-v2 .head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.prop-card-v2 .ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(45, 191, 168, 0.10);
  border: 1px solid rgba(45, 191, 168, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.prop-card-v2 .title {
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0;
}
.prop-card-v2 .desc {
  font-size: 0.88rem;
  color: var(--vl-muted, #7B93B0);
  line-height: 1.55;
  margin: 0;
}
.prop-card-v2 .checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.prop-card-v2 .checks li {
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.prop-card-v2 .checks li::before {
  content: "✓";
  color: var(--vl-success, #00D084);
  font-weight: 700;
  flex-shrink: 0;
}
.prop-card-v2 .sep {
  border-top: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
}
.prop-card-v2 .price-block {
  display: flex;
  flex-direction: column;
}
.prop-card-v2 .price-lbl {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vl-muted, #7B93B0);
  font-weight: 600;
}
.prop-card-v2 .price {
  font-family: var(--vl-font-mono, 'JetBrains Mono', monospace);
  font-weight: 900;
  font-size: 1.9rem;
  color: var(--vl-warning, #FFB800);
  line-height: 1;
  margin: 0.2rem 0;
}
.prop-card-v2 .price-note {
  font-size: 0.72rem;
  color: var(--vl-muted, #7B93B0);
}


/* ─── [E] COMBO FLAGSHIP — Combo Residencial BYD $4.290.000 ────────────── */
.combo-flagship {
  background: var(--vl-card, #0F2640);
  border: 1.5px solid rgba(255, 184, 0, 0.38);
  border-radius: var(--vl-radius-xl, 32px);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  box-shadow: 0 0 28px rgba(255, 184, 0, 0.25), 0 4px 24px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}
.combo-flagship::before {
  content: "COMBO DESTACADO";
  position: absolute;
  top: 18px;
  right: -46px;
  transform: rotate(35deg);
  background: var(--vl-warning, #FFB800);
  color: var(--vl-dark, #0A1929);
  padding: 5px 50px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 2;
}
.combo-flagship .media {
  background: var(--vl-dark-3, #132D47);
  border-radius: var(--vl-radius-lg, 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 240px;
}
.combo-flagship .media img {
  max-height: 200px;
  max-width: 80%;
  object-fit: contain;
}
.combo-flagship .body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.combo-flagship .eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vl-teal, #2DBFA8);
}
.combo-flagship h3 {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
.combo-flagship .sub {
  font-size: 0.9rem;
  color: var(--vl-muted, #7B93B0);
  line-height: 1.5;
  margin: 0;
}
.combo-flagship .list {
  list-style: none;
  padding: 0.9rem 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.8rem;
  border-top: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
  border-bottom: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
}
.combo-flagship .list li {
  font-size: 0.82rem;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  color: var(--vl-light, #F5F7FA);
}
.combo-flagship .list li::before {
  content: "✓";
  color: var(--vl-green, #7FD93D);
  font-weight: 700;
  flex-shrink: 0;
}
.combo-flagship .price-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vl-muted, #7B93B0);
  font-weight: 600;
}
.combo-flagship .price {
  font-family: var(--vl-font-mono, 'JetBrains Mono', monospace);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--vl-warning, #FFB800);
  line-height: 1;
}
.combo-flagship .price-note {
  font-size: 0.74rem;
  color: var(--vl-muted, #7B93B0);
  margin-top: 4px;
}
.combo-flagship .ctas {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.combo-flagship .ctas .btn {
  flex: 1;
  min-width: 140px;
  justify-content: center;
}


/* ─── [F] TESTIMONIALS — placeholder ───────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial {
  background: var(--vl-card, #0F2640);
  border: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
  border-radius: var(--vl-radius-lg, 20px);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 220px;
}
.testimonial.placeholder { opacity: 0.65; }
.testimonial .stars {
  color: var(--vl-warning, #FFB800);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}
.testimonial .quote {
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
  font-style: italic;
  margin: 0;
}
.testimonial .who {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
}
.testimonial .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B6EC2, #2DBFA8, #7FD93D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}
.testimonial .name {
  font-weight: 700;
  font-size: 0.9rem;
}
.testimonial .role {
  font-size: 0.74rem;
  color: var(--vl-muted, #7B93B0);
}


/* ─── [G] FOOTER V2 — RETIE inline + cobertura ─────────────────────────── */
.footer.footer-v2 .footer-brand .retie-badge {
  margin-top: 1rem;
}
.footer.footer-v2 .coverage-line {
  font-size: 0.78rem;
  color: var(--vl-muted, #7B93B0);
  line-height: 1.6;
}
.footer.footer-v2 .coverage-line strong {
  color: var(--vl-light, #F5F7FA);
  font-weight: 600;
}


/* ─── [H] RESPONSIVE — mobile-first breakpoints ────────────────────────── */

/* Tablet (>= 768px) — defaults to mobile-first single-col under this */
@media (max-width: 1024px) {
  .hero.hero-v2 {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }
  .hero-v2-side { max-width: 480px; }
  .combo-flagship {
    grid-template-columns: 1fr;
    padding: 1.6rem;
  }
  .combo-flagship .list {
    grid-template-columns: 1fr;
  }
  .combo-flagship .price {
    font-size: 2.2rem;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .stats-bar-v2 .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .stats-bar-v2 .stats-grid > div:nth-child(2)::after { display: none; }
  .stats-bar-v2 .stat-num { font-size: 2rem; }
  .combo-flagship { padding: 1.3rem; }
  .combo-flagship::before {
    top: 12px;
    right: -50px;
    padding: 4px 50px;
    font-size: 0.6rem;
  }
}


/* ─── [I] MOBILE NAV — fix robusto (iter. 2) ──────────────────────────── */
/*
   Bug reportado: tras tocar el boton hamburguesa en mobile, aparece un
   recuadro negro vacio sin items visibles. Mi primera iteracion (commit
   90653aa) solo subio contraste y NO resolvio el bug porque la causa
   raiz era estructural, no de contraste:

   1) El HTML tenia atributo [hidden] en <div class="nav-mobile">. El JS
      navbar.js hacia menu.removeAttribute('hidden') al init. Si por
      cualquier razon el JS no llegaba a ejecutarse (race condition,
      error de script previo, CSP, cache parcial del preview), el panel
      quedaba con UA [hidden] aplicado, GANANDO contra el CSS author
      (porque [hidden] = display:none de specs y aunque el media query
      tiene display:flex !important, ALGUNOS contextos lo respetan mal).
   2) El transform: translateX(0) del .is-open NO tenia !important, asi
      que era vulnerable a overrides accidentales.
   3) El color de los links era muted (bajo contraste).

   Fix iter. 2 (este commit):
   - HTML: removido el atributo [hidden] de las 9 paginas con nav (no
     depende mas del JS para visibilidad inicial)
   - CSS: bloque defensivo con !important en TODOS los puntos criticos
     del panel (display, position, transform, color)
   - El JS de navbar.js sigue funcionando igual (toggle de clase .is-open)
*/

/* Base fuera de media: panel oculto en desktop (sin attr hidden) */
.nav-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Panel mobile: SIEMPRE renderizado, controlado solo por transform.
     iter. 3 (fix bug device real reportado por Andres 2026-05-25):
     - background hardcoded SIN var() porque algunas CSS vars no resuelven
       en iOS Safari cuando el panel hace transform (stacking context propio)
     - isolation: isolate fuerza stacking context propio (evita que el
       backdrop con backdrop-filter:blur del design-tokens lo eclipse)
     - background-color extra como fallback duro
     - opaque background-color SIN transparencia para garantizar visibilidad
  */
  .nav-mobile {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(82vw, 340px) !important;
    background: #0D2137 !important;
    background-color: #0D2137 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.7) !important;
    padding: 88px 20px 24px !important;
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9500 !important;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    isolation: isolate !important;
    will-change: transform;
  }

  /* Estado abierto: slide-in lateral (blindado con !important) */
  .nav-mobile.is-open {
    transform: translateX(0) !important;
  }

  /* Links del panel: contraste AAA + tamanio tactil >=44px + color hardcoded */
  .nav-mobile a {
    display: flex !important;
    align-items: center;
    padding: 14px 16px !important;
    border-radius: 8px;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #F5F7FA !important;
    text-decoration: none !important;
    background: transparent !important;
    transition: background 180ms;
    min-height: 44px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-mobile a:hover,
  .nav-mobile a:active,
  .nav-mobile a:focus-visible {
    color: #2DBFA8 !important;
    background: #132D47 !important;
  }
  .nav-mobile a.active {
    color: #2DBFA8 !important;
    background: rgba(45, 191, 168, 0.10) !important;
  }

  /* Backdrop: blindado.
     iter. 3 fix: removido backdrop-filter (creaba stacking context
     conflictivo en iOS Safari que tapaba el panel). Mantener solo
     overlay oscuro con opacity. isolation: isolate para que NO se
     mezcle con el stacking context del panel.
  */
  .nav-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(10, 25, 41, 0.78) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 9400 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    isolation: isolate !important;
  }
  .nav-backdrop.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Hamburger garantizado visible y clicable encima de todo */
  .nav-hamburger {
    display: block !important;
    position: relative;
    z-index: 9600 !important;
  }
}


/* ─── [J] DIAGNÓSTICO EV — sección con batería animada ────────────────── */
/*
   Ajuste 2026-05-25: la animacion de bateria con carga + porcentaje
   estaba en el hero original (commit base da9a7fc) y fue removida en
   refactor(hero) cfb5e5b. La reubicamos en una seccion dedicada al
   servicio de Diagnostico EV, donde tiene mas sentido narrativo.

   El JS js/hero-charge.js sigue buscando #hero-charge-anim sin cambios.
*/
.diag-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.diag-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(127, 217, 61, 0.10), transparent 70%);
  border-radius: var(--vl-radius-xl, 32px);
  padding: 2rem;
  min-height: 320px;
}
.diag-battery {
  width: 140px;
  height: 260px;
  filter: drop-shadow(0 0 32px rgba(45, 191, 168, 0.35));
}
.diag-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.diag-body .section-title {
  text-align: left;
  margin: 0;
}
.diag-lead {
  font-size: 1rem;
  color: var(--vl-muted, #7B93B0);
  line-height: 1.6;
  margin: 0;
}
.diag-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.diag-checks li {
  font-size: 0.92rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--vl-light, #F5F7FA);
}
.diag-checks li::before {
  content: "✓";
  color: var(--vl-success, #00D084);
  font-weight: 700;
  flex-shrink: 0;
}
.diag-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--vl-border, rgba(255, 255, 255, 0.09));
  flex-wrap: wrap;
}
.diag-price {
  font-family: var(--vl-font-mono, 'JetBrains Mono', monospace);
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--vl-warning, #FFB800);
  line-height: 1;
}
.diag-ctas {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.diag-ctas .btn {
  min-width: 150px;
  justify-content: center;
}

@media (max-width: 900px) {
  .diag-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .diag-visual {
    min-height: 240px;
    padding: 1.5rem;
  }
  .diag-battery {
    width: 120px;
    height: 220px;
  }
  .diag-body .section-title {
    text-align: center;
  }
  .diag-checks {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
  }
  .diag-price-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .diag-ctas {
    justify-content: center;
  }
  .diag-ctas .btn {
    flex: 1;
  }
}


/* ─── [K] VOLTY MASCOT — FAB prominente + tooltip + WhatsApp ─────────── */
/*
   Ajuste 2026-05-25: Volty pasa de FAB discreto/inactivo a presencia
   constante en todas las paginas activas (excepto legales). Tamano +
   pulse + tooltip invitador + click->WhatsApp.

   Estructura inyectada por js/volty.js dentro de <div id="volty-mascot">:
     <div class="vl-volty-tooltip"> ... </div>
     <a class="vl-volty-btn">
       <span class="vl-volty-svg-host"> <!-- SVG inyectado --> </span>
       <span class="vl-volty-pulse"></span>
     </a>
*/
/*
   iter. 3 (ajuste pre-lanzamiento 2026-06-08):
   El stack .vl-floating-stack del WhatsApp legacy quedó vacío en todas
   las páginas activas (live-chat.js fue desreferenciado el 2026-05-25).
   Volty es ahora el único FAB visible, así que se ancla limpio a la
   esquina inferior derecha (bottom:24px right:24px) en vez del bottom:100px
   que compensaba el WhatsApp FAB que ya no existe.
*/
#volty-mascot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
#volty-mascot > * {
  pointer-events: auto;
}

/* T18-2 (2026-07-07): cuando #volty-mascot vive dentro de .vl-floating-stack
   (coexistencia Volty + WhatsApp), el stack ya maneja el anclado fijo. El
   mascot pasa a `relative` para que Volty quede abajo y el botón de
   WhatsApp arriba (column-reverse). */
.vl-floating-stack #volty-mascot {
  position: relative;
  bottom: auto;
  right: auto;
  z-index: auto;
  gap: 0.6rem;
}

.vl-volty-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(127, 217, 61, 0.18), rgba(27, 110, 194, 0.08));
  border: 2px solid rgba(127, 217, 61, 0.45);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(45, 191, 168, 0.30);
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms;
  outline: none;
  isolation: isolate;
}
.vl-volty-btn:hover,
.vl-volty-btn:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(127, 217, 61, 0.55);
}

.vl-volty-svg-host {
  width: 62px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vl-volty-svg-host svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Pulse: anillo que se expande para llamar la atencion */
.vl-volty-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(127, 217, 61, 0.55);
  pointer-events: none;
  z-index: -1;
  animation: vlVoltyPulse 2.4s ease-out infinite;
}
@keyframes vlVoltyPulse {
  0%   { transform: scale(1);   opacity: 0.75; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vl-volty-pulse { animation: none; }
}

/* Tooltip invitador */
.vl-volty-tooltip {
  position: relative;
  max-width: 260px;
  background: var(--vl-card, #0F2640);
  color: var(--vl-light, #F5F7FA);
  border: 1px solid var(--vl-border, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
  padding: 12px 36px 12px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}
.vl-volty-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.vl-volty-tooltip::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: var(--vl-card, #0F2640);
  border-right: 1px solid var(--vl-border, rgba(255, 255, 255, 0.12));
  border-bottom: 1px solid var(--vl-border, rgba(255, 255, 255, 0.12));
  transform: rotate(45deg);
}
.vl-volty-tooltip-msg {
  display: block;
}
.vl-volty-tooltip-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--vl-muted, #7B93B0);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 160ms, background 160ms;
}
.vl-volty-tooltip-close:hover {
  color: var(--vl-light, #F5F7FA);
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile: anclado a la esquina con padding 16px (vs 24px desktop). */
@media (max-width: 768px) {
  #volty-mascot {
    bottom: 16px !important;
    right: 16px !important;
  }
  .vl-volty-btn {
    width: 68px;
    height: 68px;
  }
  .vl-volty-svg-host {
    width: 52px;
    height: 60px;
  }
  .vl-volty-tooltip {
    max-width: 220px;
    font-size: 0.82rem;
  }
}

/* Media queries mobile-first ya incluidas arriba en [H] · breakpoints 768/1024 */


/* ─── [L] CONTRASTE ACCESIBLE WCAG AA · 2026-06-08 ─────────────────── */
/*
   Auditoría de contraste 2026-06-08 (sobre v6.10 en producción):
   - Calculadora ahorro: valor EV/mes #1B6EC2 sobre #132D47 = 2.6 (fail)
   - Calculadora labels: --vl-muted #7B93B0 sobre #132D47 = 4.39 (borderline)
   - Formulario: placeholders UA #757575 sobre input semitransparente = 2.97
   - Formulario: bordes rgba(255,255,255,0.09) = 1.31 (invisibles)
   - Sin estilos :focus-visible globales (a11y por teclado)

   Verificación ratios resultantes (texto / fondo real):
   - #2DBFA8 / #132D47 = 6.12 ✓ AAA (EV/mes value, edit inline en index.html)
   - #A9BDD2 / #132D47 = 7.13 ✓ AAA (label en savings-result-card)
   - #A9BDD2 / #0D2137 = 7.53 ✓ AAA (label slider en savings-section)
   - #9AADC2 / #182F48 = 5.95 ✓ AA  (placeholder en input semitransparente sobre card)
   - Borde rgba(255,255,255,0.22) sobre #0F2640 = visible (UI no-text, sin umbral 4.5)
*/

.savings-result-card .label,
.savings-label {
  color: #A9BDD2;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: #9AADC2;
  opacity: 1;
}

.field input,
.field select,
.field textarea,
.form-control {
  border-color: rgba(255, 255, 255, 0.22);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #2DBFA8;
  outline-offset: 2px;
}

/* Opciones de <select> legibles SIEMPRE (no solo en hover).
   FIX REAL 2026-06-08: Chrome/Windows ignora el color de fondo de <option>
   en el popup nativo y usa los colores del SO (texto claro sobre fondo
   claro = ilegible salvo la fila resaltada). La regla que SÍ funciona en
   el popup nativo es `color-scheme: dark` en el <select>: le indica al
   navegador que use la variante oscura del control nativo del SO.
   Las reglas option/optgroup se conservan como respaldo (Firefox y otros
   navegadores que sí respetan los estilos de <option>). */
select,
select:focus {
  color-scheme: dark;
}
select option,
select optgroup {
  background-color: #0F2640;
  color: #E8EEF5;
}

