/* Base común. Cada sitio define su marca en :root (--marca, --marca-osc, --marca-suave, --fuente-titulo…). */
:root {
  --fondo: #F4F7FB;
  --superficie: #FFFFFF;
  --tinta: #0E1726;
  --tinta-2: #475467;
  --tinta-3: #667085;
  --borde: #DCE3EC;
  --marca: #1D4ED8;
  --marca-osc: #1E3A8A;
  --marca-suave: #EAF0FD;
  --llamar: #0A8754;
  --llamar-osc: #076A41;
  --alerta: #B42318;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --fuente-titulo: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --fuente: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font-family: var(--fuente); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--fuente-titulo); line-height: 1.15; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--marca); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--marca) 45%, transparent); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }

/* Estructura */
.contenedor { width: 100%; max-width: 560px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.encabezado { background: var(--superficie); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 10; }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.02rem; color: var(--tinta); text-decoration: none; letter-spacing: -.01em; }
.logo-marca { width: 30px; height: 30px; border-radius: 9px; background: var(--marca); color: #fff; display: grid; place-items: center; }
.logo-marca svg { width: 18px; height: 18px; }
.sello { font-size: .74rem; font-weight: 600; color: var(--tinta-2); display: flex; align-items: center; gap: 6px; }
.sello::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--llamar); box-shadow: 0 0 0 3px color-mix(in srgb, var(--llamar) 20%, transparent); }
main { padding-block: 22px 40px; }

/* Barra de progreso */
.progreso { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.progreso-texto { font-size: .78rem; font-weight: 600; color: var(--tinta-3); letter-spacing: .02em; display: flex; justify-content: space-between; }
.barra { height: 6px; border-radius: 999px; background: var(--borde); overflow: hidden; }
.barra::after { content: ""; display: block; height: 100%; width: var(--p, 0%); background: var(--marca); border-radius: 999px; transition: width .45s cubic-bezier(.2,.8,.2,1); }

/* Paso */
.paso { animation: entra .35s cubic-bezier(.2,.8,.2,1); }
@keyframes entra { from { transform: translateY(8px); } to { transform: none; } }
.paso-titulo { font-size: clamp(1.55rem, 6vw, 1.95rem); font-weight: 800; }
.paso-sub { color: var(--tinta-2); margin-top: 8px; font-size: 1rem; }
.pila { display: flex; flex-direction: column; gap: 12px; }
.pila-g { display: flex; flex-direction: column; gap: 20px; }
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px; }

