/* ============================================
   HEADER MEJORADO - LOGO MÁS VISIBLE Y ATRACTIVO
   ============================================ */

/* HEADER PRINCIPAL - FONDO CON GRADIENTE Y EFECTO GLASS */
header {
    background: linear-gradient(135deg, 
        rgba(3, 4, 94, 0.95) 0%, 
        rgba(2, 62, 138, 0.95) 50%, 
        rgba(0, 119, 182, 0.95) 100%);
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(184, 251, 60, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* EFECTO AL HACER SCROLL */
header.scrolled {
    padding: 0.3rem 0;
    background: linear-gradient(135deg, 
        rgba(3, 4, 94, 0.98) 0%, 
        rgba(2, 62, 138, 0.98) 100%);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(184, 251, 60, 0.25);
}

/* CONTENEDOR DEL HEADER */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    position: relative;
}

/* ============ LOGO SUPER MEJORADO ============ */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    flex-shrink: 0;
    position: relative;
    padding: 0.6rem 0.8rem;
    border-radius: 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.08) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(184, 251, 60, 0.1);
}

/* EFECTO NEÓN SUTIL EN EL CONTENEDOR DEL LOGO */
.logo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(184, 251, 60, 0.3), 
        rgba(3, 4, 94, 0.5), 
        rgba(184, 251, 60, 0.3));
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo:hover::before {
    opacity: 0.6;
    animation: neonGlow 2s ease-in-out infinite;
}

@keyframes neonGlow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

.logo:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.18) 0%, 
        rgba(255, 255, 255, 0.12) 100%);
    border-color: rgba(184, 251, 60, 0.4);
    box-shadow: 
        0 12px 40px rgba(184, 251, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 0 2px rgba(184, 251, 60, 0.2);
}

/* IMAGEN DEL LOGO CON EFECTOS MEJORADOS Y MÁS VISIBLE */
.logo-img {
    height: 65px; /* Aumentado significativamente */
    width: auto;
    max-width: 220px; /* Aumentado para permitir logos más anchos */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 12px;
    object-fit: contain;
    
    /* Filtros mejorados para máxima visibilidad */
    filter: 
        brightness(1.15) 
        contrast(1.25) 
        saturate(1.4)
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    
    /* Borde y efectos visuales */
    border: 3px solid rgba(184, 251, 60, 0.25);
    padding: 6px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.15), 
        rgba(255, 255, 255, 0.08));
    
    /* Sombra mejorada */
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    
    /* Efecto de relieve */
    position: relative;
    overflow: hidden;
}

/* EFECTO DE BRILLO EN LA IMAGEN */
.logo-img::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.8s ease;
}

.logo:hover .logo-img::before {
    transform: rotate(30deg) translateX(100%);
}

/* EFECTOS HOVER MEJORADOS */
.logo:hover .logo-img {
    transform: scale(1.15) rotate(-3deg);
    filter: 
        brightness(1.3) 
        contrast(1.35) 
        saturate(1.5)
        drop-shadow(0 12px 24px rgba(184, 251, 60, 0.4));
    
    border-color: rgba(184, 251, 60, 0.5);
    
    box-shadow: 
        0 15px 35px rgba(184, 251, 60, 0.35),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    
    animation: logoPulse 1.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        filter: 
            brightness(1.3) 
            contrast(1.35) 
            saturate(1.5)
            drop-shadow(0 12px 24px rgba(184, 251, 60, 0.4));
    }
    50% {
        filter: 
            brightness(1.4) 
            contrast(1.4) 
            saturate(1.6)
            drop-shadow(0 15px 30px rgba(184, 251, 60, 0.6));
    }
}

/* ============ MENÚ DE NAVEGACIÓN MEJORADO ============ */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

/* ENLACES DEL MENÚ CON DISEÑO MODERNO */
nav ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

/* EFECTO DE BRILLO AL PASAR EL CURSOR */
nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(184, 251, 60, 0.15), 
        transparent);
    transition: left 0.6s ease;
}

nav ul li a:hover::before {
    left: 100%;
}

/* EFECTO DE SUBRAYADO ANIMADO */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        rgba(184, 251, 60, 0.8) 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 70%;
}

/* ESTADOS DE LOS ENLACES */
nav ul li a:hover {
    color: #C8FF5E;
    transform: translateY(-3px);
    background: rgba(184, 251, 60, 0.1);
    border-color: rgba(184, 251, 60, 0.3);
    box-shadow: 0 8px 20px rgba(184, 251, 60, 0.2);
}

nav ul li a.active {
    color: #C8FF5E;
    background: linear-gradient(135deg, 
        rgba(184, 251, 60, 0.15), 
        rgba(184, 251, 60, 0.08));
    border-color: rgba(184, 251, 60, 0.4);
    box-shadow: 0 6px 15px rgba(184, 251, 60, 0.15);
}

/* ICONOS DE LOS ENLACES */
nav ul li a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    color: rgba(184, 251, 60, 0.8);
}

nav ul li a:hover i,
nav ul li a.active i {
    transform: scale(1.2) rotate(10deg);
    color: #C8FF5E;
}

