/* ============================================================
   BASE.CSS v2 — AQUÍ NO
   Paleta cálida: teal + ámbar farola + crema + noche
   ============================================================ */

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/InterVariable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/InterVariable-Italic.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/static/fonts/Fraunces-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/static/fonts/Fraunces-500-Italic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Fraunces';
    src: url('/static/fonts/Fraunces-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Fraunces', 'Georgia', serif;

    /* Tinta (más fría, más seria - periodismo cívico) */
    --ink: #0A0F14;
    --ink-body: #1A2028;
    --muted: #444A55;
    --muted-2: #6B727E;

    /* Teal (verde-azulado, sigue siendo el primario) */
    --teal: #0F5F56;
    --teal-deep: #072A28;
    --teal-hover: #0A4A43;
    --teal-soft: rgba(15, 95, 86, 0.08);
    --teal-softer: #E5EEEC;
    --teal-border: rgba(15, 95, 86, 0.18);

    /* Ámbar farola (terroso, no dorado joya) */
    --ember: #D99343;
    --ember-deep: #B87B2A;
    --ember-soft: rgba(217, 147, 67, 0.18);
    --ember-bg: #F0E8D8;

    /* Coral (advertencia seria) */
    --coral: #C54C2E;
    --coral-soft: #E8B4A4;

    /* Rojo SOS (emergencia - sangre, no pop) */
    --sos: #BF2E2E;
    --sos-deep: #8F1F1F;
    --sos-glow: rgba(191, 46, 46, 0.32);

    /* Azul noche (más profundo, más calle) */
    --night: #0D1520;
    --night-deep: #060A12;

    /* Fondos - papel frío, no crema */
    --cream: #F5F6F7;
    --paper: #F5F6F7;
    --paper-2: #ECEEF1;
    --warm: #E8E4D9;
    --warm-deep: #D8D2C3;

    /* Auxiliares */
    --wa: #1D9E75;
    --warm-border: rgba(138, 120, 90, 0.2);
    --line: rgba(26, 32, 40, 0.1);
    --line-warm: rgba(138, 120, 90, 0.2);

    --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--cream);
    font-family: var(--font-sans);
    color: var(--ink-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; height: auto; }

.page { background: var(--cream); min-height: 100vh; }

.skip-link {
    position: absolute;
    top: -100px;
    inset-inline-start: 0;
    padding: 10px 16px;
    background: var(--ink);
    color: #fff;
    z-index: 100;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

.footer-top,
.footer-bottom {
    max-width: 1320px;
    margin-inline-start: auto;
    margin-inline-end: auto;
}

@keyframes ping {
    0%   { transform: scale(1); opacity: 0.55; }
    75%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ============ TOPBAR (cálida, no industrial) ============ */
.topbar {
    background: var(--night);
    color: #D8CFB6;
    font-size: 12.5px;
    letter-spacing: 0.1px;
    padding: 9px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--ember-deep);
    box-shadow: inset 0 -2px 0 0 rgba(232, 165, 71, 0.25);
}
.topbar-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 450;
}
.topbar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ember);
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--ember);
}
.topbar-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.2px solid var(--ember);
    opacity: 0.55;
    animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.topbar-msg strong { color: #fff; font-weight: 500; }
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #B8AF97;
}
.topbar-right a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}
.topbar-right a:hover { color: var(--ember); }
.topbar-sep {
    width: 1px;
    height: 12px;
    background: rgba(232, 165, 71, 0.25);
}

/* ============ NAV ============ */
/* Orden de pintura (z-index) al hacer scroll:
   - .topbar es position:relative y sube con el scroll (desaparece arriba).
   - .nav-wrap es position:sticky y se queda pegado al top del viewport.
   El nav-wrap DEBE tener z-index MAYOR que el topbar: durante la
   transicion el topbar saliendo pinta encima si no. Ambos por encima
   del mapa Leaflet (z-index 1000).

   Fondo opaco + translateZ(0): evita glitch en Chrome Android cuando la
   URL bar del navegador se auto-oculta al scrollear (con backdrop-filter
   + fondo semi-transparente el nav "parpadea" detrás de la status bar
   del sistema). Forzamos una capa de composicion propia al nav-wrap. */
.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 1201;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}
.topbar { position: relative; z-index: 1200; }
.megamenu, .lang-dropdown, .user-menu-pop { z-index: 1210; }
.nav {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    max-width: 1320px;
    margin: 0 auto;
}
.nav-left { display: flex; align-items: center; gap: 40px; }

