/* ============================================================
   index.css — الصفحة الرئيسية
   ------------------------------------------------------------
   ⚠️ ملاحظة:
   كل أحجام الخطوط للنصوص والعناوين تُدار ديناميكياً من
   <style id="dynamic-font-settings"> في header.php.
   لا تحدد font-size على العناصر التالية هنا:
     - العناوين (h1–h6, .hero-item-name, .marquee-part span...)
     - النصوص المقروءة (.hero-item-desc, .home-quote-text...)
   أما أزرار واجهة المستخدم والشرائح والبادجات فيُسمح بأحجام ثابتة.
============================================================ */

/* ============================================================
   1) ملء الشاشة للصفحة الرئيسية
============================================================ */
.home-page-main .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(12px, 3vw, 40px);
    padding-right: clamp(12px, 3vw, 40px);
}
body.full-header .home-page-main .container,
body.full-header .home-page-main > .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: clamp(12px, 3vw, 40px);
    padding-right: clamp(12px, 3vw, 40px);
    margin-left: 0;
    margin-right: 0;
}

/* ============================================================
   2) الهيرو
============================================================ */
.hero {
    padding: 60px 0 30px;
    background: linear-gradient(145deg, var(--primary-soft), var(--card-bg));
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    width: 100%;
}

/* ============================================================
   3) التاريخ الهجري
============================================================ */
.hijri-date-wrap {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
    width: 100%;
}
.hijri-date-badge {
    background: var(--primary-soft);
    padding: 10px 20px;
    border-radius: 60px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
    color: var(--primary-dark);
    font-weight: 700;
}

/* ============================================================
   4) بطاقة الرسالة (المنهج)
============================================================ */
.message-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px clamp(20px, 4vw, 60px);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(1, 87, 155, 0.12);
    margin: 0 0 20px;
    border-right: 5px solid var(--primary-dark);
    border-left: 5px solid var(--primary-dark);
    width: 100%;
    box-sizing: border-box;
}
.message-card h2 {
    /* font-size يُدار من header.php */
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.message-card h2 i {
    font-size: 2rem;
    color: var(--primary);
}
.message-text {
    /* font-size و line-height يُداران من header.php */
    color: var(--text-main);
}
.message-text .ayah {
    font-weight: 700;
    color: var(--primary-dark);
    display: inline-block;
    padding: 0 8px;
    border-radius: 12px;
    /* font-size يُدار من header.php */
}
.message-text .ayah-number {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 5px;
}
.signature {
    /* font-size يُدار من header.php */
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed var(--border-light);
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.signature i {
    color: var(--primary);
    font-size: 1.8rem;
}
.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    padding: 5px 0;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}
.read-more-btn:hover {
    color: var(--primary-dark);
}
.extra-content {
    display: none;
}
.extra-content.show {
    display: block;
}

/* ============================================================
   5) بطاقة الأكاديمية
============================================================ */
.academy-card {
    background: linear-gradient(145deg, var(--card-bg), #f6fbfe);
    border-radius: var(--radius-lg);
    padding: 45px clamp(20px, 4vw, 60px);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-soft);
    margin: 30px 0 50px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.academy-card h2 {
    /* font-size يُدار من header.php */
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.academy-card h2 i {
    font-size: 2.8rem;
    color: var(--primary);
}
.academy-quote {
    /* font-size يُدار من header.php */
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0 20px;
    line-height: 1.4;
}
.academy-quote small {
    font-size: 1rem;
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
}
.academy-description {
    /* font-size و line-height يُداران من header.php */
    color: var(--text-soft);
    max-width: 100%;
    margin: 0 auto 35px;
}
.academy-btn {
    margin-top: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 34px;
    font-size: 1.08rem;
    background: var(--primary-dark);
    color: white;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(1, 87, 155, 0.3);
    transition: var(--transition);
    border: 2px solid transparent;
}
.academy-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(1, 111, 174, 0.4);
}

/* ============================================================
   6) الشريط المتحرك (marquee)
============================================================ */
.marquee-container {
    width: 100%;
    background: #01579b;
    padding: 20px 0;
    border-top: 1px solid var(--primary-dark);
    border-bottom: 1px solid #01579b;
    overflow: hidden;
    margin: 0;
}
.marquee-content {
    display: flex;
    width: max-content;
    animation: scroll-smooth 110s linear infinite;
}
.marquee-part {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 100px;
}
.marquee-part span {
    /* font-family و font-size يُداران من header.php */
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.marquee-part img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 10px #ffaa00);
}
@keyframes scroll-smooth {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

/* ============================================================
   7) السلايدر الموحّد — الإطار والعناصر
============================================================ */
.hero-item-slider {
    margin: 1.6rem 0 2.4rem;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-item-frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    border-radius: var(--radius-lg, 28px);
    overflow: hidden;
    background: linear-gradient(135deg, #014978 0%, #01579b 50%, #0369a1 100%);
    box-shadow: 0 20px 50px -15px rgba(1, 73, 120, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    isolation: isolate;
    height: 620px;
}

.hero-item-frame::before {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffb74d, #4facfe, #ffb74d);
    z-index: 8;
}

.hero-item-frame::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1.5px solid rgba(255, 210, 122, 0.35);
    border-radius: calc(var(--radius-lg, 28px) - 8px);
    pointer-events: none;
    z-index: 7;
}

.hero-item-track {
    position: absolute;
    inset: 0;
}

.hero-item-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease-in-out, visibility 0.9s;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px clamp(20px, 4vw, 80px);
}

.hero-item-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 3;
}

/* ============================================================
   8) بطاقة السلايدر
============================================================ */
.hero-item-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-decoration: none;
    color: inherit;
    padding: 28px clamp(20px, 3vw, 50px);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 210, 122, 0.28);
    border-radius: 26px;
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.hero-item-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 210, 122, 0.12), transparent 55%),
        radial-gradient(circle at bottom left, rgba(79, 172, 254, 0.12), transparent 55%);
    pointer-events: none;
}

