/* ==========================================================================
   أكاديمية ريان التعليمية - ملف التنسيق الرئيسي (style.css)
   الخط: Cairo | الاتجاه: RTL | الألوان: أزرق داكن + أبيض + لمسات ذهبية
   ملاحظة: الملف مقسّم إلى أقسام مطابقة لأقسام index.html لتسهيل التعديل
   ========================================================================== */


/* ==========================================================================
   1) المتغيرات العامة (Design Tokens)
   ========================================================================== */
:root {
  /* الألوان الأساسية */
  --color-navy-900: #0a1f44;   /* أزرق داكن أساسي */
  --color-navy-800: #0f2a5c;
  --color-navy-700: #16356f;
  --color-navy-600: #21437f;

  --color-gold: #c9a24b;       /* ذهبي أساسي (لمسات بسيطة) */
  --color-gold-light: #e6c876;
  --color-gold-dark: #a5822f;

  --color-white: #ffffff;
  --color-bg-soft: #f6f7fb;    /* خلفية فاتحة لتبديل الأقسام */
  --color-bg-soft-2: #eef1f8;

  --color-text-main: #1c2434;
  --color-text-muted: #5c6579;
  --color-border: #e4e8f1;

  /* الظلال */
  --shadow-sm: 0 4px 14px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 31, 68, 0.10);
  --shadow-lg: 0 20px 45px rgba(10, 31, 68, 0.16);

  /* الخط */
  --font-main: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;

  /* الانحناءات */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-round: 50%;

  /* الانتقالات */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;

  /* أقصى عرض للمحتوى */
  --container-width: 1200px;

  /* ارتفاع الشريط العلوي (يُستخدم في scroll-padding) */
  --header-height: 82px;
}


/* ==========================================================================
   2) إعادة الضبط والأساسيات (Reset / Base)
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--color-navy-900);
  line-height: 1.35;
}

section {
  position: relative;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gold {
  color: var(--color-gold-dark);
}


/* ==========================================================================
   3) عناصر مشتركة (Section Heading / Buttons)
   ========================================================================== */
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-gold-dark);
  background: rgba(201, 162, 75, 0.1);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.02rem;
}

.section-cta {
  text-align: center;
  margin-top: 44px;
}

/* --- الأزرار --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition-base);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-navy-900);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-gold);
  color: var(--color-navy-900);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy-900);
  border-color: var(--color-navy-900);
}

.btn-outline:hover {
  background: var(--color-navy-900);
  color: var(--color-white);
  transform: translateY(-3px);
}

.btn-small {
  padding: 9px 20px;
  font-size: 0.88rem;
}

.btn-full {
  width: 100%;
}

/* --- عنصر بديل للصور (Image Placeholder) ---
   يُستخدم في كل مكان بانتظار إضافة الصور الحقيقية لاحقًا،
   بدلًا من أي صور مؤقتة من الإنترنت. */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: linear-gradient(135deg, rgba(10, 31, 68, 0.05), rgba(201, 162, 75, 0.08));
  border: 2px dashed rgba(10, 31, 68, 0.2);
  color: var(--color-text-muted);
  text-align: center;
  padding: 12px;
}

.img-placeholder-icon {
  font-size: 1.8rem;
  opacity: 0.55;
  line-height: 1;
}

.img-placeholder-text {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

/* شكل عمودي (بورتريه) - قسم من هو الأستاذ ريان */
.img-placeholder-portrait {
  aspect-ratio: 500 / 560;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* شكل غلاف كتاب */
.img-placeholder-book {
  height: 260px;
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   4) الشريط العلوي (Header / Navbar)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* الشعار */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--color-navy-900);
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-round);
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
  color: var(--color-gold-light);
  font-size: 1.2rem;
  border: 2px solid var(--color-gold);
}

/* شعار أكاديمية ريان (شريط التنقل فقط) - بأبعاده الأصلية دون تمديد */
.logo-mark {
  height: 72px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.08rem;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.logo-text-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-gold-dark);
}

/* روابط التنقل */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--color-text-main);
  padding: 8px 2px;
  transition: var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-navy-900);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-cta {
  flex-shrink: 0;
  padding: 11px 26px;
}

