/* ============================================================================
   Calculadora informativa de asesorías — OPAMSS
   Hoja de estilos única. Tokens tomados del design system del portal
   (src/Asesorias.Web/wwwroot/css/design-system/tokens.css) para conservar la marca.

   Estructura: base · barra institucional · encabezado · hero · calculadora
               (panel de selección + panel pegajoso de cantidad/resultado) ·
               requisitos · secciones informativas · barra móvil · pie.
   ============================================================================ */

:root {
  /* Marca */
  --primary:        #00167B;
  --primary-dark:   #000F54;
  --primary-light:  #1A3BA0;
  --primary-subtle: #E8ECFA;
  --accent:         #35D32F;
  --accent-dark:    #28A623;
  --accent-subtle:  #E8FBE7;

  /* Superficies y texto */
  --bg:            #F4F6FA;
  --surface:       #FFFFFF;
  --surface-alt:   #F8F9FC;
  --text:          #1E2A3A;
  --text-muted:    #6B7A99;
  --text-subtle:   #94A3B8;
  --border:        #E2E8F0;
  --border-strong: #CBD5E1;
  --danger:        #DC2626;

  --font: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  --sh-sm: 0 1px 3px rgba(0, 22, 123, .06), 0 1px 6px rgba(0, 22, 123, .04);
  --sh-md: 0 4px 14px rgba(0, 22, 123, .08), 0 2px 4px rgba(0, 22, 123, .04);
  --sh-lg: 0 16px 40px rgba(0, 22, 123, .14), 0 6px 14px rgba(0, 22, 123, .07);

  --wrap: 1180px;
  --header-h: 64px;
}

/* ══ Base ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }

:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; border-radius: 4px; }

/* ══ Barras de desplazamiento internas ═════════════════════════════════
   Dos variantes: sobre fondo claro (lista de servicios) y sobre el azul
   (tarjeta de resultado). Firefox usa scrollbar-width/-color; los navegadores
   Chromium/WebKit, los pseudo-elementos. El "borde" transparente con
   background-clip deja aire entre el pulgar y el borde del contenedor.
   ══════════════════════════════════════════════════════════════════════ */
.lista, .res { scrollbar-width: thin; }
/* Solo la lista reserva el canal: al filtrar cambia de alto a cada rato y así no salta. */
.lista { scrollbar-gutter: stable; scrollbar-color: var(--border-strong) transparent; }
.res   { scrollbar-color: rgba(255, 255, 255, .38) transparent; }

.lista::-webkit-scrollbar,
.res::-webkit-scrollbar { width: 12px; }

.lista::-webkit-scrollbar-track,
.res::-webkit-scrollbar-track { background: transparent; }

.lista::-webkit-scrollbar-thumb,
.res::-webkit-scrollbar-thumb {
  border: 4px solid transparent; background-clip: content-box;
  border-radius: var(--r-full);
  transition: background-color .15s ease;
}
.lista::-webkit-scrollbar-thumb { background-color: var(--border-strong); }
.lista:hover::-webkit-scrollbar-thumb { background-color: var(--text-subtle); }
.lista::-webkit-scrollbar-thumb:hover { background-color: var(--primary-light); }

.res::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .28); }
.res:hover::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .42); }
.res::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }

/* Cifras de dinero y áreas con ancho fijo: no "bailan" al teclear. */
.res__monto, .res__row b, .barra__monto, .tramo__valor, .res__campo input {
  font-variant-numeric: tabular-nums;
}

/* El atributo hidden debe ganarle a los display: flex/grid de los componentes. */
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; }

.eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 5px;
}

/* Salto al contenido (accesibilidad de teclado) */
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 900;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700;
}
.skip:focus { left: 16px; }

.noscript {
  margin: 20px 0; padding: 14px 18px; border-radius: var(--r-md);
  background: #FFFBEB; border: 1px solid #FCD34D; color: #B45309; font-weight: 600;
}

