/* ═══════════════════════════════════════════════════════════════
   SEGURIDAD VIAL ARGENTINA - style.css
   Paleta moderna, tipografía Google Fonts, layout en columnas,
   navbar de vidrio, hero animado, modo oscuro y responsive.
   Incluye la sección de ESTUDIO (fichas, glosario, errores) y los
   controles del cuestionario (chips de tema y modo).
   ═══════════════════════════════════════════════════════════════ */

/* ── 0. VARIABLES Y TEMA ─────────────────────────────────────────
   Colores centralizados; body.tema-oscuro los redefine. */
:root {
  --navy: #12224a; --navy-2: #1d3557; --blue: #2f5fd0;
  --teal: #14b8a6; --teal-osc: #0e9c8c; --rojo: #ef4444; --ambar: #f59e0b;
  --bg: #eef2f7; --surface: #ffffff; --surface-alt: #f5f8fc;
  --ink: #0f172a; --muted: #5b6b83; --line: #e3e9f1;
  --shadow: 0 12px 32px rgba(18, 34, 74, 0.10);
  --shadow-sm: 0 4px 12px rgba(18, 34, 74, 0.08);
  --navy-texto: #1d3557;
  --grad-primario: linear-gradient(100deg, #14b8a6, #2f5fd0);
}
body.tema-oscuro {
  --bg: #0b1220; --surface: #131c2c; --surface-alt: #182335;
  --ink: #e6edf6; --muted: #9fb0c8; --line: #243349;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --navy-texto: #9ec5e8;
}

/* ── 1. BASE ───────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  overflow-x: hidden; transition: background 0.4s ease, color 0.4s ease;
}
h1, h2, h3, h4, .clase-letra, .stat-num { font-family: "Outfit", Arial, sans-serif; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
::selection { background: rgba(20, 184, 166, 0.35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--teal), var(--navy)); border-radius: 6px; }

/* Foco visible para navegar con teclado (accesibilidad). */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* Respeta "reducir movimiento" del sistema: apaga shimmer, blobs,
   marquee, parallax, reveals y latidos en toda la página. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .hero-tipografia { animation: none; background: none; -webkit-text-fill-color: currentColor; }
  .reveal, .reveal-izq, .reveal-der, .reveal-zoom { opacity: 1; transform: none; }
}

/* ── 2. PRECARGA ───────────────────────────────────────────────── */
#precarga {
  position: fixed; inset: 0; background: var(--navy); z-index: 20000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; color: #fff; font-family: "Outfit", Arial, sans-serif;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#precarga.oculta { opacity: 0; visibility: hidden; pointer-events: none; }
.precarga-semaforo { background: #0a0a0a; border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.precarga-luz { width: 26px; height: 26px; border-radius: 50%; background: #222; animation: precargaLuz 2.4s infinite; }
.precarga-luz:nth-child(2) { animation-delay: 0.8s; }
.precarga-luz:nth-child(3) { animation-delay: 1.6s; }
@keyframes precargaLuz {
  0%, 20% { background: #ef4444; box-shadow: 0 0 18px #ef4444; }
  30%, 100% { background: #222; box-shadow: none; }
}
#precarga p { letter-spacing: 2px; text-transform: uppercase; font-size: 13px; opacity: 0.8; }

/* ── 3. BARRA DE PROGRESO DE LECTURA ───────────────────────────── */
.barra-progreso {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--blue)); z-index: 15000;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.7);
}