/* Opciones */
.opciones { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.opcion {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  background: var(--superficie); color: var(--tinta);
  border: 1.5px solid var(--borde); border-radius: 12px;
  padding: 16px 16px; font: inherit; font-weight: 600; font-size: 1.02rem;
  transition: border-color .15s, background .15s, transform .1s;
  min-height: 58px;
}
.opcion::before { content: ""; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid #B8C2D0; background: #fff; transition: all .15s; }
.opcion:hover { border-color: var(--marca); }
.opcion:active { transform: scale(.99); }
.opcion[aria-pressed="true"] { border-color: var(--marca); background: var(--marca-suave); }
.opcion[aria-pressed="true"]::before { border-color: var(--marca); background: var(--marca); box-shadow: inset 0 0 0 4px #fff; }
.opcion small { display: block; font-weight: 500; color: var(--tinta-3); font-size: .85rem; }
.opcion-icono { font-size: 1.4rem; line-height: 1; }

/* Select de año */
.campo { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.campo label { font-weight: 700; font-size: .95rem; }
.select {
  appearance: none; width: 100%; font: inherit; font-size: 1.15rem; font-weight: 600; color: var(--tinta);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23475467' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1.5px solid #B8C2D0; border-radius: 12px; padding: 15px 44px 15px 16px; min-height: 58px; cursor: pointer;
}
.select:focus { border-color: var(--marca); outline: none; box-shadow: 0 0 0 4px var(--marca-suave); }
.ayuda { font-size: .85rem; color: var(--tinta-3); }
.error-campo { font-size: .88rem; color: var(--alerta); font-weight: 600; }

/* Botones */
.boton {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.1rem;
  background: var(--marca); color: #fff; border-radius: 12px; padding: 17px 20px; min-height: 58px;
  text-decoration: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--marca) 30%, transparent);
  transition: transform .1s, background .15s;
}
.boton:hover { background: var(--marca-osc); }
.boton:active { transform: scale(.985); }
.boton[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.boton-secundario { background: transparent; color: var(--tinta-2); box-shadow: none; font-weight: 600; font-size: .95rem; min-height: 44px; padding: 10px; }
.boton-secundario:hover { background: transparent; color: var(--tinta); }
.atras { appearance: none; border: 0; background: none; color: var(--tinta-3); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; padding: 6px 0; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 6px; }

/* Llamar */
.boton-llamar {
  appearance: none; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  background: var(--llamar); color: #fff; text-decoration: none; border-radius: 14px; padding: 16px 18px; min-height: 66px;
  font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--llamar) 35%, transparent);
  position: relative; overflow: hidden; transition: transform .1s, background .15s;
}
.boton-llamar:hover { background: var(--llamar-osc); }
.boton-llamar:active { transform: scale(.985); }
.boton-llamar[aria-disabled="true"] { background: #98A2B3; box-shadow: none; pointer-events: none; }
.boton-llamar .sub { display: block; font-family: var(--fuente); font-weight: 500; font-size: .82rem; opacity: .92; letter-spacing: 0; }
.boton-llamar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-100%); animation: brillo 3.2s ease-in-out infinite 1s; }
@keyframes brillo { 0% { transform: translateX(-100%); } 40%, 100% { transform: translateX(100%); } }
.tel-numero { font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.45rem; text-align: center; letter-spacing: .01em; user-select: all; font-variant-numeric: tabular-nums; }
.horario, .aviso-horario { font-size: .88rem; color: var(--tinta-2); text-align: center; }
.aviso-horario { color: var(--alerta); font-weight: 600; }
.en-linea { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--llamar); }
.en-linea::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--llamar); animation: pulso 1.8s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--llamar) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.barra-llamar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--borde); padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.barra-llamar .boton-llamar { max-width: 560px; margin: 0 auto; min-height: 56px; font-size: 1.08rem; }

/* Verificando */
.cargando { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding-block: 48px 24px; }
.rueda { width: 64px; height: 64px; border-radius: 50%; border: 6px solid var(--marca-suave); border-top-color: var(--marca); animation: gira .9s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; max-width: 330px; }
.checks li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--tinta-3); transition: color .3s; }
.checks li::before { content: ""; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borde); transition: all .3s; }
.checks li.ok { color: var(--tinta); }
.checks li.ok::before { border-color: var(--llamar); background: var(--llamar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat center; }

/* Confianza */
.confianza { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; }
.confianza span { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--tinta-2); }
.confianza svg { width: 16px; height: 16px; color: var(--llamar); flex: 0 0 16px; }
.pasos-llamada { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: p; }
.pasos-llamada li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--tinta-2); counter-increment: p; }
.pasos-llamada li::before { content: counter(p); flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--marca-suave); color: var(--marca); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.pasos-llamada b { color: var(--tinta); }

