/*
 BIOHACKING 360 LABS — WEB-02J
 Header ejecutivo y responsive.
 No modifica el hero ni secciones interiores.
*/

/* HEADER BASE */

header {
    position:relative;
    z-index:100;
    background:#ffffff;
    border-bottom:1px solid #e6ebf2;
    box-shadow:0 5px 22px rgba(17,40,79,.035);
}

/* USAR ANCHO REAL DE PANTALLA */

header .wrap.header-inner {
    width:calc(100% - 96px) !important;
    max-width:none !important;
    margin:0 auto !important;

    min-height:96px;
    padding:13px 0;

    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;

    gap:clamp(20px,2.5vw,48px);
}

/* LOGO OFICIAL */

header .official-brand {
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex:0 0 auto;
    min-width:0;
    text-decoration:none;
}

header .official-brand img {
    display:block;
    width:clamp(205px,14vw,260px) !important;
    max-width:260px !important;
    max-height:76px !important;
    height:auto;
    object-fit:contain;
    object-position:left center;
}

/* NAVEGACION PRINCIPAL */

header #main-navigation {
    position:static;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:1 1 auto;

    min-width:0;
    gap:clamp(15px,1.65vw,31px);

    margin:0;
    padding:0;
    background:transparent;
    box-shadow:none;
    border:0;
}

header #main-navigation a {
    position:relative;
    display:inline-flex;
    align-items:center;

    color:#172b48;
    font-size:clamp(13px,.86vw,16px);
    font-weight:600;
    line-height:1.4;
    letter-spacing:-.012em;

    text-decoration:none;
    white-space:nowrap;

    padding:13px 0;
    border:0;

    transition:color .2s ease;
}

header #main-navigation a:hover {
    color:#185bb8;
}

header #main-navigation a::after {
    position:absolute;
    bottom:7px;
    left:0;
    height:2px;
    background:#2169c5;
    border-radius:2px;
}

/* ACCIONES A LA DERECHA */

header .actions {
    display:flex;
    align-items:center;
    justify-content:flex-end;

    flex:0 0 auto;
    gap:12px;
    margin-left:0;
}

/* SELECTOR: SIN AGRANDAR NI DUPLICAR TEXTO */

header .language-switch {
    flex:0 0 auto;
}

header .language-switch > summary {
    min-height:44px;
    border-radius:12px;
    box-shadow:none;
}

/* TOGGLE MOVIL */

header .mobile-toggle {
    flex:0 0 44px;
}

/* PANTALLAS INTERMEDIAS */

@media(max-width:1350px) {

    header .wrap.header-inner {
        width:calc(100% - 64px) !important;
        gap:22px;
    }

    header .official-brand img {
        width:205px !important;
    }

    header #main-navigation {
        gap:clamp(12px,1.2vw,20px);
    }

    header #main-navigation a {
        font-size:13px;
    }
}

/* MENU TABLET Y MOVIL: NO FORZAR LINKS EN UNA FILA */

@media(max-width:1100px) {

    header .wrap.header-inner {
        width:calc(100% - 48px) !important;
        min-height:80px;
        padding:12px 0;
        gap:12px;
        position:relative;
    }

    header .official-brand {
        flex:1 1 auto;
    }

    header .official-brand img {
        width:190px !important;
        max-height:60px !important;
    }

    header .mobile-toggle {
        display:inline-flex;
        order:3;
        flex:0 0 44px;
    }

    header .actions {
        order:2;
    }

    header #main-navigation {
        display:none;
        position:absolute;
        top:100%;
        left:0;
        right:0;
        width:100%;

        flex-direction:column;
        align-items:stretch;
        justify-content:flex-start;
        gap:0;

        background:#fff;
        padding:13px 19px 19px;
        border:1px solid #e3ebf5;
        border-radius:0 0 16px 16px;
        box-shadow:0 20px 32px rgba(18,43,80,.12);
        z-index:120;
    }

    header #main-navigation.mobile-open {
        display:flex;
    }

    header #main-navigation a {
        display:flex;
        width:100%;
        padding:14px 12px;
        border-bottom:1px solid #edf1f7;
        font-size:14px;
        white-space:normal;
    }

    header #main-navigation a::after {
        display:none;
    }

    header #main-navigation a:last-child {
        border-bottom:0;
    }
}

/* TELEFONOS */

@media(max-width:640px) {

    header .wrap.header-inner {
        width:calc(100% - 28px) !important;
        min-height:72px;
        gap:7px;
    }

    header .official-brand img {
        width:clamp(135px,35vw,170px) !important;
        max-height:50px !important;
    }

    header .mobile-toggle {
        flex-basis:40px;
        width:40px;
        height:40px;
    }

    header .actions {
        gap:6px;
    }

    header .language-switch > summary {
        min-height:40px;
    }
}

@media(prefers-reduced-motion:reduce) {
    header #main-navigation a {
        transition:none;
    }
}

/* ========================================================
   WEB-02J-R1 OVERRIDE
   CONTENEDOR EJECUTIVO CON MARGENES REALES
   ======================================================== */

@media (min-width:1101px) {

    header .wrap.header-inner {
        width:calc(100% - 72px) !important;
        max-width:1400px !important;
        margin-left:auto !important;
        margin-right:auto !important;

        justify-content:space-between;
        gap:28px;
    }

    header .official-brand {
        flex:0 0 auto;
    }

    header #main-navigation {
        flex:1 1 auto;
        min-width:0;
        justify-content:center;
    }

    header .actions {
        flex:0 0 auto;
        margin-left:auto;
    }
}

/* Tabletas: conservar los margenes sin desbordar. */

@media (min-width:641px) and (max-width:1100px) {

    header .wrap.header-inner {
        width:calc(100% - 48px) !important;
        max-width:1400px !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }
}

/* Telefonos: margenes proporcionados. */

@media (max-width:640px) {

    header .wrap.header-inner {
        width:calc(100% - 32px) !important;
        max-width:1400px !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }
}

