/* ========================================
   Responsive Design - Mobile First Approach
   ======================================== */

/* Tablets and smaller desktops */
@media screen and (max-width: 992px) {
    nav {
        padding: 0 1.5rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* Tablet: 2 columns for reports */
    .reports-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

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

    /* Show arrows if more than 2 cards on tablet */
    .reports-grid.has-many-cards~.carousel-btn {
        display: flex !important;
    }
}

/* Mobile devices - CAROUSEL ACTIVATES HERE */
@media screen and (max-width: 768px) {
    nav {        
        gap: 0rem;
        padding: 1rem;
    }

    .hero-content {
        display: none !important;
    }

    .logo {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0;
    }

    .article-header-extras>.article-meta>.category {
        display: none !important;
    }

    section {
        padding: 2rem 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* ===== MOBILE CAROUSEL STYLES ===== */
    .reports-container {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        overflow: visible;
        /* Important! */
    }

    /* Change grid to flex carousel */
    .reports-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: unset !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0 !important;
        padding: 10px 0 !important;
        margin: 0 -10px !important;
    }

    /* Hide scrollbar but keep functionality */
    .reports-grid::-webkit-scrollbar {
        display: none !important;
    }

    .reports-grid {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }

    /* Each card takes full width */
    .report-card {
        flex: 0 0 calc(100% - 20px) !important;
        scroll-snap-align: start !important;
        margin: 0 10px !important;
        min-width: 0 !important;
        /* Prevents flexbox overflow */
    }

    /* Keep categories as single column */
    .categories-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .about-content ul,
    .about-content ol {
        margin-left: 1.5rem;
    }

    .contact-content {
        padding: 0;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .article-header-extras {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .subtitle,
    .article-meta {
        width: 100% !important;
    }

    .content-render.active {
        padding: 0 !important;
    }

    .content-render>.content-frame {
        padding: 0 !important;
    }
     .maintenance-banner {
        text-align: center;
        white-space: normal;
        padding: 0.75rem 1rem;
        overflow: visible;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .maintenance-text {
        animation: none !important;
        display: block;
        padding-left: 0 !important;
        transform: none !important;
        white-space: normal;
        margin: 0;
        line-height: 1.4;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .logo img {
        width: 35px;
        height: 35px;
    }

    .logo h1 {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .reports-container {
        padding: 0 35px;
        /* Slightly less padding */
    }

    .report-card,
    .category-card,
    .contact-item {
        padding: 1rem;
    }

    /* Smaller margins for carousel on very small screens */
    .reports-grid {
        margin: 0 -5px !important;
    }

    .report-card {
        flex: 0 0 calc(100% - 15px) !important;
        margin: 0 7.5px !important;
    }

    .submit-btn {
        width: 100%;
    }

    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Desktop (above 992px) - 4 columns with arrows */
@media screen and (min-width: 993px) {
    .reports-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Show arrows only if more than 4 cards */
    .reports-grid.has-many-cards~.carousel-btn {
        display: flex !important;
    }

    .reports-container .carousel-btn.prev {
        display: flex !important;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 2rem 1rem;
    }
}

/* High resolution displays */
@media screen and (min-width: 1400px) {
    :root {
        --max-width: 1400px;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }
}

/* Print styles */
@media print {

    header,
    footer,
    .nav-links,
    .contact-form,
    .carousel-btn {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
        color: #000;
    }

    .report-card,
    .category-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Force grid layout for print */
    .reports-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        overflow: visible !important;
    }
}