/* ══════════════════════════════════════════
   متغيرات التصميم
══════════════════════════════════════════ */
:root {
  --primary:        #0B6B3A;
  --primary-dark:   #084d2a;
  --primary-light:  #1FAF5A;
  --primary-soft:   #e8f5ee;
  --gold:           #D4AF37;
  --gold-light:     #f0d060;
  --gold-soft:      #fdf8e1;
  --white:          #ffffff;
  --bg:             #f7f9fc;
  --card-bg:        #ffffff;
  --text-dark:      #1a2332;
  --text-mid:       #4a5568;
  --text-light:     #718096;
  --border:         #e2e8f0;
  --shadow-xs:      0 1px 4px rgba(11,107,58,.06);
  --shadow-sm:      0 2px 10px rgba(11,107,58,.09);
  --shadow-md:      0 6px 20px rgba(11,107,58,.13);
  --shadow-lg:      0 12px 40px rgba(11,107,58,.18);
  --shadow-gold:    0 4px 20px rgba(212,175,55,.3);
  --radius:         14px;
  --radius-sm:      8px;
  --radius-lg:      22px;
  --radius-xl:      32px;
  --transition:     all .3s cubic-bezier(.4,0,.2,1);
  --header-h:       72px;
}

/* ══════════════════════════════════════════
   إعادة الضبط
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', 'Arial', sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ══════════════════════════════════════════
   تخطيط عام
══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════════
   الرأس
══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  height: var(--header-h);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-logo {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.nav-logo::after { content: 'م'; }
.nav-info { display: flex; flex-direction: column; }
.school-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}
.school-sub {
  font-size: .72rem;
  color: var(--text-light);
  font-weight: 400;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-links .nav-admin-btn {
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-links .nav-admin-btn:hover {
  background: var(--primary-dark);
  color: white;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  padding: 4px 8px;
}

/* ══════════════════════════════════════════
   القسم البطولي (Hero)
══════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(140deg, var(--primary-dark) 0%, var(--primary) 55%, #0f9950 100%);
  overflow: hidden;
  padding: 90px 0 80px;
  text-align: center;
}
.hero-bg-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
}
.hero-circle-1 {
  width: 520px; height: 520px;
  background: var(--gold);
  top: -180px; right: -100px;
}
.hero-circle-2 {
  width: 360px; height: 360px;
  background: white;
  bottom: -120px; left: -80px;
}
.hero-circle-3 {
  width: 200px; height: 200px;
  background: var(--gold-light);
  top: 40%; left: 10%;
  opacity: .07;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  padding: 8px 22px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  color: white;
  line-height: 1.25;
  margin-bottom: 18px;
  text-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.hero-title span.gold { color: var(--gold-light); }
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 36px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: .01em;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--gold);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   أزرار
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid transparent;
  font-family: inherit;
  cursor: pointer;
}
.btn-gold {
  background: var(--gold);
  color: var(--primary-dark);
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,175,55,.4);
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.5);
  color: white;
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
}
.btn-link {
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.btn-link:hover { color: var(--primary-light); gap: 8px; }

/* ══════════════════════════════════════════
   شريط الإحصائيات
══════════════════════════════════════════ */
.stats-bar {
  background: white;
  box-shadow: var(--shadow-xs);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 40px;
  border-left: 1px solid var(--border);
}
.stat-item:last-child { border-left: none; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 500;
}

/* ══════════════════════════════════════════
   أقسام عامة
══════════════════════════════════════════ */
.section { padding: 70px 0; }
.section-alt { background: var(--bg); }
.section-white { background: white; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 14px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--primary-light));
  border-radius: 2px;
}
.section-sub {
  color: var(--text-light);
  font-size: .95rem;
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   بطاقات الفئات
══════════════════════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.category-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  border: 2px solid transparent;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: var(--cat-color, var(--primary));
  transition: var(--transition);
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--cat-color, var(--border));
}
.cat-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
  background: var(--cat-bg, var(--primary-soft));
  transition: var(--transition);
}
.category-card:hover .cat-icon { transform: scale(1.1); }
.cat-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.cat-count {
  font-size: .8rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ══════════════════════════════════════════
   شبكة الإنجازات
══════════════════════════════════════════ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.achievement-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.achievement-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.card-image-wrap img,
.card-image-wrap .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.achievement-card:hover .card-image-wrap img { transform: scale(1.06); }
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--cat-bg, #f0f4f8), var(--cat-soft, #e8f0e8));
}
.card-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  color: white;
  background: var(--cat-color, var(--primary));
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: .85rem;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-date { font-size: .78rem; color: var(--text-light); }
.card-arrow {
  color: var(--primary);
  font-size: 1.1rem;
  transition: var(--transition);
}
.achievement-card:hover .card-arrow { transform: translateX(-4px); }

