/* ==========================================================================
   PB Design System
   COMPONENT · Header
   ========================================================================== */

/* --------------------------------------------------------------
   Cabecera
-------------------------------------------------------------- */

.pb-root .cabecera-sitio {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    border-bottom: var(--border-gold);
    box-shadow: var(--shadow-abajo);
    background: var(--color-fondo);
}

.pb-root .cabecera-sitio .contenedor {
    width: 90%;
    max-width: var(--container-xl);
    padding-inline: 0;
}

/* --------------------------------------------------------------
   Navegación
-------------------------------------------------------------- */

.pb-root .navegacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    min-height: 5.8rem;
}

.pb-root .logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    height: 4.2rem;
    margin-right: var(--space-5);
}

.pb-root .logo img {
    display: block;
    width: auto;
    height: 100%;
    object-fit: contain;
}

.pb-root .navegacion-enlaces {
    display: flex;
    flex: 0 1 auto;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.pb-root .navegacion-enlaces li {
    display: inline-flex;
    align-items: center;
}

.pb-root .navegacion-enlaces a {
    display: inline-flex;
    align-items: center;
    font-family: var(--fuente-acento);
    font-size: var(--fs-500);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .06em;
    color: var(--color-bordoy); /* Color base elegante (púrpura oscuro) */
    position: relative; /* Necesario para el efecto de línea inferior */
    padding: 8px 0;
    text-shadow: none; /* Eliminamos la sombra pesada */
    transition: color 0.3s ease;
}

.pb-root .navegacion-enlaces a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-fucsia); /* Color de acento para el hover */
    transform-origin: bottom center;
    transition: transform 0.25s ease-out;
}

.pb-root .navegacion-enlaces a:hover {
    color: var(--color-fucsia);
}

.pb-root .navegacion-enlaces a:hover::after {
    transform: scaleX(1);
}

.pb-root .navegacion-enlaces a.enlace-dos-lineas {
    max-width: 13ch;
    white-space: normal;
}

/* --------------------------------------------------------------
   Redes
-------------------------------------------------------------- */

.pb-root .navegacion-sociales {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    margin-left: var(--space-4);
}

/* --------------------------------------------------------------
   Menú móvil
-------------------------------------------------------------- */

.pb-root .menu {
    display: none;
    position: relative;
    z-index: calc(var(--z-header) + 2);
    flex-direction: column;
    justify-content: center;
    gap: .32rem;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pb-root .menu span {
    display: block;
    width: 100%;
    height: .18rem;
    border-radius: var(--radio-pill);
    background: var(--color-bordoy);
    transform-origin: center;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.pb-root .menu-abierto .menu span:nth-child(1) {
    transform: translateY(.5rem) rotate(45deg);
}

.pb-root .menu-abierto .menu span:nth-child(2) {
    opacity: 0;
}

.pb-root .menu-abierto .menu span:nth-child(3) {
    transform: translateY(-.5rem) rotate(-45deg);
}

.pb-root .overlay-menu {
    display: none;
}

/* --------------------------------------------------------------
   Responsive
-------------------------------------------------------------- */

@media (min-width: 981px) {
    .pb-root {
        padding-top: 5.8rem;
    }

    .pb-root .cabecera-sitio {
        position: fixed;
        right: 0;
        left: 0;
        width: 100%;
    }
}

@media (max-width: 980px) {
    .pb-root .navegacion {
        justify-content: space-between;
    }

    .pb-root .logo {
        order: 1;
        margin-right: auto;
    }

    .pb-root .menu {
        display: flex;
        order: 3;
    }

    .pb-root .overlay-menu {
        display: none;
        position: fixed;
        inset: 0;
        z-index: calc(var(--z-header) + 1);
        background: var(--color-fondo);
    }

    .pb-root .menu-abierto .overlay-menu {
        display: block;
    }

    .pb-root .navegacion-enlaces {
        display: none;
        position: fixed;
        z-index: calc(var(--z-header) + 2);
        top: 6rem;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: var(--space-7);
        padding: var(--space-6);
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .pb-root .navegacion-enlaces a {
        text-shadow: none;
    }

    .pb-root .menu-abierto .navegacion-enlaces {
        display: flex;
    }

    .pb-root .cabecera-sitio .navegacion-sociales {
        display: inline-flex !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%) scale(1.1);
        transform-origin: center;
        gap: var(--space-5);
        margin: 0;
        z-index: 2;
    }
}