/* =====================================================================
   تقرير قسم نظام الفصل — تصميم Apple Glass / Glassmorphism
   المعهد الديني الجعفري | وزارة التربية والتعليم | مملكة البحرين
   ===================================================================== */

/* ---------- المتغيرات العامة (Design Tokens) ---------- */
:root {
  /* الألوان الأساسية (هادئة وفاخرة) */
  --bg-deep: #0b1230;
  --bg-mid: #1c2056;
  --bg-soft: #2a3268;

  --accent: #7dd3fc;        /* سماوي فاخر */
  --accent-2: #a78bfa;      /* بنفسجي ناعم */
  --accent-3: #f0abfc;      /* وردي فاخر */
  --accent-gold: #fbbf24;   /* ذهبي وزاري */

  --text: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.72);
  --text-soft: rgba(248, 250, 252, 0.55);

  /* الزجاج */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-gloss: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 18px 50px rgba(2, 6, 32, 0.45);
  --glass-shadow-soft: 0 10px 30px rgba(2, 6, 32, 0.30);

  /* الحواف الدائرية */
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;

  /* الحركة */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.25s;
  --t-med: 0.45s;
  --t-slow: 0.8s;
}

/* ---------- إعادة الضبط ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  /* المسافة العلوية للقفز السلس تتطابق مع ارتفاع الهيدر الكامل */
  scroll-padding-top: var(--header-total-height, 220px);
}

body {
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  /* مسافة علوية تساوي ارتفاع الهيدر الثابت لمنع التداخل مع المحتوى */
  padding-top: var(--header-total-height, 220px);
}

/* ---------- خلفية متدرجة متحركة + كرات ضوئية ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse at top right, #1e3a8a 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, #581c87 0%, transparent 55%),
    radial-gradient(ellipse at center, #0f172a 0%, #050818 100%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.4;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 3px 3px;
}

.orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  animation: orb-float 22s ease-in-out infinite alternate;
}

.orb.o1 { width: 520px; height: 520px; background: #38bdf8; top: -160px; right: -160px; }
.orb.o2 { width: 620px; height: 620px; background: #a855f7; bottom: -200px; left: -180px; animation-delay: -7s; }
.orb.o3 { width: 380px; height: 380px; background: #ec4899; top: 35%; left: 28%; animation-delay: -14s; opacity: 0.35; }
.orb.o4 { width: 320px; height: 320px; background: #fbbf24; top: 65%; right: 25%; animation-delay: -3s; opacity: 0.18; }

@keyframes orb-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, -60px) scale(1.12); }
}

/* ---------- التخطيط العام ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 64px 0;
  scroll-margin-top: 110px;
}

/* ---------- الهيدر الموحَّد (شعار + شريط تنقّل في وحدة واحدة) ---------- */
/*
   البنية البصرية (٣ صفوف عند الحاجة، اثنان غالباً):
   • صف ١: الأزرار (يسار في RTL = نهاية الشاشة) في الأعلى
   • صف ٢: الشعار في الوسط (مكبَّر)
   • صف ٣: شريط التنقّل ممتدّ من حافة لحافة، ملتصق بالشعار
   كل ذلك مثبَّت (sticky) أعلى الصفحة كوحدة واحدة منسَّقة.
*/

/* الشريط العلوي = صفّان: الأزرار في الأعلى، ثم الشعار قريب من الخط الفاصل */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 4px 28px 0; /* لا فراغ سفلي حتى ينزل الشعار قريباً من الخط */
  background:
    linear-gradient(180deg, rgba(11, 18, 48, 0.92) 0%, rgba(11, 18, 48, 0.78) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* شعار قسم نظام الفصل (يمين الهيدر) */
.top-bar-section-logo {
  position: absolute;
  right: 20px;
  top: 4px;
  bottom: 2px; /* يمتد تقريباً حتى خط الفصل السفلي */
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 2;
}

.top-bar-section-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

/* صفّ الأزرار في الأعلى (يصطفّ على نهاية الصف في RTL = اليسار) */
.top-bar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 38px;
  min-width: 260px;
  margin: 0; /* لا فراغ بين الأزرار والشعار، الشعار يدفع نفسه للأسفل */
}

.top-bar-actions .btn {
  padding: 7px 14px;
  font-size: 0.84rem;
  white-space: nowrap;
}

/* صفّ الشعار في الوسط (مُمَركَز عمودياً بين فراغين متساويين) */
.top-bar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  margin: 0;
}

.top-bar-brand img {
  height: 118px;
  width: auto;
  transform: translateY(26px);
  filter: none;
  opacity: 1;
  transition: transform var(--t-med) var(--ease);
}

.top-bar-brand:hover img {
  transform: translateY(26px);
  filter: none;
}

/* مؤشّر الصفحة محذوف نهائياً */
.top-bar-meta { display: none !important; }

/* استجابة للأجهزة الصغيرة */
@media (max-width: 900px) {
  .top-bar {
    padding: 8px 14px 10px;
    gap: 6px;
  }
  .top-bar-section-logo {
    right: 12px;
    top: 8px;
    bottom: 6px;
    width: 72px;
  }
  .top-bar-brand img {
    height: 82px;
    transform: translateY(12px);
  }
  .top-bar-actions {
    min-height: 34px;
    min-width: 0;
    gap: 6px;
  }
  .top-bar-actions .btn {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .top-bar-actions .btn span:not(.fa-solid) { display: none; }
  .top-bar-actions .btn i { margin: 0; }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 6px 10px 8px;
    gap: 4px;
  }
  .top-bar-section-logo {
    right: 8px;
    top: 6px;
    bottom: 6px;
    width: 56px;
  }
  .top-bar-brand img {
    height: 62px;
    transform: translateY(8px);
  }
  .top-bar-actions {
    min-height: 30px;
    gap: 4px;
  }
  .top-bar-actions .btn {
    padding: 6px 8px;
    font-size: 0.74rem;
    border-radius: 10px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--glass-gloss);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.25), rgba(167, 139, 250, 0.25));
  border-color: rgba(125, 211, 252, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.4), rgba(167, 139, 250, 0.4));
}

/* ---------- شريط التنقّل (ثابت أعلى الصفحة بشكل مطلق) ---------- */
/*
   شريط التنقّل ثابت (fixed) أسفل الشعار مباشرة بعرض الشاشة كاملاً.
   لا يتأثّر بأي حاوية أو تمرير — يبقى مرئياً دائماً.
*/
.side-nav {
  position: fixed;
  top: var(--header-top-height, 120px); /* يُعدَّل ديناميكياً عبر JS حسب ارتفاع الـ top-bar */
  left: 0;
  right: 0;
  z-index: 199;
  width: 100%;
  margin: 0;
  padding: 6px 0;
  background:
    linear-gradient(180deg, rgba(11, 18, 48, 0.78), rgba(11, 18, 48, 0.68));
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: none;
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  max-width: none;
}

/* خط فاصل أنيق بين الشعار وشريط التنقّل */
.side-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(125, 211, 252, 0.42) 25%,
    rgba(167, 139, 250, 0.42) 50%,
    rgba(125, 211, 252, 0.42) 75%,
    transparent 100%
  );
  pointer-events: none;
}

.side-nav-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 24px;
  max-width: 1280px;
  margin: 0 auto;
  /* safe center: تتوسّط الروابط عند توفّر المساحة، وترتدّ تلقائياً
     لبداية الصفّ (يمين في RTL) عند الفيضان حتى لا تُقتطع "الرئيسية" */
  justify-content: safe center;
  flex-wrap: nowrap;
  /* احتياط للمتصفحات القديمة التي لا تدعم safe */
  scroll-padding-inline-start: 12px;
}

.side-nav-scroll::-webkit-scrollbar { display: none; }

.side-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
}

.side-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.side-nav a.active,
.side-nav a.is-current {
  color: var(--text);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.22), rgba(167, 139, 250, 0.18));
  border-color: rgba(125, 211, 252, 0.38);
  box-shadow: inset 0 1px 0 var(--glass-gloss), 0 0 12px rgba(125, 211, 252, 0.12);
  font-weight: 600;
}