/* ── 4. NAVBAR DE VIDRIO ───────────────────────────────────────── */
.nav {
  position: fixed; top: 4px; left: 0; right: 0; z-index: 9000;
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); transition: background 0.3s ease, box-shadow 0.3s ease;
}
body.tema-oscuro .nav { background: rgba(13, 20, 34, 0.78); }
.nav.escurecida { box-shadow: 0 6px 22px rgba(18, 34, 74, 0.14); }
.nav-container { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: flex-start; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: "Outfit", Arial, sans-serif; font-weight: 800; font-size: 20px; color: var(--ink); flex-shrink: 0; }
.nav-logo-icono { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--grad-primario); color: #fff; font-size: 18px; box-shadow: 0 6px 14px rgba(20, 184, 166, 0.4); }
.nav-logo-acento { color: var(--teal); }
.nav-enlaces { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; margin-left: 12px; }
.nav-link { padding: 8px 11px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color 0.2s ease, background 0.2s ease; }
.nav-link:hover { color: var(--ink); background: var(--surface-alt); }
.nav-link.activa { color: #fff; background: var(--grad-primario); box-shadow: 0 5px 14px rgba(20, 184, 166, 0.4); }
.nav-acciones { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }
.icono-boton {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer;
  display: grid; place-items: center; transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.icono-boton:hover { transform: translateY(-3px) rotate(8deg); box-shadow: var(--shadow-sm); background: var(--grad-primario); color: #fff; border-color: transparent; }
#btnArriba { position: fixed; right: 22px; bottom: 22px; z-index: 8000; width: 48px; height: 48px; font-size: 20px; opacity: 0; pointer-events: none; transform: translateY(12px); }
#btnArriba.visible { opacity: 1; pointer-events: auto; transform: none; }

/* ── 5. HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 96vh; display: flex; align-items: center; padding: 120px 24px 80px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(47, 95, 208, 0.45), transparent 60%),
    radial-gradient(700px 420px at 8% 110%, rgba(20, 184, 166, 0.35), transparent 60%),
    linear-gradient(160deg, #0c1830, #12224a 55%, #0e1f3f);
  overflow: hidden; color: #fff;
}
.hero-fondo { position: absolute; inset: 0; pointer-events: none; }
.hero-fondo::before, .hero-fondo::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.hero-fondo::before { width: 420px; height: 420px; left: -80px; top: 20%; background: rgba(20, 184, 166, 0.5); animation: blobA 9s ease-in-out infinite alternate; }
.hero-fondo::after { width: 360px; height: 360px; right: -60px; bottom: 5%; background: rgba(239, 68, 68, 0.35); animation: blobB 11s ease-in-out infinite alternate; }
@keyframes blobA { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, -40px) scale(1.2); } }
@keyframes blobB { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-70px, 50px) scale(0.9); } }
.hero-grid { position: relative; max-width: 1240px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-badge { display: inline-block; padding: 7px 15px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); font-size: 13px; font-weight: 600; letter-spacing: 0.4px; margin-bottom: 18px; }
.hero-titulo { font-size: clamp(38px, 6vw, 64px); line-height: 1.08; font-weight: 900; margin-bottom: 18px; }
.hero-tipografia { background: linear-gradient(90deg, #5eead4, #93c5fd, #5eead4); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cursor { display: inline-block; width: 3px; margin-left: 4px; background: #5eead4; animation: parpadeo 0.9s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.hero-desc { max-width: 560px; font-size: 17px; color: rgba(230, 240, 255, 0.85); margin-bottom: 28px; }
.hero-desc strong { color: #fff; }
.hero-botones { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 42px; }

/* ── 6. BOTONES ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; border: none; position: relative; overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.btn-primario { background: var(--grad-primario); color: #fff; box-shadow: 0 10px 24px rgba(20, 184, 166, 0.4); }
.btn-primario::before { content: ""; position: absolute; top: 0; left: -80%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent); transform: skewX(-20deg); transition: left 0.5s ease; }
.btn-primario:hover::before { left: 120%; }
.btn-primario:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(20, 184, 166, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-3px); }
.btn-chico { padding: 10px 16px; font-size: 13px; margin-top: 14px; width: 100%; justify-content: center; }

/* ── 7. ESTADÍSTICAS DEL HERO ──────────────────────────────────── */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px; padding: 14px 10px; text-align: center; backdrop-filter: blur(6px); transition: transform 0.25s ease, background 0.25s ease; }
.stat:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.16); }
.stat-num { font-size: 26px; font-weight: 800; color: #5eead4; display: block; }
.stat-lbl { font-size: 11px; color: rgba(230, 240, 255, 0.75); }

/* ── 8. SEMÁFORO DEL HERO (CSS puro) ───────────────────────────── */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }
.semaforo-hero { display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4)); }
.semaforo-hero-tope { width: 14px; height: 70px; background: #1a1a1a; }
.semaforo-hero-caja { background: linear-gradient(180deg, #262626, #101010); border: 4px solid #333; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.luz-hero { width: 92px; height: 92px; border-radius: 50%; background: #242424; }
.luz-hero.roja { animation: faseRoja 10s infinite; }
.luz-hero.amarilla { animation: faseAmarilla 10s infinite; }
.luz-hero.verde { animation: faseVerde 10s infinite; }
@keyframes faseRoja { 0%, 18% { background: radial-gradient(circle at 35% 30%, #ff9aa0, #ef4444); box-shadow: 0 0 34px #ef4444; } 20%, 100% { background: #242424; box-shadow: none; } }
@keyframes faseAmarilla { 0%, 18%, 30%, 100% { background: #242424; box-shadow: none; } 20%, 28% { background: radial-gradient(circle at 35% 30%, #ffd58a, #f59e0b); box-shadow: 0 0 34px #f59e0b; } }
@keyframes faseVerde { 0%, 28%, 55%, 100% { background: #242424; box-shadow: none; } 30%, 53% { background: radial-gradient(circle at 35% 30%, #9be3d6, #14b8a6); box-shadow: 0 0 34px #14b8a6; } }
.float-card { position: absolute; padding: 10px 15px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); animation: flotar 5s ease-in-out infinite; }
.fc-1 { top: 6%; left: 4%; }
.fc-2 { top: 40%; right: 2%; animation-delay: 1.2s; }
.fc-3 { bottom: 4%; left: 12%; animation-delay: 2s; }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ── 9. TICKER ─────────────────────────────────────────────────── */
.ticker { background: var(--navy-2); color: #fff; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 0; }
.ticker-track { display: flex; gap: 44px; width: max-content; animation: marquesina 28s linear infinite; }
.ticker-track span { font-size: 14px; font-weight: 600; white-space: nowrap; }
@keyframes marquesina { to { transform: translateX(-50%); } }

/* ── 10. MARCO PRINCIPAL (2 columnas) ──────────────────────────── */
.marco { max-width: 1240px; margin: 0 auto; padding: 34px 24px 60px; display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; }
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.contenido { display: flex; flex-direction: column; gap: 26px; }

/* ── VISTAS (una sola sección visible a la vez) ──────────────────
   Cada bloque de información es una "pantalla": solo se muestra la
   que eligió el usuario en la barra superior (script.js, B3). El
   inicio (hero + ticker) tiene su propia vista, sin la columna de
   contenido. */
.seccion { display: none; }
.seccion.vista-activa { display: block; animation: entrarVista 0.45s ease; }
@keyframes entrarVista { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
body[data-vista="inicio"] .marco { display: none; }
body:not([data-vista="inicio"]) .hero,
body:not([data-vista="inicio"]) .ticker { display: none; }
body:not([data-vista="inicio"]) .marco { padding-top: 104px; min-height: 80vh; }

/* ── 11. SECCIONES ─────────────────────────────────────────────── */
.seccion { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 30px 34px; box-shadow: var(--shadow-sm); scroll-margin-top: 96px; }
.seccion-cabecera { margin-bottom: 24px; }
.seccion-etiqueta { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.seccion-titulo { font-size: 30px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.seccion-desc { color: var(--muted); max-width: 640px; }
.seccion-subtitulo { font-family: "Outfit", Arial, sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); margin: 26px 0 14px; }

/* ── 12. CONSEJOS ──────────────────────────────────────────────── */
.grid-consejos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.consejo { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.consejo:hover { border-color: rgba(20, 184, 166, 0.6); box-shadow: var(--shadow); }
.consejo-icono { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; color: #fff; }
.ci-1 { background: #14b8a6; } .ci-2 { background: #ef4444; } .ci-3 { background: #f59e0b; } .ci-4 { background: #2f5fd0; }
.ci-5 { background: #8b5cf6; } .ci-6 { background: #0ea5e9; } .ci-7 { background: #ec4899; } .ci-8 { background: #64748b; }
.consejo h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.consejo p { font-size: 13px; color: var(--muted); }

/* ── 13. SEÑALES ───────────────────────────────────────────────── */
.grid-senales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.senal { display: flex; align-items: center; gap: 14px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.senal:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.senal h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.senal p { font-size: 13px; color: var(--muted); }
.senal-badge { flex-shrink: 0; width: 58px; height: 58px; display: grid; place-items: center; font-family: "Outfit", Arial, sans-serif; font-weight: 800; color: #fff; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.forma-octogo { background: #dc2626; border-radius: 8px; }
.forma-triangulo { background: #fbbf24; color: #7c2d12; clip-path: polygon(50% 0, 100% 100%, 0 100%); font-size: 26px; }
.forma-circulo { background: #fff; color: #dc2626; border: 4px solid #dc2626; border-radius: 50%; font-size: 18px; }
.forma-circulo.azul { background: #2563eb; color: #fff; border-color: #2563eb; font-size: 20px; }
.forma-rombo { background: #fbbf24; color: #7c2d12; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); font-size: 22px; }
.forma-rect { background: #16a34a; border-radius: 6px; font-size: 24px; }
/* Variante grande para el mini juego "Reconocé la señal". */
.senal-badge.grande { width: 96px; height: 96px; font-size: 30px; margin: 0 auto 18px; }
.senal-badge.grande.forma-triangulo, .senal-badge.grande.forma-rombo { font-size: 40px; }

/* ── 14. CLASES DE LICENCIA ────────────────────────────────────── */
.grid-clases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.clase { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; align-items: center; gap: 14px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.clase:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.clase-letra { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; font-weight: 900; color: #fff; background: var(--grad-primario); box-shadow: 0 6px 14px rgba(20, 184, 166, 0.35); }
.clase p { font-size: 13px; color: var(--muted); flex: 1; }
.clase-edad { font-size: 12px; font-weight: 700; color: var(--teal); background: rgba(20, 184, 166, 0.12); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* ── 15. PASOS DEL TRÁMITE ─────────────────────────────────────── */
.pasos { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 6px; }
.pasos::before { content: ""; position: absolute; left: 27px; top: 18px; bottom: 18px; width: 3px; background: linear-gradient(var(--teal), var(--blue)); border-radius: 3px; }
.paso { position: relative; display: flex; gap: 18px; align-items: flex-start; }
.paso-num { position: relative; z-index: 1; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: "Outfit", Arial, sans-serif; font-weight: 800; font-size: 17px; color: #fff; background: var(--grad-primario); border: 4px solid var(--surface); box-shadow: 0 6px 14px rgba(20, 184, 166, 0.4); }
.paso h3 { font-size: 16px; font-weight: 700; }
.paso p { font-size: 13px; color: var(--muted); }

/* ── 16. AVISOS ────────────────────────────────────────────────── */
.aviso { display: flex; gap: 14px; align-items: flex-start; background: rgba(20, 184, 166, 0.09); border-left: 6px solid var(--teal); border-radius: 12px; padding: 16px 18px; margin-top: 26px; }
.aviso-ambar { background: rgba(245, 158, 11, 0.10); border-left-color: var(--ambar); }
.aviso-icono { font-size: 22px; line-height: 1; }
.aviso p { font-size: 14px; color: var(--ink); }

/* ── 17. GENERAL ROCA ──────────────────────────────────────────── */
.grid-roca { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dato-roca { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.dato-roca:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dr-icono { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(20, 184, 166, 0.14); color: var(--teal); font-size: 20px; margin-bottom: 10px; }
.dato-roca h3 { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.dato-roca p { font-size: 13px; color: var(--muted); }

/* ── 18. ESTUDIO: FICHAS, GLOSARIO Y ERRORES COMUNES ───────────── */
.fichas { display: flex; flex-direction: column; gap: 12px; }
.ficha { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: box-shadow 0.25s ease, border-color 0.25s ease; }
.ficha:hover { box-shadow: var(--shadow-sm); }
.ficha.ficha-leida { border-color: rgba(20, 184, 166, 0.5); }
.ficha-cabecera { display: flex; align-items: center; gap: 12px; padding: 15px 16px; }
.ficha-titulo { flex: 1; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--ink); user-select: none; position: relative; padding-right: 30px; }
.ficha-titulo::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-primario); color: #fff; font-size: 15px; font-weight: 800; transition: transform 0.3s ease; }
.ficha-abierta .ficha-titulo::after { transform: translateY(-50%) rotate(45deg); }
.ficha-check { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; cursor: pointer; }
.ficha-check input { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.ficha-contenido { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.ficha-abierta .ficha-contenido { max-height: 480px; }
.ficha-contenido-interior { padding: 0 16px 16px; }
.ficha-contenido-interior p { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.ficha-contenido-interior ul { display: flex; flex-direction: column; gap: 6px; }
.ficha-contenido-interior li { font-size: 13px; color: var(--ink); padding-left: 16px; position: relative; }
.ficha-contenido-interior li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.progreso-estudio { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.progreso-estudio span { font-size: 13px; font-weight: 800; color: var(--teal); white-space: nowrap; }

.grid-glosario { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.glosario-item { background: var(--surface-alt); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: 14px 16px; }
.glosario-termino { font-size: 14px; font-weight: 800; color: var(--navy-texto); margin-bottom: 4px; }
.glosario-def { font-size: 13px; color: var(--muted); }

.grid-errores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.error-comun { background: rgba(245, 158, 11, 0.08); border: 1px solid var(--line); border-left: 4px solid var(--ambar); border-radius: 12px; padding: 14px 16px; }
.error-comun-mal { font-size: 13px; color: var(--rojo); font-weight: 700; margin-bottom: 4px; }
.error-comun-bien { font-size: 13px; color: var(--ink); }
.error-comun-bien b { color: var(--teal-osc); }

/* ── 19. PRÁCTICA: CONTROLES DE TEMA Y MODO ────────────────────── */
.quiz-controles { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; padding: 16px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; }
.quiz-controles-grupo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quiz-controles-label { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.chip:hover { border-color: var(--teal); transform: translateY(-2px); }
.chip.chip-activo { background: var(--grad-primario); color: #fff; border-color: transparent; box-shadow: 0 5px 12px rgba(20, 184, 166, 0.35); }

/* ── 20. PRÁCTICA: CUESTIONARIO + SEMÁFORO ─────────────────────── */
.grid-practica { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.panel-cuestionario, .panel-semaforo, .panel-senales { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel-semaforo { text-align: center; }
.panel-senales { text-align: center; margin-top: 14px; }
.semaforo-marco { display: inline-block; background: linear-gradient(180deg, #262626, #101010); border: 4px solid #333; border-radius: 18px; padding: 16px; margin: 16px 0 10px; box-shadow: var(--shadow); }
.luz { width: 72px; height: 72px; margin: 10px auto; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a3a3a, #1f1f1f); transition: background 0.3s ease, box-shadow 0.3s ease; }
.luz.encendida#luz-roja { background: radial-gradient(circle at 35% 30%, #ff9aa0, #ef4444); box-shadow: 0 0 26px #ef4444; animation: latido 1.2s ease-in-out infinite; }
.luz.encendida#luz-amarilla { background: radial-gradient(circle at 35% 30%, #ffd58a, #f59e0b); box-shadow: 0 0 26px #f59e0b; animation: latido 1.2s ease-in-out infinite; }
.luz.encendida#luz-verde { background: radial-gradient(circle at 35% 30%, #9be3d6, #14b8a6); box-shadow: 0 0 26px #14b8a6; animation: latido 1.2s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.semaforo-estado { font-size: 17px; font-weight: 700; color: var(--ink); min-height: 26px; }
.semaforo-contador { font-size: 26px; font-weight: 800; color: var(--teal); min-height: 30px; }
.semaforo-botones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.btn-luz { border: none; border-radius: 10px; padding: 9px 13px; color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: transform 0.15s ease, filter 0.15s ease; }
.btn-luz:hover { transform: translateY(-2px); filter: brightness(1.15); }
#btn-rojo { background: var(--rojo); } #btn-amarillo { background: var(--ambar); } #btn-verde { background: var(--teal); } #btn-apagar { background: #64748b; }
.btn-auto { background: var(--grad-primario); }

/* ── 21. CUESTIONARIO ──────────────────────────────────────────── */
#cuestionario { text-align: left; }
.quiz-progreso { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.quiz-barra { height: 8px; background: var(--line); border-radius: 6px; margin: 8px 0 12px; overflow: hidden; }
.quiz-barra-llena { height: 8px; background: var(--grad-primario); border-radius: 6px; transition: width 0.4s ease; }
.quiz-timer { height: 6px; background: var(--line); border-radius: 4px; margin-bottom: 14px; overflow: hidden; }
.quiz-timer-barra { height: 6px; width: 100%; background: var(--rojo); border-radius: 4px; transition: width 0.1s linear; }
.quiz-categoria-tag { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--blue); background: rgba(47, 95, 208, 0.1); border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }
.quiz-pregunta { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.quiz-opciones { display: flex; flex-direction: column; gap: 8px; }
.quiz-opcion { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px; font-family: "Inter", Arial, sans-serif; font-size: 14px; color: var(--ink); cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.quiz-opcion:hover:not(:disabled) { border-color: var(--teal); transform: translateX(4px); }
.quiz-opcion:disabled { cursor: default; opacity: 0.95; }
.quiz-opcion.correcta { border-color: var(--teal); background: rgba(20, 184, 166, 0.14); }
.quiz-opcion.incorrecta { border-color: var(--rojo); background: rgba(239, 68, 68, 0.12); animation: agitar 0.4s ease; }
.quiz-opcion.elegida-examen { border-color: var(--blue); background: rgba(47, 95, 208, 0.10); }
@keyframes agitar { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.quiz-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--blue); font-size: 13px; }
.quiz-feedback:empty { display: none; }
.feedback-ok { color: var(--teal-osc); font-weight: 800; }
.feedback-mal { color: var(--rojo); font-weight: 800; }
.feedback-exp { color: var(--muted); }
.feedback-enlace { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--blue); }
.feedback-enlace:hover { text-decoration: underline; }
.quiz-boton { background: var(--grad-primario); color: #fff; border: none; border-radius: 12px; padding: 11px 18px; font-family: "Inter", Arial, sans-serif; font-weight: 800; font-size: 14px; cursor: pointer; margin-top: 14px; box-shadow: 0 6px 16px rgba(20, 184, 166, 0.35); transition: transform 0.2s ease, filter 0.2s ease; }
.quiz-boton:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.1); }
.quiz-boton:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.quiz-marcador, .senal-quiz-marcador { margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.quiz-resultado { text-align: center; padding: 26px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); }
.quiz-resultado.aprobado { border-color: var(--teal); background: rgba(20, 184, 166, 0.08); }
.quiz-resultado.desaprobado { border-color: var(--rojo); background: rgba(239, 68, 68, 0.06); }
.quiz-resultado-nota { font-size: 46px; font-weight: 900; color: var(--navy-texto); margin: 0; }
.quiz-resultado-msg { font-size: 16px; font-weight: 600; margin: 6px 0; }
.quiz-resultado-detalle { font-size: 13px; color: var(--muted); }
/* Repaso de preguntas falladas (modo examen real). */
.quiz-repaso { text-align: left; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.quiz-repaso-titulo { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.quiz-repaso-item { background: var(--surface-alt); border-left: 4px solid var(--rojo); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.quiz-repaso-pregunta { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.quiz-repaso-detalle { font-size: 12.5px; color: var(--muted); }
.quiz-repaso-ok { text-align: center; color: var(--teal-osc); font-weight: 700; font-size: 13.5px; padding: 8px 0; }
#senal-quiz-panel .quiz-opciones { max-width: 420px; margin: 0 auto; }

/* ── 22. FAQ ───────────────────────────────────────────────────── */
.faq-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.faq-columna { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: box-shadow 0.25s ease; }
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-pregunta { margin: 0; padding: 15px 16px; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--ink); user-select: none; position: relative; padding-right: 42px; }
.faq-pregunta::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-primario); color: #fff; font-size: 16px; font-weight: 800; transition: transform 0.3s ease; }
.faq-abierto .faq-pregunta::after { transform: translateY(-50%) rotate(45deg); }
.faq-respuesta { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-respuesta p { padding: 0 16px 15px; font-size: 14px; color: var(--muted); }
.faq-abierto .faq-respuesta { max-height: 300px; }

/* ── 23. BARRA LATERAL ─────────────────────────────────────────── */
.tarjeta-lateral { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.tl-titulo { font-size: 16px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.tl-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tl-lista { display: flex; flex-direction: column; gap: 9px; }
.tl-lista li { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.tl-lista a { color: var(--blue); font-weight: 600; }
.tl-lista a:hover { text-decoration: underline; }
.tl-punto { color: var(--teal); font-size: 14px; }
.consejo-sidebar { font-size: 14px; color: var(--ink); line-height: 1.55; }
.consejo-sidebar.cambiar { animation: consejoAparecer 0.6s ease; }
@keyframes consejoAparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; color: var(--ink); background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; transition: background 0.2s ease, transform 0.2s ease; }
.check-item:hover { transform: translateX(3px); }
.check-item input { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }
.check-item.hecho { background: rgba(20, 184, 166, 0.12); border-color: rgba(20, 184, 166, 0.5); }
.checklist-progreso { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.cl-barra { flex: 1; height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.cl-barra-llena { height: 8px; width: 0%; background: var(--grad-primario); border-radius: 6px; transition: width 0.4s ease; }
.checklist-progreso span { font-size: 13px; font-weight: 800; color: var(--teal); }

/* ── 24. FOOTER ────────────────────────────────────────────────── */
.footer { background: linear-gradient(160deg, #0c1830, #12224a); color: #c7d2e3; margin-top: 40px; }
.footer-grid { max-width: 1240px; margin: 0 auto; padding: 46px 24px 26px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.footer .nav-logo { color: #fff; }
.footer-desc { font-size: 13px; margin: 12px 0; color: #93a3bb; }
.footer h4 { color: #fff; font-family: "Outfit", Arial, sans-serif; font-size: 15px; margin-bottom: 12px; }
.footer ul { display: flex; flex-direction: column; gap: 8px; }
.footer ul li { font-size: 13px; }
.footer ul a { color: #93a3bb; transition: color 0.2s ease; }
.footer ul a:hover { color: #5eead4; }
.footer-mini { font-size: 12px; color: #93a3bb; margin-top: 10px; line-height: 1.6; }
.footer-mini b { color: #5eead4; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 16px 24px; text-align: center; font-size: 13px; color: #93a3bb; }

/* ── 25. TOASTS, CONFETI Y PARTÍCULAS ──────────────────────────── */
.toast-container { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 12000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: aparecerToast 0.35s ease; }
.toast.ok { background: var(--grad-primario); } .toast.error { background: var(--rojo); } .toast.info { background: var(--navy-2); }
@keyframes aparecerToast { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
.confeti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 13000; pointer-events: none; }
#fondo-particulas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── 26. REVELADO AL SCROLL ────────────────────────────────────── */
.reveal, .reveal-izq, .reveal-der, .reveal-zoom { opacity: 0; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); will-change: opacity, transform; }
.reveal { transform: translateY(34px); }
.reveal-izq { transform: translateX(-46px); }
.reveal-der { transform: translateX(46px); }
.reveal-zoom { transform: scale(0.88); }
.reveal.activo, .reveal-izq.activo, .reveal-der.activo, .reveal-zoom.activo { opacity: 1; transform: none; }

/* ── 27. RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1200px) { .nav-link { padding: 8px; font-size: 13px; } }
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { min-height: 360px; }
  .marco { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .grid-consejos, .grid-senales, .grid-clases, .grid-roca { grid-template-columns: repeat(2, 1fr); }
  .grid-errores { grid-template-columns: 1fr; }
  .grid-practica, .faq-doble { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-enlaces { position: fixed; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px 16px; gap: 6px; max-height: calc(100vh - 66px); overflow-y: auto; transform: translateY(-140%); transition: transform 0.35s ease; }
  .nav-enlaces.abierta { transform: none; }
  .nav-link { display: block; text-align: center; padding: 12px; }
  .hero { min-height: auto; padding-top: 104px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-consejos, .grid-senales, .grid-clases, .grid-roca, .grid-glosario { grid-template-columns: 1fr; }
  .sidebar { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .seccion { padding: 22px 18px; }
  .quiz-controles-grupo { flex-direction: column; align-items: flex-start; }
}
