/* =============================================================
   HEADER — v2
   Changes: hamburger button + mobile menu overlay
   ============================================================= */

.main-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    transition: height 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
    display: flex; align-items: center;
    height: var(--header-height);
    padding-top: 50px; padding-bottom: 25px;
}

.main-header.scrolled {
    height: 70px;
    background: rgba(3, 7, 12, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.18);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 1px 12px rgba(0,212,255,0.08);
    padding-top: 0; padding-bottom: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-img { height: 70px; width: 70px; transition: transform 0.3s ease; }
.logo-link:hover .logo-img { transform: scale(1.05); }

/* ─── DESKTOP NAV ─── */
.nav-menu {
    display: none;
    list-style: none;
    gap: 25px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 10px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.main-header.scrolled .nav-menu {
    border-color: rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.07);
    padding: 7px 22px;
}

.nav-menu li a {
    position: relative;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding-bottom: 4px;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--primary-blue);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after { width: 100%; }
.nav-menu li a:hover,
.nav-menu li a.active { color: var(--primary-blue); }

@media (min-width: 769px) { .nav-menu { display: flex; } }

/* ─── SOCIAL LINKS ─── */
.social-links {
    display: flex; gap: 18px; align-items: center;
}

.social-icon {
    color: var(--text-white);
    font-size: 1.15rem;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}

.social-icon:hover {
    color: var(--primary-blue) !important;
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px var(--primary-blue));
}

@keyframes softPulse {
    0%, 100% { filter: drop-shadow(0 0 0px rgba(0, 212, 255, 0)); }
    50%       { filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5)); }
}
.social-icon[aria-label="WhatsApp"] { animation: softPulse 3s infinite ease-in-out; }

/* Hide social links on mobile — shown inside mobile menu */
@media (max-width: 768px) { .social-links { display: none; } }

/* ─── HAMBURGER BUTTON ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.3s ease, border-color 0.3s ease;
    z-index: 1100;
    position: relative;
}

.hamburger:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
}

.ham-line {
    display: block;
    width: 22px; height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.35s ease, width 0.35s ease;
    transform-origin: center;
}

/* Open state: X shape */
.hamburger.is-open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #00d4ff; }
.hamburger.is-open .ham-line:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #00d4ff; }

@media (max-width: 768px) { .hamburger { display: flex; } }

/* ─── MOBILE MENU OVERLAY ─── */
.mobile-menu {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: rgba(3, 7, 12, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
}

/* Mobile nav links */
.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0; margin: 0;
}

.mobile-nav__link {
    display: block;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    letter-spacing: -1px;
    line-height: 1.2;
    transition: color 0.3s ease, transform 0.3s ease;
    /* Stagger reveal */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu.is-open .mobile-nav__link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays per link */
.mobile-menu.is-open .mobile-nav__link[data-index="1"] { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-nav__link[data-index="2"] { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-nav__link[data-index="3"] { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-nav__link[data-index="4"] { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-nav__link[data-index="5"] { transition-delay: 0.25s; }

.mobile-nav__link:hover,
.mobile-nav__link:focus { color: #00d4ff; transform: translateX(8px); }

/* Mobile social icons */
.mobile-menu__socials {
    display: flex;
    gap: 28px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.35s, transform 0.4s ease 0.35s;
}

.mobile-menu.is-open .mobile-menu__socials {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu__socials a {
    color: rgba(255,255,255,0.5);
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-menu__socials a:hover {
    color: #00d4ff;
    transform: scale(1.2);
}

/* ─── GSAP entrance opacity (set to 0, JS reveals) ─── */
.logo-link, .nav-menu, .social-icon { opacity: 0; }

/* Hamburger always visible */
.hamburger { opacity: 1 !important; }

/* Performance hints */
.main-header { will-change: height, background; }
.mobile-menu { will-change: opacity, visibility; }