/* ---------- الـ Hero ---------- */
.hero {
  text-align: center;
  padding: 80px 0 40px;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(125, 211, 252, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 10%, var(--accent) 50%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 24px rgba(125, 211, 252, 0.15);
}

.hero h2 {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.93rem;
  color: var(--text);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow-soft);
}

.chip .chip-icon {
  font-size: 1.05rem;
  opacity: 0.85;
}

.chip-strong {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.18));
  border-color: rgba(125, 211, 252, 0.35);
}

.hero-meta.hero-meta-leaders {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(960px, 100%);
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 8px;
  transform: none;
  translate: -136px 0;
}

.hero-meta.hero-meta-leaders .leaders-row {
  width: min(900px, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.hero-meta.hero-meta-leaders .leaders-row .chip {
  min-width: 0;
  justify-content: center;
  min-height: 46px;
  padding-inline: 16px;
  white-space: nowrap;
  line-height: 1.15;
  font-size: 0.86rem;
}

.hero-meta.hero-meta-leaders .leaders-row-top .chip {
  flex: 1 1 0;
}

.hero-meta.hero-meta-leaders .leaders-row-bottom .chip-director {
  flex: 1 1 36%;
}

.hero-meta.hero-meta-leaders .leaders-row-bottom .chip-assistants {
  flex: 1 1 64%;
}

@media (max-width: 900px) {
  .hero-meta.hero-meta-leaders {
    transform: none;
    translate: none;
  }
}

@media (max-width: 760px) {
  .hero-meta.hero-meta-leaders .leaders-row {
    flex-wrap: wrap;
  }

  .hero-meta.hero-meta-leaders .leaders-row .chip {
    flex: 1 1 100%;
    white-space: normal;
  }
}

/* ---------- عنوان كل قسم ---------- */
.section-head {
  margin-bottom: 36px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(125, 211, 252, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 720px;
  margin-inline: auto;
}

/* ---------- اللوحات الزجاجية الأساسية ---------- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-gloss);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-gloss), transparent);
  opacity: 0.6;
}

.glass-panel + .glass-panel {
  margin-top: 28px;
}

.glass-panel h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.glass-panel h3::before {
  content: '';
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 4px;
}

/* ---------- مبادرة مميزة — منصة رقمية (مظهر زجاجي معزّز) ---------- */
.initiative-featured-section {
  margin-bottom: 8px;
}

.initiative-featured {
  --init-glass-highlight: rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(15, 23, 42, 0.45) 48%,
    rgba(15, 23, 42, 0.62) 100%
  );
  backdrop-filter: blur(42px) saturate(180%);
  -webkit-backdrop-filter: blur(42px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid var(--init-glass-highlight);
  border-radius: calc(var(--r-xl) + 4px);
  padding: clamp(14px, 2.2vw, 26px) clamp(16px, 2.8vw, 30px) clamp(16px, 2.5vw, 28px);
  box-shadow:
    0 4px 1px rgba(255, 255, 255, 0.12) inset,
    0 32px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(125, 211, 252, 0.08);
}

.initiative-featured::before {
  opacity: 0.85;
}

.initiative-featured-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 10px;
  margin-bottom: 4px;
}

.initiative-featured-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  row-gap: 4px;
  flex: 1;
  min-width: 0;
}

.initiative-badge-sep {
  color: rgba(248, 250, 252, 0.38);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  padding: 0 1px;
}

/* شارات المبادرة المميزة (مدمجة في سطر؛ لا تعتمد على .card) */
.initiative-featured-badges .label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 26px;
  border-radius: 999px;
  vertical-align: middle;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: var(--accent);
}

.initiative-featured-badges .label.label-gold {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--accent-gold);
}

.initiative-featured-badges .label.label-purple {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--accent-2);
}

.initiative-featured-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  color: #e0f2fe;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.initiative-featured-deck {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.88);
  letter-spacing: 0.01em;
  margin: 0 0 6px;
  line-height: 1.45;
}

.initiative-featured-title {
  font-size: clamp(1.12rem, 2vw, 1.48rem);
  font-weight: 800;
  line-height: 1.28;
  margin: 0 0 12px;
  color: var(--text);
  text-wrap: balance;
}

.initiative-featured-body {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 20px);
}

.initiative-block {
  padding-top: 2px;
}

.initiative-block + .initiative-block {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: clamp(12px, 2vw, 18px);
}

.initiative-block-title {
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: rgba(224, 242, 254, 0.98);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.initiative-block-text {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.62;
  color: rgba(248, 250, 252, 0.9);
  max-width: 72ch;
}

.initiative-block-text:last-child {
  margin-bottom: 0;
}

.initiative-feature-list {
  margin: 0;
  padding-inline-start: 1.15rem;
  font-size: 0.9rem;
  line-height: 1.58;
  color: rgba(248, 250, 252, 0.9);
  max-width: 72ch;
}

.initiative-feature-list li {
  margin-bottom: 5px;
}

.initiative-feature-list li:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .initiative-featured-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .initiative-featured-icon {
    align-self: center;
  }

  .initiative-featured-badges {
    flex-basis: calc(100% - 52px);
  }
}

/* ---------- الشبكات (Grid) ---------- */
.grid {
  display: grid;
  gap: 22px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* تنسيق خاص ببطاقات صفحة تنسيق القسم (٢ فوق + ٢ تحت) */
.coordination-two-by-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.digital-two-per-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .coordination-two-by-two {
    grid-template-columns: 1fr;
  }

  .digital-two-per-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- البطاقات الزجاجية ---------- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.32);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--glass-gloss);
}

.card:hover::after { opacity: 1; }

.card-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.2), rgba(167, 139, 250, 0.2));
  border: 1px solid rgba(125, 211, 252, 0.3);
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.card-icon.card-icon-image {
  padding: 3px;
}

.skill-icon-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.card .meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.card p, .card li {
  font-size: 0.96rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h5::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.card ul {
  padding-right: 22px;
  margin-top: 6px;
  list-style: none;
}

.card ul li {
  position: relative;
  margin-bottom: 6px;
  padding-right: 18px;
}

.card ul li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0.65;
}

.card .label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: var(--accent);
  margin: 3px 4px 3px 0;
  vertical-align: middle;
}

.card .label.label-gold {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--accent-gold);
}

.card .label.label-purple {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--accent-2);
}

.card .label.label-pink {
  background: rgba(240, 171, 252, 0.12);
  border-color: rgba(240, 171, 252, 0.35);
  color: var(--accent-3);
}

/* أيقونات حقيقية للأدوات (شعارات عبر favicon + Font Awesome brands) */
.card .label.tool-brand-label {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  vertical-align: middle;
}

.card .tool-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.card .tool-brand-mark img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 3px;
}

.card .tool-brand-mark--icon .fa-brands {
  font-size: 0.86rem;
  line-height: 1;
  opacity: 0.95;
}

.card .tool-brand-name {
  line-height: 1.25;
}

/* ---------- بطاقات الإحصائيات ---------- */
.stat-card {
  text-align: center;
  padding: 26px 16px;
}

.stat-card .stat-num {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.stat-card .stat-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.stat-card .stat-sub {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ---------- قسم الفيديو ---------- */
.video-help {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.video-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.youtube-frame-wrap {
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background: rgba(7, 10, 28, 0.72);
  box-shadow: var(--glass-shadow-soft);
  aspect-ratio: 16 / 9;
}

.youtube-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 14px;
}

.video-card h4 {
  margin: 10px 0 6px;
  font-size: 1rem;
}

.video-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* صفحة التعلم عن بعد: 4 بطاقات في صف واحد */
.remote-four-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* ---------- أهداف التنمية المستدامة ---------- */
.sdg-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.sdg-logo-wrap img {
  width: min(180px, 42vw);
  height: auto;
}

.sdg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.sdg-hero-pro .sdg-top-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sdg-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.sdg-nav-card {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}

.sdg-nav-card img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
}

.sdg-nav-card span {
  font-size: 0.84rem;
  line-height: 1.55;
}

.sdg-nav-card em {
  font-size: 0.75rem;
  font-style: normal;
  color: var(--text-muted);
}

.sdg-nav-card .has-proof {
  color: #86efac;
}

.sdg-goals-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sdg-goal-card {
  scroll-margin-top: 88px;
}

.sdg-goal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sdg-goal-head img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}