/* ══════════════════════════════════════════
   فلتر الفئات
══════════════════════════════════════════ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  align-items: center;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 100px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text-mid);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════
   صفحة تفاصيل الإنجاز
══════════════════════════════════════════ */
.detail-page { padding: 50px 0 80px; }
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-mid);
  font-size: .9rem;
  margin-bottom: 28px;
  transition: var(--transition);
}
.detail-back:hover { color: var(--primary); gap: 10px; }
.detail-hero {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  border: 1px solid var(--border);
}
.detail-image-wrap {
  aspect-ratio: 16/7;
  overflow: hidden;
  background: var(--bg);
}
.detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, #e8f5ee, #d1ece2);
  min-height: 300px;
}
.detail-body { padding: 36px 40px; }
.detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.detail-badge {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 700;
  color: white;
}
.detail-date { font-size: .85rem; color: var(--text-light); }
.detail-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 20px;
}
.detail-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.9;
  white-space: pre-wrap;
}
.detail-reference {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--primary-soft);
  border-right: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  color: var(--primary-dark);
}
.detail-reference strong { font-weight: 700; }

/* ══════════════════════════════════════════
   الإنجازات ذات الصلة
══════════════════════════════════════════ */
.related-section { padding: 50px 0; background: var(--bg); }

/* ══════════════════════════════════════════
   حالات التحميل والفراغ
══════════════════════════════════════════ */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1.1rem; font-weight: 700; color: var(--text-mid); margin-bottom: 8px; }
.empty-sub { font-size: .88rem; }

