/* ==========================================================
   مكافح الحدادية — الستايل الرئيسي
   ==========================================================
   لوحة الألوان:
     - الأزرق الليلي (Navy)         #0a1f3d
     - الأزرق الليلي الفاتح         #142850
     - الذهبي/النحاسي (Gold)        #c8a44d
     - الذهبي الفاتح                #e6c878
     - الخلفية الفاتحة              #f7f5f0
     - الرمادي الفاتح               #ecedf0
     - الأبيض النقي                 #ffffff
     - الأحمر الهادئ (تحذير)         #b3261e
     - النصّ الأساسي                 #1a2942
     - النصّ الثانوي                 #5b6680
   الخط الأساسي: Tajawal (من Google Fonts)
   ========================================================== */

/* ----- إعادة تعيين بسيطة وأساسيّات ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
    --navy:        #0a1f3d;
    --navy-2:      #142850;
    --navy-3:      #1d3563;
    --gold:        #c8a44d;
    --gold-light:  #e6c878;
    --gold-dark:   #a48230;
    --bg:          #f7f5f0;
    --bg-2:        #ecedf0;
    --white:       #ffffff;
    --red:         #b3261e;
    --red-soft:    #fdecec;
    --green:       #1d6a31;
    --text:        #1a2942;
    --text-soft:   #5b6680;
    --border:      #d8dde6;
    --shadow-sm:   0 2px 6px rgba(10, 31, 61, .08);
    --shadow:      0 8px 24px rgba(10, 31, 61, .12);
    --shadow-lg:   0 20px 50px rgba(10, 31, 61, .18);
    --radius:      12px;
    --radius-sm:   8px;
    --maxw:        1240px;
    --transition:  .28s cubic-bezier(.4, 0, .2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
    background: var(--bg);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

/* ----- روابط ----- */
a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--gold); }

/* ----- العناوين ----- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--navy);
    margin-bottom: .6em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.1em; }

/* ----- الحاوية ----- */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================
   الشريط العلوي (Header)
   ========================================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--gold);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: var(--maxw);
    margin: 0 auto;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--navy), var(--navy-3));
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid var(--gold);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 900; color: var(--navy); font-size: 18px; }
.brand-tag  { font-size: 12px; color: var(--text-soft); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--navy);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
    font-size: 15.5px;
}
.main-nav a:hover { background: var(--bg-2); color: var(--navy); }
.main-nav a.active {
    background: var(--navy);
    color: var(--white);
}
.main-nav a.active:hover { background: var(--navy-2); }

.menu-toggle {
    display: none;
    background: var(--navy);
    color: var(--white);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 22px;
    cursor: pointer;
}

@media (max-width: 980px) {
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        box-shadow: var(--shadow);
        gap: 4px;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 16px; }
}

/* ==========================================================
   قسم البطل (Hero)
   ========================================================== */
.hero {
    background:
        linear-gradient(135deg, rgba(10,31,61,.95) 0%, rgba(20,40,80,.92) 100%),
        radial-gradient(ellipse at top right, rgba(200,164,77,.25), transparent 60%);
    color: var(--white);
    padding: 88px 24px 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0, transparent 80px, rgba(200,164,77,.04) 80px, rgba(200,164,77,.04) 81px);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.hero .eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 6px 18px;
    border: 1px solid var(--gold);
    border-radius: 30px;
}
.hero h1 {
    color: var(--white);
    font-weight: 900;
    margin-bottom: 18px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.3;
}
.hero h1 .accent { color: var(--gold); }
.hero p.lead {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255,255,255,.92);
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--navy);
    padding: 14px 30px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: inherit;
    font-size: 16px;
    border: 2px solid var(--gold);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn:hover {
    background: var(--gold-light);
    color: var(--navy);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(200,164,77,.35);
}
.btn.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
}
.btn.btn-navy {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn.btn-navy:hover { background: var(--navy-2); color: var(--gold); }
.btn.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ==========================================================
   الأقسام العامّة
   ========================================================== */
.section { padding: 70px 0; }
.section.alt { background: var(--white); }
.section.dark { background: var(--navy); color: var(--white); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--white); }

