/* ============================================================
   articles.css — تنسيقات خدمة المقالات — v1.0
   ============================================================ */

/* ============================================================
   1. قسم "آخر المقالات" في الصفحة الرئيسية
   ============================================================ */
.articles-home-section {
    padding: 50px 0;
    background: #f8fafc;
    position: relative;
}
.articles-home-section .section-heading {
    margin-bottom: 32px;
}
.articles-home-section .section-heading h2 {
    font-weight: 900;
    font-size: 1.9rem;
    color: #0f172a;
    margin-bottom: 6px;
}
.articles-home-section .section-heading h2 i {
    color: var(--primary, #0a2558);
}
.articles-home-section .section-heading p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* تبويبات التصنيفات */
.articles-cats-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0 10px;
}
.articles-cat-tab {
    padding: 9px 22px;
    border-radius: 50px;
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    white-space: nowrap;
}
.articles-cat-tab:hover {
    border-color: var(--cat-color, var(--primary));
    color: var(--cat-color, var(--primary));
    transform: translateY(-2px);
}
.articles-cat-tab.active {
    background: var(--cat-color, var(--primary));
    border-color: var(--cat-color, var(--primary));
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* حاوية البطاقات */
.articles-cards-wrapper {
    position: relative;
}
.articles-card-panel {
    display: none;
    animation: articleFadeIn 0.4s ease;
}
.articles-card-panel.active {
    display: block;
}
@keyframes articleFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   2. بطاقة التصنيف — تصميم صحفي متعرّج
   ============================================================ */
.article-category-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.3s;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 460px;
}
.article-category-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.article-category-card.layout-reversed {
    grid-template-columns: 1fr 1.1fr;
}
.article-category-card.layout-reversed .acc-cover-side {
    order: 2;
}
.article-category-card.layout-reversed .acc-content-side {
    order: 1;
}

/* الجهة اليمنى: قائمة المقالات */
.acc-content-side {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* رأس البطاقة */
.acc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--cat-color, #0a2558);
    position: relative;
}
.acc-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--cat-color, #0a2558);
    opacity: 0.4;
}
.acc-header h3 {
    font-weight: 900;
    font-size: 1.3rem;
    margin: 0;
    color: #0f172a;
    flex: 1;
}
.acc-header .acc-header-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cat-color, #0a2558);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

