/* ═══════════════════════════════════════════
        RESPONSIVE SYSTEM: CHARIINFO
    التوافق مع الهواتف والأجهزة اللوحية
═══════════════════════════════════════════ */

/* ── TABLET (max-width: 1024px) */
@media (max-width: 1024px) {
    .site-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .news-card--featured {
        grid-column: span 1;
    }
}

/* ── MOBILE LARGE (max-width: 768px) */
@media (max-width: 768px) {
    .header-main {
        flex-direction: row;
        justify-content: space-between;
        height: 64px;
        padding: 0 var(--space-4);
        gap: var(--space-2);
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .world-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .breaking-label {
        padding: 0 var(--space-4);
        font-size: 10px;
    }

    .breaking-label span {
        display: none;
        /* Cache le texte long sur mobile */
    }

    .nav-inner {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .nav-item {
        padding: 0 var(--space-3);
        font-size: var(--text-xs);
    }
}

/* ── MOBILE (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --text-3xl: 28px;
        --text-2xl: 22px;
        --text-xl: 18px;
    }

    .header-main {
        height: auto;
    }

    .site-logo__name {
        font-size: 20px;
    }

    .search-box {
        display: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .world-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .nav-inner::-webkit-scrollbar {
        display: none;
    }

    .btn {
        width: 100%;
    }

    .article-body {
        font-size: var(--text-base);
    }

    .news-card--hero {
        height: 380px;
    }
}

/* ── PRINT ── */
@media print {

    .breaking-bar,
    nav,
    .sidebar,
    .widget-area,
    footer,
    .social-btn,
    .pagination,
    .search-form {
        display: none !important;
    }

    .site-grid {
        grid-template-columns: 1fr;
    }

    body {
        background: white;
        font-size: 12pt;
        color: black;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #333;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* ── DARK MODE (Future implementation) ── */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode variables */
}