.sdg-goal-head h3 {
  margin: 0;
}

.sdg-goal-card ul {
  margin: 8px 0 10px;
  padding-right: 18px;
}

.sdg-goal-card li {
  margin-bottom: 6px;
  color: var(--text-muted);
}

.sdg-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.sdg-proof-grid img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sdg-proof-grid figure {
  margin: 0;
}

.sdg-proof-grid figcaption {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.sdg-evidence-block {
  margin-top: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sdg-evidence-block p {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.8;
}

.sdg-empty-proof {
  margin-top: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.sdg-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdg-tags span {
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: rgba(125, 211, 252, 0.1);
}

.sdg-doc-text {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.85;
}

.sdg-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sdg-impact-grid .card {
  padding: 14px;
}

.sdg-impact-grid h4 {
  margin: 0 0 6px;
}

.sdg-impact-grid p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.sdg-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.sdg-pillar-card {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.sdg-pillar-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sdg-pillar-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.sdg-edu-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.sdg-edu-item {
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.sdg-edu-item h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.sdg-edu-item p {
  margin: 0 0 6px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.93rem;
}

.sdg-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  line-height: 1.9;
}

.sdg-team-kpis {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdg-team-kpis .stat-chip {
  border: 1px solid var(--glass-border);
  background: rgba(125, 211, 252, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.sdg-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.sdg-evidence-card {
  margin: 0;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.sdg-evidence-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.sdg-evidence-card figcaption {
  padding: 10px 12px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.sdg-evidence-card figcaption strong {
  color: var(--text);
}

@media (max-width: 980px) {
  .sdg-impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sdg-hero-pro .sdg-top-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sdg-proof-grid,
  .sdg-impact-grid,
  .sdg-hero-pro .sdg-top-stats {
    grid-template-columns: 1fr;
  }

  .sdg-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sdg-card {
  margin: 0;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.sdg-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.sdg-card figcaption {
  padding: 8px 10px 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
}

/* شبكة بطاقات الإحصائيات في الرئيسية: 3 فوق + 3 تحت */
.stats-grid-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .stats-grid-six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stats-grid-six {
    grid-template-columns: 1fr;
  }
}

/* ---------- البطاقات القابلة للتوسيع ---------- */
.expandable {
  cursor: pointer;
}

.expandable-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.expandable-head .toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
  transition: transform var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.expandable.open .expandable-head .toggle {
  transform: rotate(180deg);
}

.expandable-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-med) var(--ease), margin-top var(--t-fast) var(--ease);
}

.expandable.open .expandable-body {
  max-height: 1500px;
  margin-top: 14px;
}

/* ---------- شريط الفلاتر (Tabs / Chips) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px);
}

.filter-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  align-self: center;
  margin-left: 6px;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.filter-chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.10);
}

.filter-chip.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.25), rgba(167, 139, 250, 0.20));
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: inset 0 1px 0 var(--glass-gloss);
}

.event-lightbox-card .img-grid .event-grid-extra {
  display: none;
}

.event-open-gallery-btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.event-show-more-btn {
  margin-top: 12px;
  margin-inline-end: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#filters-events .card[data-filter-item] {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

/* للفلاتر متعددة المجموعات */
.filter-tabs-wrapper {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ---------- الجداول الزجاجية ---------- */
.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.glass-table th,
.glass-table td {
  padding: 14px 18px;
  text-align: right;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-table th {
  background: rgba(125, 211, 252, 0.10);
  font-weight: 700;
  color: var(--accent);
}

.glass-table tr:last-child td { border-bottom: none; }

.glass-table tr:hover td { background: rgba(255, 255, 255, 0.04); }

.weekly-plan-table th:first-child,
.weekly-plan-table td:first-child {
  white-space: nowrap;
}

/* ---------- أماكن الصور (Image Placeholders) ---------- */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

figure.img-grid {
  margin-inline: 0;
  margin-block: 18px 0;
}

.gallery-toolbar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.gallery-filter-box {
  margin-top: 16px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(11, 18, 48, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 10px;
}

.gallery-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.gallery-filter-row-full {
  grid-template-columns: 1fr;
}

.gallery-filter-field {
  display: grid;
  gap: 6px;
}

.gallery-filter-field label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gallery-filter-field input,
.gallery-filter-field select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 12, 32, 0.55);
  color: var(--text);
  padding: 0 10px;
  font-family: inherit;
  font-size: 16px; /* يمنع تكبير الحقل تلقائياً في iOS Safari */
}

.gallery-filter-field input::placeholder {
  color: var(--text-soft);
}

.gallery-filter-actions {
  display: flex;
  align-items: end;
}

.gallery-toolbar .label {
  background: rgba(11, 18, 48, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gallery-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.img-placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.06), rgba(167, 139, 250, 0.04)),
    rgba(0, 0, 0, 0.18);
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-soft);
  text-align: center;
  padding: 16px;
  transition: all var(--t-fast) var(--ease);
  overflow: hidden;
}

.img-placeholder:hover {
  border-color: rgba(125, 211, 252, 0.4);
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.10), rgba(167, 139, 250, 0.08)),
    rgba(0, 0, 0, 0.18);
  color: var(--text-muted);
}

.img-placeholder::before {
  content: "\f03e"; /* Font Awesome image icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.8rem;
  opacity: 0.4;
}

.img-placeholder .ph-label {
  font-size: 0.86rem;
  font-weight: 600;
}

.img-placeholder .ph-name {
  font-size: 0.72rem;
  color: var(--text-soft);
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* عند إضافة الصورة فعلياً */
.img-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.img-placeholder.has-image::before { display: none; }
.img-placeholder.has-image .ph-label,
.img-placeholder.has-image .ph-name { display: none; }

.gallery-photo-meta {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(8, 12, 32, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #eef5ff;
  text-align: center;
  backdrop-filter: blur(6px);
}

.img-grid .img-placeholder.has-image img {
  cursor: pointer;
}

.img-grid .img-placeholder.has-image {
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    border-style 0.28s ease;
}

.img-grid .img-placeholder.has-image:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 26px 48px rgba(5, 10, 28, 0.5),
    0 0 0 1px rgba(125, 211, 252, 0.45),
    0 0 36px rgba(125, 211, 252, 0.18);
  border-color: rgba(125, 211, 252, 0.55);
  border-style: solid;
  z-index: 8;
}

.img-grid .img-placeholder.has-image:active {
  transform: translateY(-4px) scale(1.015);
  box-shadow:
    0 14px 28px rgba(5, 10, 28, 0.4),
    0 0 0 1px rgba(125, 211, 252, 0.35);
  transition-duration: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .img-grid .img-placeholder.has-image {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .img-grid .img-placeholder.has-image:hover,
  .img-grid .img-placeholder.has-image:active {
    transform: none;
  }
}

/* صور تطبيق قيمة النظافة (تنسيق عمودي) */
.img-grid--cleanliness {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.img-grid--cleanliness .img-placeholder {
  aspect-ratio: 3 / 4;
}

/* صور تطبيق قيمة الاحترام (ملصقات وبطاقات عمودية) */
.img-grid--respect {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.img-grid--respect .img-placeholder {
  aspect-ratio: 3 / 4;
}

/* صور تطبيق قيمة التعاون والتواصل (لقطات أفقية من الصف) */
.img-grid--cooperation {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.img-grid--cooperation .img-placeholder {
  aspect-ratio: 16 / 9;
}

/* صور تطبيق قيمة المواطنة والانتماء (لقطات ميدانية وصفيّة متنوعة) */
.img-grid--citizenship {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.img-grid--citizenship .img-placeholder {
  aspect-ratio: 4 / 3;
}

/* شواهد رواق نظام الفصل — عمود واحد بعرض البطاقة (مثل شواهد التلفاز) */
.img-grid--rawaq {
  grid-template-columns: 1fr;
  gap: 14px;
}

.img-grid--rawaq .img-placeholder {
  aspect-ratio: 4 / 3;
  border: 2px solid rgba(232, 213, 183, 0.42);
  border-style: solid;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.24);
}

.img-grid--rawaq .img-placeholder.has-image:hover {
  border-color: rgba(251, 191, 36, 0.45);
}

/* لقطات شاشة لشواهد المنصة — إطار أقصر لتوفير ارتفاع الصفحة */
.img-grid--platform-evidence {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
}

.initiative-featured .img-grid {
  margin-top: 10px;
}

.img-grid--platform-evidence .img-placeholder {
  aspect-ratio: 16 / 9;
  background: rgba(8, 12, 32, 0.55);
}

.img-grid--platform-evidence .img-placeholder img {
  object-fit: contain;
  object-position: top center;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: absolute;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(5, 10, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-shell {
  position: relative;
  width: min(1120px, calc(100vw - 90px));
  height: min(84vh, calc(100vh - 72px));
  max-height: calc(100dvh - 48px);
  transform: none;
  background: rgba(10, 18, 45, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 46px 12px 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.gallery-lightbox-image {
  width: 100%;
  height: auto;
  max-height: calc(100% - 74px);
  align-self: center;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}

.gallery-lightbox-caption {
  margin: 6px 4px 2px;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
}

.gallery-lightbox-close {
  position: absolute;
  top: 12px;
  left: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 28, 0.7);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gallery-lightbox-tag {
  position: absolute;
  top: 12px;
  right: 10px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 28, 0.72);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.84rem;
  z-index: 2;
  display: none !important;
}

.gallery-lightbox-zoom-tools {
  position: absolute;
  top: 12px;
  right: 170px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 28, 0.72);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  z-index: 2;
}

.gallery-lightbox-zoom-tools button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.gallery-lightbox-zoom-level {
  min-width: 44px;
  text-align: center;
  color: #fff;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .gallery-lightbox-shell {
    width: min(94vw, 820px);
    height: min(74vh, 640px);
    max-height: calc(100dvh - 56px);
    padding-top: 54px;
    transform: none;
  }
}

@supports not (height: 100dvh) {
  .gallery-lightbox-shell {
    max-height: calc(100vh - 80px);
  }
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 28, 0.72);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gallery-lightbox-nav.prev {
  right: 10px;
}

.gallery-lightbox-nav.next {
  left: 10px;
}

.gallery-lightbox-nav:hover,
.gallery-lightbox-close:hover,
.gallery-lightbox-tag:hover,
.gallery-lightbox-zoom-tools button:hover {
  background: rgba(18, 30, 68, 0.88);
}

/* إخفاء خيار تسمية الوجوه نهائياً في كل المقاسات */
.face-label-button,
.face-label-btn,
.face-label,
.face-tag,
[data-face-label="true"] {
  display: none !important;
}

/* تحسينات الجوال/التابلت فقط (بدون تغيير الديسكتوب) */
@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  main,
  .container,
  .glass-panel,
  .card,
  .grid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .img-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .img-placeholder {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    aspect-ratio: 4 / 3 !important;
  }

  .img-placeholder img,
  .img-grid img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  .gallery-lightbox {
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  .gallery-lightbox-shell {
    width: min(94vw, 430px) !important;
    max-width: 94vw !important;
    max-height: 82vh !important;
    height: auto !important;
    padding: 8px !important;
    padding-top: 52px !important;
    box-sizing: border-box !important;
    border-radius: 18px !important;
  }

  .gallery-lightbox-image {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 64vh !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .gallery-lightbox-caption {
    font-size: 12px !important;
    line-height: 1.5 !important;
    padding: 6px 8px !important;
    text-align: center !important;
  }

  .gallery-lightbox-close {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 22px !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 10 !important;
  }

  .gallery-lightbox-nav {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    font-size: 24px !important;
    z-index: 10 !important;
  }

  .gallery-lightbox-nav.prev {
    right: 8px !important;
  }

  .gallery-lightbox-nav.next {
    left: 8px !important;
  }

  .gallery-lightbox-zoom-tools {
    top: 8px !important;
    right: 56px !important;
    max-width: calc(100% - 112px) !important;
  }
}

@media (max-width: 430px) {
  .img-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* مصدر صور الاستراتيجيات — مخفي بصرياً، يُملأ قبل فتح نفس مستعرض المعرض */
.strategy-lightbox-source-grid {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.strategy-card {
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.strategy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.strategy-card:focus {
  outline: none;
}

.strategy-card:focus-visible {
  outline: 2px solid rgba(120, 170, 255, 0.85);
  outline-offset: 3px;
}

.strategy-card-preview {
  margin: 0 0 12px;
}

.strategy-card-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  border-radius: 10px;
  overflow: hidden;
}

.strategy-card-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.15);
}

.strategy-card-meta {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 980px) {
  .gallery-filter-row {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-filter-row {
    grid-template-columns: 1fr;
  }

  .gallery-filter-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- زر العودة للأعلى ---------- */
#scroll-top {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 200;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(11, 18, 48, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: all var(--t-med) var(--ease);
  box-shadow: var(--glass-shadow-soft);
}

#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scroll-top:hover {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.4), rgba(167, 139, 250, 0.4));
  border-color: rgba(125, 211, 252, 0.5);
}

/* ---------- التذييل ---------- */
.footer {
  margin-top: 60px;
  padding: 36px 24px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(11, 18, 48, 0.55);
  backdrop-filter: blur(20px);
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 4px 0;
}

.footer .footer-strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- التذييل التوقيعي داخل الأقسام ---------- */
.signature-row {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- شارة المعلم ---------- */
.teacher-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  margin: 3px 4px 3px 0;
  min-height: 34px;
  vertical-align: middle;
}

.teacher-badges-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 3px 4px 3px 0;
  vertical-align: middle;
}

.teacher-badges-row .teacher-badge {
  margin-bottom: 0;
  min-height: 34px;
}

.teacher-badge .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #0b1230;
  overflow: hidden;
}

.teacher-badge .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teacher-badge .avatar.avatar-fallback {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.7), rgba(167, 139, 250, 0.7));
  color: #0b1230;
}

.teacher-badge .avatar.avatar-fallback i {
  font-size: 0.72rem;
}

@media (max-width: 560px) {
  .teacher-badges-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- الخاتمة ---------- */
.closing-card {
  text-align: center;
  padding: 50px 32px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.10), rgba(167, 139, 250, 0.10)),
    var(--glass-bg);
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: var(--r-xl);
  backdrop-filter: blur(28px);
}

.closing-card h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.closing-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 12px;
}

/* ---------- التحركات الناعمة عند الظهور ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* تأخير تدريجي للشبكات — كل بطاقة تظهر بعد السابقة */
.reveal .card:nth-child(2),
.reveal .section-tile:nth-child(2) { transition-delay: 0.06s; }
.reveal .card:nth-child(3),
.reveal .section-tile:nth-child(3) { transition-delay: 0.12s; }
.reveal .card:nth-child(4),
.reveal .section-tile:nth-child(4) { transition-delay: 0.18s; }
.reveal .card:nth-child(5),
.reveal .section-tile:nth-child(5) { transition-delay: 0.24s; }
.reveal .card:nth-child(6),
.reveal .section-tile:nth-child(6) { transition-delay: 0.30s; }

/* ---------- الاستجابة للأجهزة (Responsive) ---------- */
@media (max-width: 900px) {
  .container { padding: 0 18px; }
  section { padding: 48px 0; }
  .glass-panel { padding: 24px; border-radius: var(--r-lg); }
  .top-bar { flex-direction: column; }
  .side-nav { top: var(--header-top-height, 120px); }
}

@media (max-width: 600px) {
  .top-bar {
    padding: 4px 8px 6px;
    gap: 2px;
  }
  .top-bar-section-logo {
    display: none !important;
  }
  .top-bar-brand {
    padding-inline-end: 0;
  }

  .side-nav {
    padding: 4px 0;
  }
  .side-nav-scroll {
    padding: 2px 8px;
    gap: 4px;
    justify-content: flex-start;
  }
  .side-nav a {
    padding: 8px 12px;
    font-size: 0.82rem;
    gap: 6px;
  }

  body { font-size: 15px; }
  .hero { padding: 50px 0 24px; }
  .glass-panel h3 { font-size: 1.18rem; }
  .card { padding: 20px; }
  .stat-card .stat-num { font-size: 2.1rem; }
  #scroll-top { left: 16px; bottom: 16px; }
}


/* Mobile final lock: hide circular section logo completely */
@media screen and (max-width: 900px) {
  .top-bar .top-bar-section-logo,
  .top-bar-section-logo,
  .top-bar > .top-bar-section-logo,
  .top-bar div[aria-label="شعار قسم نظام الفصل"],
  .top-bar-section-logo img,
  .top-bar .top-bar-section-logo img {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 420px) {
  .side-nav a {
    padding: 7px 10px;
    font-size: 0.78rem;
    gap: 5px;
  }
}

/* =====================================================================
   إضافات الموقع متعدد الصفحات (Multi-page Site Additions)
   ===================================================================== */

/* انتقال سلس عبر الصفحات (View Transitions API للمتصفحات الحديثة) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-fade-out 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  animation: page-fade-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-fade-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* تحريك ناعم لكامل الصفحة عند تحميلها (fallback) */
body {
  animation: body-load 0.55s var(--ease) both;
}

@keyframes body-load {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- مسار التنقل (Breadcrumb) ---------- */
.breadcrumb {
  margin: 24px 0 14px;
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb .sep {
  color: var(--text-soft);
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

/* ---------- بطل الصفحة (Page Hero) — يختلف عن hero الصفحة الرئيسية ---------- */
.page-hero {
  text-align: center;
  padding: 50px 0 36px;
  position: relative;
}

.page-hero .page-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(125, 211, 252, 0.3);
  font-size: 2rem;
  color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--glass-gloss);
  backdrop-filter: blur(16px);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.25;
  display: inline-block;
  padding-inline: 0.08em;
  overflow: visible;
  background: linear-gradient(135deg, #fff 10%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.85;
}

/* ---------- شريط التنقل بين الصفحات (Page Pager — Prev/Next) ---------- */
.page-pager {
  margin-top: 60px;
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pager-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-gloss);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  transition: all var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
}

.pager-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.10), rgba(167, 139, 250, 0.06));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}

.pager-link:hover {
  border-color: rgba(125, 211, 252, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.pager-link:hover::before { opacity: 1; }

.pager-link .pager-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.pager-link .pager-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.pager-link .pager-text .label {
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.pager-link .pager-text .title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.pager-link.prev { text-align: right; }

.pager-link.next {
  text-align: left;
  flex-direction: row-reverse;
}

.pager-link.next .pager-text { text-align: left; }

@media (max-width: 700px) {
  .page-pager { grid-template-columns: 1fr; }
}

/* ---------- صفحة الهوية (Home / Landing) ---------- */
.cinema-hero {
  text-align: center;
  padding: 80px 16px 60px;
  position: relative;
}

.cinema-hero .crest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  margin-top: 16px;
  margin-bottom: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  backdrop-filter: blur(14px);
}

.cinema-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 35%, var(--accent-2) 65%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 30px rgba(125, 211, 252, 0.15);
}

.cinema-hero h2 {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 22px;
  line-height: 1.85;
}

.cinema-hero .cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.35), rgba(167, 139, 250, 0.3));
  border: 1px solid rgba(125, 211, 252, 0.5);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--t-med) var(--ease);
  font-family: inherit;
  box-shadow: 0 10px 28px rgba(125, 211, 252, 0.18), inset 0 1px 0 var(--glass-gloss);
  backdrop-filter: blur(16px);
}

.btn-large:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 42px rgba(125, 211, 252, 0.32), inset 0 1px 0 var(--glass-gloss);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.5), rgba(167, 139, 250, 0.45));
}

