/* ----------------------------------------------------
   news-detail.css - تصميم فخم وتفاعلي لصفحة الخبر التفصيلي
   ---------------------------------------------------- */

:root {
    --navy-dark: #0A0F1D;
    --navy-corporate: #141F36;
    --navy-light: #1E2D4A;
    --gold-premium: #B68D2E;
    --gold-glow: #D4AF37;
    --bg-cream: #FDFBF7;
    --text-main: #2D3748;
    --white: #FFFFFF;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* البطل الخاص بالخبر */
.news-hero-section {
    background: radial-gradient(circle at 50% 50%, rgba(182, 141, 46, 0.08) 0%, transparent 80%), 
                linear-gradient(135deg, #0B121F, #162238) !important;
    padding: 80px 6% 80px;
    text-align: center;
    border-bottom: 2px solid var(--gold-premium);
    position: relative;
}

.news-hero-container {
    max-width: 1000px;
    margin: 0 auto;
}

.news-meta-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(182, 141, 46, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13.5px;
    color: var(--white);
    font-weight: 700;
    margin-bottom: 25px;
    backdrop-filter: blur(4px);
}

.news-hero-section h1 {
    font-family: 'Cairo', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 30px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.news-back-link {
    margin-top: 10px;
}

.news-back-link .btn-outline {
    font-size: 14px;
    padding: 10px 22px !important;
}

/* محتوى الخبر */
.news-content-wrapper {
    max-width: 1000px;
    margin: 40px auto 60px;
}

.news-main-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(11, 18, 31, 0.03);
    border: 1px solid rgba(182, 141, 46, 0.08);
}

/* المعرض الشبكي للصور */
.news-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.news-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 160px;
    border: 1.5px solid rgba(182, 141, 46, 0.15);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.news-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.news-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 31, 54, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.news-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(182, 141, 46, 0.25);
    border-color: var(--gold-premium);
}

.news-gallery-item:hover img {
    transform: scale(1.06);
}

.news-gallery-item:hover .news-gallery-overlay {
    opacity: 1;
}

/* نص الخبر */
.news-text-content p {
    font-size: 17px;
    line-height: 2;
    color: var(--text-main);
    text-align: justify;
    font-family: 'Almarai', sans-serif;
}

/* نافذة عرض الصور المنبثقة Lightbox */
.news-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(10px);
}

.news-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-lightbox-content {
    margin: auto;
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--gold-premium);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: zoomLightbox 0.3s ease;
}

@keyframes zoomLightbox {
    from {transform: scale(0.92); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-lightbox-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1000001;
}

.close-lightbox-btn:hover,
.close-lightbox-btn:focus {
    color: var(--gold-glow);
    text-decoration: none;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 22px;
    background: rgba(10, 15, 29, 0.75);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1000000;
}

.lightbox-arrow:hover {
    background: var(--gold-premium);
    color: #0A0F1D;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.lightbox-prev {
    right: 30px;
}

.lightbox-next {
    left: 30px;
}

[dir="ltr"] .lightbox-prev {
    left: 30px;
    right: auto;
}

[dir="ltr"] .lightbox-next {
    right: 30px;
    left: auto;
}

.lightbox-img-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    margin: 0 auto;
}

.lightbox-caption {
    color: var(--gold-glow);
    font-weight: 700;
    font-size: 13.5px;
    margin-top: 14px;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(6px);
    padding: 6px 20px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    letter-spacing: 1px;
}

/* تجاوب التصميم */
@media (max-width: 768px) {
    .news-hero-section h1 {
        font-size: 26px;
    }
    .news-main-card {
        padding: 20px;
    }
    .news-text-content p {
        font-size: 15px;
    }
    .lightbox-arrow {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .lightbox-prev {
        right: 12px;
    }
    .lightbox-next {
        left: 12px;
    }
    [dir="ltr"] .lightbox-prev {
        left: 12px;
        right: auto;
    }
    [dir="ltr"] .lightbox-next {
        right: 12px;
        left: auto;
    }
    .close-lightbox-btn {
        top: 15px;
        right: 18px;
        font-size: 32px;
    }
}

/* صندوق المشاركة الاجتماعي */
.news-share-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1.5px solid rgba(182, 141, 46, 0.15);
}

.news-share-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-corporate);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
}

.news-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    color: #fff;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.share-btn i {
    font-size: 16px;
}