/* زر القائمة للجوال */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--color-navy-900);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* حالة القائمة مفتوحة (تُفعَّل عبر script.js بإضافة الكلاس "active") */
.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   5) القسم الرئيسي (Hero)
   ========================================================================== */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, #fbfbfd 0%, var(--color-white) 60%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
}

.hero-eyebrow {
  display: inline-block;
  font-weight: 700;
  color: var(--color-gold-dark);
  background: rgba(201, 162, 75, 0.1);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  margin-bottom: 22px;
}

.hero-desc {
  color: var(--color-text-muted);
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 46px;
}

/* سطر الثقة أسفل الأزرار (عدد الآراء + صور مصغّرة) */
.hero-trust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-trust-avatars {
  display: flex;
}

.trust-avatar-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-round);
  background: rgba(10, 31, 68, 0.06);
  color: var(--color-text-muted);
  font-size: 1rem;
  border: 2px solid var(--color-white);
  box-shadow: var(--shadow-sm);
  margin-inline-start: -14px;
}

.trust-avatar-mini:first-child {
  margin-inline-start: 0;
}

.hero-trust-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-trust-stars {
  color: var(--color-gold);
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.hero-trust-text p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.hero-trust-text strong {
  color: var(--color-navy-900);
}

/* صورتا الأستاذ - حجم متوسط واحترافي */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photos-group {
  position: relative;
  width: min(280px, 75%);
}

.hero-photo-frame {
  border-radius: var(--radius-round);
  padding: 6px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  box-shadow: var(--shadow-lg);
}

.hero-photo-primary {
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* الصورة الثانية الأصغر، متراكبة مع الصورة الرئيسية */
.hero-photo-secondary {
  position: absolute;
  bottom: -18px;
  left: -18px;
  width: 42%;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-md);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-round);
  border: 4px solid var(--color-white);
}

.hero-photo-secondary .hero-photo {
  border-width: 3px;
}


/* ==========================================================================
   5.1) شريط الثقة (Trust Bar) - يظهر مباشرة أسفل قسم Hero
   ========================================================================== */
.trust-bar {
  position: relative;
  z-index: 2;
  padding: 0 0 40px;
}

.trust-bar-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--color-gold);
  margin-top: -64px; /* لرفع الشريط ليتراكب بأناقة مع أسفل قسم Hero */
  overflow: hidden;
}

.trust-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 32px 20px;
  border-inline-start: 1px solid var(--color-border);
  transition: var(--transition-base);
}

.trust-bar-item:first-child {
  border-inline-start: none;
}

.trust-bar-item:hover {
  background: var(--color-bg-soft);
  transform: translateY(-4px);
}

.trust-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-round);
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
  border: 2px solid var(--color-gold);
  font-size: 1.4rem;
  transition: var(--transition-base);
}

.trust-bar-item:hover .trust-bar-icon {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  transform: scale(1.08);
}

.trust-bar-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-navy-900);
  line-height: 1.6;
}


/* ==========================================================================
   6) قسم من هو الأستاذ ريان (About)
   تصميم ثابت بدون جافاسكربت وبدون أي حركات/Animation - HTML + CSS فقط
   الصورتان في الجهة اليسرى، والمحتوى (نبذة / المواد / أسلوب الشرح) في اليمين
   ========================================================================== */
.about {
  padding: 90px 0;
  background: var(--color-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  align-items: center;
  gap: 60px;
}

/* ---------- 6.1) عمود المحتوى (يمين) ---------- */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.12rem;
  color: var(--color-navy-900);
  margin-bottom: 14px;
}

.about-block-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-round);
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
  border: 2px solid var(--color-gold);
  font-size: 1.15rem;
}

.about-block-text {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.about-subjects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
}

.about-subjects li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-main);
  font-size: 0.92rem;
  font-weight: 600;
}

.about-subject-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(201, 162, 75, 0.12);
  font-size: 0.9rem;
}

/* ---------- 6.2) عمود الصور (يسار) ---------- */
.about-media {
  position: relative;
  display: flex;
  justify-content: center;
  width: min(320px, 100%);
  justify-self: center;
}