.btn-large.btn-ghost {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow-soft);
}

.btn-large.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- بطاقات الأقسام (Section Tiles على الصفحة الرئيسية) ---------- */
.section-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-gloss);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: all var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.section-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.08), rgba(167, 139, 250, 0.06));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}

.section-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--glass-gloss);
}

.section-tile:hover::after { opacity: 1; }

.section-tile .tile-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.22), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(125, 211, 252, 0.32);
  font-size: 1.35rem;
  color: var(--accent);
  box-shadow: inset 0 1px 0 var(--glass-gloss);
}

.section-tile .tile-num {
  position: absolute;
  top: 18px;
  left: 22px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  font-family: 'Tajawal', sans-serif;
}

.section-tile h4 {
  position: relative;
  z-index: 1;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}

.section-tile p {
  position: relative;
  z-index: 1;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0;
}

.section-tile .tile-arrow {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  transition: gap var(--t-fast) var(--ease);
}

.section-tile:hover .tile-arrow { gap: 10px; }

.report-sections-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .report-sections-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .report-sections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .report-sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .report-sections-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- شريط مؤشر التقدم في القراءة (اختياري في رأس الصفحة) ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  z-index: 300;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.6);
}

/* ---------- ميزة المعلم في الصفحة الرئيسية (Team Strip) ---------- */
.team-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .team-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .team-strip {
    grid-template-columns: 1fr;
  }
}