/* Salida */
.salida { text-align: center; padding-block: 40px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.salida-icono { width: 64px; height: 64px; border-radius: 50%; background: var(--marca-suave); color: var(--marca); display: grid; place-items: center; }

/* Pie */
.pie { border-top: 1px solid var(--borde); background: var(--superficie); padding-block: 22px 28px; font-size: .78rem; color: var(--tinta-3); }
.pie .contenedor { display: flex; flex-direction: column; gap: 10px; }
.pie a { color: var(--tinta-2); }

.aviso-red { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: .9rem; z-index: 50; max-width: calc(100% - 32px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Logo: ícono + nombre en dos líneas ---------- */
.logo { gap: 10px; min-width: 0; }
.logo-marca { width: 38px; height: 38px; border-radius: 11px; background: none; flex: 0 0 38px; box-shadow: 0 2px 6px rgba(16, 24, 40, .14); }
.logo-marca svg { width: 38px; height: 38px; }
.logo-txt { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.logo-txt b { font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.12rem; letter-spacing: -.025em; color: var(--tinta); white-space: nowrap; }
.logo-txt small { font-family: var(--fuente); font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--marca); margin-top: 4px; white-space: nowrap; }

/* ---------- Encabezado: asesores en línea ---------- */
.sello { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--borde); border-radius: 999px; background: var(--superficie); font-size: inherit; flex: 0 0 auto; }
.sello::before { content: none; }
.sello-ic { position: relative; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--llamar) 13%, #fff); color: var(--llamar); display: grid; place-items: center; flex: 0 0 30px; }
.sello-ic svg { width: 15px; height: 15px; }
.sello-ic::after { content: ""; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--llamar); border: 2px solid var(--superficie); animation: pulso 2s infinite; }
.sello-txt { display: flex; flex-direction: column; line-height: 1.15; }
.sello-txt b { font-size: .74rem; font-weight: 700; color: var(--tinta); white-space: nowrap; }
.sello-txt small { font-size: .64rem; font-weight: 500; color: var(--tinta-3); white-space: nowrap; }
@media (max-width: 400px) {
  .sello { padding-right: 10px; }
  .sello-txt small { display: none; }
  .sello-txt b { font-size: .7rem; }
  .logo-txt b { font-size: 1.02rem; }
}

/* ---------- El pie siempre abajo, el contenido llena el alto ---------- */
body:has(> footer.pie) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> footer.pie) > main { flex: 1 0 auto; display: flex; flex-direction: column; }
body:has(> footer.pie) > main > .contenedor { flex: 1 0 auto; display: flex; flex-direction: column; }

/* ---------- Franja de confianza (la agrega core.js al final del contenido) ---------- */
.garantias { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.garantias ul { list-style: none; margin: 0; padding: 14px 6px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.garantias li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.garantias li > span:first-child { width: 34px; height: 34px; border-radius: 10px; background: var(--marca-suave); color: var(--marca); display: grid; place-items: center; }
.garantias li svg { width: 18px; height: 18px; }
.garantias b { display: block; font-size: .76rem; font-weight: 700; color: var(--tinta); line-height: 1.2; }
.garantias small { display: block; font-size: .68rem; color: var(--tinta-3); line-height: 1.25; margin-top: 2px; }
.garantias-nota { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .74rem; color: var(--tinta-3); text-align: center; }
.garantias-nota svg { width: 13px; height: 13px; flex: 0 0 13px; color: var(--llamar); }

/* ---------- Pie legal: pequeño y discreto ---------- */
.pie { padding-block: 14px 18px; font-size: .68rem; line-height: 1.45; color: var(--tinta-3); }
.pie .contenedor { gap: 6px; }
.pie b { font-weight: 600; color: var(--tinta-2); }

/* El número visible también llama */
.tel-enlace { color: inherit; text-decoration: none; cursor: pointer; }
.tel-enlace:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Foto de la asesora como avatar del especialista (misma en todos los funnels) */
.esp-avatar.con-foto { position: relative; width: 60px; height: 60px; flex: 0 0 60px; padding: 0; border-radius: 50%; background: var(--marca-suave); box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--marca) 22%, transparent); }
.esp-avatar.con-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.esp-en-linea { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--llamar); border: 2.5px solid #fff; }
.esp-cab:has(.con-foto) .en-linea::before, .tl-cab:has(.con-foto) .punto-vivo { display: none; }

/* Pantalla de llamar: solo la tarjeta del botón es tarjeta; lo demás va integrado al fondo */
[data-paso="llamar"] .tarjeta:not(:has(.boton-llamar)) { background: transparent; border-color: transparent; box-shadow: none; padding-inline: 4px; }