/* ══ Franja institucional ═══════════════════════════════════════════════
   Degradado verde → azul de izquierda a derecha. Los dos logotipos son PNG
   blancos con transparencia, así que solo se ven sobre este fondo oscuro.
   ══════════════════════════════════════════════════════════════════════ */
.franja {
  background: linear-gradient(90deg,
    #35D32F 0%, #22AC36 5%, #0B5390 13%, #00187F 24%, #0B2CAC 62%, #000F54 100%);
}
/* Alineada con el contenedor del resto de la página (los logotipos quedan a plomo
   con el logo del encabezado y la calculadora). El hueco elástico va en la primera
   columna: así el lema queda siempre junto a los sellos AENOR, a un paso fijo. */
.franja__in {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center;
  row-gap: 10px; column-gap: 40px;
  min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
.franja__transparencia { justify-self: start; display: block; }
.franja__transparencia img { height: 34px; width: auto; display: block; transition: opacity .15s ease; }
.franja__transparencia:hover img { opacity: .82; }
.franja__lema {
  font-size: 15px; font-weight: 700; color: var(--accent);
  text-align: center; line-height: 1.25;
}
.franja__lema a:hover { color: #fff; }
.franja__cert { height: 42px; width: auto; justify-self: end; }

/* ══ Encabezado ═════════════════════════════════════════════════════════ */
.header { position: sticky; top: 0; z-index: 300; background: var(--surface); border-bottom: 1px solid var(--border); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand img { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 13px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--surface-alt); color: var(--primary); }
.nav a.is-current { background: var(--primary-subtle); color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; box-shadow: var(--sh-md); }

.burger { display: none; background: none; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px; color: var(--primary); }

/* ══ Hero ═══════════════════════════════════════════════════════════════ */
.hero {
  background:
    radial-gradient(900px 340px at 80% -20%, rgba(53, 211, 47, .16), transparent 60%),
    linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 52%, var(--primary-dark) 100%);
  color: #fff; padding: 30px 0 64px;
}
.hero__in { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(268px, 372px); gap: 20px 44px; align-items: start; }
.crumbs { font-size: 12.5px; color: rgba(255, 255, 255, .6); margin-bottom: 18px; }
.crumbs span { margin: 0 6px; }
.hero__eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hero__title { font-size: clamp(30px, 4.2vw, 44px); font-weight: 800; line-height: 1.06; letter-spacing: -.02em; }
.hero__lead { margin-top: 14px; max-width: 64ch; font-size: 15px; color: rgba(255, 255, 255, .78); }

/* Tarjeta del Diario Oficial que respalda el tarifario (descarga directa). */
.doc {
  display: block; margin-top: 42px; padding: 18px 20px 16px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--r-lg);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.doc:hover { background: rgba(255, 255, 255, .16); border-color: var(--accent); transform: translateY(-2px); }
.doc__tag {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.doc__title { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.doc__meta { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .72); }
.doc__cta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px; font-weight: 700; color: var(--accent);
}
.doc__cta b { font-weight: 400; color: rgba(255, 255, 255, .45); }
.doc:hover .doc__cta { color: #fff; }

/* ══ Calculadora ════════════════════════════════════════════════════════ */
.main { padding-bottom: 64px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; margin-top: -40px; }

/* ── Panel de selección ── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: 24px 26px 26px;
}
.panel__head { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.panel__title { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.panel__sub { margin-top: 6px; font-size: 13.5px; color: var(--text-muted); }

.paso { padding-top: 18px; }
.paso__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.paso__label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-subtle); margin-bottom: 9px;
}
.conteo { font-size: 12px; color: var(--text-muted); margin-bottom: 9px; }

/* Buscador */
.buscador { position: relative; }
.buscador__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); }
.buscador input {
  width: 100%; height: 44px; padding: 0 14px 0 42px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); font-size: 14px; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.buscador input::placeholder { color: var(--text-subtle); }
.buscador input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 22, 123, .13); }
.buscador input::-webkit-search-cancel-button { cursor: pointer; }

