/* إعدادات الشامل التعليمي - 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); }

/* شريط الأخبار المتحرك */
@keyframes tickerScroll { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.ticker-animate { animation: tickerScroll 45s linear infinite; }
.ticker-animate:hover { animation-play-state: paused; }

/* تأثيرات البطاقات والنصوص */
.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; }

/* شريط التمرير (Scrollbar) */
::-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) */
.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; font-size: 1.1rem; line-height: 2; }
.post-body h2, .post-body h3 { margin: 32px 0 16px; font-weight: 700; color: inherit; }
.post-body p { line-height: 2; margin-bottom: 16px; }
.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; }
.post-body li { margin-bottom: 8px; line-height: 2; }

/* قائمة الجوال (Mobile Menu) */
.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) */
.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) */
.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), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 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%); }
/* 1. إصلاح حجم خط العنوان الرئيسي على الهاتف ليكون أصغر وأجمل */
.hero__title,
h1.header-title {
  font-size: 1.75rem !important; /* تحديد حجم خط أصغر للعنوان الرئيسي */
  line-height: 1.2 !important; /* ضبط ارتفاع السطر لتجنب التداخل */
}

/* 2. إصلاح تنسيق قائمة التنقل لتكون سطرًا واحدًا (مثل تحضير البكالوريا) */
.main-nav__link,
.navbar .menu-item a {
  white-space: nowrap !important; /* منع التفاف النص */
  display: inline-flex !important; /* تأكد من أنه عنصر مضمن */
  align-items: center; /* توسيع العناصر رأسيًا */
}

/* 3. تباطؤ شريط المواضيع الجاري ليسير بهدوء */
.news-ticker__marquee,
.ticker-content {
  /* قم بزيادة المدة هنا لجعلها أبطأ. 40 ثانية تبدو قيمة جيدة. */
  animation: scroll-ticker 40s linear infinite !important;
}

/* تحديد الرسوم المتحركة إذا لم تكن موجودة */
@keyframes scroll-ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}