/* ===== INDEX PAGE CRITICAL FIXES - HIGHEST PRIORITY ===== */
/* This file specifically fixes header and hero issues on the index page */

/* ===== FORCE HEADER LAYOUT ON INDEX PAGE ===== */
@media screen and (max-width: 1024px) {
    /* CRITICAL: Force proper header layout */
    .header .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;
    }
    
    /* LOGO POSITIONING - FORCE LEFT SIDE */
    .header .logo {
        order: 1 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin-right: auto !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;
    }
    
    /* HAMBURGER POSITIONING - FORCE RIGHT SIDE */
    .header .hamburger {
        display: flex !important;
        order: 999 !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        margin-left: auto !important;
        position: relative !important;
        right: 0 !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;
    }
    
    .header .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;
    }
    
    /* HIDE DESKTOP MENU ON MOBILE */
    .header .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 {
        left: 0 !important;
    }
    
    /* MOBILE NAVIGATION ITEMS */
    .header .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 {
        border-bottom: none !important;
    }
    
    .header .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 {
        color: #D4AF37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        padding-left: 1rem !important;
        border-radius: 8px !important;
    }
    
    /* DROPDOWN MENU FIXES */
    .header .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 {
        display: flex !important;
    }
    
    .header .dropdown-column {
        min-width: auto !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .header .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 {
        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 {
        border-bottom: none !important;
    }
    
    .header .dropdown-link:hover {
        padding-left: 0.8rem !important;
        color: #D4AF37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        border-radius: 4px !important;
    }
    
    /* HAMBURGER ANIMATION */
    .header .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px) !important;
        background-color: #D4AF37 !important;
    }
    
    .header .hamburger.active span:nth-child(2) {
        opacity: 0 !important;
        transform: translateX(-20px) !important;
    }
    
    .header .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px) !important;
        background-color: #D4AF37 !important;
    }
}

/* ===== HERO SECTION BACKGROUND FIX ===== */
/* Fix the missing hero background image */
.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;
    position: relative !important;
    overflow: hidden !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;
}

.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;
}

.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;
}

/* ===== MOBILE SPECIFIC FIXES ===== */
@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;
    }
    
    /* FORCE LOGO SIZE ON MOBILE */
    .header .logo-icon {
        width: 120px !important;
        height: 60px !important;
    }
    
    .header .logo-image {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* HAMBURGER FIXES FOR SMALL SCREENS */
    .header .hamburger {
        width: 36px !important;
        height: 36px !important;
    }
    
    .header .hamburger span {
        width: 20px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-credentials {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-credentials {
        grid-template-columns: 1fr !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .header .logo-icon {
        width: 100px !important;
        height: 50px !important;
    }
}

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

/* ===== ENSURE VISIBILITY ===== */
@media screen and (max-width: 1200px) { .header .hamburger { display: flex !important; } }
@media screen and (max-width: 1024px) { .header .hamburger { display: flex !important; } }
@media screen and (max-width: 991px) { .header .hamburger { display: flex !important; } }
@media screen and (max-width: 768px) { .header .hamburger { display: flex !important; } }
@media screen and (max-width: 576px) { .header .hamburger { display: flex !important; } }

/* ===== FALLBACK HERO BACKGROUND ===== */
/* In case the primary image fails to load */
.hero::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #1C2951 0%, #2B3F6B 50%, #3B5998 100%) !important;
    z-index: 0 !important;
}

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

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