/* Chips de grupo */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 12.5px; font-weight: 600; transition: all .15s ease;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip__n { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-full); background: var(--surface-alt); color: var(--text-muted); }
.chip.is-active .chip__n { background: rgba(255, 255, 255, .22); color: #fff; }

/* Lista de servicios: altura acotada, con desplazamiento propio.
   Es la clave para que el paso 3 (cantidad) no quede fuera de pantalla. */
.lista {
  max-height: 340px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 6px;
  /* Sombras de desplazamiento: se asoman solo cuando queda contenido arriba o abajo
     (las capas "local" tapan a las "scroll" en los extremos). */
  background:
    linear-gradient(var(--surface-alt) 30%, rgba(248, 249, 252, 0)) top    / 100% 26px local no-repeat,
    linear-gradient(rgba(248, 249, 252, 0), var(--surface-alt) 70%) bottom / 100% 26px local no-repeat,
    radial-gradient(farthest-side at 50% 0,   rgba(0, 22, 123, .16), rgba(0, 22, 123, 0)) top    / 100% 12px scroll no-repeat,
    radial-gradient(farthest-side at 50% 100%, rgba(0, 22, 123, .16), rgba(0, 22, 123, 0)) bottom / 100% 12px scroll no-repeat,
    var(--surface-alt);
}
.lista:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 1px; }
/* Solo cuando la lista realmente tiene contenido oculto se evita que la rueda
   arrastre la página al llegar a su final (la clase la pone el JS). */
.lista.is-desplazable { overscroll-behavior: contain; }

.lista__head {
  position: sticky; top: -6px; z-index: 1;
  margin: 6px 0 4px; padding: 6px 8px;
  background: var(--surface-alt);
  font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted);
}
.lista__head:first-child { margin-top: 0; }
.lista__vacio { padding: 26px 14px; text-align: center; font-size: 13.5px; color: var(--text-muted); }

.svc {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; margin-bottom: 4px; text-align: left;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-sm);
  transition: background-color .12s ease, border-color .12s ease;
}
.svc:last-child { margin-bottom: 0; }
.svc:hover { border-color: var(--primary-light); }
.svc[aria-selected="true"] { background: var(--accent-subtle); border-color: var(--accent-dark); }
.svc__mark {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--surface-alt); color: transparent; border: 1px solid var(--border-strong);
}
.svc__mark .ico { width: 13px; height: 13px; }
.svc[aria-selected="true"] .svc__mark { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.svc__body { min-width: 0; }
.svc__name { display: block; font-size: 13.5px; font-weight: 700; color: var(--primary); line-height: 1.35; }
.svc__desc { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.svc__grupo { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700; color: var(--primary-light); }

/* ══ Panel pegajoso: cantidad + resultado ═══════════════════════════════ */
.lateral { display: grid; gap: 14px; }
.sticky { position: sticky; top: calc(var(--header-h) + 12px); }

/* La tarjeta se desplaza por dentro cuando su contenido supera el alto de la ventana
   (p. ej. con la base del cálculo desplegada): así la barra queda DENTRO del azul. */
.res {
  background: linear-gradient(165deg, var(--primary-light) 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  /* Se aprovecha casi todo el alto de la ventana antes de recurrir al scroll interno.
     dvh evita que la barra del navegador móvil recorte de más (vh queda de respaldo). */
  max-height: calc(100vh - var(--header-h) - 24px);
  max-height: calc(100dvh - var(--header-h) - 24px);
  /* Sin overscroll-behavior: si la tarjeta no tiene nada que desplazar (o ya llegó
     al final), la rueda debe seguir moviendo la página, no quedarse atrapada. */
  overflow: hidden auto;
}

/* El campo de cantidad queda fijo arriba mientras se desplaza el resto de la tarjeta. */
.res__form {
  position: sticky; top: 0; z-index: 2;
  padding: 17px 20px 15px; border-bottom: 1px solid rgba(255, 255, 255, .16);
  background: var(--primary-light);
  box-shadow: 0 8px 16px -8px rgba(0, 8, 46, .55);
}
.res__label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.res__svc { margin-top: 6px; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: rgba(255, 255, 255, .92); }
.res__svc .res__clave { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-full); background: rgba(255, 255, 255, .18); font-size: 10.5px; font-weight: 700; vertical-align: middle; }
.res__svc--off { color: rgba(255, 255, 255, .55); font-weight: 400; }

.res__campo { position: relative; margin-top: 10px; }
.res__campo input {
  width: 100%; height: 48px; padding: 0 62px 0 14px;
  border: 1px solid transparent; border-radius: var(--r-md);
  background: #fff; color: var(--text); font-size: 20px; font-weight: 800;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.res__campo input::placeholder { color: var(--text-subtle); font-weight: 600; }
.res__campo input:focus { outline: none; box-shadow: 0 0 0 3px rgba(53, 211, 47, .5); }
.res__campo input:disabled { background: rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .7); cursor: not-allowed; }
.res__campo input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .35); }
.res__unidad {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 700; color: var(--text-muted); pointer-events: none;
}

