/* Header styles - Versión mejorada */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0;
}

/* Estado normal - COMPLETAMENTE TRANSPARENTE (sin fondo) */
.header.transparent {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

/* Estado con scroll - fondo azul sólido */
.header.scrolled {
    background: #0a192f;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

/* Estado oculto (hacia abajo) */
.header.hidden {
    transform: translateY(-100%);
}

/* Estado visible (hacia arriba) */
.header.visible {
    transform: translateY(0);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease;
    gap: 1rem;
}

/* Header más pequeño al hacer scroll */
.header.scrolled .header-container {
    padding: 0.7rem 2rem;
}

/* ============================================
   LOGO - Color original siempre
   ============================================ */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}

/* ============================================
   NAVEGACIÓN - Textos blancos siempre
   ============================================ */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    color: #FFFFFF !important;
    padding: 0.5rem 0;
}

.nav-link i {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.dropdown-mega:hover .nav-link i {
    transform: rotate(180deg);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    transition: width 0.3s ease;
    background: #2A9D8F;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 30px;
}

/* ============================================
   MEGA MENU DROPDOWN - DISEÑO MEJORADO
   ============================================ */
.dropdown-mega {
    position: static;
}

.dropdown-mega-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    width: 100%;
    background: #0a192f;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-mega:hover .dropdown-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Contenedor interno centrado */
.mega-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 2rem;
}

/* Títulos de las secciones */
.mega-menu-section h4 {
    font-size: 0.9rem;
    color: #FFFFFF;
    margin-bottom: 1.2rem;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid #2A9D8F;
    display: inline-block;
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Listas del menú */
.mega-menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-section li {
    margin-bottom: 0.5rem;
}

.mega-menu-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    position: relative;
}

.mega-menu-section a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #2A9D8F;
    font-size: 0.8rem;
}

.mega-menu-section a:hover {
    color: #2A9D8F;
    padding-left: 5px;
}

.mega-menu-section a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Sección CTA */
.mega-menu-cta {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.btn-ver-todos-mega {
    background: linear-gradient(135deg, #2A9D8F, #1a6b62);
    color: white;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(42, 157, 143, 0.3);
}

.btn-ver-todos-mega:hover {
    transform: translateX(5px);
    gap: 1rem;
    background: linear-gradient(135deg, #359f8f, #227a6e);
    box-shadow: 0 6px 15px rgba(42, 157, 143, 0.4);
}

/* Iconos decorativos en secciones */
.mega-menu-section:nth-child(1) h4::before {
    content: '🏔️ ';
    font-size: 0.9rem;
}

.mega-menu-section:nth-child(2) h4::before {
    content: '⏱️ ';
    font-size: 0.9rem;
}

.mega-menu-section:nth-child(3) h4::before {
    content: '⚡ ';
    font-size: 0.9rem;
}

/* ============================================
   BOTÓN WHATSAPP - MÁS GRANDE
   ============================================ */
.header-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    flex-shrink: 0;
}

.header-whatsapp i {
    font-size: 1.2rem;
}

.header-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    gap: 1rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #0a192f;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7);
    }
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    color: #FFFFFF;
}

/* Animación de entrada para el mega menú */
@keyframes megaMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-mega-menu {
    animation: megaMenuFadeIn 0.3s ease forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.2rem;
    }
    
    .mega-menu-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .mega-menu-cta {
        grid-column: span 2;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1.5rem;
        margin-top: 0.5rem;
    }
    
    .header-whatsapp span {
        display: none;
    }
    
    .header-whatsapp {
        padding: 0.8rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        display: block;
        overflow-y: auto;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 80px 1.5rem 2rem;
        gap: 0.5rem;
        height: auto;
    }
    
    .header.transparent nav,
    .header.scrolled nav {
        background: #0a192f;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    nav.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 0.8rem 0;
        font-size: 1rem;
        color: #FFFFFF !important;
    }
    
    .nav-link::after {
        left: 0;
        transform: none;
    }
    
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 40px;
    }
    
    .dropdown-mega {
        position: relative;
    }
    
    .dropdown-mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
        background: transparent !important;
        display: none;
        border-radius: 0;
        border: none;
        animation: none;
    }
    
    .dropdown-mega.active .dropdown-mega-menu {
        display: block;
    }
    
    .mega-menu-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.5rem 0 0 0;
        max-width: 100%;
    }
    
    .mega-menu-section h4 {
        font-size: 0.9rem;
        color: #2A9D8F;
    }
    
    .mega-menu-section a {
        color: rgba(255, 255, 255, 0.7) !important;
    }
    
    .mega-menu-cta {
        grid-column: span 1;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 0 0 0;
        margin-top: 0.5rem;
    }
    
    .btn-ver-todos-mega {
        display: inline-block;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .header-whatsapp {
        display: none;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 15px;
        right: 15px;
    }
}