.brand {
    display: flex;
    align-items: center;
    color: var(--ink);
}
.brand-logo {
    height: 42px;
    width: auto;
    display: block;
    transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-logo { transform: scale(1.04); }

.navlinks {
    display: flex;
    gap: 2px;
    align-items: center;
}
.navlink {
    position: relative;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 450;
    color: #4A413A;
    border-radius: 8px;
    transition: color .2s, background .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.navlink:hover { color: var(--teal); background: var(--teal-soft); }
.navlink.is-current { color: var(--teal); background: var(--teal-soft); }
.navlink-chevron {
    width: 12px;
    height: 12px;
    opacity: 0.55;
    transition: transform .25s;
}
.navlink:hover .navlink-chevron { transform: rotate(180deg); opacity: 0.85; }

.navlink-wrap { position: relative; }
.megamenu {
    position: absolute;
    top: calc(100% + 12px);
    inset-inline-start: -20px;
    width: 360px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 20px 48px rgba(14, 37, 36, 0.12), 0 0 0 1px rgba(14, 37, 36, 0.03);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.navlink-wrap:hover .megamenu,
.navlink-wrap:focus-within .megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: background .2s;
    cursor: pointer;
}
.mega-item:hover { background: var(--warm); }
.mega-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--teal-softer);
    color: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, transform .2s;
}
.mega-item:hover .mega-icon {
    background: #fff;
    transform: scale(1.05);
}
.mega-text { min-width: 0; }
.mega-title {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 3px;
    font-family: var(--font-serif);
}
.mega-desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Selector idioma */
.lang { position: relative; }
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #4A413A;
    border-radius: 8px;
    transition: background .2s, color .2s;
    font-family: inherit;
}
.lang-btn:hover { background: var(--teal-soft); color: var(--teal); }
.lang-flag {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
}
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(14, 37, 36, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
    min-width: 180px;
    z-index: 60;
}
.lang:hover .lang-dropdown,
.lang:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-form { margin: 0; }
.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #4A413A;
    transition: background .2s;
    cursor: pointer;
    width: 100%;
    text-align: start;
    font-family: inherit;
}
.lang-item:hover { background: var(--warm); }
.lang-item.active { color: var(--teal); font-weight: 500; }
.lang-item.active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ember);
    margin-inline-start: auto;
    box-shadow: 0 0 6px var(--ember);
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--line);
    margin: 0 6px;
}

.btn-login {
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    border-radius: 8px;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.btn-login:hover { background: var(--teal-soft); }

.btn-register {
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-hover) 100%);
    border-radius: 8px;
    transition: transform .15s, box-shadow .2s, filter .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 95, 86, 0.25);
    font-family: inherit;
}
.btn-register::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .6s;
}
.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 95, 86, 0.38);
    filter: brightness(1.05);
}
.btn-register:hover::before { transform: translateX(100%); }
.btn-register svg { transition: transform .25s; }
.btn-register:hover svg { transform: translateX(2px); }

/* Menú de usuario */
.user-menu { position: relative; }
.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: background .2s, border-color .2s;
    font-family: inherit;
    background: #fff;
}
.user-menu-btn:hover {
    background: var(--teal-soft);
    border-color: var(--teal-border);
}
.user-menu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--ember-deep));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}
.user-menu-pop {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(14, 37, 36, 0.16);
    min-width: 240px;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
}
.user-menu:hover .user-menu-pop,
.user-menu:focus-within .user-menu-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-menu-pop-head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}
.user-menu-pop-head strong {
    font-size: 13px;
    color: var(--ink);
    display: block;
    font-family: var(--font-serif);
    font-weight: 500;
}
.user-menu-pop-head span { font-size: 12px; color: var(--muted); }
.user-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #4A413A;
    transition: background .2s;
}
.user-menu-link:hover { background: var(--warm); color: var(--ink); }
.user-menu-link svg { opacity: 0.6; }

/* Hamburguesa móvil */
.nav-burger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    transition: background .2s;
}
.nav-burger:hover { background: var(--teal-soft); }
.nav-burger span {
    width: 18px;
    height: 1.5px;
    background: var(--ink);
    border-radius: 1px;
    transition: transform .25s, opacity .25s;
}