.atajos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.atajo {
  padding: 5px 11px; border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .07);
  font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .88);
  transition: background-color .15s ease, border-color .15s ease;
}
.atajo:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }

.res__hint { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: rgba(255, 255, 255, .62); }
.res__error {
  display: flex; gap: 7px; align-items: flex-start; margin-top: 9px;
  padding: 9px 11px; border-radius: var(--r-sm);
  background: rgba(220, 38, 38, .22); border: 1px solid rgba(255, 255, 255, .3);
  font-size: 12px; font-weight: 600; color: #fff;
}

/* Bloque de salida (monto + desglose) */
.res__out { padding: 16px 20px 18px; }
.res__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.res__monto { font-size: 37px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-top: 2px; }
.res__monto--off { color: rgba(255, 255, 255, .32); }
.res__espera { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .62); }

.res__rows { margin-top: 12px; display: grid; gap: 1px; }
.res__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 11px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .07); font-size: 12.5px; color: rgba(255, 255, 255, .78);
}
.res__row b { color: #fff; font-weight: 700; white-space: nowrap; }
.res__row--total {
  margin-top: 5px; background: rgba(53, 211, 47, .18); border: 1px solid rgba(53, 211, 47, .4);
  font-size: 13.5px; color: #fff;
}
.res__row--total b { font-size: 16px; }

.res__aviso {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .1); font-size: 12px; color: rgba(255, 255, 255, .88);
}
.res__legal { margin-top: 10px; font-size: 11px; line-height: 1.45; color: rgba(255, 255, 255, .55); }

/* Desplegable "base del cálculo", dentro de la propia tarjeta de resultado */
.res__mas { border-top: 1px solid rgba(255, 255, 255, .14); }
.detalle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 12px 20px; border: 0; background: transparent;
  font-size: 12.5px; font-weight: 700; color: #fff; text-align: left;
  transition: background-color .15s ease;
}
.detalle:hover { background: rgba(255, 255, 255, .08); }
.detalle .ico { transition: transform .18s ease; color: var(--accent); }
.detalle[aria-expanded="true"] .ico { transform: rotate(180deg); }

