/* ============================================
   DIGIN PERÚ - HEADER STYLES
   Estilos del menú de navegación
   ============================================ */

/* === HEADER PRINCIPAL === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--graphite);
    z-index: 1000;
    transition: all var(--transition-base);
    border-bottom: 2px solid var(--neon-green);
    box-shadow: 0 4px 20px rgba(0, 255, 170, 0.1);
}

/* Header con scroll */
header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--neon-green);
}

/* === NAVEGACIÓN === */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: var(--container-xl);
    margin: 0 auto;
}

/* === LOGO === */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: var(--font-weight-extrabold);
    font-size: 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 40px;
    width: auto;
    transition: filter var(--transition-base);
}

.logo:hover img {
    filter: drop-shadow(0 0 10px var(--neon-green));
}

.logo-text {
    color: var(--digital-blue);
    text-shadow: 0 0 15px rgba(0, 119, 255, 0.5);
}

/* === MENÚ DE NAVEGACIÓN === */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: color var(--transition-base);
    position: relative;
    display: block;
}

.nav-links a:hover {
    color: var(--neon-green);
}

/* Efecto de subrayado animado */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-green) 0%, var(--digital-blue) 100%);
    transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Link activo */
.nav-links a.active {
    color: var(--neon-green);
}

/* === BOTÓN CTA EN EL MENÚ === */
.nav-cta {
    background: linear-gradient(135deg, var(--neon-green) 0%, var(--digital-blue) 100%);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-bold);
    box-shadow: 0 4px 15px rgba(0, 255, 170, 0.3);
    transition: all var(--transition-base);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 170, 0.5);
}

.nav-cta::after {
    display: none;
}

/* === MENÚ MÓVIL - BOTÓN HAMBURGUESA === */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--neon-green);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* Animación del icono hamburguesa a X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    nav {
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }
    
    /* Mostrar botón hamburguesa */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Ocultar menú desktop */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark-bg);
        flex-direction: column;
        gap: 0;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        transition: right var(--transition-base);
        overflow-y: auto;
        border-left: 3px solid var(--neon-green);
    }
    
    /* Menú móvil abierto */
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a {
        padding: 1rem 0;
        width: 100%;
        font-size: 1.1rem;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .nav-cta {
        margin-top: 1rem;
        text-align: center;
        border-radius: var(--radius-md);
    }
    
    /* Overlay cuando el menú está abierto */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        backdrop-filter: blur(5px);
    }
    
    .nav-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }
    
    .logo img {
        height: 35px;
    }
    
    .nav-links {
        width: 100%;
        right: -100%;
    }
}

/* === ANIMACIONES DE ENTRADA === */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header {
    animation: slideDown 0.5s ease-out;
}

/* === ACCESIBILIDAD === */
.mobile-menu-toggle:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: 4px;
}

.nav-links a:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: 4px;
    border-radius: 4px;
}

/* === EFECTO HOVER EN LOGO === */
@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--neon-green));
    }
    50% {
        filter: drop-shadow(0 0 15px var(--neon-green));
    }
}

.logo:hover img {
    animation: glow 1.5s ease-in-out infinite;
}
