/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .phone-mockup {
        max-width: 250px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .legal-body {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1.25rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .screenshots-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-container {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.25rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-container {
        gap: 4rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-container {
        gap: 5rem;
    }

    .hero-title {
        font-size: 4rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== NAVIGATION MOBILE MENU ===== */
@media (max-width: 767.98px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
    }

    .nav-links .nav-link:last-child {
        border-bottom: none;
    }
}

/* ===== HOVER EFFECTS FOR TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover {
        transform: none;
    }

    .screenshot-img:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    .app-store-btn:hover img {
        transform: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .hero-cta,
    .download-buttons {
        display: none !important;
    }

    .hero {
        background: white !important;
        color: black !important;
        padding: 2rem 0 !important;
    }

    .hero-title,
    .hero-subtitle {
        color: black !important;
    }

    .legal-content {
        padding: 2rem 0 !important;
        background: white !important;
    }

    .legal-body {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    a {
        color: black !important;
        text-decoration: underline !important;
    }

    .btn {
        border: 1px solid #ccc !important;
        background: white !important;
        color: black !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
    /* For now, we'll keep the light theme as default */
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }

    .btn-secondary {
        border: 2px solid #fff;
    }

    .feature-card {
        border: 1px solid #000;
    }

    .legal-section h2 {
        border-bottom: 3px solid #000;
    }
}

/* ===== FOCUS VISIBILITY ===== */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    a:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 80px 0 40px;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    section {
        padding: 40px 0;
    }
}

/* ===== RETINA 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;
    }
}

/* ===== SAFE AREA INSETS (for notched devices) ===== */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
} 