.hero-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 210, 122, 0.6);
}

.hero-item-card--text {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 40px clamp(20px, 4vw, 60px);
}

/* الوسائط */
.hero-item-media {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-item-image {
    overflow: hidden;
    border: 4px solid rgba(255, 210, 122, 0.55);
    box-shadow:
        0 0 0 6px rgba(255, 255, 255, 0.08),
        0 12px 30px rgba(0, 0, 0, 0.35);
    background: #f1f5f9;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.hero-item-image--round    { width: 220px; height: 220px; border-radius: 50%; }
.hero-item-image--portrait { width: 200px; height: 280px; border-radius: 18px; }
.hero-item-image--landscape { width: 300px; height: 188px; border-radius: 18px; }
.hero-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-item-card:hover .hero-item-image {
    transform: scale(1.04);
    box-shadow:
        0 0 0 8px rgba(255, 210, 122, 0.15),
        0 16px 40px rgba(0, 0, 0, 0.45);
}
.hero-item-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffb74d, #ffd27a);
    color: #014978;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    z-index: 2;
}

/* المعلومات */
.hero-item-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: right;
    direction: rtl;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.hero-item-info--full {
    align-items: stretch;
    text-align: right;
}

.hero-item-name {
    /* font-size يُدار من header.php */
    margin: 0;
    font-weight: 800;
    color: #ffd27a;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-item-card--text .hero-item-name {
    /* font-size يُدار من header.php */
    border-bottom: 2px solid rgba(255, 210, 122, 0.35);
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    -webkit-line-clamp: unset;
    overflow: visible;
}
.hero-item-card--audio .hero-item-name {
    /* font-size يُدار من header.php */
    line-height: 1.4;
    -webkit-line-clamp: 5;
}

.hero-item-sub {
    /* font-size يُدار من header.php */
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.hero-item-desc {
    /* font-size و line-height يُداران من header.php */
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    text-align: justify;
    text-justify: inter-word;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
}

/* الميتا والشرائح */
.hero-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.hero-item-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 210, 122, 0.25);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.hero-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.hero-item-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 210, 122, 0.18);
    border: 1px solid rgba(255, 210, 122, 0.4);
    border-radius: 999px;
    color: #ffd27a;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #ffb74d, #ffd27a);
    color: #014978;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 999px;
    width: fit-content;
    box-shadow: 0 8px 20px -8px rgba(255, 183, 77, 0.6);
    transition: all 0.3s ease;
}
.hero-item-card:hover .hero-item-cta {
    background: linear-gradient(135deg, #ffd27a, #ffe9b8);
    box-shadow: 0 10px 26px -6px rgba(255, 183, 77, 0.8);
    transform: translateX(-4px);
}

/* اللمعة الذهبية */
.hero-item-shine {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(
        115deg,
        transparent 35%,
        rgba(255, 255, 255, 0.10) 45%,
        rgba(255, 210, 122, 0.20) 50%,
        rgba(255, 255, 255, 0.10) 55%,
        transparent 65%
    );
    background-size: 300% 100%;
    animation: heroItemShine 8s ease-in-out infinite;
    mix-blend-mode: screen;
}
@keyframes heroItemShine {
    0%   { background-position: 150% 0; }
    55%  { background-position: -60% 0; }
    100% { background-position: -60% 0; }
}

/* المؤشرات */
.hero-item-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 9;
    padding: 7px 15px;
    border-radius: 999px;
    background: rgba(1, 30, 60, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 210, 122, 0.25);
    box-shadow: 0 8px 20px rgba(1, 30, 60, 0.3);
}
.hero-item-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.45);
    transition: all 0.35s ease;
    padding: 0;
}
.hero-item-dot:hover {
    background: rgba(255, 210, 122, 0.85);
    transform: scale(1.2);
}
.hero-item-dot.is-active {
    width: 32px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb74d, #ffd27a);
    box-shadow: 0 0 12px rgba(255, 183, 77, 0.75);
}