.section-head {
    text-align: center;
    margin-bottom: 50px;
}
.section-head .eyebrow {
    display: inline-block;
    color: var(--gold-dark);
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.section.dark .section-head .eyebrow { color: var(--gold); }
.section-head h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
.section-head h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gold);
    margin: 14px auto 0;
    border-radius: 2px;
}
.section-head p { color: var(--text-soft); max-width: 720px; margin: 0 auto; }
.section.dark .section-head p { color: rgba(255,255,255,.8); }

/* ==========================================================
   الشبكة (Grid)
   ========================================================== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================
   البطاقات
   ========================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.card .icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--navy), var(--navy-3));
    color: var(--gold);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}
.card h3 { color: var(--navy); margin-bottom: 12px; }
.card p { color: var(--text-soft); margin-bottom: 0; }

/* بطاقة الأصل الفاسد (تحذير) */
.card.danger {
    border-right: 5px solid var(--red);
}
.card.danger .icon {
    background: var(--red-soft);
    color: var(--red);
}
.card.danger h3 { color: var(--red); }

/* بطاقة قاعدة المنهج الحقّ (نور/ذهبي) */
.card.ok {
    border-right: 5px solid var(--gold);
}
.card.ok .icon {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
}

/* ==========================================================
   بطاقة المقالة
   ========================================================== */
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.article-card .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-card .meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 12px;
}
.article-card .meta .badge {
    background: var(--bg-2);
    color: var(--navy);
    padding: 3px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 12px;
}
.article-card h3 {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 1.15rem;
}
.article-card h3 a { color: var(--navy); }
.article-card h3 a:hover { color: var(--gold-dark); }
.article-card .excerpt {
    color: var(--text-soft);
    flex: 1;
    line-height: 1.85;
    margin-bottom: 16px;
}
.article-card .more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-dark);
    font-weight: 700;
    align-self: flex-start;
}
.article-card .more::after {
    content: '←';
    transition: transform var(--transition);
}
.article-card:hover .more::after { transform: translateX(-4px); }

/* ==========================================================
   بطاقة الفيديو
   ========================================================== */
