/* ============================================
   HEADER PREMIUM - AMAYALAB
   Efectos: Sticky, Glassmorphism, Reveal, 
   Progress Bar, Hover 3D, Menú Slide Premium
   ============================================ */

/* ========== RESET LOCAL ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FFFFFF;
    color: #2C3E50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background-color: #FFFFFF;
    transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    animation: headerReveal 0.8s cubic-bezier(0.25, 0.8, 0.25, 1.2) forwards;
}

/* ===== BARRA DE PROGRESO SCROLL ===== */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0F81F2, #0A5DB0, #0F81F2);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    z-index: 10001;
    transition: width 0.15s linear;
}

/* ===== HEADER INNER ===== */
.header-inner {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    transition: height 0.45s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

/* ===== ESTADO SCROLLED ===== */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(15, 129, 242, 0.1);
    box-shadow: 0 8px 40px rgba(15, 129, 242, 0.06),
                0 2px 8px rgba(10, 93, 176, 0.04);
}

.header.scrolled .header-inner {
    height: 68px;
}

/* ===== MARCA (Logo + Tagline) ===== */
.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10002;
}

.brand-logo {
    display: block;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.logo-wrapper {
    width: 120px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    box-shadow: none;
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

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

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

.header.scrolled .logo-wrapper {
    width: 95px;
    height: auto;
    border-radius: 0;
}

.brand-divider {
    width: 1px;
    height: 35px;
    background: linear-gradient(180deg, transparent, rgba(15, 129, 242, 0.3), transparent);
    transition: height 0.45s ease;
}

.header.scrolled .brand-divider {
    height: 26px;
}

.brand-tagline {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #0A5DB0;
    line-height: 1.5;
    transition: all 0.45s ease;
    opacity: 1;
}

.header.scrolled .brand-tagline {
    font-size: 0.58rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* ============================================
   NAVEGACIÓN ESCRITORIO (PC)
   Íconos OCULTOS, solo texto
   ============================================ */
.header-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0.35rem;
}

/* 🔴 OCULTAR TODO LO QUE ES DEL MENÚ MÓVIL EN PC */
.nav-icono,
.nav-header-movil,
.nav-separador,
.nav-whatsapp-wrapper,
.nav-footer-movil {
    display: none !important;
}

/* Estilo del enlace en PC: solo texto centrado */
.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-decoration: none;
    color: #2C3E50;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 10px;
    position: relative;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.nav-link:hover {
    background-color: rgba(15, 129, 242, 0.04);
    color: #0F81F2;
}

.nav-text {
    position: relative;
    z-index: 2;
}

.nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background-color: #0F81F2;
    border-radius: 10px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.nav-link:hover .nav-indicator,
.nav-link.active .nav-indicator {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    color: #0F81F2;
    font-weight: 600;
}

/* ===== ACCIONES ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10002;
}

/* ===== BOTÓN WHATSAPP ===== */
.btn-whatsapp {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.35);
}

.whatsapp-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.whatsapp-icon i {
    font-size: 1.5rem;
    position: relative;
    z-index: 3;
    animation: iconBounce 2.5s ease-in-out infinite;
}

.whatsapp-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background-color: rgba(37, 211, 102, 0.35);
    border-radius: 50%;
    z-index: 1;
    animation: ringPulse 2s ease-in-out infinite;
}

.whatsapp-ring-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background-color: rgba(37, 211, 102, 0.2);
    border-radius: 50%;
    z-index: 1;
    animation: ringPulse 2s ease-in-out infinite 0.6s;
}

.whatsapp-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    position: relative;
    z-index: 2;
}

.whatsapp-label-top {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.85;
    text-transform: uppercase;
}

.whatsapp-label-bottom {
    font-size: 0.95rem;
    font-weight: 700;
}