/* ============ BOTONES ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 26px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s;
    font-family: inherit;
    border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-hover) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 95, 86, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 10px 26px rgba(15, 95, 86, 0.4);
    filter: brightness(1.06);
}
.btn-ember {
    background: linear-gradient(135deg, var(--ember) 0%, var(--ember-deep) 100%);
    color: var(--ink);
    box-shadow: 0 2px 10px rgba(200, 133, 48, 0.3);
}
.btn-ember:hover {
    box-shadow: 0 10px 26px rgba(200, 133, 48, 0.45);
    filter: brightness(1.04);
}
.btn-sos {
    background: var(--sos);
    color: #fff;
    box-shadow: 0 0 0 0 var(--sos-glow), 0 6px 18px rgba(209, 62, 54, 0.3);
    animation: sos-pulse 2.4s ease-in-out infinite;
}
@keyframes sos-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(209, 62, 54, 0.28), 0 6px 18px rgba(209, 62, 54, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(209, 62, 54, 0), 0 6px 18px rgba(209, 62, 54, 0.3); }
}
.btn-ghost {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--teal-border);
}
.btn-ghost:hover { background: var(--teal-soft); border-color: var(--teal); }

.btn-white {
    background: #fff;
    color: var(--ink);
    padding: 14px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-family: inherit;
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.btn-outline-white {
    background: transparent;
    color: #fff;
    padding: 14px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: background .2s, border-color .2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
}

/* ============ ELEMENTOS COMPARTIDOS ============ */
.kicker {
    font-size: 11.5px;
    letter-spacing: 2.2px;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.kicker::before {
    content: '';
    width: 18px;
    height: 1px;
    background: var(--ember);
}
.kicker--light { color: var(--ember); }
.kicker--light::before { background: var(--ember); }

.h2 {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 36px;
    line-height: 1.22;
    color: var(--ink);
    letter-spacing: -0.4px;
    margin: 0;
}
.h2 em {
    font-style: italic;
    color: var(--teal);
    font-weight: 500;
}

/* ============ FAQ ============ */
.faq-list {
    display: flex;
    flex-direction: column;
}
.faq-item {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    cursor: pointer;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-family: var(--font-serif);
    font-size: 17.5px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.1px;
    line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--teal-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    transition: transform .3s ease, background .2s, color .2s;
    flex-shrink: 0;
    background: #fff;
}
.faq-item[open] .faq-icon {
    transform: rotate(45deg);
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}
.faq-item p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink-body);
    margin: 14px 0 0;
    max-width: 620px;
}

/* ============ FOOTER (cálido, nocturno) ============ */
.footer {
    background: var(--night-deep);
    background-image:
        radial-gradient(700px 400px at 90% 0%, rgba(232, 165, 71, 0.08), transparent 70%),
        radial-gradient(500px 300px at 0% 100%, rgba(15, 95, 86, 0.12), transparent 70%);
    color: #A8A093;
    padding: 80px 48px 32px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember) 20%, var(--teal) 50%, var(--ember) 80%, transparent);
    opacity: 0.5;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.3fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}
