/**
 * news-details-page.css
 * صفحة تفاصيل الخبر — بوابة الوحدة العربية
 * =========================================
 * الأقسام:
 *  1. Hero — الصورة الكاملة والعنوان
 *  2. هيكل الصفحة والمقال
 *  3. Lead Paragraph — ملخص الخبر
 *  4. محتوى المقال
 *  5. المصدر والكلمات المفتاحية
 *  6. أزرار المشاركة — الدوائر
 *  7. الشريط الجانبي
 *  8. السلايدر (موبايل)
 *  9. Media Queries
 * =========================================
 */

/* =========================================
   1. Hero
   ========================================= */
   .news-hero {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background: #111;
}

.news-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: brightness(0.55);
    transition: transform 8s ease;
}

.news-hero:hover .news-hero__img {
    transform: scale(1.03);
}

.news-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.45) 55%,
        rgba(0,0,0,0.10) 100%
    );
    pointer-events: none;
}

.news-hero__content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 0 0 36px;
}

/* الوسوم */
.news-hero__tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}

.hero-tag--category {
    background: rgba(204,0,0,0.85);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    transition: background 0.2s;
}

.hero-tag--category:hover {
    background: rgba(150,0,0,0.95);
    color: #fff;
    text-decoration: none;
}

.hero-tag--type,
.hero-tag--country {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.92);
    border: 1px solid rgba(255,255,255,0.2);
}

/* العنوان */
.news-hero__title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
    margin: 0 0 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    max-width: 820px;
}

/* الميتا */
.news-hero__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255,255,255,0.80);
}

.news-hero__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-hero__meta i {
    font-size: 11px;
    color: #d4af37;
    opacity: 0.9;
}


/* =========================================
   2. هيكل الصفحة والمقال
   ========================================= */
.news-details {
    padding-top: 40px;
    padding-bottom: 60px;
}

.news-article {
    max-width: 100%;
}

/* العنوان الفرعي */
.news-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    line-height: 1.55;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

/* أدوات الخبر */
.news-tools-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}

.font-size-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tools-label {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

.btn-font-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-font-size:hover,
.btn-font-size.active {
    background: #CC0000;
    border-color: #CC0000;
    color: #fff;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.like-button:hover,
.like-button.active {
    background: #fff0f0;
    border-color: #CC0000;
    color: #CC0000;
}


/* =========================================
   3. Lead Paragraph — ملخص الخبر
   ========================================= */
.news-lead {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.75;
    color: #2c2c2c;
    margin: 0 0 28px;
    padding: 20px 22px;
    border-right: 4px solid #CC0000;    /* RTL */
    border-left: none;
    background: #fafafa;
    border-radius: 0 8px 8px 0;
    position: relative;
}

/* لو كان LTR */
[dir="ltr"] .news-lead {
    border-left: 4px solid #CC0000;
    border-right: none;
    border-radius: 8px 0 0 8px;
}


/* =========================================
   4. محتوى المقال — قراءة حرة
   ========================================= */
.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: #333;
    margin-bottom: 32px;
}

/* الفقرات */
.article-content p {
    margin-bottom: 1.4em;
}

/* العناوين الداخلية */
.article-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #CC0000;
}

.article-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: #222;
    margin: 28px 0 12px;
}

/* الاقتباسات */
.article-content blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    background: #fff8f8;
    border-right: 4px solid #CC0000;
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 17px;
    font-style: italic;
    color: #555;
    box-shadow: inset 0 0 0 1px rgba(204,0,0,0.08);
}

[dir="ltr"] .article-content blockquote {
    border-left: 4px solid #CC0000;
    border-right: none;
    border-radius: 8px 0 0 8px;
}

/* الصور داخل المحتوى */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 20px auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* القوائم */
.article-content ul,
.article-content ol {
    padding-right: 24px;
    padding-left: 0;
    margin-bottom: 1.4em;
}

[dir="ltr"] .article-content ul,
[dir="ltr"] .article-content ol {
    padding-left: 24px;
    padding-right: 0;
}

.article-content li {
    margin-bottom: 6px;
}

/* الروابط */
.article-content a {
    color: #CC0000;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #960000;
}


/* =========================================
   5. المصدر والكلمات المفتاحية
   ========================================= */
.news-source {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #666;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.news-source i {
    color: #CC0000;
    font-size: 12px;
}

.news-source a {
    color: #CC0000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.news-source a:hover {
    color: #960000;
    text-decoration: underline;
}

/* الكلمات المفتاحية */
.news-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 28px;
    font-size: 13px;
    color: #888;
}

.news-tags > i {
    color: #CC0000;
    font-size: 13px;
    margin-left: 2px;
}

.news-tag-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    color: #555;
    font-size: 12.5px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.news-tag-badge:hover {
    background: rgba(204,0,0,0.07);
    border-color: #CC0000;
    color: #CC0000;
}


/* =========================================
   6. أزرار المشاركة — الدوائر
   ========================================= */