.about-photo-frame {
  border-radius: var(--radius-round);
  padding: 6px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  box-shadow: var(--shadow-lg);
}

.about-photo-frame-primary {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.about-photo-frame-secondary {
  position: absolute;
  bottom: -18px;
  left: -18px;
  width: 42%;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-md);
}

.about-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-round);
  border: 4px solid var(--color-white);
}

.about-photo-frame-secondary .about-photo {
  border-width: 3px;
}


/* ==========================================================================
   7) قسم الدورات التعليمية (Courses) - بطاقات
   ========================================================================== */
.courses {
  padding: 90px 0;
  background: var(--color-bg-soft);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.course-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border-top: 3px solid transparent;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-gold);
}

.course-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-soft-2);
}

/* object-fit: contain لعرض الغلاف كاملًا دون قص أي جزء منه (الأغلفة مربعة الشكل) */
.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-base);
}

.course-card:hover .course-thumb img {
  transform: scale(1.06);
}

.course-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-gold);
  color: var(--color-navy-900);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

.course-badge-new {
  background: var(--color-navy-900);
  color: var(--color-white);
}

.course-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-title {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

/* السطر الصغير الذي يوضح الجامعة/الأستاذ صاحب الدورة (بيانات حقيقية من غلاف الدورة) */
.course-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  margin-bottom: 8px;
}

.course-desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
  flex: 1;
}

.course-footer {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.course-footer .btn {
  width: 100%;
}


/* ==========================================================================
   8) قسم الاختبارات المجانية (Tests) - بطاقات
   ========================================================================== */
.tests {
  padding: 90px 0;
  background: var(--color-white);
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.test-card {
  text-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 40px 26px;
  transition: var(--transition-base);
}

.test-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.test-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: var(--radius-round);
  background: rgba(10, 31, 68, 0.06);
  font-size: 1.6rem;
}

.test-title {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.test-desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}


/* ==========================================================================
   9) قسم الكتب المجانية (Books) - بطاقات
   ========================================================================== */
.books {
  padding: 90px 0;
  background: var(--color-bg-soft);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.book-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border-top: 3px solid transparent;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-gold);
}

.book-thumb {
  position: relative;
  margin-bottom: 18px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-soft-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* object-fit: contain لعرض غلاف الكتاب كاملًا دون قص أي جزء منه */
.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-gold);
  color: var(--color-navy-900);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

.book-title {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.book-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}


/* ==========================================================================
   10) قسم نجاحات وآراء الطلاب (Testimonials)
   ========================================================================== */
.testimonials {
  padding: 90px 0;
  background: var(--color-white);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 42px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gold);
}

/* أيقونة الاقتباس الزخرفية أعلى البطاقة */
.testimonial-quote-icon {
  position: absolute;
  top: -20px;
  right: 30px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
  border: 2px solid var(--color-gold);
  color: var(--color-gold-light);
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  color: var(--color-gold);
  letter-spacing: 3px;
  font-size: 1rem;
}

.testimonial-text {
  color: var(--color-text-main);
  font-size: 0.98rem;
  line-height: 1.9;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

/* دائرة بديلة لصورة الطالب بانتظار الصورة الحقيقية */
.testimonial-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-round);
  background: rgba(10, 31, 68, 0.06);
  border: 2px solid var(--color-gold);
  color: var(--color-text-muted);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-navy-900);
}

.testimonial-author span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}


/* ==========================================================================
   11) قسم الأرقام والإحصائيات (Stats)
   ========================================================================== */
.stats {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--color-white);
  display: inline-block;
}

.stat-plus {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-gold-light);
  margin-inline-start: 2px;
}

.stat-label {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}


/* ==========================================================================
   13) قسم التواصل والتسجيل (Contact)
   ========================================================================== */
.contact {
  padding: 90px 0;
  background: var(--color-bg-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 30px 0 34px;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.98rem;
  color: var(--color-text-main);
}

.contact-details em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(10, 31, 68, 0.06);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.contact-social {
  display: flex;
  gap: 12px;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-round);
  background: var(--color-navy-900);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.8rem;
  transition: var(--transition-base);
}

.contact-social a:hover {
  background: var(--color-gold);
  color: var(--color-navy-900);
  transform: translateY(-4px);
}