/* ============ BOTÓN WHATSAPP MEJORADO ============ */
.whatsapp-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, 
        #25D366 0%, 
        #128C7E 50%, 
        #075E54 100%);
    color: white;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    border: none;
    animation: pulseWhatsApp 2s infinite;
}

/* ANIMACIÓN DE PULSO PARA WHATSAPP */
@keyframes pulseWhatsApp {
    0% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    }
    100% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    }
}

/* EFECTO DE BRILLO */
.whatsapp-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.7s ease;
}

.whatsapp-header:hover::before {
    left: 100%;
}

/* HOVER MEJORADO */
.whatsapp-header:hover {
    background: linear-gradient(135deg, 
        #1EBEA5 0%, 
        #25D366 50%, 
        #128C7E 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
    animation: none;
}

/* ICONO DE WHATSAPP */
.whatsapp-header i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.whatsapp-header:hover i {
    transform: scale(1.2) rotate(-5deg);
}

/* ============ BOTÓN MENÚ MÓVIL MEJORADO ============ */
.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    padding: 0.8rem;
    border-radius: 10px;
    background: rgba(184, 251, 60, 0.1);
    border: 1px solid rgba(184, 251, 60, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1001;
}

.mobile-menu:hover {
    color: #C8FF5E;
    background: rgba(184, 251, 60, 0.2);
    transform: rotate(90deg);
}

.mobile-menu.active {
    color: #C8FF5E;
    background: rgba(184, 251, 60, 0.2);
    transform: rotate(90deg);
}

/* ============ RESPONSIVE DESIGN MEJORADO ============ */

/* TABLET GRANDE */
@media (max-width: 1200px) {
    .logo {
        padding: 0.5rem 0.7rem;
    }
    
    .logo-img {
        height: 60px;
        max-width: 200px;
    }
    
    nav ul li a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .whatsapp-header {
        padding: 0.7rem 1.4rem;
        font-size: 0.85rem;
    }
}

/* TABLET */
@media (max-width: 992px) {
    .logo {
        padding: 0.5rem 0.6rem;
        border-radius: 14px;
    }
    
    .logo-img {
        height: 55px;
        max-width: 180px;
    }
    
    nav ul {
        gap: 0.3rem;
    }
    
    nav ul li a {
        padding: 0.55rem 0.9rem;
        font-size: 0.82rem;
    }
    
    .whatsapp-header {
        padding: 0.6rem 1.2rem;
        font-size: 0.82rem;
    }
}

/* TABLET PEQUEÑA / MÓVIL GRANDE */
@media (max-width: 768px) {
    .header-content {
        padding: 0.4rem 0;
    }
    
    .logo {
        padding: 0.4rem 0.5rem;
        border-radius: 12px;
    }
    
    .logo-img {
        height: 50px;
        max-width: 160px;
        border-width: 2px;
    }
    
    /* MENÚ MÓVIL CON ANIMACIÓN */
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, 
            rgba(3, 4, 94, 0.98) 0%, 
            rgba(2, 62, 138, 0.98) 100%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        gap: 1.2rem;
        z-index: 1000;
        backdrop-filter: blur(20px);
        animation: slideInMenu 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes slideInMenu {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        width: 80%;
        max-width: 300px;
    }
    
    nav ul li a {
        width: 100%;
        padding: 1.1rem 2rem;
        font-size: 1rem;
        justify-content: center;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    nav ul li a:hover {
        transform: translateY(-5px) scale(1.02);
        background: rgba(184, 251, 60, 0.15);
    }
    
    .whatsapp-header {
        width: 80%;
        max-width: 300px;
        padding: 1.1rem 2rem;
        font-size: 1rem;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .mobile-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Efecto de cierre del menú móvil */
    nav ul.active ~ .mobile-menu {
        position: fixed;
        top: 1.2rem;
        right: 1.2rem;
    }
}

/* MÓVIL PEQUEÑO */
@media (max-width: 480px) {
    .header-content {
        padding: 0.3rem 0;
    }
    
    .logo {
        padding: 0.4rem;
        border-radius: 10px;
    }
    
    .logo-img {
        height: 45px;
        max-width: 140px;
    }
    
    nav ul {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    nav ul li {
        width: 90%;
    }
    
    nav ul li a {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .whatsapp-header {
        width: 90%;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .mobile-menu {
        padding: 0.7rem;
        font-size: 1.4rem;
    }
}

/* MÓVIL MUY PEQUEÑO */
@media (max-width: 360px) {
    .logo {
        padding: 0.3rem;
    }
    
    .logo-img {
        height: 42px;
        max-width: 130px;
    }
    
    nav ul li a {
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .whatsapp-header {
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ============ EFECTOS ESPECIALES ============ */

/* EFECTO DE PARTICULAS AL HOVER (OPCIONAL) */
nav ul li a:hover::after {
    animation: particleGlow 1.5s ease-out infinite;
}

@keyframes particleGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(184, 251, 60, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(184, 251, 60, 0.8);
    }
}

/* EFECTO DE CARGANDO PARA ENLACES ACTIVOS */
nav ul li a.active {
    animation: activePulse 2s infinite;
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 0 6px 15px rgba(184, 251, 60, 0.15);
    }
    50% {
        box-shadow: 0 6px 20px rgba(184, 251, 60, 0.25);
    }
}