.base { padding: 0 20px 18px; }
.base__title { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.base .formula {
  margin-top: 8px; padding: 9px 11px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.45;
}
.base__meta { margin-top: 8px; font-size: 11.5px; color: rgba(255, 255, 255, .62); line-height: 1.45; }
.base .tramos { margin-top: 10px; display: grid; gap: 4px; }
.base .tramo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 11px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: rgba(255, 255, 255, .07); font-size: 11.5px; color: rgba(255, 255, 255, .72);
}
.base .tramo.is-active { background: rgba(53, 211, 47, .18); border-color: rgba(53, 211, 47, .42); color: #fff; font-weight: 600; }
.base .tramo__valor { font-weight: 700; color: #fff; white-space: nowrap; }
.base__nota { display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; font-size: 11.5px; color: rgba(255, 255, 255, .7); line-height: 1.5; }
.base__nota .ico { margin-top: 2px; color: var(--accent); }
.base__alcance { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 11.5px; color: rgba(255, 255, 255, .7); line-height: 1.55; }

/* ══ Tarjetas ═══════════════════════════════════════════════════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-sm); }
.card__title { font-size: 14.5px; font-weight: 800; color: var(--primary); }
.card__text { margin-top: 8px; font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ══ Requisitos ═════════════════════════════════════════════════════════ */
.req { margin-top: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 24px 26px 26px; box-shadow: var(--sh-sm); }
.req__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.section__title { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -.01em; }
.req__tags { display: flex; gap: 7px; }
.tag { padding: 4px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }
.tag--blue { background: var(--primary-subtle); color: var(--primary); border-color: #ADBAF0; }

.req-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px 32px; }
.req-col__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--border); font-size: 12.5px; font-weight: 700; }
.req-col__badge { padding: 2px 8px; border-radius: var(--r-full); background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; }

.req-list { display: grid; gap: 3px; }
.req-list li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; line-height: 1.45; }
.req-list li .ico { margin-top: 2px; width: 15px; height: 15px; color: var(--accent-dark); }
.req-list li.is-opcional { color: var(--text-muted); }
.req-list li.is-opcional .ico { color: var(--text-subtle); }
.req-list li i { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-subtle); }
.req-list--flat { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); column-gap: 32px; }

/* ══ Secciones informativas ═════════════════════════════════════════════ */
.section { margin-top: 48px; }
.section > .section__title { margin-bottom: 18px; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.card--feature { padding: 22px; }
.feature__ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--primary-subtle); color: var(--primary); }
.feature__ico .ico { width: 20px; height: 20px; }

.faq { display: grid; gap: 9px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.faq details[open] { border-color: var(--primary-light); box-shadow: var(--sh-sm); }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--primary); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 19px; font-weight: 400; color: var(--text-subtle); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 9px; font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }
/* La regla base deja los enlaces sin color ni subrayado: dentro del FAQ el correo
   tiene que leerse como enlace. */
.faq p a { color: var(--primary-light); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.faq p a:hover { color: var(--primary); }

/* ══ Barra resumen móvil ════════════════════════════════════════════════ */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 250;
  background: var(--primary-dark); color: #fff;
  border-top: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 -6px 24px rgba(0, 15, 84, .28);
  padding: 10px 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.barra__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.barra__lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.barra__monto { font-size: 22px; font-weight: 800; line-height: 1.1; }
.barra .btn--primary { background: rgba(255, 255, 255, .16); }
.barra .btn--primary:hover { background: rgba(255, 255, 255, .28); }
/* Se esconde cuando la tarjeta de resultado ya está a la vista (evita duplicar el monto). */
.barra.is-oculta { transform: translateY(110%); pointer-events: none; }
.barra { transition: transform .2s ease; }
@media (min-width: 1025px) { .barra { display: none !important; } }

/* ══ Pie ════════════════════════════════════════════════════════════════
   Mismo lenguaje que la franja superior: degradado verde → azul, con un halo
   verde suave a la izquierda. Texto de contacto en verde, como en la marca.
   ══════════════════════════════════════════════════════════════════════ */
.footer {
  color: #fff; padding-top: 34px;
  background:
    radial-gradient(460px 320px at 2% 50%, rgba(53, 211, 47, .26), transparent 60%),
    linear-gradient(96deg, #35D32F 0%, #1E9F3B 5%, #0B5390 18%, #001A8C 56%, #000F54 100%);
}

/* Fila superior: secciones + redes */
.footer__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px 32px; flex-wrap: wrap; padding-bottom: 44px;
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer__nav a { font-size: 15.5px; font-weight: 700; }
.footer__nav a:hover { color: var(--accent); }

.footer__social { display: flex; align-items: center; gap: 8px; }
.footer__social a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--r-full); color: var(--accent);
  transition: background-color .15s ease, color .15s ease;
}
.footer__social a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.footer__social .ico { width: 22px; height: 22px; }

