/* global/menuypie/estilos_menuypie.css */

:root {
    --menu-bg: #ffffff;
    --menu-texto: #000000;
    --menu-hover: #666666;
    --menu-borde: #eaeaea;
    --transicion-rapida: all 0.3s ease;
}

/* --- HEADER PRINCIPAL --- */
.header-global {
    background-color: var(--menu-bg);
    border-bottom: 1px solid var(--menu-borde);
    position: sticky; 
    top: 0;
    z-index: 1000; 
    width: 100%;
    font-family: 'Inter', -apple-system, sans-serif;
}

.header-contenedor {
    /* MAGIA 1: Expande el menú para aprovechar el espacio blanco de tu pantalla */
    max-width: 100%; 
    margin: 0 auto;
    padding: 0 40px; /* Margen de respiración a los lados */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px; /* Un pelín más alto para acomodar textos en dos renglones */
}

/* --- LOGO --- */
.header-logo {
    display: flex;        
    align-items: center;  
    gap: 8px;             
    font-size: 18px;      
    font-weight: 800;
    color: var(--menu-texto);
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-right: auto;   
    padding-right: 20px;  
}

.header-logo span {
    font-weight: 300;
    color: var(--menu-hover);
    margin-left: 5px;
}

.logo-img {
    height: 32px; 
    width: auto;
    filter: brightness(0); 
    transition: var(--transicion-rapida);
}

.header-logo:hover .logo-img {
    filter: brightness(0) opacity(0.6); 
}

/* --- NAVEGACIÓN DESKTOP --- */
.header-nav {
    display: flex;
    gap: 18px; /* Un espacio agradable entre los botones */
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--menu-texto);
    font-weight: 600;
    font-size: 13px; /* MAGIA 2: ¡Letra más grande! */
    text-transform: uppercase;
    letter-spacing: 0; 
    transition: var(--transicion-rapida);
    position: relative;
    
    /* MAGIA 3: Permite que los textos bajen de renglón si son muy largos */
    white-space: normal; 
    text-align: center;
    line-height: 1.2;
    max-width: 135px; /* Forzamos a que "Praxis Arquitectónica" sea de dos renglones */
}

/* Efecto de línea debajo de los enlaces */
.header-nav a:not(.btn-sesion)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px; /* Bajamos un poco la línea para que no roce los dos renglones */
    left: 0;
    background-color: var(--menu-texto);
    transition: width 0.3s ease;
}

.header-nav a:hover {
    color: var(--menu-hover);
}

.header-nav a:not(.btn-sesion):hover::after {
    width: 100%; 
}

/* --- BOTÓN DINÁMICO DE SESIÓN (ESTILO PASTILLA) --- */
.header-nav a.btn-sesion {
    background-color: var(--negro-puro);
    color: var(--blanco);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 10px; 
    max-width: none; /* Asegura que el botón nunca se parta en dos renglones */
    white-space: nowrap; 
}

.header-nav a.btn-sesion:hover {
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- BOTÓN HAMBURGUESA --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--menu-texto);
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    font-size: 32px;
}

/* --- ADAPTABILIDAD MÓVIL --- */
@media (max-width: 1200px) {
    .menu-toggle {
        display: block; 
    }

    .header-nav {
        position: fixed;
        top: 85px; 
        right: -100%; 
        width: 100%;
        height: calc(100vh - 85px);
        background-color: var(--menu-bg);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        overflow-y: auto;
    }

    .header-nav.activo {
        right: 0; 
    }

    .header-nav a {
        font-size: 16px; 
        max-width: none; /* En celular dejamos que se expandan libres */
    }
    
    .header-nav a.btn-sesion {
        margin-top: 20px; 
        padding: 12px 30px;
        font-size: 16px;
    }
}