/* Mobile Critical Fixes - Load this LAST */

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative !important;
    }
    
    * {
        max-width: 100% !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Nav Logo */
    .nav-logo img,
    .logo-full {
        max-height: 35px !important;
        height: 35px !important;
        width: auto !important;
    }
    
    .nav {
        padding: 15px 0 !important;
    }
    
    .nav-container {
        padding: 0 20px !important;
    }
    
    /* Footer Logo */
    .footer-logo img,
    .footer-logo {
        max-height: 28px !important;
        height: 28px !important;
        width: auto !important;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 !important;
    }
    
    .footer-content {
        width: 100% !important;
    }
    
    .footer-links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }
    
    .footer-section {
        width: 100% !important;
    }
    
    /* Mobile Menu Button */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-around !important;
        width: 40px !important;
        height: 40px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 8px !important;
        z-index: 10001 !important;
        position: relative !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background: #0A0A0A !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        pointer-events: none !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px) !important;
    }
    
    /* Nav Links Mobile */
    .nav-links {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        padding: 20px !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
    }
    
    .nav-links.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .nav-links a {
        display: block !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        width: 100% !important;
        text-align: left !important;
        color: #1d1d1f !important;
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    
    .nav-links a:last-child {
        border-bottom: none !important;
    }
    
    .nav-links a.nav-cta {
        background: #0071E3 !important;
        color: white !important;
        padding: 15px 20px !important;
        border-radius: 8px !important;
        text-align: center !important;
        margin-top: 10px !important;
    }
    
    /* Footer Mobile */
    .footer-links-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }
    
    .footer-contact-links {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .footer-copyright {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center !important;
    }
    
    /* Container */
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Hero */
    .hero {
        padding: 120px 0 60px !important;
    }
    
    .hero-layout {
        grid-template-columns: 1fr !important;
    }
    
    .hero-headline-modern {
        font-size: 2.25rem !important;
    }
    
    .typing-text {
        color: #0071E3 !important;
    }
    
    .hero-cta-modern {
        flex-direction: column !important;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Logos */
    .division-logos {
        overflow: hidden !important;
        padding: 20px 10px !important;
    }
    
    .division-logos img {
        height: 28px !important;
    }
    
    .division-logos-track {
        animation: scroll-logos 8s linear infinite !important;
        animation-play-state: running !important;
    }
    
    .division-logos:hover .division-logos-track {
        animation-play-state: running !important;
    }
    
    /* Cards - Single column on mobile only */
    .capabilities-grid-four,
    .featured-grid,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Disable animations on mobile */
    .fade-in-up,
    .hover-lift,
    .card-hover {
        animation: none !important;
    }
}
