/* ===== EMERGENCY GLOBAL HEADER FIXES ===== */
/* HIGHEST PRIORITY - FORCE MOBILE LAYOUT */

/* Force hamburger visibility across all screen sizes below 1024px */
@media screen and (max-width: 1200px), screen and (max-width: 1024px), screen and (max-width: 991px), screen and (max-width: 768px), screen and (max-width: 576px) {
    .header .hamburger,
    .hamburger,
    [class*="hamburger"] {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 9999 !important;
        order: 999 !important;
        margin-left: auto !important;
        flex-shrink: 0 !important;
        width: 40px !important;
        height: 40px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
    }
    
    .header .hamburger span,
    .hamburger span,
    [class*="hamburger"] span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background-color: #1C2951 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        opacity: 1 !important;
    }
    
    /* Force navigation container layout */
    .header .nav-container,
    .nav-container,
    [class*="nav-container"] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        position: relative !important;
    }
    
    /* Force logo positioning */
    .header .logo,
    .logo,
    [class*="logo"] {
        order: 1 !important;
        margin-right: auto !important;
        flex-shrink: 0 !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;
    }
    
    /* Hide desktop navigation */
    .header .nav-menu,
    .nav-menu,
    [class*="nav-menu"] {
        position: fixed !important;
        top: 80px !important;
        left: -100% !important;
        width: 100vw !important;
        height: calc(100vh - 80px) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        flex-direction: column !important;
        padding: 2rem !important;
        transition: left 0.3s ease !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .header .nav-menu.active,
    .nav-menu.active,
    [class*="nav-menu"].active {
        left: 0 !important;
    }
}

/* ===== FORCE HERO BACKGROUND ON ALL PAGES ===== */
.hero {
    background: linear-gradient(135deg, rgba(28, 41, 81, 0.95) 0%, rgba(43, 63, 107, 0.9) 50%, rgba(59, 89, 152, 0.85) 100%), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    min-height: 60vh !important;
    position: relative !important;
}

.hero-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, rgba(28, 41, 81, 0.95) 0%, rgba(43, 63, 107, 0.9) 50%, rgba(59, 89, 152, 0.85) 100%), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') !important;
    background-size: cover !important;
    background-position: center !important;
    z-index: 1 !important;
}

/* ===== UNIVERSAL DROPDOWN FIXES ===== */
@media screen and (max-width: 1024px) {
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(248, 250, 252, 0.9) !important;
        margin-top: 1rem !important;
        display: none !important;
        flex-direction: column !important;
        border-radius: 8px !important;
        padding: 1rem !important;
        max-height: 400px !important;
        overflow-y: auto !important;
    }
    
    .dropdown.mobile-open .dropdown-menu,
    .dropdown-menu.mobile-open {
        display: flex !important;
    }
}

/* ===== ACCESSIBILITY ===== */
.hamburger:focus {
    outline: 2px solid #D4AF37 !important;
    outline-offset: 2px !important;
}

/* ===== BODY SCROLL LOCK ===== */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ===== INSTANT PRELOADER HIDE ===== */
.preloader.instant-hide {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.1s ease, visibility 0.1s ease !important;
    pointer-events: none !important;
}

/* ===== ANIMATION FIXES ===== */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px) !important;
    background-color: #D4AF37 !important;
}

.hamburger.active span:nth-child(2) {
    opacity: 0 !important;
    transform: translateX(-20px) !important;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px) !important;
    background-color: #D4AF37 !important;
}
