/* =========================================================
   DEPJA — PREINSCRIPCIÓN ÑEMBOJA DIGITAL
   Identidad visual 2026: azul #1f5d9b · negro #2e2d2c · amarillo #facd05
   Tipografías: Barlow (texto) · Barlow Semi Condensed (títulos) · Montserrat (marca)
   Este archivo es autosuficiente: incluye navbar, formulario y footer.
   ========================================================= */

:root {
    --azul: #1f5d9b;
    --azul-hover: #174775;
    --azul-claro: #e6eef8;
    --negro: #2e2d2c;
    --amarillo: #facd05;
    --naranja: #f4492e;
    --gris-texto: #5f5f5f;
    --borde: #dce3eb;
    --borde-campo: #c9d3df;
    --fondo: #f5f7fa;
    --nav-h: 84px;

    /* SweetAlert2 con los colores de marca */
    --swal2-confirm-button-background-color: #1f5d9b;
    --swal2-outline: 0 0 0 3px rgba(250, 205, 5, .6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: "Barlow", Arial, sans-serif;
    color: var(--negro);
    background: var(--fondo);
}

button, input, select, textarea, .swal2-popup { font-family: "Barlow", Arial, sans-serif; }


/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--nav-h);
    padding: 0 max(20px, calc((100% - 1280px) / 2));
    background: #fff;
    box-shadow: 0 2px 10px rgba(46, 45, 44, .08);
}

.navbar-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; min-width: 0; }
.escudo-provincial { display: block; width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }

