/* mobile-optimizations.css - Additional Mobile-Specific Optimizations */

/* ===== IMPROVED TOUCH TARGETS ===== */
@media (max-width: 768px) {
    /* Make all interactive elements at least 44px x 44px for better touch targets */
    .btn,
    .nav-item,
    .learn-more-link,
    .language-selector,
    .mobile-menu-toggle,
    .team-card,
    .feature-card a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Add more padding to navigation items for better touch targets */
    .nav-item {
        padding: var(--space-md) 0;
    }

    /* Increase tap area for mobile menu toggle */
    .mobile-menu-toggle {
        padding: 10px;
    }

    /* Improve spacing between interactive elements */
    .feature-card,
    .detect-card,
    .resolve-card,
    .automate-feature {
        margin-bottom: 24px;
    }

    /* Add active state styles for better touch feedback */
    .btn:active,
    .nav-item:active,
    .learn-more-link:active,
    .team-card:active {
        opacity: 0.7;
        transition: opacity 0.1s ease;
    }
}

/* ===== MOBILE NAVIGATION IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Improve mobile navigation appearance */
    .navigation.active {
        background: rgba(21, 18, 28, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border: 1px solid var(--glass-border);
    }

    /* Add transition for smooth mobile menu appearance */
    .navigation {
        transition: all 0.3s ease;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
    }

    .navigation.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Improve mobile menu toggle appearance */
    .mobile-menu-toggle {
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--glass-border);
        padding: 8px;
    }

    .mobile-menu-toggle span {
        transition: all 0.3s ease;
    }
}

/* ===== OPTIMIZED IMAGES ===== */
/* Image optimization for all screen sizes */
.hero-image img,
.step-image img {
    max-width: 100%;
    height: auto;
}

/* ===== OPTIMIZED IMAGES FOR MOBILE ===== */
@media (max-width: 768px) {
    /* Optimize image display on mobile */
    .hero-image img,
    .step-image img {
        max-width: 100%;
        height: auto;
        border-radius: var(--radius-lg);
    }

    /* Improve image containers on mobile */
    .hero-image,
    .step-image {
        margin: 0 auto;
        text-align: center;
        width: 100%;
    }
}

/* ===== ADDITIONAL MOBILE IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Improve text readability on mobile */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Improve scrolling experience */
    html, body {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Fix for iOS form elements */
    input, 
    textarea, 
    select, 
    button {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    /* Reduce header padding to remove extra space */
    .header {
        padding: 8px var(--space-lg);
    }
    
    /* Prevent content from being hidden under fixed elements and reduce space */
    .header-hero-container {
        padding-top: 50px; /* Reduced to match smaller header */
    }
    
    /* Reduce hero padding to eliminate extra space */
    .hero {
        padding-top: var(--space-xl);
    }

    /* Remove spacing between sections to eliminate blue background showing through */
    .step-section, 
    .team-section, 
    .cta-section,
    section {
        margin: 0;
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-3xl);
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
    
    /* Ensure sections are directly adjacent with no gap */
    section + section {
        margin-top: 0;
        border-top: none;
    }
    
    /* Fix for the blue gap between sections */
    body {
        display: flex;
        flex-direction: column;
    }
    
    /* Remove any margin from the last element in each section */
    section > *:last-child {
        margin-bottom: 0;
    }

    /* Prevent horizontal overflow */
    .hero-content,
    .step-content,
    .team-container,
    .team-description {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* ===== VERY SMALL MOBILE ADDITIONAL OPTIMIZATIONS (≤480px) ===== */
@media (max-width: 480px) {
    /* Further reduce header padding for very small screens */
    .header {
        padding: 5px 10px;
    }
    
    /* Adjust logo size for very small screens */
    .logo {
        width: 130px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    /* Further reduce hero padding for very small screens */
    .hero {
        padding-top: var(--space-md);
    }
    
    /* Reduce header-hero container padding */
    .header-hero-container {
        padding-top: 40px;
    }
    
    /* Further reduce font sizes for very small screens */
    .hero-title {
        font-size: 24px;
        line-height: 32px;
    }

    .step-heading {
        font-size: 20px;
        line-height: 28px;
    }

    /* Adjust button sizes for very small screens */
    .btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    /* Improve card layouts on very small screens */
    .feature-card,
    .detect-card,
    .resolve-card {
        padding: var(--space-md);
    }

    /* Adjust team cards for very small screens */
    .team-card {
        flex-direction: column;
        text-align: center;
    }

    .team-photo {
        margin: 0 auto var(--space-sm);
    }
}
