/* CRITICAL MOBILE FIXES - HIGHEST PRIORITY */
/* This file ensures all mobile functionality works properly */

/* ===== FORCE HAMBURGER MENU VISIBILITY ===== */
/* Absolutely force hamburger to appear on ALL mobile devices */
@media screen and (max-width: 1024px) {
    .hamburger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 40px !important;
        height: 40px !important;
        cursor: pointer !important;
        z-index: 1003 !important;
        position: relative !important;
        gap: 4px !important;
        padding: 8px !important;
        background: transparent !important;
        border: none !important;
        margin-left: auto !important;
        order: 3 !important;
    }
    
    .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;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px) !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;
    }
    
    /* FORCE NAV CONTAINER LAYOUT */
    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        position: relative !important;
    }
    
    .logo {
        order: 1 !important;
        flex-shrink: 0 !important;
    }
    
    .nav-menu {
        order: 2 !important;
    }
    
    .hamburger {
        order: 3 !important;
        margin-left: auto !important;
    }
    
    /* ENSURE NAV MENU IS PROPERLY POSITIONED AND HIDDEN */
    .nav-menu {
        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;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    /* FORCE MOBILE MENU STYLES */
    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid rgba(28, 41, 81, 0.1) !important;
        margin: 0 !important;
    }
    
    .nav-item:last-child {
        border-bottom: none !important;
    }
    
    .nav-link {
        display: block !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;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .nav-link:hover {
        color: #D4AF37 !important;
        background: rgba(212, 175, 55, 0.1) !important;
        padding-left: 1rem !important;
    }
    
    /* MOBILE DROPDOWN STYLES */
    .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;
    }
    
    .dropdown.mobile-open .dropdown-menu,
    .dropdown-menu.mobile-open {
        display: flex !important;
    }
    
    .dropdown-column {
        min-width: auto !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .dropdown-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        color: #1C2951 !important;
        font-weight: 600 !important;
    }
    
    .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;
    }
    
    .dropdown-link:last-child {
        border-bottom: none !important;
    }
    
    .dropdown-link:hover {
        padding-left: 0.8rem !important;
        color: #D4AF37 !important;
    }
}

/* ===== PRELOADER CENTERING FIX ===== */
/* Force logo and content to center properly on mobile */
@media screen and (max-width: 768px) {
    .preloader {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100vw !important;
        height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 10000 !important;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    }
    
    .preloader-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 90% !important;
        margin: 0 auto !important;
        padding: 2rem 1rem !important;
    }
    
    .welcome-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    .preloader-logo {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto 2rem auto !important;
        text-align: center !important;
    }
    
    .preloader-logo img {
        max-width: 220px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
        object-fit: contain !important;
    }
    
    .welcome-header {
        width: 100% !important;
        text-align: center !important;
        margin: 0 auto 1.5rem auto !important;
    }
    
    .welcome-header h1 {
        font-size: 1.8rem !important;
        text-align: center !important;
        margin: 0 auto !important;
        line-height: 1.3 !important;
        color: var(--primary-gold, #D4AF37) !important;
    }
    
    .welcome-description {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 2rem auto !important;
    }
    
    .welcome-description p {
        font-size: 1rem !important;
        padding: 0 1rem !important;
        margin: 0 auto !important;
        text-align: center !important;
        line-height: 1.6 !important;
        color: var(--light-gold, #F4E9C1) !important;
    }
    
    .service-highlights {
        width: 100% !important;
        margin: 2rem auto !important;
        text-align: center !important;
    }
    
    .highlight-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .highlight-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
        text-align: center !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 250px !important;
    }
    
    .agree-btn {
        margin: 2rem auto 0 auto !important;
        display: block !important;
        width: auto !important;
        padding: 1rem 2rem !important;
    }
}

/* ===== HERO SECTION MOBILE FIX ===== */
/* Fix hero section layout and add background image */
@media screen and (max-width: 768px) {
    .hero {
        min-height: 100vh !important;
        padding-top: 80px !important;
        padding-bottom: 2rem !important;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%), 
                    url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80') center/cover !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .hero-background {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%), 
                    url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80') center/cover !important;
        z-index: 1 !important;
    }
    
    .hero-overlay {
        background: rgba(15, 23, 42, 0.7) !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 2 !important;
    }
    
    .hero-container {
        position: relative !important;
        z-index: 3 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        align-items: center !important;
        text-align: center !important;
        padding: 2rem 1rem !important;
        width: 100% !important;
    }
    
    .hero-content {
        color: white !important;
        text-align: center !important;
    }
    
    .hero-title {
        color: white !important;
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .highlight-text {
        color: #D4AF37 !important;
        display: block !important;
        margin: 0.5rem 0 !important;
    }
    
    .hero-description {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }
    
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
        margin: 2rem 0 !important;
    }
    
    .hero-credentials {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }
    
    .credential {
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 10px !important;
        padding: 1rem !important;
        text-align: center !important;
        color: white !important;
    }
    
    .credential-number {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: #D4AF37 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .credential-text {
        font-size: 0.9rem !important;
        opacity: 0.9 !important;
    }
}

/* ===== SUPER SMALL PHONES (max 480px) ===== */
@media screen and (max-width: 480px) {
    .hamburger {
        width: 36px !important;
        height: 36px !important;
        padding: 6px !important;
    }
    
    .hamburger span {
        width: 20px !important;
        height: 2px !important;
    }
    
    .preloader-logo img {
        max-width: 180px !important;
    }
    
    .welcome-header h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-credentials {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .nav-container {
        padding: 0 1rem !important;
    }
}

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

/* ===== ENSURE VISIBILITY ON ALL DEVICES ===== */
@media screen and (max-width: 1200px) {
    .hamburger {
        display: flex !important;
    }
}

@media screen and (max-width: 991px) {
    .hamburger {
        display: flex !important;
    }
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
}

@media screen and (max-width: 576px) {
    .hamburger {
        display: flex !important;
    }
}