/* ===== BOTÓN HAMBURGUESA (OCULTO EN PC) ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    width: 48px;
    height: 48px;
    background: rgba(15, 129, 242, 0.04);
    border: 1px solid rgba(15, 129, 242, 0.1);
    cursor: pointer;
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.menu-toggle:hover {
    background: rgba(15, 129, 242, 0.08);
    border-color: rgba(15, 129, 242, 0.2);
}

.menu-toggle.active {
    background: #0F81F2;
    border-color: #0F81F2;
    box-shadow: 0 8px 25px rgba(15, 129, 242, 0.4);
}

.menu-line {
    display: block;
    width: 26px;
    height: 2.5px;
    background-color: #0A5DB0;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.menu-toggle.active .menu-line {
    background-color: #FFFFFF;
}

.menu-toggle.active .menu-line-top {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active .menu-line-middle {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active .menu-line-bottom {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ===== ANIMACIONES ===== */
@keyframes headerReveal {
    0% { transform: translateY(-100%); opacity: 0; }
    60% { transform: translateY(5px); opacity: 0.9; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    12% { transform: scale(1.18); }
    24% { transform: scale(1); }
    36% { transform: scale(1.12); }
    48% { transform: scale(1); }
}

@keyframes ringPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

@keyframes iconoWhatsappMenu {
    0%, 100% { transform: scale(1); }
    12% { transform: scale(1.15); }
    24% { transform: scale(1); }
    36% { transform: scale(1.1); }
    48% { transform: scale(1); }
}

/* ============================================
   RESPONSIVE - MENÚ MÓVIL PREMIUM
   ============================================ */

@media (max-width: 1080px) {

    /* ===== MOSTRAR ELEMENTOS DEL MENÚ MÓVIL ===== */
    .nav-header-movil {
        display: flex !important;
        align-items: center;
        gap: 14px;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-icono {
        display: flex !important;
        width: 42px;
        height: 42px;
        min-width: 42px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.7);
        transition: all 0.35s ease;
    }

    .nav-link:hover .nav-icono,
    .nav-link.active .nav-icono {
        background: #0F81F2;
        color: #FFFFFF;
        box-shadow: 0 8px 20px rgba(15, 129, 242, 0.35);
    }

    .nav-separador {
        display: block !important;
        text-align: center;
        margin: 1rem 0;
        position: relative;
    }

    .nav-separador::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-separador span {
        position: relative;
        display: inline-block;
        padding: 0 16px;
        background: #0A1F3A;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
    }

    .nav-whatsapp-wrapper {
        display: block !important;
    }

    .nav-footer-movil {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* ===== HEADER DEL MENÚ ===== */
    .nav-header-icono {
        width: 50px;
        height: 50px;
        min-width: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #0F81F2, #0A5DB0);
        border-radius: 14px;
        font-size: 1.3rem;
        color: #FFFFFF;
        box-shadow: 0 8px 20px rgba(15, 129, 242, 0.3);
    }

    .nav-header-info {
        display: flex;
        flex-direction: column;
    }

    .nav-header-titulo {
        font-size: 1.1rem;
        font-weight: 700;
        color: #FFFFFF;
        line-height: 1.2;
    }

    .nav-header-subtitulo {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 500;
    }

    /* ===== FONDO DEL MENÚ ===== */
    .header-nav {
        position: fixed;
        top: 85px;
        right: 0;
        width: 360px;
        height: 100vh;
        height: 100dvh;
        background: linear-gradient(180deg, #0A1F3A 0%, #0D2B4E 40%, #0A1F3A 100%);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        padding: 2rem 1.8rem;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
        transform: translateX(105%);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1.2);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .header-nav.active {
        transform: translateX(0);
        opacity: 1;
    }

    /* ===== ENLACES EN MÓVIL ===== */
    .nav-list {
        flex-direction: column;
        gap: 0.3rem;
    }

    .nav-link {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 13px 16px;
        font-size: 0.95rem;
        border-radius: 14px;
        color: rgba(255, 255, 255, 0.8);
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #FFFFFF;
    }

    .nav-link.active {
        background: rgba(15, 129, 242, 0.2);
        color: #FFFFFF;
    }

    .nav-indicator {
        display: none;
    }

    /* ===== BOTÓN WHATSAPP EN MENÚ ===== */
    .nav-whatsapp-btn {
        display: flex;
        align-items: center;
        gap: 14px;
        background: #25D366;
        padding: 16px 20px;
        border-radius: 16px;
        text-decoration: none;
        transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
        position: relative;
        overflow: hidden;
    }

    .nav-whatsapp-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.6s ease;
    }

    .nav-whatsapp-btn:hover {
        background: #128C7E;
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
    }

    .nav-whatsapp-btn:hover::before {
        left: 100%;
    }

    .nav-whatsapp-icono {
        width: 44px;
        height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        font-size: 1.3rem;
        color: #FFFFFF;
        position: relative;
        z-index: 2;
        animation: iconoWhatsappMenu 2.5s ease-in-out infinite;
    }

    .nav-whatsapp-texto {
        flex: 1;
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 2;
    }

    .nav-whatsapp-titulo {
        font-size: 0.95rem;
        font-weight: 700;
        color: #FFFFFF;
    }

    .nav-whatsapp-subtitulo {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .nav-whatsapp-flecha {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
        position: relative;
        z-index: 2;
        transition: transform 0.3s ease;
    }

    .nav-whatsapp-btn:hover .nav-whatsapp-flecha {
        transform: translateX(3px) translateY(-3px);
    }

    /* ===== FOOTER DEL MENÚ ===== */
    .nav-footer-item {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .nav-footer-item i {
        width: 20px;
        text-align: center;
        color: #0F81F2;
        font-size: 0.8rem;
    }

    /* ===== MOSTRAR HAMBURGUESA ===== */
    .menu-toggle {
        display: flex;
    }

    .header.scrolled .header-nav {
        top: 68px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 1.25rem;
    }

    .brand-tagline {
        display: none;
    }

    .brand-divider {
        display: none;
    }

    .whatsapp-label {
        display: none;
    }

    .btn-whatsapp {
        padding: 10px;
        border-radius: 50%;
    }

    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }

    .whatsapp-icon i {
        font-size: 1.2rem;
    }

    .header-nav {
        width: 100%;
        padding: 1.5rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .header-inner {
        height: 72px;
    }

    .header.scrolled .header-inner {
        height: 60px;
    }

    .logo-wrapper {
        width: 85px;
    }

    .header.scrolled .logo-wrapper {
        width: 70px;
    }

    .header-nav {
        top: 72px;
        padding: 1.2rem;
    }

    .header.scrolled .header-nav {
        top: 60px;
    }

    .nav-link {
        padding: 11px 14px;
    }

    .nav-icono {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
    }
}