/* ===== EMERGENCY MOBILE HEADER & HERO FIXES ===== */
/* HIGHEST PRIORITY - FORCE MOBILE LAYOUT AND HERO BACKGROUND */

/* ===== DESKTOP NAVIGATION - FORCE DISPLAY ON LARGE SCREENS ===== */
@media screen and (min-width: 992px) {
    /* Ensure nav-menu is visible on desktop */
    .header .nav-menu,
    .nav-menu,
    .navbar .nav-menu,
    header .nav-menu,
    [class*="nav-menu"] {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 1.5rem !important;
        background: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border: none !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        left: 0 !important;
        top: 0 !important;
        overflow: visible !important;
        z-index: auto !important;
        list-style: none !important;
    }
    
    /* Hide hamburger on desktop */
    .header .hamburger,
    .hamburger,
    .navbar .hamburger,
    header .hamburger,
    [class*="hamburger"] {
        display: none !important;
    }
    
    /* Desktop nav items */
    .header .nav-item,
    .nav-item,
    [class*="nav-item"] {
        width: auto !important;
        border-bottom: none !important;
        margin: 0 !important;
        position: relative !important;
    }
    
    /* Desktop nav links */
    .header .nav-link,
    .nav-link,
    [class*="nav-link"] {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        width: auto !important;
        padding: 0.5rem 0 !important;
        font-size: 0.85rem !important;
        color: #1C2951 !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        min-height: auto !important;
        background: none !important;
        white-space: nowrap !important;
        position: relative !important;
    }
    
    .header .nav-link::before,
    .nav-link::before {
        content: '' !important;
        position: absolute !important;
        bottom: -2px !important;
        left: 0 !important;
        width: 0 !important;
        height: 2px !important;
        background: #D4AF37 !important;
        transition: width 0.3s ease !important;
    }
    
    .header .nav-link:hover::before,
    .nav-link:hover::before,
    .header .nav-link.active::before,
    .nav-link.active::before {
        width: 100% !important;
    }
    
    .header .nav-link:hover,
    .nav-link:hover,
    .header .nav-link.active,
    .nav-link.active {
        color: #D4AF37 !important;
        background: none !important;
        padding-left: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Desktop Services Dropdown */
    .header .dropdown-menu,
    .dropdown-menu,
    [class*="dropdown-menu"] {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(10px) !important;
        width: 95vw !important;
        max-width: 1000px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(28, 41, 81, 0.1) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(28, 41, 81, 0.15) !important;
        padding: 1.5rem !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem !important;
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: 1001 !important;
        margin-top: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        transition: all 0.3s ease !important;
    }
    
    .header .dropdown:hover .dropdown-menu,
    .dropdown:hover .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(0) !important;
    }
    
    .header .dropdown-column,
    .dropdown-column {
        flex: 1 !important;
        min-width: 140px !important;
        width: auto !important;
        margin-bottom: 0 !important;
    }
    
    .header .dropdown-title,
    .dropdown-title {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        color: #1C2951 !important;
        margin-bottom: 0.8rem !important;
        padding-bottom: 0.4rem !important;
        border-bottom: 2px solid #D4AF37 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .header .dropdown-link,
    .dropdown-link {
        display: block !important;
        color: #64748b !important;
        text-decoration: none !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        padding: 0.3rem 0 !important;
        transition: all 0.3s ease !important;
        line-height: 1.4 !important;
        min-height: auto !important;
        border-bottom: none !important;
        background: none !important;
        border-radius: 0 !important;
    }
    
    .header .dropdown-link:hover,
    .dropdown-link:hover {
        color: #D4AF37 !important;
        padding-left: 0.5rem !important;
        background: none !important;
        border-radius: 0 !important;
    }
    
    /* Dropdown trigger icon */
    .dropdown-toggle i {
        font-size: 0.7rem !important;
        transition: all 0.3s ease !important;
    }
    
    .dropdown:hover .dropdown-toggle i {
        transform: rotate(180deg) !important;
    }
}

/* ===== FORCE MOBILE HEADER LAYOUT ON MOBILE ONLY ===== */
@media screen and (max-width: 991px) {
    
    /* CRITICAL: Navigation Container - Force Proper Layout */
    .header .nav-container,
    .nav-container,
    .navbar .nav-container,
    header .nav-container,
    [class*="nav-container"] {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
        position: relative !important;
        flex-wrap: nowrap !important;
        box-sizing: border-box !important;
    }
    
    /* CRITICAL: Logo - Force Left Position */
    .header .logo,
    .logo,
    .navbar .logo,
    header .logo,
    [class*="logo"] {
        order: 1 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin-right: auto !important;
        position: relative !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        display: flex !important;
        align-items: center !important;
        max-width: 200px !important;
    }
    
    .header .logo img,
    .logo img,
    .logo-image,
    [class*="logo"] img {
        max-width: 140px !important;
        height: auto !important;
        display: block !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* CRITICAL: Hamburger - Force Right Position */
    .header .hamburger,
    .hamburger,
    .navbar .hamburger,
    header .hamburger,
    [class*="hamburger"] {
        display: flex !important;
        order: 999 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        position: relative !important;
        right: 0 !important;
        left: auto !important;
        width: 40px !important;
        height: 40px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 8px !important;
        cursor: pointer !important;
        z-index: 1003 !important;
        background: transparent !important;
        border: none !important;
        visibility: visible !important;
        opacity: 1 !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;
        visibility: visible !important;
    }
    
    /* CRITICAL: Hide Desktop Navigation */
    .header .nav-menu,
    .nav-menu,
    .navbar .nav-menu,
    header .nav-menu,
    [class*="nav-menu"] {
        order: 2 !important;
        display: flex !important;
        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;
        align-items: flex-start !important;
        padding: 2rem !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .header .nav-menu.active,
    .nav-menu.active,
    [class*="nav-menu"].active {
        left: 0 !important;
    }
    
    /* CRITICAL: Mobile Navigation Items */
    .header .nav-item,
    .nav-item,
    [class*="nav-item"] {
        width: 100% !important;
        border-bottom: 1px solid rgba(28, 41, 81, 0.1) !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    .header .nav-item:last-child,
    .nav-item:last-child {
        border-bottom: none !important;
    }
    
    .header .nav-link,
    .nav-link,
    [class*="nav-link"] {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 1.2rem 0 !important;
        font-size: 1.1rem !important;
        color: #1C2951 !important;
        text-decoration: none !important;
        border: none !important;
        font-weight: 500 !important;
        min-height: 48px !important;
        background: none !important;
    }
    
    .header .nav-link:hover,
    .nav-link:hover {
        color: #D4AF37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        padding-left: 1rem !important;
        border-radius: 8px !important;
    }
    
    /* CRITICAL: Services Dropdown for Mobile */
    .header .dropdown-menu,
    .dropdown-menu,
    [class*="dropdown-menu"] {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(248, 250, 252, 0.9) !important;
        margin-top: 1rem !important;
        flex-direction: column !important;
        gap: 0 !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(28, 41, 81, 0.05) !important;
        border-radius: 8px !important;
        padding: 1rem !important;
        backdrop-filter: blur(10px) !important;
        max-height: 400px !important;
        overflow-y: auto !important;
        display: none !important;
    }
    
    .header .dropdown.mobile-open .dropdown-menu,
    .header .dropdown-menu.mobile-open,
    .dropdown.mobile-open .dropdown-menu,
    .dropdown-menu.mobile-open {
        display: flex !important;
    }
    
    .header .dropdown-column,
    .dropdown-column {
        min-width: auto !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .header .dropdown-title,
    .dropdown-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        color: #1C2951 !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .header .dropdown-link,
    .dropdown-link {
        font-size: 0.85rem !important;
        padding: 0.8rem 0 !important;
        border-bottom: 1px solid rgba(28, 41, 81, 0.05) !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        color: #64748b !important;
        text-decoration: none !important;
    }
    
    .header .dropdown-link:last-child,
    .dropdown-link:last-child {
        border-bottom: none !important;
    }
    
    .header .dropdown-link:hover,
    .dropdown-link:hover {
        padding-left: 0.8rem !important;
        color: #D4AF37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        border-radius: 4px !important;
    }
    
    /* CRITICAL: Hamburger Animation */
    .header .hamburger.active span:nth-child(1),
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px) !important;
        background-color: #D4AF37 !important;
    }
    
    .header .hamburger.active span:nth-child(2),
    .hamburger.active span:nth-child(2) {
        opacity: 0 !important;
        transform: translateX(-20px) !important;
    }
    
    .header .hamburger.active span:nth-child(3),
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px) !important;
        background-color: #D4AF37 !important;
    }
}

/* ===== HERO SECTION BACKGROUND FIX - PRIORITY ===== */
/* Fix the missing hero background image issue */

.hero {
    min-height: 100vh !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;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !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;
    background-attachment: fixed !important;
    z-index: 1 !important;
}

.hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.4) !important;
    z-index: 2 !important;
}