.footer-brand-block .footer-brand {
    display: inline-flex;
    margin-bottom: 18px;
}
.footer-brand-logo {
    height: 120px;
    width: auto;
    display: block;
    border-radius: 10px;
}
.footer-tagline {
    color: #B8AF97;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 290px;
}
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}
.footer-contact a,
.footer-contact span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #D8CFB6;
    transition: color .2s;
}
.footer-contact a:hover { color: var(--ember); }
.footer-contact svg { color: #8A8070; flex-shrink: 0; }

.footer-col-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    letter-spacing: 0.3px;
    font-family: var(--font-serif);
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.footer-links a {
    font-size: 13.5px;
    color: #A8A093;
    transition: color .2s, transform .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}
.footer-links a:hover { color: #fff; transform: translateX(3px); }

.footer-news-desc {
    font-size: 13.5px;
    color: #A8A093;
    line-height: 1.6;
    margin-bottom: 16px;
}
.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.footer-social {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #A8A093;
    transition: all .2s;
}
.footer-social:hover {
    color: var(--night-deep);
    background: var(--ember);
    border-color: var(--ember);
    transform: translateY(-2px);
}

/* Tira de garantías técnico-legales */
.footer-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 40px 0 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-trust-badge {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: border-color .25s, background .25s, transform .2s;
}
.footer-trust-badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(15, 95, 86, 0.45);
    transform: translateY(-2px);
}
.footer-trust-badge svg {
    color: #4FB5A8;
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-trust-badge strong {
    display: block;
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font-serif);
    letter-spacing: -0.1px;
    margin-bottom: 4px;
}
.footer-trust-badge span {
    display: block;
    font-size: 12px;
    color: #A8A093;
    line-height: 1.45;
}

/* Barra legal */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 1320px;
    margin: 0 auto;
}
.footer-legal a {
    font-size: 12.5px;
    color: #8A8070;
    letter-spacing: 0.2px;
    transition: color .2s;
}
.footer-legal a:hover { color: #fff; }

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 12.5px;
    color: #8A8070;
}
.footer-bottom-left {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-bottom-left strong {
    color: #fff;
    font-weight: 600;
}
.footer-bottom-sep {
    width: auto;
    height: auto;
    background: transparent;
    color: #4B4A45;
}
.footer-bottom-sep::before { content: '·'; }
.footer-bottom-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6B6257;
    letter-spacing: 0.3px;
    font-style: normal;
    font-family: inherit;
    opacity: 1;
}
.footer-badges {
    max-width: 1320px;
    margin: 0 auto;
}
.footer-bottom a { transition: color .2s; }
.footer-bottom a:hover { color: #fff; }
.footer-certs {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-cert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    color: #A8A093;
    background: rgba(255, 255, 255, 0.02);
}
.footer-cert svg { color: var(--ember); flex-shrink: 0; }

/* ============ MESSAGES / ALERTS ============ */
.messages-toast {
    position: fixed;
    top: 84px;
    inset-inline-end: 24px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(14, 37, 36, 0.14);
}
.alert--success { border-inline-start: 3px solid var(--wa); }
.alert--error { border-inline-start: 3px solid var(--sos); }
.alert--warning { border-inline-start: 3px solid var(--ember); }
.alert--info { border-inline-start: 3px solid var(--teal); }

/* ============ RESPONSIVE BASE ============ */
@media (max-width: 1100px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px 48px;
    }
    .footer-brand-block { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .topbar { padding: 9px 20px; font-size: 12px; gap: 12px; }
    .topbar-right { display: none; }
    .nav { padding: 0 20px; }
    .nav-left { gap: 20px; }
    .navlinks { display: none; }
    .nav-burger { display: inline-flex; }
    .lang { display: none; }
    .btn-login { display: none; }
    .btn-register { display: none; }
    .user-menu { display: none; }
    .nav-divider { display: none; }
    .footer { padding: 56px 20px 28px; }
    .footer-top { gap: 32px 20px; }
    .footer-badges { grid-template-columns: 1fr 1fr; }
    .footer-legal { gap: 10px 18px; justify-content: center; }
    /* Footer-bottom en móvil: centrado */
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-top: 20px;
        text-align: center;
    }
    .footer-bottom-left {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }
    .footer-bottom-meta {
        justify-content: center;
    }
    .footer-bottom-sep { display: none; }
}
@media (max-width: 340px) {
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
    .footer-brand-block { grid-column: auto; }
    .footer-badges { grid-template-columns: 1fr; }
}
/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.mobile-drawer {
    position: fixed;
    inset: 0;
    /* Encima de topbar (1201) y nav-wrap (1200). Sin esto, al abrir el
       drawer con scroll arriba del todo el topbar fijo tapa el primer
       enlace (Inicio) del menu. */
    z-index: 1300;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear .35s;
}
.mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s;
}
.mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 18, 0.5);
    opacity: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity .3s ease;
}
.mobile-drawer.is-open .mobile-drawer-backdrop { opacity: 1; }

.mobile-drawer-panel {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    bottom: 0;
    width: 88%;
    max-width: 380px;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -20px 0 60px rgba(6, 10, 18, 0.3);
}
.mobile-drawer.is-open .mobile-drawer-panel {
    transform: translateX(0);
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 2;
}
.mobile-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    max-width: calc(100% - 50px);
}
.mobile-drawer-brand-logo {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.mobile-drawer-brand small {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.2px;
    font-style: normal;
}
.mobile-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: transparent;
    transition: background .2s, color .2s;
    flex-shrink: 0;
}
.mobile-drawer-close:hover {
    background: var(--teal-soft);
    color: var(--teal);
}