/* قائمة المقالات */
.acc-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.acc-article-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    align-items: center;
}
.acc-article-item:last-child {
    border-bottom: none;
}
.acc-article-item:hover {
    padding-right: 6px;
    background: #f8fafc;
    border-radius: 8px;
    padding-left: 6px;
}
.acc-article-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
    position: relative;
}
.acc-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.acc-article-item:hover .acc-article-thumb img {
    transform: scale(1.1);
}
.acc-article-thumb .acc-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 20px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.acc-article-info {
    flex: 1;
    min-width: 0;
}
.acc-article-title {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #0f172a;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.acc-article-item:hover .acc-article-title {
    color: var(--cat-color, #0a2558);
}
.acc-article-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.acc-article-meta i {
    color: var(--cat-color, #0a2558);
    opacity: 0.7;
}

/* زر المزيد */
.acc-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 20px;
    border-radius: 10px;
    background: var(--cat-color, #0a2558);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.acc-more-btn:hover {
    background: var(--cat-color, #0a2558);
    color: #fff;
    transform: translateX(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* الجهة اليسرى: غلاف المقال الرئيسي */
.acc-cover-side {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}
.acc-cover-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.acc-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-category-card:hover .acc-cover-img {
    transform: scale(1.05);
}
.acc-cover-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--cat-color, #0a2558), #1a3a7a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 4rem;
}
.acc-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px 24px;
    z-index: 2;
}
.acc-cover-title {
    color: #fff;
    font-weight: 900;
    font-size: 1.25rem;
    line-height: 1.4;
    margin: 0 0 10px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.acc-cover-excerpt {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.acc-cover-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cat-color, #0a2558);
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 12px;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ============================================================
   3. الاستجابة
   ============================================================ */
@media (max-width: 992px) {
    .article-category-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .article-category-card.layout-reversed {
        grid-template-columns: 1fr;
    }
    .article-category-card.layout-reversed .acc-cover-side { order: 0; }
    .acc-cover-side {
        min-height: 320px;
    }
}

@media (max-width: 576px) {
    .articles-home-section { padding: 30px 0; }
    .articles-home-section .section-heading h2 { font-size: 1.4rem; }
    .acc-content-side { padding: 20px 18px; }
    .acc-cover-side { min-height: 260px; }
    .acc-cover-title { font-size: 1.05rem; }
    .acc-header h3 { font-size: 1.1rem; }
    .articles-cat-tab { padding: 7px 16px; font-size: 0.78rem; }
}

/* ============================================================
   4. صفحة قراءة المقال — article.php
   ============================================================ */
.article-page-wrapper {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 0 60px;
}
.article-header-section {
    margin-bottom: 24px;
}
.article-breadcrumbs {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.article-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}
.article-breadcrumbs a:hover {
    color: var(--primary, #0a2558);
}
.article-breadcrumbs i {
    font-size: 0.7rem;
    opacity: 0.5;
}
.article-cats-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.article-cat-badge {
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s;
}
.article-cat-badge:hover {
    transform: translateY(-2px);
    color: #fff;
}
.article-main-title {
    font-weight: 900;
    font-size: 2rem;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 18px;
}
.article-info-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 26px;
}
.article-info-bar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.article-info-bar i {
    color: var(--primary, #0a2558);
}
.article-info-bar a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}
.article-info-bar a:hover {
    text-decoration: underline;
}

.article-cover-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.article-body-content {
    font-size: 1.05rem;
    line-height: 1.95;
    color: #334155;
    margin-bottom: 32px;
}
.article-body-content h2 {
    font-weight: 800;
    font-size: 1.4rem;
    color: #0f172a;
    margin: 28px 0 14px;
}
.article-body-content h3 {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0f172a;
    margin: 24px 0 12px;
}
.article-body-content p { margin-bottom: 16px; }
.article-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.article-body-content ul,
.article-body-content ol {
    padding-right: 26px;
    margin-bottom: 16px;
}
.article-body-content li { margin-bottom: 6px; }
.article-body-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}
.article-body-content blockquote {
    border-right: 4px solid var(--primary, #0a2558);
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin: 20px 0;
    font-style: italic;
    color: #475569;
}
.article-body-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.article-body-content table th {
    background: var(--primary, #0a2558);
    color: #fff;
    padding: 12px;
    text-align: right;
    font-weight: 700;
}
.article-body-content table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* شريط الأدوات (مشاركة + طباعة) */
.article-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 26px;
    align-items: center;
}
.article-toolbar .toolbar-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
    margin-left: 6px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.share-btn.whatsapp { color: #25D366; border-color: #25D366; }
.share-btn.whatsapp:hover { background: #25D366; color: #fff; }
.share-btn.twitter  { color: #1DA1F2; border-color: #1DA1F2; }
.share-btn.twitter:hover  { background: #1DA1F2; color: #fff; }
.share-btn.copy     { color: #64748b; border-color: #cbd5e1; }
.share-btn.copy:hover     { background: #0f172a; color: #fff; border-color: #0f172a; }
.share-btn.print    { color: #dc2626; border-color: #dc2626; }
.share-btn.print:hover    { background: #dc2626; color: #fff; }

/* الوسوم */
.article-tags-box {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 26px;
}
.article-tags-box .tag-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 700;
}
.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.article-tag:hover {
    background: var(--primary, #0a2558);
    color: #fff;
}

/* ============================================================
   5. صندوق التقييم
   ============================================================ */
.rating-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fcd34d;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    margin-bottom: 32px;
}
.rating-box .rating-title {
    font-weight: 800;
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 12px;
}
.rating-stars-input {
    display: inline-flex;
    gap: 8px;
    font-size: 2.2rem;
    color: #d1d5db;
    cursor: pointer;
    direction: ltr;
}
.rating-stars-input i {
    transition: all 0.15s;
}
.rating-stars-input i.active,
.rating-stars-input i.hover {
    color: #fbbf24;
    text-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    transform: scale(1.1);
}
.rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #78716c;
}
.rating-summary .rating-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #92400e;
    line-height: 1;
}
.rating-summary .rating-stars-display {
    color: #fbbf24;
    font-size: 1rem;
}
.rating-thanks {
    color: #059669;
    font-weight: 700;
    margin-top: 8px;
    display: none;
}
.rating-thanks.show {
    display: block;
    animation: articleFadeIn 0.3s ease;
}

/* ============================================================
   6. التعليقات
   ============================================================ */
.comments-section {
    margin-bottom: 40px;
}
.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}
.comments-header h4 {
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
    margin: 0;
}
.comments-header h4 i {
    color: var(--primary, #0a2558);
}
.comment-closed-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    font-size: 0.88rem;
}

/* نموذج إضافة تعليق */
.comment-form-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 26px;
}
.comment-form-box h5 {
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 14px;
}
.comment-form-box .form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.comment-form-box .form-control:focus {
    border-color: var(--primary, #0a2558);
    box-shadow: 0 0 0 3px rgba(10,37,88,0.08);
}
.comment-submit-btn {
    background: var(--primary, #0a2558);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10,37,88,0.25);
}
.comment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* قائمة التعليقات */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-right: 4px solid var(--primary, #0a2558);
    border-radius: 12px;
    padding: 16px 18px;
    transition: box-shadow 0.2s;
}
.comment-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}
.comment-item.reply {
    margin-right: 42px;
    background: #f8fafc;
    border-right-color: #94a3b8;
    border-right-width: 3px;
}
.comment-item.admin-reply {
    background: #eff6ff;
    border-right-color: #2563eb;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.comment-author-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #0a2558), #1a3a7a);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.comment-avatar.admin {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.comment-author-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.comment-author-name .admin-tag {
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.65rem;
    padding: 1px 8px;
    border-radius: 50px;
    font-weight: 700;
}
.comment-date {
    font-size: 0.72rem;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}
.comment-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #334155;
    margin: 8px 0 10px;
    word-wrap: break-word;
}
.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.75rem;
}
.comment-action-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.comment-action-btn:hover {
    background: #f1f5f9;
    color: var(--primary, #0a2558);
}
.comment-action-btn.report:hover {
    background: #fee2e2;
    color: #dc2626;
}

.comments-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.comments-empty i {
    font-size: 42px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ============================================================
   7. جدول المقالات السابقة
   ============================================================ */
.previous-articles-section {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 2px solid #e2e8f0;
}
.previous-articles-section h4 {
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
    margin-bottom: 18px;
}
.previous-articles-section h4 i {
    color: var(--primary, #0a2558);
}
.prev-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.prev-article-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}
.prev-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
    border-color: var(--primary, #0a2558);
}
.prev-article-thumb {
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
}
.prev-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.prev-article-card:hover .prev-article-thumb img {
    transform: scale(1.08);
}
.prev-article-thumb .fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 28px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.prev-article-body {
    padding: 12px 14px;
    flex: 1;
}
.prev-article-title {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #0f172a;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prev-article-date {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ============================================================
   8. صفحة التصنيف — category.php
   ============================================================ */
.category-page-wrapper {
    padding: 20px 0 60px;
}
.category-hero {
    background: linear-gradient(135deg, var(--cat-color, #0a2558), #1a3a7a);
    border-radius: 18px;
    padding: 40px 30px;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.category-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}
.category-hero-content {
    position: relative;
    z-index: 1;
}
.category-hero h1 {
    font-weight: 900;
    font-size: 2rem;
    margin: 0 0 8px;
}
.category-hero p {
    opacity: 0.9;
    margin: 0;
    font-size: 1rem;
}
.category-hero .cat-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 12px;
}

/* فلاتر المصادر */
.source-filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    align-items: center;
}
.source-filter-bar .filter-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 700;
    margin-left: 6px;
}
.source-filter-chip {
    padding: 6px 14px;
    border-radius: 50px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}
.source-filter-chip:hover {
    background: var(--primary, #0a2558);
    color: #fff;
}
.source-filter-chip.active {
    background: var(--primary, #0a2558);
    color: #fff;
}

/* شبكة المقالات */
.category-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.category-article-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.category-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    border-color: var(--primary, #0a2558);
}
.category-article-thumb {
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
}
.category-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.category-article-card:hover .category-article-thumb img {
    transform: scale(1.06);
}
.category-article-thumb .fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 36px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}
.category-article-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.category-article-title {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.5;
    color: #0f172a;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-article-excerpt {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.category-article-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: auto;
}
.category-article-meta i {
    color: var(--primary, #0a2558);
    opacity: 0.7;
}

/* Pagination */
.category-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.category-pagination a,
.category-pagination span {
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: all 0.2s;
    padding: 0 12px;
}
.category-pagination a:hover {
    background: var(--primary, #0a2558);
    color: #fff;
    border-color: var(--primary, #0a2558);
}
.category-pagination .active {
    background: var(--primary, #0a2558);
    color: #fff;
    border-color: var(--primary, #0a2558);
}

/* ============================================================
   9. صفحة المصدر — source.php
   ============================================================ */
.source-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}
.source-hero-logo {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.source-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.source-hero-logo i { font-size: 34px; color: #94a3b8; }
.source-hero-info h1 {
    font-weight: 900;
    font-size: 1.6rem;
    color: #0f172a;
    margin: 0 0 6px;
}
.source-hero-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 8px;
}
.source-hero-info .source-url-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
}
.source-hero-info .source-url-link:hover { text-decoration: underline; }

/* ============================================================
   10. Toast
   ============================================================ */
.article-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f172a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    z-index: 99999;
    opacity: 0;
    transition: all 0.35s;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    max-width: 90%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.article-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.article-toast.success { background: #059669; }
.article-toast.error   { background: #dc2626; }
.article-toast.warning { background: #d97706; }

/* ============================================================
   11. الطباعة
   ============================================================ */
@media print {
    .navbar-custom, .footer-custom, .article-toolbar,
    .comments-section, .rating-box, .previous-articles-section,
    .article-breadcrumbs, .national-day-banner,
    .home-emergency-bar, .article-cats-badges {
        display: none !important;
    }
    .article-page-wrapper { max-width: 100%; padding: 0; }
    .article-main-title { font-size: 1.6rem; }
    .article-body-content { font-size: 11pt; line-height: 1.7; }
    .article-cover-image { max-height: 350px; }
    body { background: #fff !important; }
    a { color: #000 !important; text-decoration: none !important; }
}