.cosmoHeaderContainer {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.cosmoHeader {
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    background: transparent;
    box-shadow: unset;
    top: 0;
    width: 100%;
    padding: 15px 30px;
    color: var(--color-blanco);
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
    z-index: 100;
}

ul#menu-main-menu {
    display: flex;
    gap: 30px;
}

/* Estado cuando el usuario hace scroll */
.cosmoHeader.scrolled {
    background: rgb(20 20 20);
    /* backdrop-filter: blur(10px); */
    /* box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15); */
}

.cosmoHeader a {
    color: #ffffff;
    font-size: 14px;
}

/* Ultimo item del menu como boton CTA (Contacto) */
ul#menu-main-menu > li:last-child > a,
.cosmoHeaderMenu ul > li:last-child > a {
    display: inline-block;
    padding: 6px 19px;
    background-color: var(--color-accent, #9da876);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease;
}

ul#menu-main-menu > li:last-child > a:hover,
.cosmoHeaderMenu ul > li:last-child > a:hover {
    background-color: #8a9466;
}

.cosmoHeaderBurger {
    display: none;
}

.cosmoHeaderBackground {
    display: none;
}

/* Estilos del logo SVG - hereda color del contenedor para adaptarse al fondo */
.cosmoHeaderLogo {
    display: flex;
    align-items: center;
}

.cosmoHeaderLogo .gbn-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.cosmoHeaderLogoSvg {
    width: 36px;
    height: 36px;
    color: currentColor;
    transition: opacity 0.3s ease;
}

.cosmoHeaderLogoSvg:hover {
    opacity: 0.8;
}

/* Menu movil desplegable - Estado abierto */
.cosmoHeader.open .cosmoHeaderBackground,
[gloryHeader].open .cosmoHeaderBackground,
.cosmoHeader.open .background,
[gloryHeader].open .background {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99;
}

.cosmoHeader.open ul#menu-main-menu,
.cosmoHeader.open .cosmoHeaderMenu ul,
.cosmoHeader.open .nav-links,
[gloryHeader].open ul#menu-main-menu,
[gloryHeader].open .nav-links {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    gap: 30px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
}

.cosmoHeader.open ul#menu-main-menu a,
.cosmoHeader.open .nav-links a,
.cosmoHeader.open .cosmoHeaderMenu a,
[gloryHeader].open ul#menu-main-menu a,
[gloryHeader].open .nav-links a {
    font-size: 24px;
    color: #fff;
}

/* Estilos del boton burger - visible con icono SVG */
.cosmoHeader .burger,
.cosmoHeaderBurger,
[gloryHeader] .burger {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 110;
}

.cosmoHeader .burger svg,
.cosmoHeaderBurger svg,
[gloryHeader] .burger svg {
    color: #fff;
    width: 24px;
    height: 24px;
}

/* 2. TABLET - Container Query (header ahora dentro del main con container-type) */
@container gbn-root (max-width: 1024px) {
    .cosmoHeaderBurger,
    .cosmoHeader .burger {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 110;
    }

    /* Ocultar menu principal en tablet */
    ul#menu-main-menu,
    .cosmoHeaderMenu ul,
    .cosmoHeader .nav-links {
        display: none !important;
    }
}

/* 3. MOVIL - Container Query */
@container gbn-root (max-width: 768px) {
    .cosmoHeaderBurger,
    .cosmoHeader .burger {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 110;
    }

    /* Ocultar menu principal en movil */
    ul#menu-main-menu,
    .cosmoHeaderMenu ul,
    .cosmoHeader .nav-links {
        display: none !important;
    }

    .cosmoHeader {
        padding: 12px 20px;
    }
}


.cosmoHeaderMenu ul {
    display: flex;
    gap: 30px;
}

nav.cosmoHeaderMenu {
    display: flex;
    align-items: center;
}