/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .hero-container {
        gap: 5rem;
    }
    
    .steps-container {
        flex-wrap: nowrap;
    }
    
    .step {
        min-width: 220px;
    }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) {
    .nav-menu {
        gap: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Devices (768px and down) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease-in-out;
        z-index: 1001;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-download {
        display: none;
    }
    
    .hamburger {
        display: block;
        z-index: 1002;
    }
    
    .hamburger.active {
        color: var(--primary-color);
    }
    
    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding-top: 100px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content {
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .download-btn img {
        height: 50px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .app-mockup {
        max-width: 280px;
    }
    
    /* Features Section */
    .features {
        padding: 3rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* How It Works Section */
    .how-it-works {
        padding: 3rem 0;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step {
        min-width: auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
    
    /* Testimonials Section */
    .testimonials {
        padding: 3rem 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial {
        padding: 1.5rem;
    }
    
    /* CTA Section */
    .cta {
        padding: 3rem 0;
    }
    
    .cta-content {
        padding: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-download {
        align-items: center;
    }
}

/* Extra Small Devices (576px and down) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        width: 100%;
        padding: 5rem 1.5rem 2rem;
    }
    
    /* Hero Section */
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-stats {
        margin: 1rem 0;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Sections padding */
    .features,
    .how-it-works,
    .testimonials,
    .cta {
        padding: 2rem 0;
    }
    
    /* Cards */
    .glass-card {
        border-radius: 12px;
    }
    
    .feature-card,
    .testimonial,
    .step {
        padding: 1.5rem;
    }
    
    .cta-content {
        padding: 1.5rem;
    }
    
    /* Buttons */
    .glass-btn,
    .cta-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

/* Landscape orientation on small devices */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 70vh;
        padding-top: 80px;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .app-mockup {
        max-width: 200px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img,
    .footer-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-background {
        animation: none;
    }
    
    .app-mockup {
        animation: none;
    }
    
    .step-arrow {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --text-dark: #ffffff;
        --glass-bg: rgba(255, 255, 255, 0.08);
        --glass-border: rgba(255, 255, 255, 0.15);
    }
}

/* Print styles */
@media print {
    .navbar,
    .hamburger,
    .hero-buttons,
    .cta,
    .footer {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .glass-card {
        background: transparent;
        border: 1px solid #ccc;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    * {
        color: #000 !important;
        background: transparent !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .glass-card:hover,
    .glass-btn:hover,
    .cta-btn:hover {
        transform: none;
    }
    
    .nav-link:hover {
        color: var(--text-secondary);
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    /* Increase touch targets */
    .nav-link,
    .glass-btn,
    .cta-btn,
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .nav-menu {
        width: 100vw;
        left: 0;
        right: auto;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .cta-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Focus styles for keyboard navigation */
    .nav-link:focus,
    .glass-btn:focus,
    .cta-btn:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* Larger text for readability */
    .footer-links a {
        font-size: 1rem;
        padding: 0.25rem 0;
        display: block;
    }
    
    /* Better spacing for touch targets */
    .testimonial-author {
        gap: 1.5rem;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}