/* ══════════════════════════════════════════
   التذييل
══════════════════════════════════════════ */
.site-footer {
  background: linear-gradient(135deg, var(--primary-dark), #0a5c32);
  color: rgba(255,255,255,.85);
  padding: 60px 0 0;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-logo {
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.footer-logo::after { content: 'م'; }
.footer-brand h3 { font-size: 1rem; font-weight: 700; color: white; margin-bottom: 6px; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-links h4, .footer-categories h4 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-links ul li, .footer-categories ul li { margin-bottom: 10px; }
.footer-links ul a, .footer-categories ul a {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  transition: var(--transition);
}
.footer-links ul a:hover, .footer-categories ul a:hover {
  color: white;
  padding-right: 6px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

/* ══════════════════════════════════════════
   إشعارات التنبيه
══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 90px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: white;
  box-shadow: var(--shadow-md);
  animation: slideInLeft .3s ease forwards;
  pointer-events: all;
  max-width: 320px;
}
.toast-success { background: var(--primary); }
.toast-error   { background: #e53e3e; }

/* ══════════════════════════════════════════
   الصفحة - عنوان الصفحة الداخلية
══════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 50px 0 45px;
  text-align: center;
  color: white;
}
.page-hero h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.page-hero p { font-size: .95rem; color: rgba(255,255,255,.75); }

/* ══════════════════════════════════════════
   معلمة مميزة خلال الشهر - بطاقة مميزة
══════════════════════════════════════════ */
.teacher-spotlight {
  background: linear-gradient(135deg, #fdf0f7 0%, #fff 60%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(233,30,140,.12);
  display: flex;
  gap: 0;
  transition: var(--transition);
}
.teacher-spotlight:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.teacher-img-side {
  width: 280px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #E91E8C22, #E91E8C44);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  min-height: 240px;
}
.teacher-img-side img { width: 100%; height: 100%; object-fit: cover; }
.teacher-info-side { padding: 32px; flex: 1; }
.teacher-crown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E91E8C;
  color: white;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.teacher-name { font-size: 1.5rem; font-weight: 900; color: var(--text-dark); margin-bottom: 10px; }
.teacher-desc { font-size: .95rem; color: var(--text-mid); line-height: 1.8; }
.teacher-date { font-size: .8rem; color: #E91E8C; margin-top: 14px; font-weight: 600; }

/* معلمون إضافيون - شبكة صغيرة */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.teacher-mini-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.teacher-mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.teacher-mini-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #fdf0f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.teacher-mini-img img { width: 100%; height: 100%; object-fit: cover; }
.teacher-mini-info { padding: 14px; }
.teacher-mini-name { font-size: .9rem; font-weight: 700; color: var(--text-dark); }
.teacher-mini-date { font-size: .75rem; color: #E91E8C; margin-top: 4px; }

/* ══════════════════════════════════════════
   شركاء النجاح
══════════════════════════════════════════ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.partner-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.partner-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #0EA5E9; }
.partner-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #f0f9ff, #0EA5E922);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 3px solid #0EA5E922;
}
.partner-img img { width: 100%; height: 100%; object-fit: cover; }
.partner-name { font-size: .95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.partner-desc { font-size: .8rem; color: var(--text-light); line-height: 1.6; }

/* ══════════════════════════════════════════
   سفيرة قيم
══════════════════════════════════════════ */
.ambassador-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.ambassador-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.ambassador-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.ambassador-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, #7C3AED, #A855F7);
}
.ambassador-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f3ff, #7C3AED22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.ambassador-img img { width: 100%; height: 100%; object-fit: cover; }
.ambassador-body { padding: 18px; }
.ambassador-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f5f3ff;
  color: #7C3AED;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.ambassador-name { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.ambassador-desc { font-size: .83rem; color: var(--text-mid); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ══════════════════════════════════════════
   المسابقات الوطنية
══════════════════════════════════════════ */
.competitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.competition-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.competition-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #DC2626; }
.competition-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #fff5f5, #DC262622);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}
.competition-img img { width: 100%; height: 100%; object-fit: cover; }
.competition-medal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: var(--primary-dark);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-gold);
}
.competition-body { padding: 18px; }
.competition-title { font-size: 1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.competition-desc { font-size: .83rem; color: var(--text-mid); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.competition-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.competition-date { font-size: .78rem; color: var(--text-light); }
.competition-badge { padding: 4px 10px; background: #fff5f5; color: #DC2626; border-radius: 100px; font-size: .72rem; font-weight: 700; }

/* ══════════════════════════════════════════
   شارة الحالة (مرئي/مخفي)
══════════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
}
.status-pill.active   { background: #f0fdf4; color: #166534; }
.status-pill.inactive { background: #fef2f2; color: #991b1b; }

/* صفحة القسم العامة */
.section-page-hero {
  background: linear-gradient(140deg, var(--section-color-dark, var(--primary-dark)), var(--section-color, var(--primary)));
  padding: 60px 0 50px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.section-page-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.section-page-hero .hero-icon { font-size: 3.5rem; margin-bottom: 14px; }
.section-page-hero h1 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.section-page-hero p { font-size: .95rem; color: rgba(255,255,255,.8); }

/* استجابة للأقسام الجديدة */
@media (max-width: 768px) {
  .teacher-spotlight { flex-direction: column; }
  .teacher-img-side  { width: 100%; min-height: 200px; }
  .teacher-grid      { grid-template-columns: repeat(2, 1fr); }
  .partners-grid     { grid-template-columns: repeat(2, 1fr); }
  .ambassador-grid   { grid-template-columns: 1fr; }
  .competitions-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .teacher-grid  { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   أنيميشن الظهور
══════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   كي-فريمز
══════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════════
   استجابة للشاشات الصغيرة
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: fixed; top: var(--header-h); right: 0; left: 0; background: white; padding: 20px; gap: 8px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 60px 0 50px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .achievements-grid { grid-template-columns: 1fr; }
  .stats-grid { flex-direction: column; }
  .stat-item { border-left: none; border-bottom: 1px solid var(--border); width: 100%; }
  .stat-item:last-child { border-bottom: none; }
  .footer-content { grid-template-columns: 1fr; gap: 28px; }
  .detail-body { padding: 24px 20px; }
  .section-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .school-name { font-size: .8rem; }
}
