/* Responsive CSS for Rajasthan Virtual Shiksha PWA */

/* Mobile First Approach */

/* Base Mobile Styles (320px - 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .logo-container {
        gap: var(--spacing-md);
    }
    
    .raj-logo {
        height: 60px;
    }
    
    .india-emblem {
        height: 45px;
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Tablet Styles (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop Styles (1025px+) */
@media (min-width: 1025px) {
    .container {
        padding: 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* High-DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for high-DPI displays */
    .hero-section::before {
        background-size: 100px;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-nav,
    .install-app,
    .main-footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    a {
        text-decoration: underline;
        color: black;
    }
    
    .container {
        width: 100%;
        padding: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body.auto-theme {
        --background-color: #121212;
        --text-color: #f0f0f0;
        --light-gray: #222;
        --medium-gray: #333;
        --dark-gray: #aaa;
    }
    
    body.auto-theme .main-header {
        background-color: #1a1a1a;
    }
    
    body.auto-theme .feature-card {
        background-color: #1a1a1a;
    }
}

