/**
 * article_cards.css - بطاقات المقالات الجاهزة (موقع أذكار المسلم)
 * يدعم الوضعين النهاري والليلي تلقائياً (Light & Dark Theme)
 * متجاوب بالكامل مع الهواتف والشاشات الصغيرة
 */

/* ==========================================================================
   1. بطاقة ترويج التطبيق (App Promo Card)
   ========================================================================== */
.article-app-promo {
    background: var(--jannah-card-bg, #ffffff);
    border: 1px solid var(--jannah-border, #e2e8f0);
    border-radius: 20px;
    padding: 26px 28px;
    margin: 35px 0;
    box-shadow: 0 10px 30px -5px rgba(5, 150, 105, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    direction: rtl;
    text-align: right;
}

[data-theme="dark"] .article-app-promo {
    background: var(--jannah-card-bg, #131c2e);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .article-app-promo-title {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] .article-app-promo-desc {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .article-app-promo-feature-item {
    color: var(--text-secondary, #e2e8f0);
}

.article-app-promo::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--jannah-primary, #059669), var(--jannah-primary-dark, #047857));
}

.article-app-promo-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.article-app-promo-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f1f5f9;
}

.article-app-promo-titles {
    flex: 1;
    min-width: 0;
}

.article-app-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--jannah-primary, #059669);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

[data-theme="dark"] .article-app-promo-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

.article-app-promo-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--jannah-text-title, #0f172a);
    line-height: 1.3;
}

.article-app-promo-desc {
    margin: 0 0 16px 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--jannah-text-body, #475569);
}

.article-app-promo-features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 18px;
}

.article-app-promo-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.96rem;
    color: var(--jannah-text-body, #334155);
    font-weight: 600;
}

.article-app-promo-feature-item svg,
.article-app-promo-feature-item .icon-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--jannah-primary, #059669);
}

[data-theme="dark"] .article-app-promo-feature-item svg,
[data-theme="dark"] .article-app-promo-feature-item .icon-check {
    color: #10b981;
}

.article-app-promo-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.article-btn-store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.article-btn-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0.95;
}

.article-btn-googleplay {
    background: #0f172a;
    border: 1px solid #1e293b;
}

[data-theme="dark"] .article-btn-googleplay {
    background: #1e293b;
    border-color: #334155;
}

.article-btn-appstore {
    background: #0f172a;
    border: 1px solid #1e293b;
}

[data-theme="dark"] .article-btn-appstore {
    background: #1e293b;
    border-color: #334155;
}

.article-btn-store-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.article-btn-store-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.15;
}

.article-btn-store-small {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.82;
}