/* صورة جماعية للفريق — الرئيسية */
.home-team-photo-wrap {
  max-width: 920px;
  margin: 0 auto 28px;
}

.home-team-photo-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    var(--glass-shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(125, 211, 252, 0.12);
  background: rgba(5, 12, 40, 0.55);
  line-height: 0;
}

.home-team-photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(2, 6, 32, 0.35);
}

.home-team-photo-frame img {
  width: 100%;
  height: clamp(260px, 40vw, 460px);
  display: block;
  object-fit: cover;
  object-position: center 66%;
}

@media print {
  .home-team-photo-frame img {
    max-height: none;
  }
}

.team-member {
  text-align: center;
  padding: 24px 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  transition: all var(--t-fast) var(--ease);
}

.team-member:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(125, 211, 252, 0.3);
}

.team-member .avatar-lg {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(125, 211, 252, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: rgba(224, 242, 254, 0.95);
  box-shadow: inset 0 1px 6px rgba(125, 211, 252, 0.12);
  overflow: hidden;
}

.team-member .avatar-photo-slot i {
  font-size: 1.35rem;
  opacity: 0.9;
}

.avatar-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
  display: block;
}

.avatar-photo-slot i {
  font-size: 1.35rem;
  opacity: 0.9;
}

.avatar-photo-slot {
  border-radius: 50%;
  overflow: hidden;
}

.team-member .avatar-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* تمركز أعلى قليلًا لإبراز الوجه (نفس أسلوب بطاقة هاشم) */
  object-position: 50% 20%;
  transform: scale(1.1);
  transform-origin: center top;
  border-radius: 50%;
  display: block;
}

.team-member .avatar-photo-slot img.avatar-fadel {
  transform: scale(1);
  object-position: 50% 22%;
  transform-origin: center top;
}

.team-member .avatar-photo-slot img.avatar-hashem {
  transform: scale(1);
  object-position: 50% 22%;
  transform-origin: center top;
}

/* صورة المعلم داخل صفحات الإنجازات */
.teacher-profile-avatar {
  width: 132px !important;
  height: 132px !important;
  margin: 0 auto 12px !important;
  border: none !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow:
    0 12px 26px rgba(11, 18, 48, 0.3),
    0 0 22px rgba(125, 211, 252, 0.22),
    inset 0 1px 8px rgba(125, 211, 252, 0.14);
}

.teacher-profile-avatar img.avatar-fadel {
  transform: scale(1);
  object-position: 50% 22%;
  transform-origin: center top;
}

