/* =========================================
   VARIABLES GLOBALES Y PALETA (Se cargan aquí primero)
   ========================================= */
:root {
    --cyan: #00E8EC; 
    --magenta: #EE50FF;
    --yellow: #FED402;
    --azul: #4DB8FF; 
    --mora: #B874FF; 
    --orange: #FE612A;
    --bg-header: #050505; 
    --bg-panel: #121214;
    --text-main: #ffffff;
    --text-muted: #e0e0e0;
    --border-color: #27272a; 
}

/* Reset Estructural */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* El lienzo negro del "Ferrari" */
body {
    background-color: #000000; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Obliga al footer a ir abajo siempre */
}

/* =========================================
   ESTILOS DEL HEADER (DESKTOP)
   ========================================= */
.main-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    position: relative; 
}

.header-container {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    height: 70px; 
    padding: 0 40px; 
    max-width: 1280px; 
    margin: 0 auto; 
    width: 100%;
}

/* Logo y Texto */
.brand-section { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon { height: 40px; width: 40px; object-fit: contain; }
.brand-text { font-family: system-ui, -apple-system, sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-yellow { color: var(--yellow); }

/* Navegación Principal */
.nav-section { display: flex; align-items: center; gap: 32px; height: 100%; }
/* Estado Base de los Enlaces del Header (Igualados al Footer) */
.nav-link {
    font-family: system-ui, -apple-system, sans-serif !important; 
    color: var(--text-muted); /* Sin important para permitir el hover */
    text-decoration: none; 
    font-size: 0.85rem !important; /* Tamaño emparejado con el footer */
    font-weight: 600 !important; /* Grosor regular emparejado con el footer */
    position: relative; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    transition: color 0.3s ease;
}

/* Estado Hover e Ítem Activo (Recuperando el Cyan) */
.nav-link:hover, 
.current-menu-item > .nav-link,
.current-menu-item > a {
    color: var(--cyan) !important; 
}

/* Línea inferior para el menú activo */
.current-menu-item > .nav-link::after,
.current-menu-item > a::after {
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background-color: var(--cyan);
}

/* Botones de acción */
.action-section { display: flex; align-items: center; gap: 15px; }
.search-btn, .menu-toggle {
    background: transparent; 
    border: none; 
    color: var(--text-main); 
    cursor: pointer;
    padding: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: color 0.3s ease;
}
.search-btn:hover, .menu-toggle:hover { color: var(--cyan); }
.menu-toggle { display: none; } /* Oculto en escritorio */

/* =========================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================= */
@media (max-width: 1050px) {
    .header-container { padding: 0 20px; }
    .brand-text { font-size: 1.2rem; margin-right: 0 !important; }
    
    /* Mostrar botón hamburguesa */
    .menu-toggle { display: flex; }
    
    /* Transformar el menú horizontal en un desplegable vertical */
    .nav-section { 
        display: none; 
        position: absolute; 
        top: 70px; 
        left: 0; 
        width: 100%; 
        background-color: var(--bg-header); 
        flex-direction: column; 
        align-items: flex-start; 
        height: auto; 
        padding: 10px 0; 
        z-index: 1000; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    /* Clase que activa el JS para desplegar */
    .nav-section.menu-open { display: flex; }
    
    .nav-link { 
        width: 100%; 
        padding: 15px 40px; 
        font-size: 0.9rem; 
        height: auto;
    }
    
    /* Ajuste de la línea indicadora activa para móvil (se pone a la izquierda) */
    .current-menu-item > .nav-link::after { 
        width: 3px; 
        height: 100%; 
        top: 0; 
        left: 0; 
    }
}