.article-btn-store-big {
    font-size: 1.02rem;
    font-weight: 800;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .article-app-promo {
        padding: 20px 18px;
        border-radius: 16px;
        margin: 28px 0;
    }
    .article-app-promo-header {
        gap: 14px;
    }
    .article-app-promo-icon {
        width: 58px;
        height: 58px;
        border-radius: 15px;
    }
    .article-app-promo-title {
        font-size: 1.18rem;
    }
    .article-app-promo-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .article-app-promo-buttons {
        flex-direction: column;
        width: 100%;
    }
    .article-btn-store {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   2. بطاقة الحديث النبوي الشريف (Hadith Card)
   ========================================================================== */
.article-hadith-card {
    background: var(--jannah-card-bg, #ffffff);
    border: 1px solid var(--jannah-border, #e2e8f0);
    border-right: 4px solid var(--jannah-primary, #059669);
    border-radius: 16px;
    padding: 24px 26px;
    margin: 30px 0;
    box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.05);
    position: relative;
    direction: rtl;
    text-align: right;
}

[data-theme="dark"] .article-hadith-card {
    background: var(--jannah-card-bg, #131c2e);
    border-color: rgba(16, 185, 129, 0.25);
    border-right-color: #10b981;
    box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .article-hadith-text {
    color: var(--text-primary, #f8fafc);
}

.article-hadith-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.article-hadith-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--jannah-primary, #059669);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

[data-theme="dark"] .article-hadith-pill {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}

.article-hadith-quote-icon {
    color: rgba(5, 150, 105, 0.25);
    font-size: 2rem;
    line-height: 1;
}

[data-theme="dark"] .article-hadith-quote-icon {
    color: rgba(16, 185, 129, 0.35);
}

.article-hadith-text {
    font-size: 1.22rem;
    line-height: 2.15;
    color: var(--jannah-text-title, #0f172a);
    font-weight: 600;
    margin: 0 0 16px 0;
    font-family: 'Amiri', 'Traditional Arabic', serif;
}

.article-hadith-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--jannah-border, #e2e8f0);
    font-size: 0.9rem;
    color: var(--jannah-text-muted, #64748b);
}

.article-hadith-source {
    font-weight: 700;
    color: var(--jannah-primary, #059669);
}

[data-theme="dark"] .article-hadith-source {
    color: #34d399;
}

.article-hadith-grade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

[data-theme="dark"] .article-hadith-grade {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

/* ==========================================================================
   3. بطاقة الآية القرآنية (Quran Verse Card)
   ========================================================================== */
.article-quran-card {
    background: linear-gradient(145deg, rgba(5, 150, 105, 0.05), rgba(217, 119, 6, 0.04));
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-radius: 18px;
    padding: 26px 28px;
    margin: 30px 0;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 18px rgba(5, 150, 105, 0.06);
}

[data-theme="dark"] .article-quran-card {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(245, 158, 11, 0.06));
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .article-quran-text {
    color: var(--text-primary, #f8fafc);
}

.article-quran-text {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 1.45rem;
    line-height: 2.3;
    color: var(--jannah-text-title, #0f172a);
    font-weight: 700;
    margin: 0 0 16px 0;
}

.article-quran-text::before {
    content: "﴿ ";
    color: var(--jannah-primary, #059669);
    font-size: 1.6rem;
}

.article-quran-text::after {
    content: " ﴾";
    color: var(--jannah-primary, #059669);
    font-size: 1.6rem;
}

[data-theme="dark"] .article-quran-text::before,
[data-theme="dark"] .article-quran-text::after {
    color: #10b981;
}

.article-quran-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--jannah-card-bg, #ffffff);
    border: 1px solid var(--jannah-border, #e2e8f0);
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--jannah-primary, #059669);
}

[data-theme="dark"] .article-quran-meta {
    background: var(--jannah-card-bg, #131c2e);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.article-quran-meta a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.article-quran-meta a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* ==========================================================================
   4. بطاقة الفائدة الذهبية / الخلاصة (Golden Tip / Key Takeaway Card)
   ========================================================================== */
.article-golden-tip {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-right: 4px solid #d97706;
    border-radius: 16px;
    padding: 22px 24px;
    margin: 28px 0;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.06);
    direction: rtl;
    text-align: right;
}

[data-theme="dark"] .article-golden-tip {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.35);
    border-right-color: #fbbf24;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .article-golden-tip-text {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .article-golden-tip-text strong {
    color: var(--text-primary, #f8fafc);
}

.article-golden-tip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 10px;
}

[data-theme="dark"] .article-golden-tip-title {
    color: #fbbf24;
}

.article-golden-tip-text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.95;
    color: var(--jannah-text-body, #334155);
}

.article-golden-tip-text strong {
    color: var(--jannah-text-title, #0f172a);
}

/* ==========================================================================
   5. بطاقة التنبيه والتصحيح (Notice / Warning Card)
   ========================================================================== */
.article-notice-card {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-right: 4px solid #ef4444;
    border-radius: 16px;
    padding: 22px 24px;
    margin: 28px 0;
    direction: rtl;
    text-align: right;
}

[data-theme="dark"] .article-notice-card {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    border-right-color: #f87171;
}

[data-theme="dark"] .article-notice-text {
    color: var(--text-secondary, #cbd5e1);
}

.article-notice-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 10px;
}

[data-theme="dark"] .article-notice-title {
    color: #f87171;
}

.article-notice-text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.95;
    color: var(--jannah-text-body, #334155);
}

/* ==========================================================================
   6. قسم الأسئلة الشائعة (FAQ Cards & Question Distinction)
   ========================================================================== */
.article-faq-container {
    margin: 28px 0 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.article-faq-item {
    background: var(--jannah-card-subtle, #f8fafc);
    border: 1px solid var(--jannah-border, #e2e8f0);
    border-right: 4px solid var(--jannah-primary, #059669);
    border-radius: 14px;
    padding: 20px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.article-faq-item:hover {
    border-color: rgba(5, 150, 105, 0.35);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08);
}

.article-faq-question {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    color: #047857 !important; /* لون السؤال مميز وأنيق في الوضع النهاري (زمردي غني عالي التباين) */
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.article-faq-icon {
    color: var(--jannah-primary, #059669);
    font-size: 1.15rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.article-faq-answer {
    font-size: 1.1rem;
    line-height: 1.95;
    color: var(--jannah-text-body, #334155); /* لون الإجابة هادئ ومريح للقراءة (سليت داكن) */
}

.article-faq-answer p {
    margin: 0 0 0.85em 0;
    color: inherit;
}

.article-faq-answer p:last-child {
    margin-bottom: 0;
}

/* الوضع الليلي (Dark Mode) */
[data-theme="dark"] .article-faq-item {
    background: var(--jannah-card-subtle, #1a2438);
    border-color: rgba(255, 255, 255, 0.08);
    border-right-color: #10b981;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .article-faq-item:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .article-faq-question {
    color: #34d399 !important; /* لون السؤال مميز ومضيء في الوضع الليلي (نعناعي زمردي مشرق عالي الوضوح والتباين) */
}

[data-theme="dark"] .article-faq-icon {
    color: #10b981;
}

[data-theme="dark"] .article-faq-answer {
    color: var(--jannah-text-body, #cbd5e1); /* لون الإجابة فضي مريح للعين في الظلام */
}

/* Fallback: في حال وجود أي سؤال h3 يتبع قسم الأسئلة الشائعة مباشرة */
.entry-content .faq-question {
    color: #047857 !important;
}
[data-theme="dark"] .entry-content .faq-question {
    color: #34d399 !important;
}

@media (max-width: 600px) {
    .article-faq-item {
        padding: 16px 18px;
        border-radius: 12px;
    }
    .article-faq-question {
        font-size: 1.15rem !important;
        gap: 8px;
    }
    .article-faq-answer {
        font-size: 1.05rem;
        line-height: 1.85;
    }
}

/* ==========================================================================
   7. بطاقة الإجابة المباشرة والموثقة (Direct Answer / AEO Card)
   ========================================================================== */
.article-direct-answer,
.direct-answer-box {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.06) 0%, var(--jannah-card-bg, #ffffff) 100%);
    border: 1px solid rgba(5, 150, 105, 0.22);
    border-right: 5px solid var(--jannah-primary, #059669);
    border-radius: 18px;
    padding: 24px 28px;
    margin: 30px 0;
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-direct-answer:hover,
.direct-answer-box:hover {
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 12px 30px -5px rgba(5, 150, 105, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.article-direct-answer-header,
.direct-answer-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.article-direct-answer-badge,
.direct-answer-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
    font-size: 0.96rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(5, 150, 105, 0.2);
    letter-spacing: -0.01em;
}

.article-direct-answer-badge i,
.direct-answer-title i {
    color: var(--jannah-primary, #059669);
    font-size: 1rem;
}

.article-direct-answer-meta {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--jannah-text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--jannah-card-subtle, #f1f5f9);
    padding: 4px 10px;
    border-radius: 6px;
}

.article-direct-answer-text,
.direct-answer-box p {
    font-size: 1.15rem;
    line-height: 2.05;
    color: var(--jannah-text-body, #1e293b);
    margin: 0;
}

.article-direct-answer-text strong,
.direct-answer-box p strong {
    font-weight: 800;
    color: #047857;
}

.article-direct-answer-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(5, 150, 105, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--jannah-primary, #059669);
}

/* الوضع الليلي (Dark Mode) */
[data-theme="dark"] .article-direct-answer,
[data-theme="dark"] .direct-answer-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, var(--jannah-card-bg, #131c2e) 100%);
    border-color: rgba(16, 185, 129, 0.28);
    border-right-color: #34d399;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .article-direct-answer:hover,
[data-theme="dark"] .direct-answer-box:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .article-direct-answer-badge,
[data-theme="dark"] .direct-answer-title {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .article-direct-answer-badge i,
[data-theme="dark"] .direct-answer-title i {
    color: #10b981;
}

[data-theme="dark"] .article-direct-answer-meta {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

[data-theme="dark"] .article-direct-answer-text,
[data-theme="dark"] .direct-answer-box p {
    color: var(--text-secondary, #e2e8f0);
}

[data-theme="dark"] .article-direct-answer-text strong,
[data-theme="dark"] .direct-answer-box p strong {
    color: #34d399;
}

[data-theme="dark"] .article-direct-answer-footer {
    border-top-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

@media (max-width: 600px) {
    .article-direct-answer,
    .direct-answer-box {
        padding: 18px 20px;
        border-radius: 14px;
        margin: 24px 0;
    }
    .article-direct-answer-text,
    .direct-answer-box p {
        font-size: 1.08rem;
        line-height: 1.95;
    }
}
