/* Mobile CSS Fixes for Zero Echelon
   Created: November 2025
   Purpose: Complete mobile responsiveness */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Navigation Fixes */
    .nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark, #0f172a);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-link {
        padding: 0.75rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero p {
        font-size: 1rem !important;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 1rem !important;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    /* Card layouts */
    .features-grid,
    .services-grid,
    .demo-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Section spacing */
    .section {
        padding: 2rem 0 !important;
    }
    
    /* Typography */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }
    
    /* Demo cards */
    .demo-card {
        padding: 1.5rem !important;
    }
    
    /* Forms */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95% !important;
        margin: 1rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    /* Even smaller adjustments */
    .hero h1 {
        font-size: 1.75rem !important;
    }
    
    .nav-logo-text {
        font-size: 0.9rem !important;
    }
    
    /* Hide logo text on very small screens */
    @media (max-width: 350px) {
        .nav-logo-text {
            display: none !important;
        }
    }
    
    /* Stack everything vertically */
    .stats-grid,
    .tech-stack {
        grid-template-columns: 1fr !important;
    }
    
    /* Smaller padding */
    .section {
        padding: 1.5rem 0 !important;
    }
    
    .container {
        padding: 0 0.75rem !important;
    }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .nav-menu {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Fix for hamburger menu animation */
.mobile-menu-toggle {
    position: relative;
    width: 30px;
    height: 30px;
}

.mobile-menu-toggle span {
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 14px;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 14px;
}
