/* ============================================
   NEWS PAGE - PROFESSIONAL STYLING
   ============================================ */

/* News design tokens (scoped to the news page only) */
.news-page {
    --primary-color: #ff6b3b;
    --secondary-color: #1d9b86;
    --accent-color: #fbbf24;

    --news-bg: #f8fafc;
    --news-surface: #ffffff;
    --news-surface-2: #f1f5f9;
    --news-text: #0f172a;
    --news-muted: #64748b;
    --news-border: rgba(15, 23, 42, 0.1);

    --news-radius: 14px;
    --news-radius-lg: 16px;
    --news-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    --news-shadow-hover: 0 20px 60px rgba(15, 23, 42, 0.14);

    --news-font-en: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --news-font-ar: "Almarai", "Cairo", "Tahoma", sans-serif;
    --news-font: var(--news-font-en);
    --news-body-size: 15px;
    --news-body-line: 1.65;
}

html[lang="ar"] .news-page {
    --news-font: var(--news-font-ar);
}

html.dark-mode .news-page {
    --news-bg: #0b1120;
    --news-surface: rgba(17, 24, 39, 0.86);
    --news-surface-2: rgba(15, 23, 42, 0.9);
    --news-text: #f8fafc;
    --news-muted: #9ca3af;
    --news-border: rgba(255, 255, 255, 0.1);
    --news-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    --news-shadow-hover: 0 24px 80px rgba(0, 0, 0, 0.55);
}

/* ============ PAGE WRAPPER ============ */
.news-page {
    background: var(--news-bg);
    min-height: 100vh;
    color: var(--news-text);
    font-size: var(--news-body-size);
    line-height: var(--news-body-line);
}

.news-page,
.news-page * {
    font-family: var(--news-font);
}

.news-page h1,
.news-page h2,
.news-page h3,
.news-page h4,
.news-page h5,
.news-page h6 {
    color: var(--news-text);
    letter-spacing: -0.01em;
}

html[lang="ar"] .news-page h1,
html[lang="ar"] .news-page h2,
html[lang="ar"] .news-page h3,
html[lang="ar"] .news-page h4,
html[lang="ar"] .news-page h5,
html[lang="ar"] .news-page h6 {
    letter-spacing: 0;
}

.news-page p {
    color: var(--news-muted);
}

.news-page a {
    color: inherit;
}

.news-page a:hover {
    color: var(--primary-color);
}

/* ============ CONTAINER UTILITIES ============ */
.my-80 {
    margin-top: 80px;
    margin-bottom: 80px;
}

.my-60 {
    margin-top: 60px;
    margin-bottom: 60px;
}

/* ============ POSTS SECTION ============ */
.posts-section {
    margin: 80px 0;
    animation: fadeIn 0.6s ease-out;
}

.posts-grid {
        display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-bottom: 60px;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    color: var(--news-muted);
    font-size: 1.1rem;
}

/* ============ PAGINATION ============ */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 70px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 14px;
    border: 1px solid var(--news-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--news-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    background: var(--news-surface);
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(255, 107, 59, 0.18);
}

.pagination .active span {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(255, 107, 59, 0.25);
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .my-80 {
        margin-top: 60px;
        margin-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .my-80,
    .my-60 {
        margin-top: 50px;
        margin-bottom: 50px;
    }

    .posts-section {
        margin: 50px 0;
    }

    .empty-state {
        padding: 60px 20px;
    }

    .empty-state i {
        font-size: 3.5rem;
    }

    .pagination-wrapper {
        margin: 50px 0;
        gap: 6px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 10px;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============ SMOOTH SCROLL BEHAVIOR ============ */
html {
    scroll-behavior: smooth;
}

/* ============ FOCUS STYLES ============ */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============ UTILITY CLASSES ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* ============ TEXT UTILITIES ============ */
.text-center {
    text-align: center;
}

.text-right { text-align: right; }
.text-left { text-align: left; }

/* ============ SPACING UTILITIES ============ */
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }

/* ============ PRINT STYLES ============ */
@media print {
    .pagination-wrapper,
    .news-filters,
    .news-hero .series-label {
        display: none;
    }

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