.hero-container {
    position: relative !important;
    z-index: 3 !important;
    padding: 2rem 1rem !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.hero-content {
    color: white !important;
    text-align: center !important;
}

.hero-title {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.highlight-text {
    color: #D4AF37 !important;
}

.hero-description {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== FALLBACK HERO BACKGROUNDS ===== */
/* Multiple fallback images in case primary fails */
.hero::before {
    content: '' !important;
    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-1560472354-b33ff0c44a43?ixlib=rb-4.0.3&auto=format&fit=crop&w=1926&q=80'),
        url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'),
        linear-gradient(135deg, #1C2951 0%, #2B3F6B 50%, #3B5998 100%) !important;
    background-size: cover !important;
    background-position: center !important;
    z-index: 0 !important;
}

/* ===== MOBILE HERO OPTIMIZATIONS ===== */
@media screen and (max-width: 768px) {
    .hero {
        background-attachment: scroll !important;
        min-height: 100vh !important;
        padding-top: 80px !important;
    }
    
    .hero-background {
        background-attachment: scroll !important;
    }
    
    .hero::before {
        background-attachment: scroll !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-container {
        padding: 1rem !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
}

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

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

.header .nav-link:focus,
.nav-link:focus {
    outline: 2px solid #D4AF37 !important;
    outline-offset: 2px !important;
}

/* ===== FORCE VISIBILITY ON MOBILE SCREEN SIZES ONLY ===== */
@media screen and (max-width: 991px) { 
    .header .hamburger, .hamburger { display: flex !important; visibility: visible !important; opacity: 1 !important; } 
}
@media screen and (max-width: 768px) { 
    .header .hamburger, .hamburger { display: flex !important; visibility: visible !important; opacity: 1 !important; } 
}
@media screen and (max-width: 576px) { 
    .header .hamburger, .hamburger { display: flex !important; visibility: visible !important; opacity: 1 !important; } 
}
@media screen and (max-width: 480px) { 
    .header .hamburger, .hamburger { display: flex !important; visibility: visible !important; opacity: 1 !important; } 
}