.news-share-section {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 0 8px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.share-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #444;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-btns-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* الزر الدائري الأساسي */
.share-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.share-circle i {
    font-size: 18px;
    color: #fff;
    line-height: 1;
    pointer-events: none;
}

.share-circle__label {
    font-size: 9px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1;
}

.share-circle:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* ألوان المنصات */
.share-circle--facebook {
    background: #1877F2;
    box-shadow: 0 3px 10px rgba(24,119,242,0.3);
}
.share-circle--facebook:hover {
    background: #145dbf;
    box-shadow: 0 6px 18px rgba(24,119,242,0.4);
}

.share-circle--whatsapp {
    background: #25D366;
    box-shadow: 0 3px 10px rgba(37,211,102,0.3);
}
.share-circle--whatsapp:hover {
    background: #1da851;
    box-shadow: 0 6px 18px rgba(37,211,102,0.4);
}

.share-circle--telegram {
    background: #2AABEE;
    box-shadow: 0 3px 10px rgba(42,171,238,0.3);
}
.share-circle--telegram:hover {
    background: #1a8fc4;
    box-shadow: 0 6px 18px rgba(42,171,238,0.4);
}

.share-circle--twitter {
    background: #000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.share-circle--twitter:hover {
    background: #222;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.share-circle--copy {
    background: #666;
    box-shadow: 0 3px 10px rgba(100,100,100,0.25);
}
.share-circle--copy:hover {
    background: #444;
    box-shadow: 0 6px 18px rgba(100,100,100,0.35);
}

/* ديسكتوب: الدوائر أكبر قليلاً مع الاسم تحتها */
@media (min-width: 768px) {
    .share-circle {
        width: 58px;
        height: 58px;
    }
    .share-circle i {
        font-size: 20px;
    }
    .share-circle__label {
        font-size: 9.5px;
    }
}


/* =========================================
   7. الشريط الجانبي
   ========================================= */
.news-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.widget-header {
    background: linear-gradient(135deg, #CC0000 0%, #960000 100%);
    padding: 13px 18px;
    border-bottom: 3px solid #d4af37;
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-content {
    padding: 14px;
}

/* بطاقات trending في السايدبار */
.trending-card {
    display: block;
    position: relative;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.trending-card:last-child { margin-bottom: 0; }

.trending-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.trending-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.trending-card:hover img {
    transform: scale(1.06);
}

.trending-number {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(204,0,0,0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.3);
}

.trending-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.05) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    transition: background 0.3s ease;
}

.trending-card:hover .trending-overlay {
    background: linear-gradient(to top, rgba(150,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.05) 100%);
}

.trending-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trending-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.82);
}

.trending-meta i {
    font-size: 10px;
    color: #d4af37;
}

/* قوائم التصنيفات */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    border-bottom: 1px solid #f5f5f5;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    font-size: 13.5px;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.categories-list li a:hover {
    color: #CC0000;
}

.categories-list .count {
    background: #f0f0f0;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}


/* =========================================
   8. سلايدر الأكثر قراءة — موبايل فقط
   ========================================= */
.popular-slider-mobile {
    display: none; /* مخفي على الديسكتوب */
    margin-bottom: 28px;
}

.popular-slider-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #CC0000;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #CC0000;
}

.popular-slider-header i {
    font-size: 14px;
}

.popular-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.popular-slider-track::-webkit-scrollbar {
    display: none;
}

/* البطاقة في السلايدر */
.pslide-card {
    flex: 0 0 72vw;
    max-width: 280px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    scroll-snap-align: start;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.pslide-card:hover {
    transform: scale(1.02);
}

.pslide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.pslide-card:hover img {
    transform: scale(1.06);
}

.pslide-num {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(204,0,0,0.9);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.pslide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.pslide-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.pslide-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pslide-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    color: rgba(255,255,255,0.82);
}

.pslide-meta i {
    font-size: 10px;
    color: #d4af37;
}

/* نقاط التنقل */
.pslide-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.pslide-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.pslide-dot.active {
    background: #CC0000;
    width: 20px;
    border-radius: 4px;
}


/* =========================================
   9. Media Queries
   ========================================= */

/* ── تابلت ─────────────────────────── */
@media (max-width: 991px) {
    .news-hero {
        height: 420px;
    }

    .news-hero__title {
        font-size: 22px;
    }

    .news-sidebar {
        position: static;
        margin-top: 36px;
    }

    .news-details {
        padding-top: 28px;
    }
}

/* ── موبايل ────────────────────────── */
@media (max-width: 767px) {
    /* Hero */
    .news-hero {
        height: 300px;
    }

    .news-hero__title {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .news-hero__content {
        padding-bottom: 20px;
    }

    .news-hero__meta {
        font-size: 11.5px;
        gap: 12px;
    }

    .hero-tag {
        font-size: 10.5px;
        padding: 3px 9px;
    }

    /* Lead */
    .news-lead {
        font-size: 16px;
        padding: 16px 16px;
    }

    /* محتوى */
    .article-content {
        font-size: 15.5px;
        line-height: 1.80;
    }

    .article-content h2 {
        font-size: 18px;
    }

    .article-content h3 {
        font-size: 16px;
    }

    /* أزرار المشاركة — على الموبايل تبقى دوائر بدون label */
    .share-label {
        font-size: 13px;
    }

    .share-circle {
        width: 48px;
        height: 48px;
    }

    .share-circle i {
        font-size: 17px;
    }

    /* إخفاء label الأزرار على الموبايل للاختصار */
    .share-circle__label {
        display: none;
    }

    .share-circle {
        /* بدون label نجعل الدائرة أنظف */
        justify-content: center;
    }

    /* السلايدر: يظهر على الموبايل */
    .popular-slider-mobile {
        display: block;
    }

    /* السايدبار الرئيسي: إخفاء قسم الأكثر قراءة فقط على الموبايل */
    .popular-news-widget {
        display: none;
    }

    .news-sidebar {
        position: static;
    }
}

/* ── موبايل صغير ───────────────────── */
@media (max-width: 480px) {
    .news-hero {
        height: 260px;
    }

    .news-hero__title {
        font-size: 15px;
        line-height: 1.5;
    }

    .news-lead {
        font-size: 15px;
        padding: 14px;
    }

    .article-content {
        font-size: 15px;
    }

    .pslide-card {
        flex: 0 0 82vw;
    }

    .share-circle {
        width: 44px;
        height: 44px;
    }

    .share-circle i {
        font-size: 16px;
    }
}