/* =============================================
   MOBILE EXCELLENCE - FINAL OPTIMIZATIONS
   ============================================= */

/* Add this at the end of style.css for outstanding mobile performance */

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .navbar {
        padding-top: max(1.2rem, env(safe-area-inset-top));
    }
}

/* Enhanced mobile link targets */
@media (max-width: 768px) {
    /* All interactive elements minimum 44x44 */
    a, button, .btn, .nav-link, .hamburger,
    input[type="submit"], input[type="button"] {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Optimize text contrast for mobile screens */
    body {
        color: #e2e8f0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #ffffff;
    }
    
    /* Prevent text from being too wide on mobile */
    p, li {
        max-width: 65ch;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Improve button visibility */
    .btn-primary {
        box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    }
    
    .btn-secondary {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* Smooth image loading */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape mode optimizations */
@media (max-width: 968px) and (orientation: landscape) {
    .hero {
        padding: 60px 1rem 2rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
}

/* Small device optimizations (iPhone SE, etc.) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.9rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
}

/* Ultra-wide mobile devices */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 2rem;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        color: #ffffff;
    }
    
    .navbar {
        background: rgba(10, 14, 26, 1);
        border-bottom: 2px solid #06b6d4;
    }
    
    .btn-primary {
        border: 2px solid #06b6d4;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0a0e1a;
    }
    
    .navbar {
        background: rgba(10, 14, 26, 0.98);
    }
}

/* Focus visible for keyboard navigation */
@media (hover: none) and (pointer: coarse) {
    /* This is a touch device */
    *:focus {
        outline: none;
    }
    
    *:focus-visible {
        outline: 3px solid #06b6d4;
        outline-offset: 2px;
    }
}