.video-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.video-thumb {
    position: relative;
    padding-top: 56.25%;
    background: var(--navy);
    overflow: hidden;
}
.video-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-thumb .play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    background: rgba(200,164,77,.95);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--transition);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.video-card:hover .play-icon {
    background: var(--gold);
    transform: translate(-50%, -50%) scale(1.1);
}
.video-card .body { padding: 18px 22px; flex: 1; display: flex; flex-direction: column; }
.video-card h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.5; }
.video-card h3 a { color: var(--navy); }
.video-card .channel {
    color: var(--text-soft);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================
   صفحة فيديو منفردة
   ========================================================== */
.video-page { padding: 50px 0; }
.video-layout { display: grid; gap: 28px; grid-template-columns: 1fr 320px; }
@media (max-width: 980px) { .video-layout { grid-template-columns: 1fr; } }

.video-player {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.video-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.timestamps {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.timestamps h3 {
    color: var(--navy);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
    margin-bottom: 14px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ts-list { list-style: none; max-height: 480px; overflow-y: auto; }
.ts-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    align-items: center;
    margin-bottom: 4px;
    background: var(--bg);
}
.ts-item:hover {
    background: var(--bg-2);
    border-color: var(--gold);
    transform: translateX(-3px);
}
.ts-time {
    background: var(--navy);
    color: var(--gold);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    direction: ltr;
    flex-shrink: 0;
    min-width: 55px;
    text-align: center;
}
.ts-label { font-size: 14.5px; color: var(--text); line-height: 1.5; }

.transcript-block {
    margin-top: 30px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-right: 5px solid var(--gold);
}
.transcript-block h3 {
    color: var(--navy);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.transcript-block p { line-height: 2; color: var(--text); }

/* ==========================================================
   بطاقة الإمام / الشخصيّة
   ========================================================== */
.scholar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 5px solid var(--gold);
    transition: all var(--transition);
    text-align: center;
}
.scholar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.scholar-avatar {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--navy), var(--navy-3));
    color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid var(--gold);
}
.scholar-card h3 { font-size: 1.15rem; margin-bottom: 4px; color: var(--navy); }
.scholar-card .era {
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}
.scholar-card .intro {
    color: var(--text-soft);
    line-height: 1.85;
    font-size: 14.5px;
    margin-bottom: 18px;
}

/* بطاقة شخصيّة الفتنة */
.figure-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-right: 5px solid var(--red);
    transition: all var(--transition);
}
.figure-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.figure-card h3 {
    color: var(--navy);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.figure-card .role {
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}
.figure-card .intro {
    color: var(--text-soft);
    line-height: 1.85;
    font-size: 14.5px;
    margin-bottom: 14px;
}

/* ==========================================================
   بطاقة الكتاب (المكتبة)
   ========================================================== */
.book-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.book-cover {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--navy), var(--navy-3));
    color: var(--gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--gold);
    position: relative;
    overflow: hidden;
}
.book-cover img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.book-cover .b-icon { font-size: 38px; margin-bottom: 14px; opacity: .9; }
.book-cover .b-title { font-size: 16px; font-weight: 900; line-height: 1.5; color: var(--gold); }
.book-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.book-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--navy); line-height: 1.5; }
.book-card .author { color: var(--gold-dark); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.book-card .desc { color: var(--text-soft); font-size: 14px; line-height: 1.8; flex: 1; margin-bottom: 14px; }

/* ==========================================================
   صفحة المقال المنفردة (المحتوى)
   ========================================================== */
.article-single {
    background: var(--white);
    border-radius: var(--radius);
    padding: 50px clamp(20px, 5vw, 60px);
    box-shadow: var(--shadow-sm);
    margin: 40px auto;
    max-width: 920px;
    border: 1px solid var(--border);
}
.article-single .head {
    border-bottom: 2px solid var(--bg-2);
    padding-bottom: 24px;
    margin-bottom: 30px;
}
.article-single h1 {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    color: var(--navy);
    margin-bottom: 14px;
    line-height: 1.4;
}
.article-single .meta {
    color: var(--text-soft);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.article-single .meta .badge {
    background: var(--navy);
    color: var(--gold);
    padding: 4px 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 12px;
}

.article-content {
    font-size: 17.5px;
    line-height: 2;
    color: var(--text);
}
.article-content h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin: 36px 0 18px;
    padding-right: 16px;
    border-right: 4px solid var(--gold);
}
.article-content h3 {
    color: var(--navy-2);
    font-size: 1.2rem;
    margin: 28px 0 14px;
}
.article-content p { margin-bottom: 1.2em; }
.article-content ul, .article-content ol {
    margin: 14px 28px 22px;
    line-height: 2;
}
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--navy); font-weight: 700; }
.article-content em { color: var(--gold-dark); font-style: normal; font-weight: 500; }

/* اقتباس مُذهَّب (لاقتباسات السلف) */
.article-content blockquote {
    background: linear-gradient(135deg, #faf3e2, #f7eccf);
    border-right: 5px solid var(--gold);
    padding: 22px 26px;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-weight: 500;
    font-size: 17px;
    line-height: 2;
    box-shadow: 0 2px 8px rgba(200,164,77,.18);
    position: relative;
}
.article-content blockquote::before {
    content: '\201D';
    position: absolute;
    top: -8px;
    right: 18px;
    font-size: 70px;
    line-height: 1;
    color: var(--gold);
    opacity: .35;
    font-family: serif;
}

/* رمز قرآني */
.quran {
    background: linear-gradient(135deg, #fdf8e8, #faf0d2);
    border: 1px solid var(--gold-light);
    padding: 18px 24px;
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--navy);
    font-weight: 700;
    font-size: 19px;
    line-height: 2.2;
    margin: 22px 0;
}

/* ==========================================================
   تذييل (Footer)
   ========================================================== */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.8);
    padding: 60px 0 28px;
    margin-top: 60px;
    border-top: 4px solid var(--gold);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 40px;
}
@media (max-width: 980px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand h3 { color: var(--gold); margin-bottom: 14px; font-size: 1.2rem; }
.footer-brand p { color: rgba(255,255,255,.75); line-height: 1.9; font-size: 14.5px; }

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 18px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(200,164,77,.3);
    padding-bottom: 8px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: rgba(255,255,255,.75);
    font-size: 14.5px;
    transition: all var(--transition);
}
.footer-col a:hover {
    color: var(--gold);
    padding-right: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 22px;
    text-align: center;
    color: rgba(255,255,255,.55);
    font-size: 13.5px;
}
.footer-bottom .accent { color: var(--gold); }