.teacher-profile-avatar img.avatar-hashem {
  transform: scale(1);
  object-position: 50% 22%;
  transform-origin: center top;
}

.team-member .name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  display: inline-block;
  padding-inline: 0.06em;
  overflow: visible;
}

a.team-member-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ---------- بطاقات إنجازات صفحات المعلمين ---------- */
.teacher-achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.teacher-achievement-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 16px 16px 12px;
}

.teacher-achievement-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.teacher-achievement-card ul {
  margin: 0;
  padding-right: 18px;
}

.teacher-achievement-card li {
  margin-bottom: 7px;
  color: var(--text-muted);
}

/* ---------- مستعرض PDF (بنفس روح مستعرض الصور) ---------- */
.pdf-lightbox {
  position: absolute;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(5, 10, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
}

.pdf-lightbox.is-open {
  display: flex;
}

.pdf-lightbox-shell {
  position: relative;
  width: min(1120px, calc(100vw - 90px));
  height: min(84vh, calc(100vh - 72px));
  max-height: calc(100dvh - 48px);
  background: rgba(10, 18, 45, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-lightbox-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(8, 12, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.pdf-lightbox-title {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
}

.pdf-lightbox-close {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 28, 0.75);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.pdf-lightbox-open {
  border: 1px solid rgba(125, 211, 252, 0.4);
  background: rgba(9, 26, 51, 0.72);
  color: #7dd3fc;
  border-radius: 10px;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 700;
}

.pdf-lightbox-loading {
  position: absolute;
  inset: 62px 8px 8px 8px;
  display: none;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 12px;
  z-index: 2;
}

.pdf-lightbox-frame {
  width: 100%;
  height: calc(100% - 54px);
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  background: rgba(9, 13, 33, 0.92);
}

@media (max-width: 900px) {
  .pdf-lightbox-shell {
    width: min(94vw, 820px);
    height: min(80vh, 680px);
    max-height: calc(100dvh - 56px);
  }
}

.team-member .role {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ---------- عند كون شريط التنقل يحوي عنصر صفحة فعّال ---------- */
.side-nav a.is-current {
  color: var(--text);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.28), rgba(167, 139, 250, 0.22));
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: inset 0 1px 0 var(--glass-gloss), 0 4px 14px rgba(125, 211, 252, 0.18);
}

/* =====================================================================
   إضافات لوحة الإحصائيات (Statistics Dashboard)
   ===================================================================== */

/* ---------- بطاقة إحصائية بارزة (Hero Stat) ---------- */
.hero-stat-card {
  text-align: center;
  padding: 30px 20px;
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.10), rgba(167, 139, 250, 0.06)),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-gloss);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  position: relative;
  overflow: hidden;
  transition: all var(--t-med) var(--ease);
}

.hero-stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.18), transparent 70%);
  filter: blur(20px);
}

.hero-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-stat-card .stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.22), rgba(167, 139, 250, 0.18));
  border: 1px solid rgba(125, 211, 252, 0.32);
  font-size: 1.3rem;
  color: var(--accent);
}

.hero-stat-card .big-num {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  position: relative;
}

.hero-stat-card .big-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.hero-stat-card .big-sub {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ---------- صفوف الأشرطة البيانية (Bar Chart Rows) ---------- */
.bar-row {
  margin: 18px 0;
}

.bar-row + .bar-row {
  margin-top: 16px;
}

.bar-row .bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.bar-row .bar-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
}

.bar-row .bar-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  font-family: 'Tajawal', sans-serif;
}

.bar-track {
  position: relative;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  animation: bar-grow 1.4s var(--ease) forwards;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.5);
}

/* في وضع RTL، الشريط ينمو من اليمين لليسار تلقائياً عبر التحول */
[dir="rtl"] .bar-fill {
  inset: 0 0 0 auto;
}

@keyframes bar-grow {
  from { width: 0; }
  to { width: var(--bar-width, 0%); }
}