/* بطاقة التواصل عبر واتساب (بديل نموذج التواصل السابق) */
.contact-whatsapp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  box-shadow: var(--shadow-md);
}

.contact-whatsapp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: var(--radius-round);
  background: #25d366;
  box-shadow: var(--shadow-md);
  margin-bottom: 6px;
}

.contact-whatsapp-title {
  font-size: 1.3rem;
  color: var(--color-navy-900);
}

.contact-whatsapp-text {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.8;
  max-width: 34ch;
  margin-bottom: 10px;
}

.btn-whatsapp {
  background: #25d366;
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-whatsapp:hover {
  background: #1ebe57;
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}


/* ==========================================================================
   14) تذييل الموقع (Footer)
   ========================================================================== */
.site-footer {
  background: var(--color-navy-900);
  color: rgba(255, 255, 255, 0.82);
  padding-top: 70px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  color: var(--color-white);
  margin-bottom: 18px;
}

.footer-desc {
  font-size: 0.92rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.65);
  max-width: 340px;
}

.footer-links h4,
.footer-social h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.68);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-gold-light);
}

.footer-social .contact-social a {
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  text-align: center;
  padding: 22px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}


/* ==========================================================================
   15) زر واتساب الثابت (Fixed WhatsApp Button)
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-round);
  background: #25d366;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.08);
}


/* ==========================================================================
   16) الاستجابة للشاشات المختلفة (Responsive / Media Queries)
   ========================================================================== */

/* ---------- أجهزة الكمبيوتر اللوحي الكبيرة / اللابتوب الصغير ---------- */
@media (max-width: 1180px) {
  .courses-grid,
  .tests-grid,
  .books-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- الآيباد والأجهزة اللوحية ---------- */
@media (max-width: 992px) {
  :root {
    --header-height: 74px;
  }

  .logo-mark {
    height: 60px;
  }

  .main-nav {
    position: fixed;
    inset-inline: 0;
    top: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }

  /* حالة القائمة مفتوحة على الجوال (يضيفها script.js) */
  .main-nav.active {
    max-height: 520px;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 46px;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-trust {
    justify-content: center;
  }

  .hero-media {
    order: -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 44px;
  }

  .about-media {
    order: -1;
    margin: 0 auto;
  }

  .about-block-title {
    justify-content: center;
  }

  .about-subjects {
    max-width: 420px;
    margin: 0 auto;
  }

  /* شريط الثقة: صفّان (2 × 2) على الآيباد والجوال */
  .trust-bar-card {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -40px;
  }

  .trust-bar-item {
    border-inline-start: 1px solid var(--color-border);
  }

  .trust-bar-item:nth-child(odd) {
    border-inline-start: none;
  }

  .trust-bar-item:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }
}

/* ---------- الجوالات ---------- */
@media (max-width: 768px) {
  .section-heading {
    margin-bottom: 40px;
  }

  .hero,
  .about,
  .courses,
  .tests,
  .books,
  .testimonials,
  .contact {
    padding: 60px 0;
  }

  .courses-grid,
  .tests-grid,
  .books-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-desc {
    margin: 0 auto;
  }

  .footer-links,
  .footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-social .contact-social {
    justify-content: center;
  }

  .contact-whatsapp {
    padding: 34px 22px;
  }

  .whatsapp-float {
    bottom: 18px;
    left: 18px;
    width: 52px;
    height: 52px;
  }
}

/* ---------- الجوالات الصغيرة ---------- */
@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats-grid {
    gap: 18px;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .logo-text-sub {
    font-size: 0.66rem;
  }

  .logo-mark {
    height: 51px;
  }

  /* شريط الثقة: عمود واحد على الجوالات الصغيرة */
  .trust-bar-card {
    grid-template-columns: 1fr;
    margin-top: -26px;
  }

  .trust-bar-item {
    border-inline-start: none !important;
  }

  .trust-bar-item:not(:first-child) {
    border-top: 1px solid var(--color-border);
  }

  .about-media {
    width: min(240px, 78%);
  }

  .about-subjects {
    grid-template-columns: 1fr;
  }
}
