/**
 * Responsive Styles
 * Mobile-first approach
 */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .stat-box {
        margin-bottom: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .stat-box h3 {
        font-size: 2rem;
    }
    
    form .row {
        --bs-gutter-x: 0.5rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero {
        padding: 120px 40px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Large Devices (small laptops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .navbar-nav {
        gap: 1rem;
    }
}

/* Extra Large Devices (large laptops, 1200px and up) */
@media (min-width: 1200px) {
    .container, .container-sm, .container-md, .container-lg, .container-xl {
        max-width: 1140px;
    }
}

/* XXL Devices (very large screens, 1400px and up) */
@media (min-width: 1400px) {
    .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
        max-width: 1320px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar, footer, .btn-close, button, a.btn {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .form-control, .form-select {
        background-color: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
}

/* Accessibility - Focus States */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