/* ألوان مختلفة للأشرطة */
.bar-fill.b-cyan   { background: linear-gradient(90deg, #7dd3fc, #38bdf8); }
.bar-fill.b-purple { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.bar-fill.b-pink   { background: linear-gradient(90deg, #f0abfc, #d946ef); }
.bar-fill.b-gold   { background: linear-gradient(90deg, #fde68a, #fbbf24); }
.bar-fill.b-green  { background: linear-gradient(90deg, #6ee7b7, #34d399); }
.bar-fill.b-blue   { background: linear-gradient(90deg, #93c5fd, #3b82f6); }

/* ---------- مخطط دائري (Donut Chart SVG) ---------- */
.donut-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 10px;
}

.donut-chart {
  width: clamp(200px, 28vw, 260px);
  height: clamp(200px, 28vw, 260px);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35));
}

.donut-chart .donut-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 32;
}

.donut-chart .donut-seg {
  fill: none;
  stroke-width: 32;
  stroke-linecap: butt;
  transition: stroke-width var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
  transform-origin: center;
  /* الرسم يبدأ من الأعلى */
  animation: donut-draw 1.6s var(--ease) both;
}

.donut-chart .donut-seg:hover {
  stroke-width: 36;
  filter: brightness(1.18);
}

@keyframes donut-draw {
  from {
    stroke-dasharray: 0 600;
  }
  /* القيمة الفعلية تأتي من الـ inline style */
}

.donut-center-num {
  font-size: 2.4rem;
  font-weight: 900;
  fill: #fff;
  font-family: 'Tajawal', sans-serif;
}

.donut-center-label {
  font-size: 0.82rem;
  fill: var(--text-muted);
  font-family: 'Tajawal', sans-serif;
}

.donut-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}

.donut-legend .legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.donut-legend .legend-item .legend-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.donut-legend .legend-item .legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.donut-legend .legend-item .legend-val {
  font-weight: 800;
  color: var(--text);
}

/* ---------- الخط الزمني (Timeline) ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(125, 211, 252, 0.5) 10%,
    rgba(167, 139, 250, 0.5) 50%,
    rgba(240, 171, 252, 0.5) 90%,
    transparent
  );
  z-index: 0;
}

.timeline-item {
  position: relative;
  z-index: 1;
  padding: 22px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-gloss);
  border-radius: var(--r-md);
  transition: all var(--t-med) var(--ease);
}

.timeline-item:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.timeline-item .tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 3px solid #0b1230;
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.4), 0 0 14px rgba(125, 211, 252, 0.6);
  margin: -32px auto 14px;
  position: relative;
  z-index: 2;
}

.timeline-item .tl-date {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.timeline-item .tl-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-align: center;
}

.timeline-item .tl-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
}

.timeline-item .teacher-badge,
.timeline-item .teacher-badges-row {
  justify-content: center;
}

.timeline-item .teacher-badge {
  display: flex;
  width: fit-content;
  margin: 8px auto 0 !important;
}

.timeline-item .teacher-badges-row {
  display: flex;
  width: 100%;
  margin-top: 8px !important;
}


@media (max-width: 1200px) {
  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .timeline {
    grid-template-columns: 1fr;
  }
  .timeline::before { display: none; }
  .timeline-item .tl-dot { margin: 0 auto 14px; }
}

/* ---------- مساهمة المعلم (Teacher Contribution Card) ---------- */
.teacher-contrib {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teacher-contrib .contrib-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--glass-border);
}

.teacher-contrib .contrib-head strong {
  font-size: 1.05rem;
  color: var(--text);
}

.teacher-contrib .contrib-badge {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.10));
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: var(--accent-gold);
  white-space: nowrap;
}

/* ---------- صندوق الأدوات (Tools Pillbox) ---------- */
.pillbox {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  transition: all var(--t-fast) var(--ease);
}

.pill:hover {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.14));
  border-color: rgba(125, 211, 252, 0.4);
  transform: translateY(-2px);
}

.pill i {
  font-size: 0.95rem;
  color: var(--accent);
}

/* ---------- شارة الدلالة (Stat Caption) ---------- */
.stat-caption {
  text-align: center;
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

/* ---------- وضع الطباعة (Print / PDF Export) ---------- */
@media print {
  /* خلفية بيضاء وألوان داكنة للطباعة */
  body {
    background: #fff !important;
    color: #0b1230 !important;
    padding-top: 0 !important; /* لا حاجة لمسافة علوية لأنّ الهيدر يصبح relative */
  }
  .bg-gradient, .bg-noise, .orbs, #scroll-top, .top-bar-actions, .side-nav,
  .filter-bar, .filter-tabs-wrapper, .page-pager, .breadcrumb, .read-progress,
  .top-bar-meta { display: none !important; }

  .container { max-width: 100%; padding: 0 14px; }

  .top-bar {
    position: relative !important; /* لا fixed عند الطباعة */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: #fff !important;
    border-bottom: 2px solid #0b1230;
    backdrop-filter: none !important;
    box-shadow: none;
    display: flex !important;
    justify-content: center !important;
    min-height: auto !important;
    padding: 12px !important;
  }

  .top-bar::after { display: none !important; }
  .top-bar-section-logo { display: none !important; }

  /* شريط التنقّل مخفي بالفعل في الطباعة لكن نلغي الـ fixed احتياطاً */
  .side-nav {
    position: relative !important;
    top: auto !important;
  }

  .top-bar-brand img {
    /* استرجاع ألوان الشعار الأصلية عند الطباعة */
    filter: none !important;
    opacity: 1 !important;
  }

  .top-bar-brand .brand-text strong,
  .hero h1, .section-head h2, .closing-card h2,
  .glass-panel h3 {
    color: #0b1230 !important;
    -webkit-text-fill-color: #0b1230 !important;
    background: none !important;
  }

  .glass-panel, .card, .closing-card, .initiative-featured {
    background: #fff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    page-break-inside: avoid;
    color: #1e293b !important;
  }

  .initiative-featured-title,
  .initiative-block-title,
  .initiative-featured-deck {
    color: #0b1230 !important;
    -webkit-text-fill-color: #0b1230 !important;
  }

  .initiative-block-text,
  .initiative-feature-list,
  .initiative-feature-list li {
    color: #334155 !important;
  }

  .initiative-featured-icon {
    background: #e0e7ff !important;
    border-color: #c7d2fe !important;
    color: #1e3a8a !important;
    box-shadow: none !important;
  }

  .initiative-block + .initiative-block {
    border-top-color: #cbd5e1 !important;
  }

  .card h4 { color: #0b1230 !important; }
  .card p, .card li, .card .meta,
  .hero h2, .section-head p, .footer p,
  .closing-card p {
    color: #334155 !important;
  }

  .stat-card .stat-num {
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
    background: none !important;
  }

  .label { color: #1e3a8a !important; background: #e0e7ff !important; border-color: #c7d2fe !important; }

  .glass-table th { background: #e0e7ff !important; color: #1e3a8a !important; }
  .glass-table td { color: #1e293b !important; border-color: #cbd5e1 !important; }

  .img-placeholder {
    border: 1.5px dashed #94a3b8 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
  }

  /* فتح كل البطاقات القابلة للتوسيع تلقائياً عند الطباعة */
  .expandable .expandable-body { max-height: none !important; margin-top: 14px !important; }
  .expandable .toggle { display: none; }

  /* فصل كل قسم على صفحة جديدة */
  section { page-break-before: auto; }
  .glass-panel { page-break-inside: avoid; }

  /* ----- عناصر الإحصائيات في الطباعة ----- */
  .hero-stat-card,
  .timeline-item {
    background: #fff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: none !important;
  }

  .hero-stat-card .big-num {
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
    background: none !important;
  }

  .hero-stat-card .stat-icon {
    background: #e0e7ff !important;
    border-color: #c7d2fe !important;
    color: #1e3a8a !important;
  }

  .bar-track {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
  }

  .bar-fill {
    animation: none !important;
    width: var(--bar-width, 0%) !important;
  }

  .donut-chart {
    filter: none !important;
  }

  .donut-chart .donut-seg {
    animation: none !important;
  }

  .donut-center-num {
    fill: #1e3a8a !important;
  }

  .donut-center-label {
    fill: #475569 !important;
  }

  .timeline::before {
    background: #cbd5e1 !important;
  }

  .timeline-item .tl-dot {
    background: #3b82f6 !important;
    border-color: #fff !important;
    box-shadow: 0 0 0 2px #cbd5e1 !important;
  }

  .timeline-item .tl-date {
    color: #1e3a8a !important;
  }

  .timeline-item .tl-title {
    color: #0b1230 !important;
  }

  .timeline-item .tl-desc {
    color: #475569 !important;
  }

  /* خيار 1: أبيض وأسود كامل (كل شيء أسود على خلفية بيضاء) */
  body.print-bw,
  body.print-bw * {
    -webkit-print-color-adjust: economy !important;
    print-color-adjust: economy !important;
    color: #000 !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  body.print-bw {
    background: #fff !important;
    filter: none !important;
  }

  body.print-bw .bg-gradient,
  body.print-bw .bg-noise,
  body.print-bw .orbs {
    display: none !important;
  }

  body.print-bw .glass-panel,
  body.print-bw .card,
  body.print-bw .closing-card,
  body.print-bw .hero-stat-card,
  body.print-bw .timeline-item,
  body.print-bw .pill,
  body.print-bw .label,
  body.print-bw .donut-legend .legend-item {
    background: #fff !important;
    border: 1.5px solid #000 !important;
  }

  body.print-bw .section-tile,
  body.print-bw .pager-link,
  body.print-bw .teacher-badge,
  body.print-bw .contrib-badge,
  body.print-bw .btn,
  body.print-bw .btn-large,
  body.print-bw .btn-large.btn-ghost,
  body.print-bw .bar-track,
  body.print-bw .img-placeholder,
  body.print-bw .signature-row span,
  body.print-bw .donut-chart,
  body.print-bw .top-bar {
    background: #fff !important;
    border: 1.5px solid #000 !important;
    color: #000 !important;
  }

  body.print-bw .glass-table,
  body.print-bw .glass-table th,
  body.print-bw .glass-table td,
  body.print-bw table,
  body.print-bw th,
  body.print-bw td {
    border: 1.5px solid #000 !important;
    color: #000 !important;
    background: #fff !important;
  }

  body.print-bw .timeline::before,
  body.print-bw .read-progress,
  body.print-bw .bar-fill,
  body.print-bw .legend-dot,
  body.print-bw .tl-dot,
  body.print-bw .card-icon,
  body.print-bw .stat-icon,
  body.print-bw .tile-icon,
  body.print-bw .pager-icon {
    background: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    fill: #000 !important;
  }

  body.print-bw .bar-head,
  body.print-bw .bar-title,
  body.print-bw .bar-value,
  body.print-bw .stat-num,
  body.print-bw .stat-label,
  body.print-bw .stat-sub,
  body.print-bw .tile-arrow,
  body.print-bw .tile-num,
  body.print-bw .donut-center-num,
  body.print-bw .donut-center-label {
    color: #000 !important;
    fill: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }

  body.print-bw img {
    filter: grayscale(1) contrast(1.08) !important;
  }

  /* خيار 2: ألوان كاملة بدون تبسيط (بما فيها الخلفيات) */
  body.print-color,
  body.print-color * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.print-color {
    background: #020617 !important;
    color: var(--text) !important;
    padding-top: var(--header-total-height) !important;
    filter: none !important;
  }

  body.print-color .bg-gradient,
  body.print-color .bg-noise,
  body.print-color .orbs {
    display: block !important;
  }

  body.print-color .top-bar-actions { display: flex !important; }
  body.print-color .side-nav { display: block !important; }
  body.print-color .page-pager { display: grid !important; }
  body.print-color .breadcrumb { display: flex !important; }
  body.print-color .read-progress { display: block !important; }

  body.print-color .top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--glass-bg) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(22px) saturate(130%) !important;
    box-shadow: var(--glass-shadow-soft) !important;
    justify-content: space-between !important;
    min-height: 96px !important;
    padding: 0 18px !important;
  }

  body.print-color .top-bar-section-logo { display: block !important; }

  body.print-color .glass-panel,
  body.print-color .card,
  body.print-color .closing-card,
  body.print-color .hero-stat-card,
  body.print-color .timeline-item {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow-soft) !important;
    backdrop-filter: blur(18px) saturate(130%) !important;
    color: var(--text) !important;
  }

  body.print-color .card h4,
  body.print-color .section-head h2,
  body.print-color .closing-card h2,
  body.print-color .timeline-item .tl-title,
  body.print-color .donut-legend .legend-item .legend-val {
    color: var(--text) !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
  }

  body.print-color .card p,
  body.print-color .card li,
  body.print-color .section-head p,
  body.print-color .timeline-item .tl-desc,
  body.print-color .donut-legend .legend-item .legend-name {
    color: var(--text-muted) !important;
  }
}

/* Mobile final lock for ministry logo:
   show original img with agreed final size */
@media screen and (max-width: 600px) {
  .top-bar-brand {
    min-height: 67px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .top-bar-brand img {
    display: block !important;
    height: 51px !important;
    width: auto !important;
    margin-top: 10px !important;
    transform: none !important;
  }

  .top-bar-brand::before { content: none !important; display: none !important; }
}

@media screen and (max-width: 420px) {
  .top-bar-brand {
    min-height: 59px !important;
  }

  .top-bar-brand img {
    height: 45px !important;
    margin-top: 9px !important;
  }

  .top-bar-brand::before { content: none !important; display: none !important; }
}

/* FINAL HARD LOCK (mobile): ministry logo size */
@media screen and (max-width: 900px) {
  .top-bar .top-bar-brand > img {
    display: block !important;
    width: auto !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    margin-top: 10px !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  img,
  video,
  canvas,
  iframe {
    max-width: 100%;
  }

  .container,
  main.container,
  .glass-panel,
  .card {
    max-width: 100%;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  li,
  span {
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 420px) {
  .top-bar .top-bar-brand > img {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    margin-top: 10px !important;
  }
}

/* =====================================================================
   🏆 PREMIUM UPGRADE LAYER — قسم نظام الفصل 2026
   تحسينات بصرية وتفاعلية احترافية — بدون تعديل الهوية الأساسية
   ===================================================================== */

/* --- 1. أرقام بطاقات الأقسام بتدرج ذهبي احترافي --- */
.section-tile .tile-num {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.05rem;
  opacity: 1;
  letter-spacing: 0.04em;
}

/* --- 2. Shimmer على زر CTA الرئيسي --- */
.btn-large {
  position: relative;
  overflow: hidden;
}

.btn-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-18deg);
  animation: btn-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%   { left: -80%; opacity: 0; }
  15%  { opacity: 1; }
  50%  { left: 130%; opacity: 1; }
  51%  { opacity: 0; }
  100% { left: 130%; opacity: 0; }
}

/* Pulse ring على زر الـ hero الرئيسي */
.closing-card .btn-large {
  animation: cta-pulse 2.8s ease-out infinite;
}

.closing-card .btn-large:hover {
  animation: none;
}

@keyframes cta-pulse {
  0%   { box-shadow: 0 10px 28px rgba(125, 211, 252, 0.18), inset 0 1px 0 var(--glass-gloss), 0 0 0 0 rgba(125, 211, 252, 0.30); }
  65%  { box-shadow: 0 10px 28px rgba(125, 211, 252, 0.18), inset 0 1px 0 var(--glass-gloss), 0 0 0 14px rgba(125, 211, 252, 0); }
  100% { box-shadow: 0 10px 28px rgba(125, 211, 252, 0.18), inset 0 1px 0 var(--glass-gloss), 0 0 0 0 rgba(125, 211, 252, 0); }
}

/* --- 3. تحسين Footer بخط تمييز متدرج --- */
.footer {
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(125, 211, 252, 0.5),
    rgba(167, 139, 250, 0.5),
    rgba(240, 171, 252, 0.4),
    transparent
  );
}

/* --- 4. Glow على صور الفريق عند Hover --- */
.team-member:hover .avatar-lg {
  box-shadow:
    0 0 0 3px rgba(125, 211, 252, 0.22),
    0 0 28px rgba(125, 211, 252, 0.30),
    inset 0 1px 8px rgba(125, 211, 252, 0.15);
  border-color: rgba(125, 211, 252, 0.7);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.team-member .avatar-lg {
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* --- 5. Section-tile: glow خفيف لحواف البطاقة عند الـ hover --- */
.section-tile:hover {
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 var(--glass-gloss),
    0 0 0 1px rgba(125, 211, 252, 0.18),
    0 0 30px rgba(125, 211, 252, 0.08);
}

/* --- 6. Stat cards: خط علوي ملون وأرقام أكثر حضوراً --- */
.stat-card {
  border-top: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.stat-card:hover::before {
  opacity: 1;
}

/* عداد الأرقام — يُعبأ بـ JS */
.stat-num {
  display: block;
  line-height: 1.1;
}

/* --- 7. تحسين glass-panel h3 — نقطة متحركة --- */
.glass-panel h3::before {
  content: '';
  width: 4px;
  min-width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: height 0.3s var(--ease);
}

.glass-panel:hover h3::before {
  height: 28px;
}

/* --- 8. Focus-visible احترافي لجميع العناصر التفاعلية --- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.filter-chip:focus-visible,
.expandable:focus-visible,
.section-tile:focus-visible,
.team-member-link:focus-visible,
.pager-link:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- 9. Enhanced closing-card --- */
.closing-card {
  position: relative;
  overflow: hidden;
}

.closing-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.closing-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* --- 10. تأثير ظهور Hero السينمائي --- */
.cinema-hero h1 {
  animation: hero-text-in 1s var(--ease) both;
}

.cinema-hero h2 {
  animation: hero-text-in 1s 0.15s var(--ease) both;
}

.cinema-hero .hero-meta {
  animation: hero-text-in 1s 0.28s var(--ease) both;
}

@keyframes hero-text-in {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* --- 11. team-member — gradient border خفيف --- */
.team-member {
  position: relative;
}

/* --- 12. scroll-top — gradient احترافي --- */
#scroll-top.visible {
  background: linear-gradient(135deg, rgba(11, 18, 48, 0.85), rgba(28, 32, 86, 0.85));
}

/* --- 13. page-hero icon glow --- */
.page-hero .page-hero-icon {
  animation: icon-float 4s ease-in-out infinite alternate;
}

@keyframes icon-float {
  from { transform: translateY(0px); box-shadow: 0 12px 30px rgba(0,0,0,0.3), inset 0 1px 0 var(--glass-gloss); }
  to   { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(125, 211, 252, 0.15), inset 0 1px 0 var(--glass-gloss); }
}

/* --- 14. تحسين team.role --- */
.team-member .role {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  opacity: 0.85;
}

/* --- 15b. تحسينات صفحات المعلمين --- */

/* أزرار التوثيق المعطلة — تظهر بشكل رمادي واضح */
.pill:disabled,
.pill[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* teacher-achievement-card — تحسين المظهر */
.teacher-achievement-card {
  border-top: 2px solid transparent;
  background-image: linear-gradient(var(--glass-bg), var(--glass-bg)),
    linear-gradient(135deg, rgba(125, 211, 252, 0.2), rgba(167, 139, 250, 0.15));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.teacher-achievement-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* teacher-profile-avatar — ring متوهج */
.page-hero .teacher-profile-avatar {
  position: relative;
}

.page-hero .teacher-profile-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.35), rgba(167, 139, 250, 0.3));
  z-index: -1;
  filter: blur(6px);
  opacity: 0.7;
}

/* --- Reduced Motion — احترام تفضيلات المستخدم --- */
@media (prefers-reduced-motion: reduce) {
  .cinema-hero h1,
  .cinema-hero h2,
  .cinema-hero .hero-meta,
  .btn-large::before,
  .closing-card .btn-large,
  .page-hero .page-hero-icon {
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
