:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --accent: #0891b2;
    --muted: #f1f5f9;
    --muted-fg: #64748b;
    --card: #ffffff;
    --border: #e2e8f0;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 0.75rem;
}

body { font-family: 'Inter', system-ui, sans-serif; }

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-16px) rotate(2deg); }
}
@keyframes floatAlt {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-10px) rotate(-2deg); }
}

.anim-fade-up   { animation: fadeInUp 0.75s cubic-bezier(.22,1,.36,1) both; }
.anim-d1        { animation-delay: 0.12s; }
.anim-d2        { animation-delay: 0.24s; }
.anim-d3        { animation-delay: 0.38s; }
.anim-d4        { animation-delay: 0.52s; }

.anim-float     { animation: float 5s ease-in-out infinite; }
.anim-float-alt { animation: floatAlt 7s ease-in-out infinite; animation-delay: -3s; }

/* Scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-hover {
    transition: box-shadow .25s ease, transform .25s ease;
}
.card-hover:hover {
    box-shadow: 0 12px 32px rgba(30,64,175,.13);
    transform: translateY(-3px);
}

/* ── Botones ─────────────────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: background .2s, box-shadow .2s;
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(30,64,175,.35);
}

.btn-accent {
    background: var(--accent);
    color: white;
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 88vh;
    display: flex;
    align-items: center;
    margin-top: calc(-1 * var(--nav-h, 4.5rem));
}
.hero-section__bg {
    position: absolute;
    inset: 0;
}
.hero-section__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(15,30,100,.82) 0%, rgba(30,64,175,.60) 60%, rgba(8,145,178,.40) 100%);
}
.hero-section__deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
}
.hero-section__content {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* ── Navbar pública ──────────────────────────────────────── */
.site-header {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header__title { color: #0f172a; }
.site-header__subtitle { color: #64748b; }
.site-header__link {
    color: #475569;
    position: relative;
    padding-bottom: 0.25rem;
}
.site-header__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .22s ease;
}
.site-header__link:hover { color: #0f172a; }
.site-header__link:hover::after { transform: scaleX(1); }
.site-header__link.is-active { color: var(--primary) !important; font-weight: 600; }
.site-header__link.is-active::after { transform: scaleX(1); }

.site-header--hero .site-header__title,
.site-header--hero .site-header__subtitle { color: #fff; }
.site-header--hero .site-header__subtitle { opacity: .85; }
.site-header--hero .site-header__link { color: rgba(255,255,255,.85); }
.site-header--hero .site-header__link::after { background: #fff; }
.site-header--hero .site-header__link:hover { color: #fff; }
.site-header--hero .site-header__link.is-active { color: #fff !important; }

.site-header.is-scrolled {
    background: rgba(255,255,255,.94);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 24px rgba(15,23,42,.07);
    backdrop-filter: blur(12px);
}
.site-header--hero.is-scrolled .site-header__title  { color: #0f172a; }
.site-header--hero.is-scrolled .site-header__subtitle { color: #64748b; opacity: 1; }
.site-header--hero.is-scrolled .site-header__link { color: #475569; }
.site-header--hero.is-scrolled .site-header__link::after { background: var(--primary); }
.site-header--hero.is-scrolled .site-header__link:hover { color: #0f172a; }
.site-header--hero.is-scrolled .site-header__link.is-active { color: var(--primary) !important; }

/* ── Material Symbols ────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Quiz / Simulador (examen form) ─────────────────────── */
.quiz-option { transition: all .15s; cursor: pointer; }
.quiz-option:hover { background: var(--muted); }
.quiz-option.selected  { border-color: var(--primary); background: #eff6ff; }
.quiz-option.correct   { border-color: var(--success); background: #f0fdf4; }
.quiz-option.incorrect { border-color: var(--danger);  background: #fef2f2; }

/* ── Quiz cards (curso) ──────────────────────────────────── */
.quiz-option-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
    background: #fff;
}
.quiz-option-card:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
    transform: translateX(3px);
}
.quiz-option-card.seleccionada {
    border-color: var(--primary);
    background: #eff6ff;
}
.quiz-option-card.correcta {
    border-color: var(--success);
    background: #f0fdf4;
}
.quiz-option-card.incorrecta {
    border-color: var(--danger);
    background: #fef2f2;
}
.quiz-option-letra {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted-fg);
    transition: background .15s, color .15s;
}
.quiz-option-card.seleccionada .quiz-option-letra {
    background: var(--primary);
    color: #fff;
}
.quiz-option-card.correcta .quiz-option-letra {
    background: var(--success);
    color: #fff;
}
.quiz-option-card.incorrecta .quiz-option-letra {
    background: var(--danger);
    color: #fff;
}
.quiz-option-texto {
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.4;
}

/* ── Sección descarga (fondo foto) ──────────────────────── */
.download-section {
    position: relative;
    overflow: hidden;
}
.download-section__bg {
    position: absolute;
    inset: 0;
}
.download-section__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}
.download-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15,30,100,.90) 0%, rgba(30,64,175,.75) 55%, rgba(30,64,175,.30) 100%);
}
.download-section__content { position: relative; z-index: 10; }

/* ── Confetti resultado aprobado ─────────────────────────── */
@keyframes confettiFall {
    0%   { transform: translateY(-10px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}
.confetti-piece {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
    z-index: 9999;
    pointer-events: none;
}

/* ── Nav active ──────────────────────────────────────────── */
.nav-active { background: var(--primary); color: white !important; }

/* ── Nav CTA (Simulador) ─────────────────────────────────── */
.nav-cta {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.55rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(30,64,175,.35);
    transition: box-shadow .2s, transform .2s, filter .2s;
}
.nav-cta:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(30,64,175,.45);
    transform: translateY(-1px);
}
.nav-cta--active {
    filter: brightness(0.92);
    box-shadow: 0 2px 8px rgba(30,64,175,.30);
}

/* Sobre el hero: versión blanca sólida */
.site-header--hero:not(.is-scrolled) .nav-cta {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.site-header--hero:not(.is-scrolled) .nav-cta:hover {
    filter: brightness(0.97);
    box-shadow: 0 6px 20px rgba(0,0,0,.22);
}

/* ── Mobile nav padding ──────────────────────────────────── */
@media (max-width: 767px) {
    .has-mobile-nav { padding-bottom: 4.5rem; }
}
