/* Hero Section Tablet Responsive - Keep left-right layout */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .hero-images {
        height: 500px;
    }
    
    .mobile-frame {
        width: 220px;
        height: 480px;
        padding: 4px;
    }
    
    .mobile-frame-2 {
        width: 200px;
        height: 440px;
    }
    
    .mobile-frame-1 {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .mobile-frame-2 {
        left: 150px;
        top: 50%;
        transform: translateX(-10%) translateY(-50%);
    }
    
    .mobile-screen {
        height: 465px;
        margin-top: 4px;
        border-radius: 30px;
    }
    
    .mobile-frame-2 .mobile-screen {
        height: 425px;
    }
}

/* Mobile - Stack vertically on small screens only */
@media (max-width: 768px) {
    .hero {
        margin: 1rem 20px;
    }
    
    .nav {
        padding: 1rem 30px;
    }
    
    .nav-brand .logo {
        margin-left: 10px;
    }
    
    .nav-list {
        margin-right: 10px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text {
        text-align: center;
        order: 2;
    }
    
    .hero-images {
        order: 1;
        height: 350px;
    }
    
    .mobile-frame {
        width: 180px;
        height: 340px;
        padding: 4px;
    }
    
    .mobile-frame-1 {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .mobile-frame-2 {
        width: 160px;
        height: 300px;
        left: 120px;
        top: 50%;
        transform: translateX(-10%) translateY(-50%);
    }
    
    .mobile-screen {
        height: 325px;
        margin-top: 4px;
        border-radius: 25px;
    }
    
    .mobile-frame-2 .mobile-screen {
        height: 285px;
    }
    
    .mobile-frame::before {
        width: 40px;
        height: 3px;
        top: 6px;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(31, 38, 135, 0.37);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
        border-radius: 0;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

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

    .hero-description {
        font-size: 1.1rem;
    }

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

    .feature-card {
        padding: 2rem;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 0;
    }

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

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        width: 100%;
        max-width: 280px;
    }

    .features,
    .download {
        padding: 2.5rem 0;
    }

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

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

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .feature-title {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 2rem;
    }

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

    .policy-section h3 {
        font-size: 1.2rem;
    }

    .content-page {
        padding: 1rem 0;
    }

    .nav-brand .logo {
        font-size: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }

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

    .hero-description {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .nav-brand .logo {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 0;
    }

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

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .features,
    .download {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .hero-buttons,
    .download-buttons {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .page-title,
    .section-title {
        color: #007fa7;
    }

    .policy-section h2 {
        color: #007fa7;
        border-bottom-color: #007fa7;
    }

    .content-page {
        max-width: none;
        margin: 0;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (redundant but good practice) */
@media (prefers-color-scheme: dark) {
    /* Our site is already dark, but ensuring consistency */
    body {
        background-color: #000000;
        color: #ffffff;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .footer-link:focus {
        outline: 2px solid #007fa7;
        outline-offset: 2px;
        border-radius: 4px;
    }
}

/* Large Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

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

    .hero-description {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 3rem;
    }

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

    .feature-card {
        padding: 3rem;
    }
}