/*!
 * Khabarnameh — responsive.css
 * Mobile-first refinements & print styles.
 */

/* Tablet & below */
@media (max-width: 960px) {
    body { font-size: 15.5px; }
    .site-header-inner { grid-template-columns: 1fr auto; }
    .site-header-banner { display: none; }
    .home-grid, .single-layout { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
    body { font-size: 15px; }
    .container { width: calc(100% - 2rem); }
    .site-header-inner {
        grid-template-columns: 1fr auto;
        padding-block: .8rem;
        gap: .75rem;
    }
    .site-header-search { order: -1; grid-column: 1 / -1; width: 100%; }
    .site-header-search .search-form { width: 100%; }
    .site-header-search .search-field { width: 100%; flex: 1; max-width: none; }
    .site-title { font-size: 1.2rem; }
    .breaking-label { font-size: .8rem; padding: .55rem .8rem; padding-inline-end: 1.5rem; }
    .breaking-list { padding-block: .55rem; }

    .single-share-block, .author-box, .related-posts, .comments-area, .single-share-block { margin: 1.25rem .8rem; }
    .single-content-body { padding: 1.25rem; }
    .single-entry-header { padding: 1.25rem; }

    .entry-title { font-size: 1.55rem; }
    .single-entry-meta { gap: .6rem 1rem; }
    .home-section-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .home-section-title { font-size: 1.2rem; }

    .posts-grid.layout-cards { grid-template-columns: 1fr; }
}

/* Very small phones */
@media (max-width: 380px) {
    .site-header-actions { gap: .25rem; }
    .search-toggle, .menu-toggle { width: 38px; height: 38px; }
    .site-header-search .search-field { width: 140px; }
    .site-header-search .search-submit { width: 40px; height: 40px; }
}

/* Big screens */
@media (min-width: 1400px) {
    :root { --kh-container: 1320px; }
}

/* Dark accent toggle (manual) */
body.is-dark-mode {
    --kh-bg: #0F172A;
    --kh-text: #F1F5F9;
    --kh-card-bg: #111B33;
    --kh-card-border: #1E293B;
    --kh-border: #1E293B;
    --kh-surface: #0F172A;
    --kh-surface-alt: #111B33;
    --kh-muted: #94A3B8;
    --kh-primary: #DBEAFE;
    --kh-primary-dark: #93C5FD;
    --kh-secondary: #93C5FD;
    --kh-accent: #60A5FA;
    --kh-accent-soft: #1E40AF;
}
body.is-dark-mode .site-header { background: #0F172A; border-color: #1E293B; }
body.is-dark-mode .main-navigation { background: #061A30; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .breaking-list { animation: none; }
}

/* Print */
@media print {
    .site-topbar,
    .main-navigation,
    .breaking-news,
    .site-search-panel,
    .site-header-actions,
    .single-share-block,
    .related-posts,
    .comments-area,
    .newsletter-block,
    .site-footer,
    .scroll-top,
    .post-navigation,
    .reading-progress { display: none !important; }

    body { background: #fff; color: #000; font-size: 12pt; }
    .single-article { border: 0; }
    .single-content-body { padding: 0; }
    a { color: inherit; text-decoration: none; }
    .entry-title { color: #000; }
}