/* الأسهم */
.hero-item-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(1, 30, 60, 0.55);
    border: 1.5px solid rgba(255, 210, 122, 0.35);
    color: #ffd27a;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    padding: 0;
}
.hero-item-nav:hover {
    background: rgba(255, 210, 122, 0.9);
    color: #014978;
    border-color: #ffd27a;
    transform: translateY(-50%) scale(1.1);
}
.hero-item-nav--prev { right: 20px; }
.hero-item-nav--next { left: 20px; }

/* ============================================================
   9) الأقسام العامة
============================================================ */
.home-section-block {
    margin-top: 50px;
    margin-bottom: 50px;
    width: 100%;
}

/* ============================================================
   10) التبويبات (بحوث / أخبار / صوتيات)
============================================================ */
.home-tabs-wrap {
    background: #fff;
    border: 1px solid rgba(1, 87, 155, 0.10);
    border-radius: 22px;
    padding: clamp(16px, 2vw, 28px);
    box-shadow: 0 4px 16px rgba(1, 87, 155, 0.06);
    width: 100%;
    box-sizing: border-box;
}
.home-tabs-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    padding-bottom: 12px;
}
.home-tab {
    padding: 10px 22px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.22s ease;
}
.home-tab:hover {
    background: #f1f5f9;
    color: var(--primary-dark, #014978);
}
.home-tab.is-active {
    background: linear-gradient(135deg, var(--primary, #01579b), var(--primary-dark, #014978));
    color: #fff;
    box-shadow: 0 6px 16px rgba(1, 87, 155, 0.25);
}
.home-tab-panel {
    display: none;
    animation: tabFadeIn 0.35s ease-out;
}
.home-tab-panel.is-active {
    display: block;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.home-tab-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}
.home-tab-item {
    display: block;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.22s ease;
}
.home-tab-item:hover {
    background: #ffffff;
    border-color: var(--primary, #01579b);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(1, 87, 155, 0.10);
}
.home-tab-item-title {
    /* font-size يُدار من header.php (يحتوي "title") */
    display: block;
    font-weight: 800;
    color: var(--primary-dark, #014978);
    line-height: 1.5;
    margin-bottom: 4px;
}
.home-tab-item-excerpt {
    /* font-size يُدار من header.php (يحتوي "excerpt") */
    display: block;
    color: #64748b;
}
.home-tab-item-date {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 600;
}

/* ============================================================
   11) قسم CTA النهائي
============================================================ */
.home-cta-section {
    margin-top: 60px;
    margin-bottom: 60px;
    width: 100%;
}
.home-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}
.home-cta-card {
    padding: 36px clamp(20px, 3vw, 40px);
    border-radius: 24px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(1, 87, 155, 0.15);
    box-sizing: border-box;
}
.home-cta-card--academy {
    background: linear-gradient(135deg, #01579b 0%, #014978 100%);
}
.home-cta-card--contact {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}
.home-cta-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.home-cta-card h3 {
    /* font-size يُدار من header.php */
    margin: 0 0 10px;
    font-weight: 800;
    color: #fff;
}
.home-cta-card p {
    /* font-size يُدار من header.php */
    margin: 0 0 20px;
    opacity: 0.92;
    line-height: 1.7;
}
.home-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.98rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}
.home-cta-btn:hover {
    background: #fff;
    color: var(--primary-dark, #014978);
    transform: translateY(-3px);
    border-color: #fff;
}

/* ============================================================
   12) الاقتباسات
============================================================ */
.home-quotes-end {
    margin-top: 60px;
    margin-bottom: 40px;
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-inline: clamp(14px, 3vw, 32px);
    box-sizing: border-box;
}
.home-quotes-head {
    margin-bottom: 18px;
}
.home-quotes-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 6px 2px 14px;
}
.home-quotes-row {
    display: flex;
    gap: 18px;
    width: max-content;
    min-width: 100%;
}
.home-quote-card {
    width: min(96vw, 1100px);
    min-width: min(96vw, 1100px);
    min-height: clamp(260px, 48vh, 520px);
    padding: clamp(22px, 4vw, 42px);
    border-radius: 30px;
    background: linear-gradient(145deg, #fff, #fbfdff);
    border: 1px solid rgba(1, 87, 155, 0.1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.home-quote-text {
    /* font-size و line-height يُداران من header.php */
    margin: 0 0 12px;
    color: var(--text-main);
}
.home-quote-source {
    /* font-size يُدار من header.php */
    color: var(--text-muted);
    font-weight: 700;
}

/* ============================================================
   13) رؤوس الأقسام والأزرار المشتركة
============================================================ */
.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}
.slider-header h2 {
    /* font-size يُدار من header.php */
    font-weight: 800;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
}
.slider-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 70px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 4px;
}
body[dir="ltr"] .slider-header h2::after {
    right: auto;
    left: 0;
}
.slider-hint {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pause-btn-link {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    text-decoration: none;
}
.pause-btn-link:hover {
    background: var(--primary);
    color: white;
}
.single-card-slider .slider-nav {
    display: none !important;
}
.error-message {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    width: 100%;
}

/* ============================================================
   14) قائمة المقالات القابلة للتمرير
============================================================ */
.home-article-marquee .ui-list-items {
    max-height: 360px;
    overflow-y: auto;
    padding-left: 6px;
}
.home-article-marquee .ui-list-items::-webkit-scrollbar {
    width: 6px;
}
.home-article-marquee .ui-list-items::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

/* ============================================================
   15) التخطيط القديم (legacy)
============================================================ */
.home-updates-layout {
    display: block;
    margin-bottom: 56px;
    width: 100%;
}
.home-updates-main--full {
    width: 100%;
}
.home-update-section {
    background: linear-gradient(145deg, #fff, #fbfdff);
    border: 1px solid rgba(1, 87, 155, 0.08);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}
.home-update-section + .home-update-section {
    margin-top: 24px;
}
.custom-fatwa-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 28px 24px;
    min-height: 240px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
}
.custom-fatwa-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: linear-gradient(145deg, var(--card-bg), var(--primary-soft));
}
.custom-fatwa-title {
    /* font-size يُدار من header.php (يحتوي "title") */
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 18px;
    line-height: 1.5;
    width: 100%;
}
.custom-fatwa-excerpt {
    /* font-size يُدار من header.php (يحتوي "excerpt") */
    color: var(--text-soft);
    width: 100%;
}
.custom-fatwa-track {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.custom-fatwa-track .custom-fatwa-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

/* ============================================================
   16) بطاقة المنهج — justify كامل
============================================================ */
.message-text,
.message-text p,
#messageText,
#messageText p,
#extraContent,
#extraContent p {
    text-align: justify !important;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    word-spacing: -0.02em;
}
.message-text .ayah {
    display: inline;
}

/* ============================================================
   17) بطاقة الفتوى في السلايدر
============================================================ */
.hero-item-card--fatwa .hero-item-image--landscape {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}
.hero-item-card--fatwa .hero-item-image img {
    object-fit: contain;
    padding: 10px;
}

/* ============================================================
   18) دعم RTL/LTR
   (نحتاج body[dir] ليعمل — انظر header.php)
============================================================ */
body[dir="rtl"] .hero-item-info {
    text-align: right;
}
body[dir="ltr"] .hero-item-info {
    text-align: left;
    direction: ltr;
}
body[dir="ltr"] .hero-item-cta {
    flex-direction: row-reverse;
}
body[dir="ltr"] .hero-item-card:hover .hero-item-cta {
    transform: translateX(4px);
}

/* ============================================================
   19) الاستجابة للشاشات المتوسطة (≤ 1024px)
============================================================ */
@media (max-width: 1024px) {
    .home-two-cols { grid-template-columns: 1fr; gap: 40px; }
    .home-tab-list { grid-template-columns: 1fr; }
}

/* ============================================================
   20) الاستجابة للشاشات المتوسطة (≤ 900px)
============================================================ */
@media (max-width: 900px) {
    .hero-item-frame { height: 580px; }

    .hero-item-card {
        grid-template-columns: 180px 1fr;
        gap: 26px;
        padding: 22px 24px;
    }
    .hero-item-image--round    { width: 170px; height: 170px; }
    .hero-item-image--portrait { width: 150px; height: 210px; }
    .hero-item-image--landscape { width: 230px; height: 145px; }

    .hero-item-slide { padding: 34px 40px; }

    .home-tab-list { grid-template-columns: 1fr; }
}

/* ============================================================
   21) الاستجابة للجوال (≤ 768px)
============================================================ */
@media (max-width: 768px) {
    .message-card { padding: 30px 20px; }
    .academy-card { padding: 30px 20px; }
    .marquee-part img { width: 35px; margin: 0 10px; }

    .home-section-block { margin-top: 36px; margin-bottom: 36px; }

    .home-tabs-head {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 8px;
    }
    .home-tabs-head::-webkit-scrollbar { display: none; }
    .home-tab {
        flex-shrink: 0;
        padding: 9px 16px;
        font-size: 0.9rem;
    }

    .home-cta-grid { grid-template-columns: 1fr; }
    .home-cta-card { padding: 28px 20px; }

    .home-update-section { border-radius: 22px; padding: 18px; }
    .home-updates-layout { margin-bottom: 40px; }
    .custom-fatwa-card { padding: 20px 18px; min-height: 200px; }
    .home-quote-card { border-radius: 24px; }
}

/* ============================================================
   22) الاستجابة للجوال (≤ 640px)
============================================================ */
@media (max-width: 640px) {
    .hero-item-frame {
        height: auto;
        min-height: 560px;
    }
    .hero-item-frame::after { inset: 8px; }

    .hero-item-slide { padding: 26px 18px 62px; }

    .hero-item-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px 18px;
        text-align: center;
    }
    .hero-item-card--text { padding: 24px 20px; }

    .hero-item-image--round    { width: 130px; height: 130px; }
    .hero-item-image--portrait { width: 130px; height: 180px; }
    .hero-item-image--landscape { width: 100%; max-width: 280px; height: 158px; }

    .hero-item-media { justify-content: center; }

    .hero-item-info {
        text-align: center;
        align-items: center;
    }
    .hero-item-card--text .hero-item-name { justify-content: center; }

    .hero-item-meta { justify-content: center; }
    .hero-item-tags { justify-content: center; }

    .hero-item-cta { margin: 0 auto; }

    .hero-item-dots { bottom: 16px; padding: 6px 12px; }

    .hero-item-nav {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
    .hero-item-nav--prev { right: 12px; }
    .hero-item-nav--next { left: 12px; }

    .home-tab-list { grid-template-columns: 1fr; }
}

/* ============================================================
   23) الاستجابة للجوال الصغير (≤ 480px)
============================================================ */
@media (max-width: 480px) {
    .hero-item-frame { min-height: 520px; }

    .hero-item-image--round    { width: 110px; height: 110px; }
    .hero-item-image--portrait { width: 110px; height: 155px; }
    .hero-item-image--landscape { max-width: 240px; height: 135px; }

    .hero-item-badge { font-size: 0.72rem; padding: 4px 12px; }
}