/**
 * Mega Menu - Header Expansion Method
 * DESKTOP ONLY - Mobile styles are in main.css
 */

/* ==================================================================
   DESKTOP MEGA MENU STYLES (769px and up)
   ================================================================== */
@media (min-width: 769px) {
    /* Hide mobile phone header on desktop */
    .mobile-phone-header {
        display: none !important;
    }

    /* Show desktop phone link */
    .desktop-phone-link {
        display: flex !important;
        align-items: center;
        gap: 8px;
        color: white;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px;
        padding: 8px 16px;
        border-radius: 4px;
        transition: background 0.2s ease;
        margin-left: auto;
        margin-right: 16px;
    }

    .desktop-phone-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .site-header.scrolled .desktop-phone-link,
    .site-header.mega-open .desktop-phone-link {
        color: #1c1e21;
    }

    .site-header.scrolled .desktop-phone-link:hover,
    .site-header.mega-open .desktop-phone-link:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    /* HEADER - Override all main.css styles */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: transparent !important;
        z-index: 1000 !important;
        transition: background 0.3s ease, backdrop-filter 0.3s ease !important;
        height: auto !important;
        padding: 0 !important;
        border-bottom: none !important;
    }

    /* Kill the old gradient overlay from main.css */
    .site-header::before {
        display: none !important;
    }

    /* Glass effect when scrolled OR mega menu open */
    .site-header.scrolled,
    .site-header.mega-open {
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: saturate(180%) blur(20px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    }

    /* Top navigation bar */
    .header-top {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Header inner layout */
    .header-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        height: 60px;
        display: flex !important;
        align-items: center;
        gap: 40px; /* Reduced gap between logo and nav */
    }

    .logo {
        font-size: 20px;
        font-weight: 700;
        color: white;
        text-decoration: none;
        display: flex;
        align-items: center;
    }

    /* Logo images */
    .logo img {
        max-height: 40px;
        width: auto;
    }

    /* Show white logo by default (transparent header) */
    .site-logo .logo-white {
        display: block;
    }

    .site-logo .logo-dark {
        display: none;
    }

    /* Show dark logo when scrolled or mega open */
    .site-header.scrolled .site-logo .logo-white,
    .site-header.mega-open .site-logo .logo-white {
        display: none !important;
        opacity: 0 !important;
    }

    .site-header.scrolled .site-logo .logo-dark,
    .site-header.mega-open .site-logo .logo-dark {
        display: block !important;
        opacity: 1 !important;
    }

    /* Text logo fallback */
    .site-header.scrolled .logo,
    .site-header.mega-open .logo {
        color: #1c1e21;
    }

    /* NAVIGATION */
    nav ul {
        display: flex;
        list-style: none;
        gap: 32px;
        height: 60px;
        align-items: center;
    }

    nav li {
        height: 100%;
        display: flex;
        align-items: center;
    }

    nav a {
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        padding: 0 8px;
    }

    .site-header.scrolled nav a,
    .site-header.mega-open nav a {
        color: #1c1e21;
    }

    /* MEGA MENU CONTENT - Hidden by default */
    .mega-menu-content {
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .mega-menu-content.active {
        display: block;
    }

    .site-header.mega-open .mega-menu-content.active {
        max-height: 400px;
    }

    .mega-menu-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px 40px 40px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mega-item {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
        border-radius: 8px;
        text-decoration: none;
        color: #1c1e21;
        transition: background 0.15s ease;
    }

    .mega-item:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .mega-icon {
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #2c5282, #546e7a);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 18px;
        flex-shrink: 0;
    }

    .mega-text strong {
        display: block;
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 4px;
        color: #1c1e21;
    }

    .mega-text p {
        font-size: 13px;
        color: #65676b;
        line-height: 1.4;
        margin: 0;
    }
}

/* Hide desktop phone link on mobile */
@media (max-width: 768px) {
    .desktop-phone-link {
        display: none !important;
    }
}
