/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    /* Header */
    .nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        margin-top: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    /* How It Works */
    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .workflow-step {
        padding: 1.5rem;
    }
    
    .phone-mockup-large {
        width: 280px;
        height: 560px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    /* App Mockups */
    .mockups-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .mockup-phone {
        width: 200px;
        height: 400px;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    /* CTA */
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding: 0 20px;
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* How It Works */
    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* App Mockups */
    .mockups-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding: 0 30px;
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    /* How It Works */
    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* App Mockups */
    .mockups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        padding: 0 40px;
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    /* How It Works */
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* App Mockups */
    .mockups-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    /* How It Works */
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* App Mockups */
    .mockups-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Footer */
    .footer-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding: 80px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .btn-icon,
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .floating-elements,
    .thematic-image {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    .how-it-works,
    .features,
    .app-mockups,
    .testimonials,
    .cta {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-glow,
    .animate-rotate,
    .animate-bounce {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme, but can add additional dark mode optimizations */
    .glass-effect {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Light Mode Override (if needed) */
@media (prefers-color-scheme: light) {
    /* Keep dark theme as per design requirements */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover-lift:hover,
    .hover-glow:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
        box-shadow: none;
    }
    
    .card-hover:hover {
        transform: none;
    }
    
    .btn-animate:hover::before {
        left: -100%;
    }
    
    /* Increase touch targets */
    .primary-btn,
    .secondary-btn,
    .download-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        padding: 10px 15px;
        display: block;
    }
}

/* Specific Device Optimizations */

/* iPhone SE and similar small screens */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    .phone-mockup-large {
        width: 250px;
        height: 500px;
    }
    
    .mockup-phone {
        width: 180px;
        height: 360px;
    }
}

/* iPad Portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .workflow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Landscape */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .phone-mockup {
        width: 350px;
        height: 700px;
    }
    
    .phone-mockup-large {
        width: 400px;
        height: 800px;
    }
}

/* Ultra-wide Screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-content {
        gap: 6rem;
    }
    
    .workflow-grid,
    .features-grid,
    .mockups-grid,
    .testimonials-grid {
        gap: 4rem;
    }
}