/* Cuerpo: contacto + tira de marca */
.footer__body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 48px; align-items: center; padding-bottom: 38px;
}
.footer__h { font-size: 18.5px; font-weight: 700; margin-bottom: 24px; }
/* Texto en blanco; solo los iconos toman el verde de la marca. */
.contacto { display: grid; gap: 18px; max-width: 56ch; }
.contacto li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 14.5px; line-height: 1.5; color: #fff;
}
.contacto .ico { width: 19px; height: 19px; margin-top: 2px; color: var(--accent); }
.contacto a { color: #fff; }
.contacto a:hover { color: var(--accent); }
.footer__marca { height: 148px; width: auto; justify-self: end; }

/* Fila inferior: dos mitades centradas + botón de volver arriba */
.footer__legal {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 12px 24px;
  padding-top: 22px; padding-bottom: 26px;
}
.footer__copy, .footer__priv { text-align: center; font-size: 14px; font-weight: 700; color: #fff; }
.footer__priv a:hover { color: var(--accent); }
.footer__arriba {
  position: absolute; right: 0; bottom: 18px;
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r-sm); background: var(--accent); color: var(--primary);
  transition: background-color .15s ease, transform .15s ease;
}
.footer__arriba:hover { background: #fff; transform: translateY(-2px); }

/* ══ Responsivo ═════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__in { grid-template-columns: 1fr; gap: 22px; }
  .doc { margin-top: 4px; max-width: 430px; }
  .calc { grid-template-columns: 1fr; }
  .sticky { position: static; }
  /* En una sola columna la tarjeta fluye con la página: sin scroll interno. */
  .res { max-height: none; overflow: visible; }
  .res__form { position: static; background: transparent; }
  .main { padding-bottom: 40px; }
  .footer { padding-bottom: 78px; }   /* espacio para la barra fija */
  .lista { max-height: 300px; }
}

@media (max-width: 820px) {
  .burger { display: inline-grid; place-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 3px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 24px 18px; box-shadow: var(--sh-md);
  }
  .nav.is-open { display: flex; }
  .header__in { position: relative; }
  /* El lema no cabe entre los dos logotipos: pasa a una segunda línea centrada. */
  .franja__in { grid-template-columns: auto auto; justify-content: space-between; gap: 10px 20px; }
  .franja__lema { grid-column: 1 / -1; grid-row: 2; font-size: 13.5px; }
  .franja__transparencia img { height: 30px; }
  .franja__cert { height: 36px; }
  .panel, .req { padding: 20px 18px 22px; border-radius: var(--r-lg); }
  .hero { padding: 22px 0 52px; }
  .res__monto { font-size: 34px; }
  /* Pie en una columna: la tira de marca pasa debajo del contacto. */
  .footer__body { grid-template-columns: 1fr; gap: 28px; padding-bottom: 30px; }
  .footer__marca { height: 118px; justify-self: start; }
  .footer__top { gap: 16px; padding-bottom: 32px; }
  .footer__legal { grid-template-columns: 1fr; justify-items: center; padding-bottom: 62px; }
  .footer__arriba { right: 50%; bottom: 14px; transform: translateX(50%); }
  .footer__arriba:hover { transform: translateX(50%) translateY(-2px); }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .franja__transparencia img { height: 26px; }
  .franja__cert { height: 30px; }
  .franja__lema { font-size: 12.5px; }
  .footer__marca { height: 96px; }
  .footer__nav a { font-size: 13.5px; }
  .barra__monto { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ══ Impresión ══════════════════════════════════════════════════════════ */
@media print {
  .franja, .header, .hero, .barra, .footer, .chips, .buscador, .atajos, .detalle, .section { display: none !important; }
  body { background: #fff; }
  .calc { display: block; margin: 0; }
  .res { background: #fff !important; color: #000; box-shadow: none; border: 1px solid #999; }
  .res__monto, .res__row b, .res__svc { color: #000 !important; }
  .res__row { background: #f2f2f2; color: #000; }
}