.portada-titulo { display: flex; align-items: center; gap: 18px; min-width: 0; }
.portada-titulo .bold {
    flex: 0 0 auto; max-width: 8.5em;
    color: var(--negro); font: 600 14px/1.15 "Montserrat", Arial, sans-serif;
}
.portada-titulo .bold strong { display: block; font-size: 1.2em; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.portada-titulo .regular { flex: 0 1 190px; max-width: 190px; color: var(--negro); font: 400 14px/1.35 "Barlow", Arial, sans-serif; }

.nav-links {
    display: flex; align-items: center; justify-content: flex-end; gap: 3px;
    flex: 1; margin: 0; padding: 0; list-style: none;
}
.nav-links li { position: relative; margin: 0; padding: 0; }

.nav-links li > a {
    display: flex; align-items: center; justify-content: center;
    padding: 9px 12px; border-radius: 999px;
    color: var(--negro); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.nav-links li > a:hover,
.nav-links li.open > a { background: var(--azul-claro); color: var(--azul); }

/* Submenús (escritorio): fondo blanco, texto oscuro */
.dropdown {
    display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    min-width: 220px; padding: 7px;
    background: #fff; border: 1px solid #e0e5ec; border-radius: 12px;
    box-shadow: 0 12px 28px rgba(32, 51, 76, .14); z-index: 5000;
}
.dropdown::before {
    content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
    border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #fff;
}
/* Puente invisible: evita que el hover se pierda entre el ítem y el submenú */
.dropdown::after { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }

.dropdown-item:hover > .dropdown,
.dropdown-item:focus-within > .dropdown { display: block; }

.dropdown a {
    display: block; padding: 10px 14px; border-radius: 8px;
    color: var(--negro); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.dropdown a:hover { background: var(--azul-claro); color: var(--azul); }

.menu-toggle { display: none; }


/* =========================================================
   PÁGINA
   ========================================================= */

:root { --error: #b52c18; --amarillo-claro: #fff7cc; }

.nd-page { flex: 1; width: 100%; display: flex; flex-direction: column; padding-top: var(--nav-h); }


/* =========================================================
   ESTADOS: PRÓXIMAMENTE / CERRADA
   (JS los muestra u oculta con la clase .hidden)
   ========================================================= */

.countdown-overlay {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--nav-h)); min-height: calc(100dvh - var(--nav-h));
    padding: 54px 20px 64px; text-align: center; color: #fff;
    background: linear-gradient(135deg, #1f5d9b 0%, #174775 100%);
    border-bottom: 6px solid var(--amarillo);
}
.countdown-overlay.hidden { display: none; }

.countdown-logo {
    display: block; width: 100%; max-width: 250px; margin-bottom: 26px; padding: 14px 24px;
    background: #fff; border-radius: 20px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.countdown-title {
    margin: 0 0 10px; color: #fff;
    font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif;
    font-size: clamp(34px, 5.2vw, 54px); font-weight: 800; line-height: 1.05;
}
.countdown-subtitle { max-width: 640px; margin: 0 0 30px; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.5; color: #e8eef6; }
.countdown-subtitle strong { color: var(--amarillo); }

.countdown-timer { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 30px; }
.countdown-item {
    min-width: 92px; padding: 18px 14px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); border-radius: 16px;
}
.countdown-number {
    display: block; color: var(--amarillo);
    font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif;
    font-size: clamp(36px, 5vw, 48px); font-weight: 800; line-height: 1;
}
.countdown-label { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #dbe6f3; }

.countdown-message { max-width: 540px; margin: 0; font-size: 17px; line-height: 1.6; color: #e8eef6; }

.countdown-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: 15px 34px;
    border-radius: 999px; background: var(--amarillo); color: var(--negro);
    font-size: 16px; font-weight: 700; text-decoration: none;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.countdown-btn:hover { background: #ffdb3a; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
.countdown-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.closed-overlay { background: linear-gradient(135deg, #2e2d2c 0%, #1b1a1a 100%); }
.closed-icon {
    width: 92px; height: 92px; margin-bottom: 24px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--amarillo); color: var(--negro); font-size: 40px;
}


/* =========================================================
   FORMULARIO
   ========================================================= */

.main-container {
    flex: 1; width: 100%; flex-direction: column; align-items: center;
    padding: 42px 24px 80px;
}

.nd-header {
    width: 100%; max-width: 680px; margin: 0 0 28px; padding-bottom: 22px;
    display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--borde);
}
.nd-header-icon {
    width: 58px; height: 58px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border-radius: 16px; background: var(--azul); color: #fff; font-size: 25px;
    box-shadow: 0 7px 18px rgba(31, 93, 155, .18);
}
.section-kicker { display: block; margin-bottom: 5px; color: var(--azul); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; }
.page-title {
    margin: 0; color: var(--negro);
    font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif;
    font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1.1;
}
.nd-header p { margin: 8px 0 0; color: var(--gris-texto); font-size: 16px; line-height: 1.5; }

.form-container { width: 100%; max-width: 680px; }
#msform { position: relative; }

.nd-card {
    padding: clamp(22px, 4vw, 38px);
    background: #fff; border: 1px solid #e0e5ec; border-top: 4px solid var(--azul); border-radius: 18px;
    box-shadow: 0 10px 32px rgba(32, 51, 76, .07);
}

/* ---------- Barra de progreso (JS marca .active en los pasos alcanzados) ---------- */
.progress-container { margin-bottom: 32px; }
#progressbar { display: flex; margin: 0; padding: 0; list-style: none; counter-reset: step; }
#progressbar li {
    position: relative; flex: 1; text-align: center;
    color: #6b7684; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
}
#progressbar li::before {
    content: counter(step); counter-increment: step;
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin: 0 auto 9px; border-radius: 50%;
    background: #e6eaf0; color: #5f6b7a; font-size: 15px; font-weight: 700;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
#progressbar li + li::after {
    content: ''; position: absolute; top: 16px; right: 50%; width: 100%; height: 4px; z-index: 0;
    background: var(--borde); border-radius: 4px; transition: background .25s ease;
}
#progressbar li.active { color: var(--azul); }
#progressbar li.active::before { background: var(--azul); color: #fff; }
#progressbar li.active::after { background: var(--azul); }
/* Paso actual = el último activo */
#progressbar li.active:not(:has(~ li.active)) { color: var(--negro); }
#progressbar li.active:not(:has(~ li.active))::before { box-shadow: 0 0 0 4px rgba(250, 205, 5, .65); }

/* ---------- Pasos ---------- */
.nd-card fieldset { display: none; min-width: 0; margin: 0; padding: 0; border: none; animation: cardAppear .4s ease; }
.nd-card fieldset:first-of-type { display: block; }
@keyframes cardAppear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.fs-title {
    margin: 0 0 6px; color: var(--negro);
    font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; font-size: 26px; font-weight: 800;
}
.fs-subtitle { margin: 0 0 24px; color: var(--gris-texto); font-size: 16px; line-height: 1.5; }

/* ---------- Campos ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--negro); font-size: 15px; font-weight: 600; }

.form-group input,
.form-group select {
    width: 100%; min-height: 50px; padding: 11px 15px;
    border: 1px solid var(--borde-campo); border-radius: 10px;
    background: #fff; color: var(--negro); font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-group input::placeholder { color: #8d97a3; }
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(31, 93, 155, .15); }

.form-group select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
    background-image: 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 1.5l6 6 6-6' fill='none' stroke='%231f5d9b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}

/* Errores de validación (los activa el JS) */
.form-group input.error-input,
.form-group select.error-input,
.form-group:has(.error-input) input:not([type="hidden"]) {
    border-color: var(--error); box-shadow: 0 0 0 3px rgba(181, 44, 24, .12);
}
.error-message { display: none; margin-top: 6px; color: var(--error); font-size: 13.5px; font-weight: 600; }

/* ---------- Recuadro de recurso ---------- */
.resource-box {
    margin: 24px 0; padding: 22px 24px; text-align: center;
    background: var(--azul-claro); border: 1px solid #c8d9ee; border-left: 4px solid var(--amarillo); border-radius: 12px;
}
.resource-box h4 {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px;
    color: var(--negro); font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; font-size: 20px; font-weight: 800;
}
.resource-box h4 i { color: var(--azul); }
.resource-box p { margin: 0 0 16px; color: var(--gris-texto); font-size: 15px; line-height: 1.55; }

.resource-download-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
    border-radius: 12px; background: var(--azul); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.resource-download-btn:hover { background: var(--azul-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 93, 155, .22); }
.resource-download-btn:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.resource-download-btn svg { width: 20px; height: 20px; }

/* ---------- Términos ---------- */
.terms-container { margin: 22px 0 0; padding: 18px 20px; background: var(--fondo); border: 1px solid var(--borde); border-radius: 12px; }
.terms-checkbox-wrapper { display: flex; align-items: flex-start; gap: 14px; }

.custom-checkbox { position: relative; width: 24px; height: 24px; flex-shrink: 0; margin: 1px 0 0; cursor: pointer; }
.custom-checkbox input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.checkmark {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 2px solid var(--borde-campo); border-radius: 6px; transition: all .2s ease;
}
.checkmark::after {
    content: ''; width: 6px; height: 12px; margin-top: -2px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .2s ease;
}
.custom-checkbox input:checked + .checkmark { background: var(--azul); border-color: var(--azul); }
.custom-checkbox input:checked + .checkmark::after { transform: rotate(45deg) scale(1); }
.custom-checkbox input:focus-visible + .checkmark { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.terms-label { flex: 1; color: var(--negro); font-size: 15px; line-height: 1.5; }
.terms-link { color: var(--azul); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.terms-link:hover { color: var(--azul-hover); }

/* ---------- Botones ---------- */
.buttons { display: flex; gap: 12px; margin-top: 30px; }

.btn {
    flex: 1; min-height: 50px; padding: 0 26px;
    border: 1px solid var(--azul); border-radius: 12px; background: var(--azul); color: #fff;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--azul-hover); border-color: var(--azul-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 93, 155, .22); }

.btn-prev { background: #fff; border-color: var(--borde-campo); color: var(--negro); }
.btn-prev:hover { background: #f0f2f5; border-color: #b4c0cf; box-shadow: none; }

.btn:disabled,
.btn:disabled:hover { background: #e6eaf0; border-color: #e6eaf0; color: #8d97a3; cursor: not-allowed; transform: none; box-shadow: none; }

.btn:focus-visible,
.modal-close:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.buttons.buttons-center { justify-content: center; }
.buttons-center .btn { flex: 0 1 auto; min-width: 170px; }


/* =========================================================
   MODALES
   ========================================================= */

.modal {
    display: none; position: fixed; inset: 0; z-index: 3000; padding: 20px; overflow-y: auto;
    background: rgba(46, 45, 44, .6);
}
.modal-content {
    position: relative; width: 100%; max-width: 560px; margin: 6vh auto; padding: 32px clamp(22px, 4vw, 36px);
    background: #fff; border-top: 4px solid var(--azul); border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: modalPop .3s ease;
}
.modal-content.modal-lg { max-width: 740px; }
@keyframes modalPop { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-close {
    position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%; background: transparent; color: #5f5f5f; font-size: 28px; line-height: 1; cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.modal-close:hover { background: #f0f2f5; color: var(--negro); }

.modal h2 {
    display: flex; align-items: center; gap: 10px; margin: 0 44px 14px 0; color: var(--azul);
    font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; font-size: 27px; font-weight: 800; line-height: 1.15;
}
.modal h2.error-title { color: var(--error); }
.modal h3 { color: var(--negro); font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; }
.modal p { margin: 0 0 14px; color: #3f3e3d; font-size: 16px; line-height: 1.6; }
.modal ul { margin: 12px 0; padding-left: 24px; }
.modal li { margin-bottom: 7px; color: #3f3e3d; line-height: 1.55; }
.modal a { color: var(--azul); font-weight: 600; text-underline-offset: 2px; }
.modal a:hover { color: var(--azul-hover); }

/* Aviso destacado (también lo usa el JS en el mensaje de éxito) */
.highlight-box {
    margin: 18px 0; padding: 14px 16px;
    background: var(--amarillo-claro); border-left: 4px solid var(--amarillo); border-radius: 0 10px 10px 0;
    color: var(--negro); font-weight: 700; line-height: 1.5;
}

/* Cargando */
.loading-modal .modal-content { text-align: center; padding: 48px 30px; }
.loading-modal h3 { margin: 0 0 8px; color: var(--azul); font-size: 24px; font-weight: 800; }
.spinner {
    width: 58px; height: 58px; margin: 0 auto 24px;
    border: 5px solid var(--borde); border-top-color: var(--azul); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Términos y condiciones */
.terms-modal-body { max-height: 58vh; overflow-y: auto; padding-right: 8px; }
.terms-modal-body h3 { margin: 0 0 14px; color: var(--azul); font-size: 21px; font-weight: 800; }
.terms-modal-body p { text-align: left; }
.important-note {
    margin: 20px 0; padding: 18px 20px;
    background: var(--amarillo-claro); border-left: 4px solid var(--amarillo); border-radius: 0 12px 12px 0;
}
.important-note strong { display: block; margin-bottom: 8px; color: var(--negro); font-size: 17px; }
.important-note p:last-child, .important-note ul:last-child { margin-bottom: 0; }

/* Calendario (flatpickr) con colores de marca */
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover { background: var(--azul); border-color: var(--azul); }
.flatpickr-calendar .flatpickr-day.today { border-color: var(--amarillo); }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer { margin-top: auto; background: var(--negro); color: #fff; font-family: "Barlow", Arial, sans-serif; }
.site-footer .w.pg {
    width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 38px;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px;
}
.site-footer p { margin: 0 0 18px; color: #e5e5e5; line-height: 1.65; }
.site-footer h3 { margin: 0 0 15px; color: var(--amarillo); font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; font-size: 18px; }
.site-footer .w.pg > div:not(:first-child) a {
    display: block; width: fit-content; margin: 0 0 10px;
    color: #f5f5f5; font-size: 14px; line-height: 1.45; text-decoration: none;
}
.site-footer a:hover { color: var(--amarillo) !important; }
.site-footer .redes { display: flex; gap: 10px; }
.site-footer .redes a {
    width: 38px; height: 38px; display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; color: #fff;
}
.site-footer .redes svg { width: 18px; height: 18px; }
.site-footer .pf { border-top: 1px solid rgba(255, 255, 255, .18); }
.site-footer .pf .w {
    width: min(1180px, calc(100% - 48px)); min-height: 58px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    color: #d6d6d6; font-size: 12px;
}



/* =========================================================
   RESPONSIVE — NAVBAR Y FOOTER
   ========================================================= */

@media (max-width: 1200px) {
    .navbar { gap: 14px; }
    .navbar-brand { gap: 10px; }
    .portada-titulo { gap: 10px; }
    .portada-titulo .bold { font-size: 12px; }
    .portada-titulo .regular { max-width: 150px; font-size: 12px; }
    .nav-links li > a { padding: 8px 9px; font-size: 13px; }
}

/* ---------- Menú hamburguesa (tablets y celulares) ---------- */
@media (max-width: 1024px) {
    .navbar { padding: 0 20px; }
    .navbar-brand { flex: 1 1 auto; max-width: calc(100% - 56px); }
    .portada-titulo { gap: 8px; }
    .portada-titulo .regular { max-width: 165px; }

    .menu-toggle {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        position: relative; z-index: 2200; flex-shrink: 0;
        width: 44px; height: 44px; margin: 0; padding: 7px;
        border: none; border-radius: 10px; background: var(--azul-claro); cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .bar { display: block; width: 23px; height: 2.5px; margin: 3px 0; border-radius: 5px; background: var(--azul); transition: all .25s ease; }
    .menu-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; width: 100%;
        height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
        padding: 14px 16px calc(30px + env(safe-area-inset-bottom, 0px));
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px;
        background: #f5f7fa; box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
        overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
        transform: translateX(100%); visibility: hidden;
        transition: transform .28s ease, visibility .28s ease; z-index: 2100;
    }
    .nav-links.active { transform: translateX(0); visibility: visible; }
    body:has(.nav-links.active) { overflow: hidden; }

    .nav-links li { width: 100%; }
    .nav-links li > a {
        width: 100%; min-height: 50px; padding: 14px 16px; justify-content: space-between;
        border: 1px solid var(--borde); border-radius: 12px; background: #fff;
        font-size: 16px; box-shadow: 0 2px 7px rgba(0, 0, 0, .04);
    }
    .nav-links li > a:hover,
    .nav-links li.open > a { background: var(--azul-claro); border-color: rgba(31, 93, 155, .25); }

    /* Submenús táctiles: se abren solo con la clase .open */
    .dropdown {
        position: static; transform: none; width: 100%; min-width: 0; margin-top: 6px; padding: 6px;
        display: none; background: #eef3f9; border: 1px solid var(--borde); border-radius: 10px; box-shadow: none;
    }
    .dropdown::before, .dropdown::after { display: none; }
    .dropdown-item:hover > .dropdown,
    .dropdown-item:focus-within > .dropdown { display: none; }
    .dropdown-item.open > .dropdown { display: block; }
    .dropdown a {
        display: flex; align-items: center; min-height: 46px; margin: 3px 0; padding: 10px 14px;
        background: #fff; font-size: 15px; white-space: normal;
    }

    .nav-links .dropdown-item > a { position: relative; padding-right: 45px; }
    .nav-links .dropdown-item > a::after {
        content: '⌄'; position: absolute; right: 17px; top: 50%; transform: translateY(-50%);
        color: var(--azul); font-size: 18px; font-weight: 600; transition: transform .25s ease;
    }
    .nav-links .dropdown-item.open > a::after { transform: translateY(-50%) rotate(180deg); }
}

@media (max-width: 900px) {
    .site-footer .w.pg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}

@media (max-width: 768px) {
    :root { --nav-h: 76px; }
    .navbar { padding: 0 16px; }
    .navbar-brand { gap: 8px; }
    .escudo-provincial { width: 44px; height: 44px; }
    .portada-titulo { flex-direction: column; align-items: flex-start; gap: 2px; overflow: hidden; }
    .portada-titulo .bold { max-width: 100%; font-size: 11.5px; line-height: 1.1; }
    .portada-titulo .bold strong { display: inline; margin-left: 3px; font-size: 1em; }
    .portada-titulo .regular { max-width: 100%; font-size: 10px; line-height: 1.15; }
}


/* =========================================================
   RESPONSIVE — PÁGINA
   ========================================================= */

@media (max-width: 700px) {
    .main-container { padding: 26px 14px 50px; }
    .nd-header { gap: 13px; margin-bottom: 22px; padding-bottom: 18px; }
    .nd-header-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 20px; }
    .nd-header p { font-size: 15px; }
    .fs-title { font-size: 23px; }

    .buttons { flex-direction: column-reverse; }
    .btn { flex: none; width: 100%; }
    .buttons.buttons-center { flex-direction: row; }
    .buttons-center .btn { width: auto; min-width: 0; flex: 1 1 auto; }

    .countdown-overlay { padding: 38px 16px 48px; }
    .countdown-timer { gap: 10px; }
    .countdown-item { min-width: 70px; padding: 14px 10px; }
    .countdown-label { font-size: 11px; letter-spacing: .8px; }

    .modal { padding: 12px; }
    .modal-content { margin: 4vh auto; }

    .site-footer .w.pg { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 25px; padding: 34px 0; }
    .site-footer .pf .w { width: calc(100% - 36px); padding: 14px 0; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    #progressbar li { font-size: 11px; letter-spacing: .2px; }
    #progressbar li::before { width: 32px; height: 32px; font-size: 14px; }
    #progressbar li + li::after { top: 14px; }
}

@media (max-width: 420px) {
    .navbar { padding: 0 10px; }
    .portada-titulo .bold { font-size: 10.5px; }
    .portada-titulo .regular { font-size: 9px; }
}

@media (hover: none) {
    .btn:hover, .resource-download-btn:hover, .countdown-btn:hover { transform: none; box-shadow: none; }
}

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

/* "¡Faltan X días!" sobre la cuenta regresiva */
.countdown-faltan { margin: 4px 0 6px; font-family: "Barlow Semi Condensed", "Barlow", Arial, sans-serif; font-weight: 800; font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: .02em; text-transform: uppercase; color: #facd05; }
.countdown-faltan:empty { display: none; }
