/* ========================================================
   خبر صح (Khabar S7) - تنسيق موجز ونبذة المقال (Lead Description)
   تصميم صحفي حديث فائق الاحترافية مستوحى من كبرى المنصات الإخبارية
   ======================================================== */

.post-lead-desc {
    position: relative;
    margin: 20px auto 25px auto;
    padding: 18px 24px 20px 24px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease-in-out;
}

/* شارة موجز الخبر بالمنتصف في الأعلى */
.post-lead-desc .lead-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 0 auto 12px auto;
    letter-spacing: normal;
}

.post-lead-desc .lead-badge-dot {
    width: 7px;
    height: 7px;
    background: #2563eb;
    border-radius: 50%;
    display: inline-block;
}

/* نص النبذة موسط وأنيق */
.post-lead-desc p {
    margin: 0 auto;
    max-width: 820px;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #0f172a;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.01em;
}

/* الوضع الداكن (Dark Mode) بسيط ومتناسق */
body.dark .post-lead-desc {
    background: rgba(30, 41, 59, 0.45);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.dark .post-lead-desc .lead-badge {
    background: rgba(30, 58, 138, 0.45);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.25);
}

body.dark .post-lead-desc .lead-badge-dot {
    background: #60a5fa;
}

body.dark .post-lead-desc p {
    color: #f1f5f9;
}

/* التجاوب مع شاشات الهواتف والأجهزة اللوحية */
@media (max-width: 768px) {
    .post-lead-desc {
        margin: 14px 12px 20px 12px;
        padding: 14px 16px 16px 16px;
        border-radius: 10px;
    }

    .post-lead-desc .lead-badge {
        font-size: 11px;
        padding: 2px 10px;
        margin-bottom: 10px;
    }

    .post-lead-desc p {
        font-size: 1.05rem;
        line-height: 1.75;
    }
}

/* ========================================================
   شارة ونظام التحديث التلقائي اللحظي للصفحة الرئيسية
   ======================================================== */

.widget_sw_latest_posts_home .widget-header {
    width: 100%;
}

.widget_sw_latest_posts_home .widget-title,
.widget_sw_latest_posts_home .widget-title h2 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

.widget_sw_latest_posts_home .khabar-widget-title-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: right;
    flex-shrink: 0;
}

.khabar-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
    margin-inline-start: auto !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    vertical-align: middle;
    letter-spacing: normal;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

body.dark .khabar-live-badge {
    background: rgba(6, 78, 59, 0.4);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}

.khabar-live-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.khabar-live-pulse::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.4);
    animation: livePulseAnim 1.6s infinite ease-out;
}

@keyframes livePulseAnim {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.khabar-updating {
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

.khabar-fade-in {
    animation: khabarFadeIn 0.5s ease-out;
}

@keyframes khabarFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .khabar-live-badge {
        font-size: 11px;
        padding: 2px 8px;
        gap: 5px;
        margin-inline-start: auto !important;
        margin-right: auto !important;
        margin-left: 0 !important;
    }
    .khabar-live-pulse {
        width: 6px;
        height: 6px;
    }
}

