/* إعدادات الشامل التعليمي - style.css */
* { font-family: 'Cairo', sans-serif; }
html { scroll-behavior: smooth; }
/* تأثيرات الزجاج (Glassmorphism) */
.glass { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.dark .glass { background: rgba(15, 23, 42, 0.95); }
.glass-header { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226, 232, 240, 0.6); }
.dark .glass-header { background: rgba(15, 23, 42, 0.85); border-bottom: 1px solid rgba(30, 41, 59, 0.6); }
/* القوائم المنسدلة العصرية */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-panel { position: absolute; top: calc(100% + 12px); right: 0; min-width: 340px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 100; pointer-events: none; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); border-radius: 16px; padding: 1.25rem; }
.dark .nav-dropdown .dropdown-panel { background: rgba(30, 41, 59, 0.98); border: 1px solid rgba(51, 65, 85, 0.8); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.nav-dropdown:hover .dropdown-panel, .nav-dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-dropdown .dropdown-panel::before { content: ''; position: absolute; top: -6px; right: 28px; width: 12px; height: 12px; background: white; transform: rotate(45deg); border-top: 1px solid rgba(226, 232, 240, 0.8); border-right: 1px solid rgba(226, 232, 240, 0.8); }
.dark .nav-dropdown .dropdown-panel::before { background: rgba(30, 41, 59, 0.98); border-color: rgba(51, 65, 85, 0.8); }
#reading-progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  height: 3px;
  width: 0%;
  background: #3b82f6;
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 0 2px 0;
}
/* تأثيرات البطاقات والنصوص */
.post-card { transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.post-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); }
.dark .post-card:hover { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.grad { background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.dark .grad { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
/* شريط التمرير */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }
.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }
/* الأنيميشن وترقيم الصفحات */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease-out forwards; }
.pg-btn { transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.pg-btn:hover, .pg-btn.active { background: #2563eb; color: #fff; transform: scale(1.05); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
/* تنسيق المقالات الأساسية (تم تنظيفه) */
.post-body img { max-width: 100% !important; height: auto !important; border-radius: 12px; margin: 20px auto; display: block; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.post-body iframe { max-width: 100%; border-radius: 16px; margin: 20px auto; }
.post-body { word-wrap: break-word; direction: rtl; text-align: right; }
.post-body a { color: #2563eb; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.post-body a:hover { border-bottom-color: #2563eb; }
.post-body ul, .post-body ol { margin: 16px 0; padding-right: 28px; }
/* قائمة الجوال */
.mobile-overlay { opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(4px); }
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-drawer { transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); }
.dark .mobile-drawer { background: rgba(15, 23, 42, 0.98); }
.mobile-drawer.active { transform: translateX(0); }
.mobile-sub { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-sub.open { max-height: 1000px; }
/* الفوتر */
.footer-wave { position: relative; background: linear-gradient(180deg, #0f172a 0%, #020617 100%); }
.footer-wave::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 60px; background: linear-gradient(to bottom, #f8fafc, transparent); }
.dark .footer-wave::before { background: linear-gradient(to bottom, #0f172a, transparent); }
/* العداد */
.counter-digit { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 56px; background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: 12px; font-size: 1.75rem; font-weight: 800; color: #60a5fa; margin: 0 3px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); text-shadow: 0 0 20px rgba(96, 165, 250, 0.3); }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); } 50% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); } }
.pulse-blue { animation: pulse-glow 2.5s infinite; }
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
.custom-scroll::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 8px; }
.category-badge { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3); }
.hero-gradient { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%); }
.dark .hero-gradient { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%); }
.hero__title, h1.header-title { font-size: 1.65rem !important; line-height: 1.3 !important; }
.main-nav__link, .navbar .menu-item a { white-space: nowrap !important; display: inline-flex !important; align-items: center; }
.news-ticker__marquee, .ticker-content { animation: scroll-ticker 40s linear infinite !important; }
@keyframes scroll-ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
/* ============================================
   الحزمة 1 — الإصلاحات الأساسية والتنسيق الموحد
   ============================================ */
.glass-header { position: sticky !important; top: 0; z-index: 999 !important; }
html, body { overflow-x: hidden; max-width: 100%; }
.post-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; overflow-x: auto; display: block; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.post-body table thead tr { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); color: #fff; text-align: right; }
.post-body table th, .post-body table td { padding: 12px 16px; border: 1px solid #e5e7eb; text-align: right; }
.post-body table tbody tr:nth-child(even) { background-color: #f0f7ff; }
.post-body table tbody tr:hover { background-color: #dbeafe; }
.dark .post-body table thead tr { background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%); }
.dark .post-body table th, .dark .post-body table td { border-color: #334155; }
.dark .post-body table tbody tr:nth-child(even) { background-color: #1e293b; }
.dark .post-body table tbody tr:hover { background-color: #1e3a5f; }
.post-body blockquote { border-right: 4px solid #2563eb; background: #f0f7ff; border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 24px 0; color: #1e3a5f; position: relative; }
.post-body blockquote::before { content: '"'; font-size: 3rem; color: #2563eb; opacity: 0.2; position: absolute; top: -8px; left: 16px; font-family: serif; line-height: 1; }
.dark .post-body blockquote { background: #1e293b; border-right-color: #3b82f6; color: #cbd5e1; }
.post-body pre { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 20px; overflow-x: auto; margin: 24px 0; font-size: 0.9rem; line-height: 1.8; direction: ltr; text-align: left; }
.post-body code { background: #f1f5f9; color: #2563eb; padding: 2px 8px; border-radius: 6px; font-size: 0.88rem; font-family: 'Courier New', monospace; direction: ltr; display: inline-block; }
.post-body pre code { background: transparent; color: #e2e8f0; padding: 0; }
.dark .post-body code { background: #1e293b; color: #60a5fa; }
.post-card img, .article-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; display: block; }
@media print {
  .glass-header, .footer-wave, .mobile-overlay, .mobile-drawer, .ticker-animate, .pg-btn { display: none !important; }
  body { font-size: 12pt; color: #000 !important; background: #fff !important; }
  .post-body { font-size: 11pt; line-height: 1.8; color: #000 !important; }
}
/* ============================================
   الحزمة 2 — الحيوية، التوحيد، والمحاذاة (الكمبيوتر والتابلت)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@300;400;500;700&display=swap');
body, p, li, td, th, span { font-family: 'Tajawal', 'Cairo', sans-serif; }
h1, h2, h3, h4, h5, h6, .card-title, .widget-title { font-family: 'Cairo', 'Tajawal', sans-serif; }
#reading-progress-bar { position: fixed; top: 0; right: 0; width: 0%; height: 3px; background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb); background-size: 200% 100%; animation: shimmer 2s linear infinite; z-index: 9999; transition: width 0.1s ease; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.post-body { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
/* 1. توحيد نصوص الفقرات والمحاذاة الاحترافية */
.post-body p, .post-body li, .post-first-para, .question-text { 
    font-size: 1.1rem !important; 
    line-height: 1.85 !important; 
    color: #334155 !important; 
    margin-bottom: 18px !important;
    text-align: justify !important; 
    text-justify: inter-word !important; 
    word-break: break-word !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}
.dark .post-body p, .dark .post-body li, .dark .post-first-para, .dark .question-text { color: #cbd5e1 !important; }
/* 2. تمييز الكلمات المهمة باللون الأزرق الداكن وتخفيف السمك */
.post-body b, .post-body strong {
    font-weight: 600 !important; /* سمك متوسط احترافي */
    color: #1e3a8a !important; /* أزرق داكن */
}
.dark .post-body b, .dark .post-body strong {
    color: #93c5fd !important; /* أزرق فاتح مريح للعين في الظلام */
}
/* 3. العناوين - متدرجة ومميزة */
.post-body h2 { font-size: 1.5rem; font-weight: 800; color: #1e3a5f; background: linear-gradient(to left, #eff6ff, transparent); border-right: 5px solid #2563eb; padding: 10px 16px; border-radius: 0 10px 10px 0; margin: 36px 0 16px; }
.dark .post-body h2 { color: #bfdbfe; background: linear-gradient(to left, #1e293b, transparent); border-right-color: #3b82f6; }
.post-body h3 { font-size: 1.2rem; font-weight: 700; color: #5b21b6; padding-right: 14px; margin: 28px 0 12px; position: relative; }
.post-body h3::before { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; background: #7c3aed; border-radius: 50%; }
.dark .post-body h3 { color: #c4b5fd; }
.dark .post-body h3::before { background: #a78bfa; }
.post-body h4 { font-size: 1.05rem; font-weight: 700; color: #1e40af; margin: 20px 0 8px; }
.dark .post-body h4 { color: #93c5fd; }
/* القوائم */
.post-body ul { list-style: none; padding-right: 8px; margin: 16px 0; }
.post-body ul li { padding-right: 28px; position: relative; margin-bottom: 10px; line-height: 1.9; }
.post-body ul li::before { content: '◈'; position: absolute; right: 0; color: #2563eb; font-size: 0.8rem; top: 5px; }
.dark .post-body ul li::before { color: #60a5fa; }
.post-body ol { padding-right: 24px; counter-reset: ol-counter; list-style: none; }
.post-body ol li { counter-increment: ol-counter; padding-right: 36px; position: relative; margin-bottom: 10px; line-height: 1.9; }
.post-body ol li::before { content: counter(ol-counter); position: absolute; right: 0; top: 2px; width: 22px; height: 22px; background: #2563eb; color: white; font-size: 0.75rem; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dark .post-body ol li::before { background: #1d4ed8; }
/* التنبيهات */
.post-body .alert-info, .post-body .info-box { background: #eff6ff; border-right: 5px solid #2563eb; color: #1e3a5f; border-radius: 12px; padding: 16px 20px; margin: 24px 0; line-height: 1.9; }
.post-body .alert-warning { background: #fffbeb; border-right: 5px solid #f59e0b; color: #78350f; border-radius: 12px; padding: 16px 20px; margin: 24px 0; line-height: 1.9; }
.post-body .alert-danger { background: #fef2f2; border-right: 5px solid #ef4444; color: #7f1d1d; border-radius: 12px; padding: 16px 20px; margin: 24px 0; line-height: 1.9; }
.post-body .alert-success { background: #f0fdf4; border-right: 5px solid #10b981; color: #064e3b; border-radius: 12px; padding: 16px 20px; margin: 24px 0; line-height: 1.9; }
.dark .post-body .alert-info, .dark .post-body .info-box { background: #1e293b; color: #bfdbfe; }
.dark .post-body .alert-warning { background: #1c1410; color: #fde68a; }
.post-body mark { background: linear-gradient(120deg, #fef08a 0%, #fde047 100%); color: #1a1a1a; padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.dark .post-body mark { background: linear-gradient(120deg, #854d0e 0%, #a16207 100%); color: #fef9c3; }
.post-body hr { border: none; height: 2px; background: linear-gradient(to left, transparent, #2563eb, #7c3aed, #2563eb, transparent); margin: 40px 0; border-radius: 2px; opacity: 0.4; }
.post-body a { color: #2563eb; text-decoration: none; border-bottom: 1.5px solid transparent; transition: all 0.25s ease; font-weight: 500; }
.post-body a:hover { color: #1d4ed8; border-bottom-color: #2563eb; background: #eff6ff; padding: 0 3px; border-radius: 3px; }
.dark .post-body a { color: #60a5fa; }
.dark .post-body a:hover { color: #93c5fd; background: #1e293b; border-bottom-color: #60a5fa; }
.post-card { transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid transparent; }
.post-card:hover { transform: translateY(-6px); border-color: rgba(37, 99, 235, 0.15); box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.15); }
.post-title, h1.entry-title, h1.article-title { font-family: 'Cairo', sans-serif; font-size: 1.65rem !important; font-weight: 800; line-height: 1.4; color: #1e3a5f; }
.dark .post-title, .dark h1.entry-title { color: #e0f2fe; }
/* إلغاء max-width المفروض على p في كل الأحجام */
.test-container p, .test-container li, .test-container .post-first-para { max-width: 100% !important; }
/* ============================================
   الحزمة 3 — أزرار السابق/التالي
   ============================================ */
a.group:has(.fa-arrow-right) { background: linear-gradient(135deg, #eff6ff, #fff) !important; border-color: #bfdbfe !important; border-right: 4px solid #2563eb !important; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important; }
a.group:has(.fa-arrow-right):hover { background: linear-gradient(135deg, #dbeafe, #eff6ff) !important; border-color: #2563eb !important; transform: translateX(4px); box-shadow: -4px 4px 20px rgba(37, 99, 235, 0.15) !important; }
a.group:has(.fa-arrow-right):hover .font-bold { color: #1d4ed8 !important; }
a.group:has(.fa-arrow-left) { background: linear-gradient(135deg, #f0fdf4, #fff) !important; border-color: #bbf7d0 !important; border-left: 4px solid #10b981 !important; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important; }
a.group:has(.fa-arrow-left):hover { background: linear-gradient(135deg, #dcfce7, #f0fdf4) !important; border-color: #10b981 !important; transform: translateX(-4px); box-shadow: 4px 4px 20px rgba(16, 185, 129, 0.15) !important; }
a.group:has(.fa-arrow-left):hover .font-bold { color: #059669 !important; }
.dark a.group:has(.fa-arrow-right) { background: linear-gradient(135deg, #1e3a5f, #1e293b) !important; border-color: #1d4ed8 !important; }
.dark a.group:has(.fa-arrow-right):hover { background: linear-gradient(135deg, #1e40af, #1e3a5f) !important; }
.dark a.group:has(.fa-arrow-left) { background: linear-gradient(135deg, #064e3b, #1e293b) !important; border-color: #059669 !important; }
.dark a.group:has(.fa-arrow-left):hover { background: linear-gradient(135deg, #065f46, #064e3b) !important; }
a.group:has(.fa-arrow-right) .fa-arrow-right,
a.group:has(.fa-arrow-left) .fa-arrow-left { transition: transform 0.3s ease; }
a.group:has(.fa-arrow-right):hover .fa-arrow-right { transform: translateX(-4px); }
a.group:has(.fa-arrow-left):hover .fa-arrow-left { transform: translateX(4px); }
/* ============================================
   الحزمة 4 — النظافة والترتيب (للشاشات الصغيرة والتابلت)
   ============================================ */
@media (max-width: 768px) {
    /* فك الحصار وتوحيد العرض لكافة حاويات الموقع والاختبارات */
    .container, .main-wrapper, .content, #main, .post-outer, .item-view,
    main > div:first-child, article, article > div:first-child, .post-body,
    .test-container, .test-container .section, .test-container .question {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        box-sizing: border-box !important;
        border-left: none !important;
        border-right: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow-x: hidden !important;
    }
    /* تحييد وسوم HTML/Body المتداخلة بالخطأ */
    .post-body html, .post-body body {
        all: unset !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* إلغاء قيود العرض من إطارات العمل مثل Tailwind */
    .max-w-6xl { max-width: 100% !important; }
    .test-container * {
        max-width: 100% !important;
        min-width: 0 !important;
    }
}
/* ============================================
   الحزمة 5 — تجربة السوشيال ميديا (للهواتف فقط)
   ============================================ */
@media (max-width: 600px) {
    /* 1. الخطوط: الاعتماد على خط النظام الأصلي (System UI) للموبايل */
    .post-body, .post-body p, .post-body li, .question-text, .post-first-para, .option {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        word-break: break-word !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    /* الحفاظ على هيبة العناوين بخط بسيط */
    h1, h2, h3, .post-title, .hero__title {
        font-family: 'Cairo', system-ui, sans-serif !important;
    }
    /* 2. الأحجام والمحاذاة الدقيقة الموحدة للجوال */
    .post-body p, .question-text, .post-first-para, .post-body li {
        font-size: 13px !important; /* الرقم الذهبي الذي اتفقنا عليه */
        line-height: 1.85 !important; /* مساحة تنفس مريحة بين الأسطر ومناسبة للضبط */
        margin-bottom: 16px !important;
        text-align: justify !important; /* محاذاة احترافية للفقرات */
        text-justify: inter-word !important;
        word-break: break-word !important; 
        text-rendering: optimizeLegibility !important;
        -webkit-font-smoothing: antialiased !important;
    }
    .post-body h2 { font-size: 1.1rem !important; margin-top: 22px !important; padding: 8px 12px !important; }
    .post-body h3 { font-size: 0.95rem !important; margin-top: 18px !important; }
    .hero__title, h1.header-title, .post-title, h1.entry-title { font-size: 1.15rem !important; line-height: 1.3 !important; }
    /* 3. الخيارات وأزرار الاختبارات (أ، ب، ج) */
    .options { padding-right: 4px !important; }
    .option {
        padding: 10px 12px !important;
        margin-bottom: 8px !important;
        font-size: 12.5px !important;
    }
}
.glass-header { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226, 232, 240, 0.6); }
.dark .glass-header { background: rgba(15, 23, 42, 0.85); border-bottom: 1px solid rgba(30, 41, 59, 0.6); }
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-panel { position: absolute; top: calc(100% + 12px); right: 0; min-width: 340px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 100; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); border-radius: 16px; padding: 1.25rem; }
.dark .nav-dropdown .dropdown-panel { background: rgba(30, 41, 59, 0.98); border-color: rgba(51, 65, 85, 0.8); }
.nav-dropdown:hover .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.hero-gradient { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%); }
.dark .hero-gradient { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%); }
.grad { background: linear-gradient(135deg, #1e3a5f 0%, #3b82f6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.dark .grad { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 8px; }
.footer-wave { position: relative; background: linear-gradient(180deg, #0f172a 0%, #020617 100%); }
.footer-wave::before { content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 60px; background: linear-gradient(to bottom, #f8fafc, transparent); }
.dark .footer-wave::before { background: linear-gradient(to bottom, #0f172a, transparent); }

/* استهداف الترقيم الرئيسي فقط (الذي يلي شبكة المقالات) */

/* ============================================
   الحزمة 6 — تحسينات الهاتف (Mobile Enhancements)
   ============================================ */

/* خطوط مرنة — clamp (غير موجودة سابقاً) */
h1 { font-size: clamp(1.3rem, 5.5vw, 2.25rem) !important; }
h2 { font-size: clamp(1.1rem, 4.5vw, 1.875rem) !important; }

/* أزرار اللمس — حجم مريح للإصبع */
@media (max-width: 768px) {
  button, a.btn, .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 15px;
  }
}

/* تقليل padding الهيدر على الهاتف */
@media (max-width: 640px) {
  .glass-header .max-w-7xl {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* القائمة الجانبية — انتقال سلس */
#mobile-sidebar {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
#mobile-overlay {
  transition: opacity 0.3s ease;
}
#mobile-overlay:not(.hidden) {
  display: block !important;
}

/* منع بطاقات المقالات من تأثير hover على الهاتف (يربك اللمس) */
@media (hover: none) {
  .post-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* تقليل المسافة بين بطاقات المقالات على الهاتف */
@media (max-width: 640px) {
  .post-card .p-5 {
    padding: 14px !important;
  }
}
/* =============

/* تقليل المسافة بين بطاقات المقالات على الهاتف */
@media (max-width: 640px) {
  .post-card .p-5 {
    padding: 14px !important;
  }
}

/* إخفاء المقالات بعد الخامسة على الهاتف */
@media (max-width: 640px) {
  .grid > article:nth-child(n+6) {
    display: none !important;
  }
}