/* ألوان المنصات */
.share-facebook { background-color: #1877F2; }
.share-facebook:hover { background-color: #145dbf; transform: translateY(-2px); }

.share-twitter { background-color: #1A1A1A; } /* X Logo / Twitter color */
.share-twitter:hover { background-color: #000000; transform: translateY(-2px); }

.share-linkedin { background-color: #0077B5; }
.share-linkedin:hover { background-color: #005a87; transform: translateY(-2px); }

.share-whatsapp { background-color: #25D366; }
.share-whatsapp:hover { background-color: #1ebea5; transform: translateY(-2px); }

.share-telegram { background-color: #0088cc; }
.share-telegram:hover { background-color: #0077b3; transform: translateY(-2px); }

.share-messenger { background-color: #0084FF; }
.share-messenger:hover { background-color: #0066cc; transform: translateY(-2px); }

.share-copy {
    background-color: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    position: relative;
}
.share-copy:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.share-native {
    background-color: var(--navy-corporate);
    color: #fff;
}
.share-native:hover {
    background-color: var(--navy-dark);
    transform: translateY(-2px);
}

/* تلميح نسخ الرابط المنسوخ */
.share-copy .copy-tooltip {
    visibility: hidden;
    background-color: #2d3748;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 11px;
    white-space: nowrap;
}

.share-copy .copy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

.share-copy.copied .copy-tooltip {
    visibility: visible;
    opacity: 1;
}

/* التنبيهات العائمة الفخمة (Toast Notifications) */
.news-toast {
    visibility: hidden;
    min-width: 300px;
    background-color: var(--navy-corporate, #141F36);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px 24px;
    position: fixed;
    z-index: 1000000;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14.5px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(182, 141, 46, 0.25);
    border: 1.5px solid var(--gold-premium, #B68D2E);
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s, visibility 0.5s;
}

.news-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* التخطيط المزدوج الفخم لصندوق المشاركة والـ QR Code */
.news-share-flex-layout {
    display: flex;
    gap: 35px;
    align-items: flex-start;
    justify-content: space-between;
}

.news-share-left-col {
    flex: 1;
}

.news-share-right-col {
    width: 170px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-qrcode-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(182, 141, 46, 0.04);
    border-radius: 10px;
    border: 1.5px dashed rgba(182, 141, 46, 0.25);
    width: 140px;
    height: 140px;
    margin-top: 10px;
}

#news-qrcode img {
    border-radius: 4px;
    width: 120px !important;
    height: 120px !important;
}

@media (max-width: 768px) {
    .news-share-flex-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    .news-share-left-col {
        width: 100%;
    }
    .news-share-buttons {
        justify-content: center;
    }
    .news-share-title {
        justify-content: center;
    }
    .news-share-right-col {
        width: 100%;
        border-top: 1.5px dashed rgba(182, 141, 46, 0.15);
        padding-top: 20px;
    }
}

/* ===================================================
   شريط مسار التنقل (Breadcrumb) والعودة لقائمة الأخبار
   =================================================== */
.news-breadcrumb-bar {
    background: #0D1527;
    border-bottom: 1px solid rgba(182, 141, 46, 0.2);
    padding: 12px 0;
    font-size: 13.5px;
    font-family: 'Cairo', sans-serif;
}

.news-breadcrumb-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.news-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #94A3B8;
}

.news-breadcrumb-nav a {
    color: #CBD5E1;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-breadcrumb-nav a:hover {
    color: var(--gold-premium);
}

.breadcrumb-sep {
    color: rgba(182, 141, 46, 0.5);
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--gold-glow);
    font-weight: 600;
}

.news-header-return-btn {
    background: rgba(182, 141, 46, 0.12);
    border: 1px solid rgba(182, 141, 46, 0.35);
    color: var(--gold-glow);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.news-header-return-btn:hover {
    background: var(--gold-premium);
    color: #0A0F1D;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(182, 141, 46, 0.3);
}

/* ===================================================
   كتلة التنقل بين الأخبار السابقة والتالية وأزرار العودة
   =================================================== */
.news-bottom-nav-box {
    margin: 40px 0 25px;
    padding-top: 30px;
    border-top: 1.5px solid rgba(182, 141, 46, 0.15);
}

.news-nav-buttons-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
}

.news-nav-card {
    background: #F8FAFC;
    border: 1.5px solid rgba(182, 141, 46, 0.18);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    min-height: 72px;
}

.news-nav-card:hover {
    border-color: var(--gold-premium);
    background: #fff;
    box-shadow: 0 8px 25px rgba(20, 31, 54, 0.08);
    transform: translateY(-2px);
}

.news-nav-card.empty-card {
    border: none;
    background: transparent;
    pointer-events: none;
}

.news-nav-card .nav-icon-side {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(182, 141, 46, 0.12);
    color: var(--gold-premium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.news-nav-card:hover .nav-icon-side {
    background: var(--gold-premium);
    color: #0A0F1D;
}

.news-nav-card .nav-content-side {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-dir-label {
    font-size: 11.5px;
    color: var(--gold-premium);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.nav-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy-corporate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.news-main-back-wrapper {
    display: flex;
    justify-content: center;
}

.btn-primary-back-to-news {
    background: var(--navy-corporate);
    border: 1.5px solid var(--gold-premium);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: var(--transition-smooth);
    box-shadow: 0 6px 20px rgba(20, 31, 54, 0.15);
}

.btn-primary-back-to-news:hover {
    background: var(--gold-premium);
    color: #0A0F1D;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(182, 141, 46, 0.35);
}

.btn-return-news-list {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(182, 141, 46, 0.35);
    color: var(--navy-corporate);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-return-news-list:hover {
    background: rgba(182, 141, 46, 0.1);
    border-color: var(--gold-premium);
    color: var(--gold-premium);
    transform: translateY(-2px);
}

/* ===================================================
   الزر العائم الدائم للعودة لقائمة الأخبار (Floating Back)
   =================================================== */
.floating-back-news-btn {
    position: fixed;
    bottom: 85px;
    right: 25px;
    z-index: 9999;
    background: var(--navy-corporate);
    color: #fff;
    border: 1.5px solid var(--gold-premium);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    box-shadow: 0 8px 25px rgba(10, 15, 29, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s ease;
}

[dir="ltr"] .floating-back-news-btn {
    right: auto;
    left: 25px;
}

.floating-back-news-btn i {
    color: var(--gold-glow);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.floating-back-news-btn:hover {
    background: var(--gold-premium);
    color: #0A0F1D;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(182, 141, 46, 0.4);
}

.floating-back-news-btn:hover i {
    color: #0A0F1D;
}

.floating-back-news-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .news-nav-buttons-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .news-main-back-wrapper {
        order: -1;
        width: 100%;
    }
    .btn-primary-back-to-news {
        width: 100%;
        justify-content: center;
    }
    .floating-back-news-btn {
        bottom: 75px;
        right: 15px;
        padding: 8px 14px;
        font-size: 12.5px;
    }
    [dir="ltr"] .floating-back-news-btn {
        left: 15px;
        right: auto;
    }
}