/* ==========================================================
   بطاقة بحث / تصفية
   ========================================================== */
.search-bar {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 4px 4px 20px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.search-bar input {
    border: 0;
    flex: 1;
    padding: 12px 8px;
    font-family: inherit;
    font-size: 15.5px;
    background: transparent;
    color: var(--text);
}
.search-bar input:focus { outline: none; }
.search-bar button {
    background: var(--navy);
    color: var(--gold);
    border: 0;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: all var(--transition);
}
.search-bar button:hover { background: var(--gold); color: var(--navy); }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    justify-content: center;
}
.filter-pill {
    padding: 8px 18px;
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-weight: 500;
    font-size: 14.5px;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-pill:hover { border-color: var(--gold); color: var(--gold-dark); }
.filter-pill.active {
    background: var(--navy);
    color: var(--gold);
    border-color: var(--navy);
}

/* ==========================================================
   تنبيهات
   ========================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-right: 4px solid;
    font-weight: 500;
}
.alert-warn  { background: var(--red-soft);  color: var(--red);   border-color: var(--red); }
.alert-info  { background: #e8f1fe;          color: var(--navy);  border-color: var(--navy); }
.alert-ok    { background: #e8f5e8;          color: var(--green); border-color: var(--green); }

.flash {
    padding: 14px 20px;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border-right: 4px solid;
}
.flash-success { background: #e8f5e8; color: var(--green); border-color: var(--green); }
.flash-error   { background: var(--red-soft); color: var(--red); border-color: var(--red); }

/* ==========================================================
   شريط الفُتات (Breadcrumbs)
   ========================================================== */
.breadcrumb {
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-soft);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}
.breadcrumb .container { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.breadcrumb a { color: var(--navy); }
.breadcrumb .sep { color: var(--gold); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ==========================================================
   بطاقات الإحصائيّات
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}
@media (max-width: 780px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 18px;
    text-align: center;
    border: 1px solid var(--border);
    border-top: 4px solid var(--gold);
}
.stat .num {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
}
.stat .label { color: var(--text-soft); font-size: 14px; }

/* ==========================================================
   فقاعة 404
   ========================================================== */
.notfound {
    text-align: center;
    padding: 80px 24px;
}
.notfound .num {
    font-size: 8rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 18px;
    opacity: .85;
}
.notfound h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 14px; }
.notfound p { color: var(--text-soft); margin-bottom: 24px; }

/* ==========================================================
   حركات بسيطة بدون مكتبات (تَدعم AOS أيضًا إن أُضيفت)
   ========================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.fade-up { animation: fadeUp .8s var(--transition) both; }
.fade-in { animation: fadeIn .9s ease both; }

/* تَفعيل آيات AOS داخليًّا (إن تَعذَّر تحميل المكتبة) */
[data-aos] { opacity: 0; transition: all .9s ease; }
[data-aos].aos-animate { opacity: 1; }
[data-aos="fade-up"]   { transform: translateY(28px); }
[data-aos="fade-up"].aos-animate { transform: translateY(0); }
[data-aos="fade-right"]{ transform: translateX(28px); }
[data-aos="fade-right"].aos-animate { transform: translateX(0); }

/* ==========================================================
   مكوّنات صغيرة
   ========================================================== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-2);
    color: var(--navy);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
}
.tag.gold { background: rgba(200,164,77,.18); color: var(--gold-dark); }
.tag.red  { background: var(--red-soft); color: var(--red); }

/* أيقونة دائرية صغيرة */
.icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-2);
    color: var(--navy);
    border-radius: 50%;
    font-size: 14px;
}
