/**
 * Kamol Katha - Responsive Design
 * Breakpoints: Mobile <640px, Tablet 641-1024px, Desktop 1025-1280px
 */

/* ============================================
   MOBILE (< 640px)
   ============================================ */
@media (max-width: 639px) {
    /* Hero section */
    .hero-headline {
        font-size: 24px;
    }

    .section-heading {
        font-size: 20px;
    }

    .article-headline {
        font-size: 16px;
    }

    /* Navigation */
    #main-header nav {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    /* News cards - single column */
    .news-grid {
        grid-template-columns: 1fr !important;
    }

    /* Article page */
    .article-body {
        font-size: 15px;
        line-height: 1.7;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-content h3 {
        font-size: 17px;
    }

    /* Breaking ticker */
    #breaking-ticker .ticker-content {
        animation: marquee 20s linear infinite;
    }

    /* Footer */
    footer .grid {
        grid-template-columns: 1fr !important;
    }

    /* Share buttons */
    .share-btn {
        width: 36px;
        height: 36px;
    }

    /* Touch targets */
    a, button, input[type="submit"] {
        min-height: 44px;
    }

    /* Stack sidebar below content */
    .main-with-sidebar {
        flex-direction: column;
    }
    
    .main-with-sidebar .sidebar {
        margin-top: 2rem;
    }
}

/* ============================================
   TABLET (641px - 1024px)
   ============================================ */
@media (min-width: 640px) and (max-width: 1024px) {
    /* Hero section */
    .hero-headline {
        font-size: 32px;
    }

    .section-heading {
        font-size: 24px;
    }

    .article-headline {
        font-size: 18px;
    }

    /* News grid - 2 columns */
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Article page */
    .article-body {
        font-size: 16px;
    }

    /* Sidebar below content */
    .main-with-sidebar {
        flex-direction: column;
    }
    
    .main-with-sidebar .sidebar {
        margin-top: 2rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .main-with-sidebar .sidebar > *:last-child {
        grid-column: span 2;
    }
}

/* ============================================
   DESKTOP (1025px+)
   ============================================ */
@media (min-width: 1025px) {
    /* News grid - 3 columns */
    .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Main layout with sidebar */
    .main-with-sidebar {
        display: flex;
        gap: 2rem;
    }

    .main-with-sidebar .main-content {
        flex: 1;
        min-width: 0;
    }

    .main-with-sidebar .sidebar {
        width: 320px;
        flex-shrink: 0;
    }

    /* Category page grid */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Article header */
    .article-header h1 {
        font-size: 40px;
    }

    /* Featured image */
    .article-featured-image {
        max-height: 500px;
    }

    /* Fixed navigation spacing */
    body {
        padding-top: 0;
    }
}

/* ============================================
   LARGE DESKTOP (1280px+)
   ============================================ */
@media (min-width: 1280px) {
    .hero-headline {
        font-size: 48px;
    }

    .sidebar {
        width: 340px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #page-loader {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    #main-header, #breaking-ticker, footer, .sidebar, .ad-slot, .share-buttons, #scroll-top {
        display: none !important;
    }

    body {
        font-size: 14px;
        line-height: 1.6;
        color: #000;
        background: #fff;
    }

    .article-body {
        font-size: 14px;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
