/* ================================================================
   FOCUS — NAVEGACIÓN PÚBLICA (Mujeres / Empresas)
   ================================================================
   Diseño compartido: cada página conserva su propio menú y sus enlaces.
   v6: desplegable más compacto y translúcido. No bloquea el scroll ni cubre
   toda la pantalla; el resto de la página permanece interactivo.
   No cargar este CSS en las vistas privadas.
   ================================================================ */

/* 1. Cabecera y logotipo. */
.site-head {
    z-index: 90;
    background: rgba(247, 250, 248, .97);
    backdrop-filter: blur(14px);
}

.head-inner {
    gap: 14px;
}

.head-inner .brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 7px 15px;
    border: 1px solid rgba(14, 42, 39, .14);
    border-radius: 9999px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(14, 42, 39, .06);
    flex: none;
}

.head-inner .brand img {
    width: clamp(94px, 11vw, 125px);
    max-height: 38px;
    object-fit: contain;
}

.focus-public-home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E9F1EE;
    color: #3C817A;
}

.focus-public-home-icon svg {
    width: 19px;
    height: 19px;
}

/* 2. Navegación horizontal de escritorio. */
.head-inner .nav {
    gap: 3px;
    flex-wrap: nowrap;
}

.head-inner .nav a {
    padding: 9px 12px;
    border-radius: 9999px;
    transition: background .2s ease, color .2s ease;
}

.head-inner .nav a::after {
    display: none;
}

.head-inner .nav a:hover,
.head-inner .nav a:focus-visible {
    background: #E9F1EE;
    color: #0E2A27;
}

.head-inner .head-actions .btn {
    border-radius: 9999px;
}

/* 3. Botón de apertura/cierre en móvil. */
.head-inner .burger {
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: auto;
    min-width: 88px;
    height: 52px;
    padding: 7px 14px 7px 8px;
    border: 1px solid rgba(14, 42, 39, .18);
    border-radius: 9999px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(14, 42, 39, .07);
}

.head-inner .burger img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.head-inner .burger span,
.head-inner .burger span::before,
.head-inner .burger span::after {
    background: #0E2A27;
}

.head-inner .burger[aria-expanded="true"] span {
    background: transparent;
}

/* 4. Desplegable móvil.
   La clase .drawer.is-open y el atributo inert se gestionan mediante
   focus-public-navigation.js. Sin capa oscura ni bloqueo del body. */
.drawer {
    overscroll-behavior-y: auto;
}

/* 5. Tarjetas compactas en dos columnas.
   La altura mínima admite una o dos líneas, sin desperdiciar espacio. */
.drawer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.drawer__grid .drawer__link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid #E5D9C8;
    border-radius: 17px;
    background: #FFFFFF;
    box-shadow: 0 3px 0 rgba(14, 42, 39, .05);
    color: #0E2A27;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.28;
    text-align: center;
    transition: background .2s ease, border-color .2s ease,
        transform .2s ease;
}

.drawer__grid .drawer__link:hover,
.drawer__grid .drawer__link:focus-visible {
    background: #E9F1EE;
    border-color: #65ACA4;
    transform: translateY(-2px);
}

/* 6. Botón «Hablemos» y lema: espaciado reducido para un menú más corto. */
.drawer .focus-public-drawer__action {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding-block: 10px;
    border-radius: 9999px;
    background: #F39217;
    color: #0E2A27;
    text-align: center;
}

.drawer .focus-public-drawer__action:hover {
    background: #FFA62B;
}

.focus-public-drawer__tagline {
    margin-top: 12px;
    color: #6F837F;
    font-size: 11.5px;
    text-align: center;
}

/* 7. Desktop: nunca mostrar el cajón móvil. */
@media (min-width: 861px) {
    .drawer {
        display: none;
    }
}

@media (max-width: 860px) {
    .head-inner {
        height: 72px;
    }

    .head-inner .burger {
        display: inline-flex;
    }

    .head-inner .brand {
        min-width: 0;
        padding: 7px 11px;
    }

    .head-inner .brand img {
        width: clamp(87px, 24vw, 124px);
    }

    /*
       El panel se despliega debajo de la cabecera, alineado a la derecha.
       La altura se adapta a su contenido: no tapa el resto de la página.
       Si falta altura (móvil horizontal), solo el panel tiene scroll.
    */
    .drawer {
        position: fixed;
        inset: 80px max(12px, env(safe-area-inset-right)) auto auto;
        z-index: 85;
        width: min(560px, calc(100vw - 24px));
        max-height: calc(100vh - 94px - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 94px - env(safe-area-inset-bottom));
        padding: 14px clamp(14px, 4vw, 24px) 16px;
        overflow-x: hidden;
        overflow-y: auto;
        border: 1px solid rgba(14, 42, 39, .14);
        border-radius: 22px;
        background: rgba(247, 250, 248, .84);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 18px 48px rgba(14, 42, 39, .16);
    }
}

/* 8. Adaptación a móviles estrechos y pantallas bajas. */
@media (max-width: 380px) {
    .drawer__grid {
        gap: 8px;
    }

    .drawer__grid .drawer__link {
        min-height: 54px;
        padding: 8px 7px;
        font-size: 12.5px;
    }

    .head-inner .burger {
        min-width: 77px;
        gap: 9px;
        padding-right: 11px;
    }
}

@media (max-width: 860px) and (max-height: 540px) {
    .drawer {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .drawer__grid .drawer__link {
        min-height: 48px;
        padding-block: 7px;
    }

    .focus-public-drawer__tagline {
        margin-top: 8px;
    }
}

/* 9. Respetar preferencias de accesibilidad. */
@media (prefers-reduced-motion: reduce) {
    .drawer__grid .drawer__link {
        transition: none;
    }
}