/* Nav */
.mobile-drawer-nav {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: background .2s, color .2s;
}
.mobile-drawer-link svg { color: var(--teal); opacity: 0.85; flex-shrink: 0; }
.mobile-drawer-link:hover,
.mobile-drawer-link.is-current {
    background: var(--teal-soft);
    color: var(--teal);
}

.mobile-drawer-group { border-radius: 10px; }
.mobile-drawer-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s;
}
.mobile-drawer-group summary::-webkit-details-marker { display: none; }
.mobile-drawer-group summary svg:first-child { color: var(--teal); opacity: 0.85; flex-shrink: 0; }
.mobile-drawer-group summary:hover { background: var(--teal-soft); }
.mobile-drawer-chevron {
    margin-inline-start: auto;
    color: var(--muted);
    transition: transform .25s ease;
    flex-shrink: 0;
}
.mobile-drawer-group[open] summary {
    background: var(--teal-soft);
    color: var(--teal);
}
.mobile-drawer-group[open] .mobile-drawer-chevron {
    transform: rotate(180deg);
    color: var(--teal);
}
.mobile-drawer-sub {
    display: flex;
    flex-direction: column;
    padding: 4px 14px 10px 46px;
}
.mobile-drawer-sub a {
    padding: 9px 10px;
    font-size: 14px;
    color: var(--ink-body);
    border-radius: 8px;
    transition: background .2s, color .2s;
    position: relative;
}
.mobile-drawer-sub a::before {
    content: '';
    position: absolute;
    inset-inline-start: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ember);
    opacity: 0;
    transition: opacity .2s;
}
.mobile-drawer-sub a:hover {
    color: var(--teal);
    background: var(--teal-soft);
}
.mobile-drawer-sub a:hover::before { opacity: 1; }

/* Sección idiomas */
.mobile-drawer-section-title {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 18px 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-drawer-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}
.mobile-drawer-lang {
    padding: 4px 12px 8px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
}
.mobile-drawer-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 2px 4px;
}
.mobile-drawer-lang-grid .lang-form { margin: 0; }
.mobile-lang-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    width: 100%;
    text-align: start;
}
.mobile-lang-chip:hover {
    border-color: var(--teal-border);
    background: var(--teal-soft);
}
.mobile-lang-chip.is-active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.mobile-lang-chip .lang-flag { flex-shrink: 0; }

/* Sección institucional */
.mobile-drawer-institutional {
    padding: 4px 12px 12px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
}
.mobile-drawer-inst-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 2px 4px;
}
.mobile-drawer-inst-links a {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink-body);
    font-size: 12.5px;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.mobile-drawer-inst-links a:hover {
    background: var(--teal);
    color: #fff;
}

/* CTA fondo */
.mobile-drawer-cta {
    margin-top: auto;
    padding: 16px 20px 24px;
    border-top: 1px solid var(--line);
    background: var(--paper);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    bottom: 0;
}
.mobile-drawer-cta .btn {
    justify-content: center;
    padding: 13px 18px;
    font-size: 14.5px;
    width: 100%;
}


/* ============================================================
   BANNER MODO TESTER
   ------------------------------------------------------------
   Aviso amarillo persistente en TODA la plataforma mientras la
   flag `app.modo_tester_global = 'True'`. Pensado para no dejar
   duda al usuario sobre el estado operativo: ningun servicio
   externo (112, policia, FCSE, VioGen) se contacta de verdad
   mientras este banner esté visible.

   Sin estilos inline (CSP). Sin JS. Si el usuario dispara un
   SOS desde la app o pulsa "Llamar al 112", verá ademas un
   mensaje propio en pantalla explicando qué se simula.

   Cuando el equipo decida pasar a produccion real, un
   superusuario cambia la flag desde /admin/feature-flags/ y
   este banner desaparece sin redeploy.
   ============================================================ */

.modo-tester-banner {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    color: #422006;
    padding: 10px 18px;
    border-bottom: 2px solid #b45309;
    position: relative;
    z-index: 1000;
}

.modo-tester-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.modo-tester-pill {
    background: #422006;
    color: #fef3c7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.modo-tester-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: #422006;
}

.modo-tester-text strong {
    font-weight: 700;
    color: #1f1006;
}

@media (max-width: 720px) {
    .modo-tester-banner { padding: 8px 14px; }
    .modo-tester-text { font-size: 12.5px; }
}
