
@import url("https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=Tajawal:wght@300;400;500;700;800&display=swap");

:root {
  /* الألوان */
  --deep-green: #0e4a34;
  --emerald: #146245;
  --emerald-light: #1c7a56;
  --gold: #c9a34e;
  --gold-light: #e6cd8a;
  --gold-dark: #a3812f;
  --cream: #faf6ec;
  --ivory: #ffffff;
  --sage-mist: #eef2ea;
  --ink: #1b241d;
  --ink-soft: #4a5750;
  --line: #e2ddcc;

  /* الخط */
  /* --font-display: "Aref Ruqaa", serif; */
  --font-body: "Tajawal", sans-serif;

  /* أبعاد */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 30px rgba(14, 74, 52, 0.08);
  --shadow-card: 0 4px 18px rgba(14, 74, 52, 0.1);
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  direction: rtl;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--deep-green);
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.35;
}

h1 { font-size: clamp(2.2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }



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

/* -------- زخرفة النجمة الثمانية  -------- */
.star8 {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: var(--gold);
  clip-path: polygon(
    50% 0%, 61% 35%, 93% 25%, 71% 52%, 93% 75%,
    61% 66%, 50% 100%, 39% 66%, 7% 75%, 29% 52%,
    7% 25%, 39% 35%
  );
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 34px;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 64px;
  background: var(--line);
}
.divider .star8 { width: 14px; height: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--gold-dark);
  background: rgba(201, 163, 78, 0.12);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow .star8 { width: 10px; height: 10px; }

/* -------- الأزرار -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--deep-green);
  box-shadow: var(--shadow-card);
}
.btn-gold:hover { box-shadow: 0 8px 24px rgba(201, 163, 78, .35); }

.btn-outline {
  background: transparent;
  border-color: var(--ivory);
  color: var(--ivory);
}
.btn-outline:hover { background: rgba(255,255,255,.1); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--deep-green);
  color: var(--deep-green);
}
.btn-outline-dark:hover { background: var(--deep-green); color: var(--ivory); }

/* -------- الرأس / التنقل -------- */
.topbar {
  background: var(--deep-green);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { opacity: .95; }
.topbar a:hover { color: var(--gold-light); }
.topbar-contacts { display: flex; gap: 20px; flex-wrap: wrap; }

header.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--deep-green);
}
.brand-text span {
  font-size: .72rem;
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: .03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.main-nav a {
  font-weight: 500;
  font-size: .9rem;
  color: var(--ink);
  position: relative;
  padding: 6px 2px;
  white-space: nowrap;
  transition: color .15s ease;
}
.main-nav a:hover { color: var(--deep-green); }
.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--deep-green); font-weight: 700; }

/* يخفي رابط "المعلمون" فورًا (بدون أي وميض) لو آخر قيمة معروفة للإعداد كانت
   "معطّل" — القيمة دي بتُقرأ من localStorage بسكريبت مبكر جدًا في الصفحة،
   قبل أي رسم فعلي للناف بار. راجع نهاية main.js وسكريبت رأس كل صفحة. */
html.teachers-page-disabled a[href="teachers.html"] { display: none !important; }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--deep-green);
  cursor: pointer;
}

/* --------  (Hero) -------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 100% -10%, #1c7a56 0%, var(--deep-green) 45%, #093325 100%);
  color: var(--ivory);
  padding: 84px 0 100px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(230,205,138,.35) 50%, transparent 51%),
    radial-gradient(2px 2px at 300px 120px, rgba(230,205,138,.25) 50%, transparent 51%),
    radial-gradient(2px 2px at 500px 60px, rgba(230,205,138,.3) 50%, transparent 51%);
  opacity: .5;
  pointer-events: none;
}
.hero-rays {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 620px;
  height: 620px;
  background: conic-gradient(from 200deg at 50% 50%, rgba(201,163,78,0) 0deg, rgba(201,163,78,.28) 18deg, rgba(201,163,78,0) 40deg, rgba(201,163,78,0) 320deg, rgba(201,163,78,.2) 340deg, rgba(201,163,78,0) 360deg);
  border-radius: 50%;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 50px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(230,205,138,.35);
  color: var(--gold-light);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 { color: var(--ivory); margin-bottom: 20px; }
.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}
.hero p.lead {
  color: rgba(255,255,255,.82);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
}
.hero-stats div span { font-size: .82rem; color: rgba(255,255,255,.7); }

.hero-emblem {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-emblem-ring {
  position: relative;
  width: min(340px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(230,205,138,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}
.hero-emblem-ring img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* -------- شرائط ثقة -------- */
.trust-strip {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.trust-strip .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 600;
}
.trust-strip span { display: flex; align-items: center; gap: 8px; }
.trust-strip .star8 { width: 10px; height: 10px; }

/* -------- أقسام عامة -------- */
section { padding: 84px 0; }
.section-alt { background: var(--sage-mist); }
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 50px;
}

/* -------- بطاقات المزايا -------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  color: var(--deep-green);
  flex-shrink: 0;
}

.feature-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.feature-card-head .feature-icon {
  margin-bottom: 0;
}
.feature-card-head h3 {
  margin: 0;
}

/* -------- بطاقات الدورات -------- */
.course-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.course-card-head {
  background: linear-gradient(135deg, var(--deep-green), var(--emerald-light));
  color: var(--gold);
  padding: 22px 24px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.course-card-head h3 {
  color : var(--ivory);
}
.course-card-head .star8 { width: 16px; height: 16px; margin-bottom: 10px; }
.course-card-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.course-card-body ul { margin-bottom: 20px; }
.course-card-body li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .93rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.course-card-body li .star8 { width: 8px; height: 8px; margin-top: 7px; flex-shrink: 0; }
.course-card-body .btn { margin-top: auto; align-self: flex-start; }
.course-card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

/* -------- أزرار صغيرة أكثر احترافية (تُستخدم في كروت الدورات) -------- */
.btn-sm {
  padding: 9px 18px;
  font-size: .82rem;
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: none;
}
.btn-sm.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.btn-sm.btn-gold:hover { box-shadow: 0 4px 14px rgba(201, 163, 78, .3); }
.btn-sm.btn-outline-dark:hover { background: var(--deep-green); color: var(--ivory); }

/* -------- بطاقة دورة فردية (صفحة الدورات بعد إعادة التصميم: كارت لكل دورة) -------- */
.course-item-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course-item-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.course-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: rgba(201, 163, 78, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.course-item-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.course-item-body h3 { margin: 0; }
.course-item-body p { font-size: .9rem; margin: 0; }
.course-item-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.course-item-actions .btn { flex: 1; min-width: 130px; text-align: center; }

.courses-search-bar { margin-bottom: 32px; max-width: 480px; margin-inline: auto; }
.courses-search-bar input {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--ivory);
  box-shadow: var(--shadow-card);
}
.courses-search-bar input:focus { border-color: var(--gold); outline: none; }

/* -------- زرار واتساب عائم -------- */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fe174, #1fae52);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.7rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.45);
  z-index: 999;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: whatsapp-pulse 2.6s ease-in-out infinite;
}
.whatsapp-float-btn i { line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.whatsapp-float-btn:hover {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
  animation-play-state: paused;
}
@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.45); }
  50% { box-shadow: 0 6px 18px rgba(0,0,0,.25), 0 0 0 12px rgba(37,211,102,0); }
}

/* -------- شريط CTA لاصق أسفل الشاشة في الموبايل -------- */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 999;
  display: none;
  gap: 10px;
  padding: 10px 16px;
  background: var(--ivory);
  box-shadow: 0 -4px 16px rgba(14,74,52,.12);
  transition: transform .3s ease, opacity .3s ease;
}
.mobile-sticky-cta-btn {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  font-size: .92rem;
}
@media (max-width: 640px) {
  .mobile-sticky-cta { display: flex; transform: translateY(0); opacity: 1; }
  body { padding-bottom: 64px; }
  .mobile-sticky-cta--hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .whatsapp-float-btn { bottom: 92px; }
}

/* -------- الأسئلة الشائعة (مضمّنة في صفحات تواصل معنا والتسجيل) -------- */
.faq-embed-item {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-embed-question {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--deep-green);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
}
.faq-embed-question .chevron { color: var(--gold-dark); transition: transform .2s ease; flex-shrink: 0; margin-right: 10px; }
.faq-embed-item.open .chevron { transform: rotate(180deg); }
.faq-embed-answer { display: none; padding: 0 20px 16px; color: var(--ink-soft); font-size: .9rem; line-height: 1.8; }
.faq-embed-item.open .faq-embed-answer { display: block; }

/* -------- نموذج النشرة البريدية (تذييل) -------- */
.newsletter-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(230,205,138,.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 18px;
}
.newsletter-box h4 { margin-bottom: 10px; }
.newsletter-box form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-box input[type="email"] {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--ivory);
  font-family: var(--font-body);
}
.newsletter-box input[type="email"]::placeholder { color: rgba(255,255,255,.5); }
.newsletter-box button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: var(--deep-green);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
#newsletter-alert {
  display: none;
  margin-top: 10px;
  font-size: .82rem;
  color: var(--gold-light);
}

/* ==================== صفحة تفاصيل الدورة ==================== */
.details-hero {
  background: linear-gradient(120deg, var(--deep-green), #0a3a29);
  padding: 26px 0;
}
.details-hero .breadcrumbs { color: rgba(255,255,255,.7); font-size: .85rem; }
.details-hero .breadcrumbs a:hover { color: var(--gold-light); }

.details-top {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
  padding: 50px 0;
}
.details-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--deep-green);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.details-media video,
.details-media iframe,
.details-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
}
.details-media .media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.6);
}
.details-media .media-placeholder img { width: 90px; height: 90px; object-fit: contain; opacity: .8; }

.details-info .course-item-tag { margin-bottom: 14px; }
.details-info h1 { margin-bottom: 16px; }
.details-info p.desc { font-size: 1.02rem; }
.details-info .btn { margin-top: 10px; }

.details-section { padding: 20px 0 60px; }
.details-section h2 { margin-bottom: 18px; }

.content-media-grid {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 44px;
  align-items: start;
}
/* لما مفيش صورة ثانوية مرفوعة: عمود واحد بعرض كامل بدل ترك فراغ فاضي مكان الصورة */
.content-media-grid.no-side-image {
  grid-template-columns: 1fr;
}
.content-media-grid .side-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.content-media-grid .side-image img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }
.content-media-grid .side-image.is-placeholder {
  background: var(--sage-mist);
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content-media-grid .side-image.is-placeholder img { width: 70px; height: 70px; min-height: 0; object-fit: contain; opacity: .6; }

.units-accordion { display: flex; flex-direction: column; gap: 10px; }
.unit-row {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--deep-green);
}
.unit-row .lessons-badge {
  background: var(--sage-mist);
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.teacher-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}
.teacher-card img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-light);
  flex-shrink: 0;
}
.teacher-card .teacher-avatar-fallback {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--deep-green);
  flex-shrink: 0;
}
.teacher-card .teacher-info h3 { margin-bottom: 6px; }
.teacher-card .teacher-info span.role {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.feature-pill {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.feature-pill .icon { font-size: 1.7rem; margin-bottom: 10px; }
.feature-pill .label { font-size: .85rem; font-weight: 700; color: var(--deep-green); }

@media (max-width: 900px) {
  .details-top, .content-media-grid { grid-template-columns: 1fr; }
  .content-media-grid .side-image { order: -1; }
}

/* ==================== صفحة تفاصيل الفئة (category-details.html) ==================== */

/* لضمان ترتيب يسار/يمين ثابت بغضّ النظر عن تفاصيل تدفّق الشبكة في RTL،
   نجبر اتجاه الحاوية على ltr للتموضع فقط، ونعيد rtl لكل عنصر بداخلها
   عشان النص والأرقام يفضلوا يتقروا صح */
.cd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  direction: ltr;
}
.cd-grid > * { direction: rtl; text-align: right; }

.cd-course-block { padding: 50px 0; }
.cd-course-block:not(:first-child) { border-top: 1px solid var(--line); }

.cd-course-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--gold-dark);
  background: rgba(201, 163, 78, 0.12);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cd-course-eyebrow .star8 { width: 10px; height: 10px; }

.cd-course-title { margin-bottom: 14px; }

.cd-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--deep-green);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-media video, .cd-media iframe, .cd-media img {
  width: 100%; height: 100%; object-fit: cover; border: none; display: block;
}
.cd-media .media-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255,255,255,.6);
}
.cd-media .media-placeholder img { width: 70px; height: 70px; object-fit: contain; opacity: .8; }

.cd-info p.desc { font-size: 1rem; }

.cd-second-block { margin-top: 40px; }
/* لما مفيش صورة ثانوية: عمود واحد بعرض كامل بدل ترك فراغ فاضي مكان الصورة */
.cd-grid.cd-grid-single { grid-template-columns: 1fr; }
.cd-side-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.cd-side-image img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }

.cd-learning-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.cd-learning-list .point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .93rem;
  color: var(--ink);
}
.cd-learning-list .check {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold);
  color: var(--deep-green);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 900; flex-shrink: 0; margin-top: 1px;
}

.cd-features-title, .cd-units-title { margin-top: 42px; margin-bottom: 16px; }

.cd-unit-row {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.cd-unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: 700;
  color: var(--deep-green);
}
.cd-unit-header .right-side { display: flex; align-items: center; gap: 12px; }
.cd-unit-header .lessons-badge {
  background: var(--sage-mist);
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.cd-unit-header .chevron { transition: transform .2s ease; color: var(--gold-dark); }
.cd-unit-row.open .chevron { transform: rotate(180deg); }
.cd-unit-lessons {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
}
.cd-unit-row.open .cd-unit-lessons { display: block; padding-top: 14px; }
.cd-unit-lessons li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: var(--ink-soft);
  padding: 6px 0;
}
.cd-unit-lessons li .star8 { width: 7px; height: 7px; flex-shrink: 0; }

@media (max-width: 900px) {
  .cd-grid { grid-template-columns: 1fr; }
}

/* -------- كيف تبدأ (خطوات) -------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step {
  position: relative;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 24px;
}
.step-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--deep-green);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
}
.step-mark-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

/* -------- شهادات -------- */
.testimonial {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.testimonial p { color: var(--ink); font-style: normal; }
.testimonial-name { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; color: var(--deep-green);
}

/* -------- دعوة للعمل -------- */
.cta-band {
  background: linear-gradient(120deg, var(--deep-green), #0a3a29);
  color: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 54px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { 
  color: var(--ivory); margin-bottom: 6px;}
.cta-band p { color: rgba(255,255,255,.78); margin: 0; }

/* -------- النموذج -------- */
.form-shell {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 44px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-weight: 700;
  font-size: .92rem;
  color: var(--deep-green);
  display: flex;
  gap: 6px;
}
.field .req { color: var(--gold-dark); }
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: .96rem;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: var(--ivory);
}
.field textarea { resize: vertical; min-height: 100px; }
.field select { cursor: pointer; }
.field-hint { font-size: .78rem; color: var(--ink-soft); }

.radio-group { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  background: var(--cream);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.radio-pill input { accent-color: var(--deep-green); }
.radio-pill:has(input:checked) {
  border-color: var(--deep-green);
  background: rgba(14,74,52,.08);
  color: var(--deep-green);
}

.form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--ink-soft);
  margin-top: 10px;
}
.form-note .star8 { width: 8px; height: 8px; margin-top: 6px; flex-shrink: 0; }

.form-submit-row {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

#form-alert {
  display: none;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: 24px;
}
#form-alert.show { display: block; }
#form-alert.success { background: rgba(14,74,52,.1); color: var(--deep-green); border: 1px solid rgba(14,74,52,.25); }
#form-alert.error { background: rgba(178,52,52,.1); color: #8a2d2d; border: 1px solid rgba(178,52,52,.25); }

.field.invalid input,
.field.invalid select { border-color: #b23434; }

/* -------- تذييل -------- */
footer.site-footer {
  background: #08281c;
  color: rgba(255,255,255,.75);
  padding: 64px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.footer-brand img { width: 48px; height: 48px; border-radius: 50%; }
.footer-brand strong { font-family: var(--font-display); color: var(--ivory); font-size: 1.15rem; }
footer.site-footer h4 {
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: .95rem;
  margin-bottom: 18px;
}
footer.site-footer li { margin-bottom: 10px; font-size: .9rem; }
footer.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold-light); }

/* -------- صفحات فرعية (رأس صفحة) -------- */
.page-hero {
  background: linear-gradient(120deg, var(--deep-green), #0a3a29);
  color: var(--ivory);
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: var(--ivory); margin-bottom: 10px; }
.breadcrumbs { color: rgba(255,255,255,.7); font-size: .85rem; }
.breadcrumbs a:hover { color: var(--gold-light); }

/* -------- بطاقات "من نحن" -------- */
.value-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value-item {
  display: flex;
  gap: 14px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
}
.value-item .star8 { width: 20px; height: 20px; flex-shrink: 0; margin-top: 4px; }

.about-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, var(--sage-mist), var(--ivory));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}
.about-media img { width: min(260px, 100%); height: auto; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

/* -------- تواصل معنا -------- */
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.contact-card .feature-icon { margin-bottom: 0; flex-shrink: 0; }

/* -------- 404 -------- */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

/* -------- استجابة -------- */
@media (max-width: 1180px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(0,0,0,.1);
    padding: 6px 24px 16px;
    z-index: 60;
  }
  .main-nav.open a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .main-nav.open a:last-child { border-bottom: none; }

  .nav-cta .btn { padding: 9px 16px; font-size: .84rem; white-space: nowrap; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .value-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .form-shell { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* -------- قسم "تقاريرنا وشهاداتنا" في الصفحة الرئيسية (نماذج توضيحية) -------- */
.report-preview-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.report-preview-head {
  background: linear-gradient(135deg, var(--deep-green), var(--emerald-light));
  color: var(--gold-light);
  padding: 14px 18px;
  font-weight: 700;
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-preview-body { padding: 22px 20px; }
.report-preview-line {
  height: 10px;
  border-radius: 6px;
  background: var(--sage-mist);
  margin-bottom: 12px;
}
.report-preview-line.blurred {
  background: repeating-linear-gradient(135deg, var(--line), var(--line) 4px, var(--sage-mist) 4px, var(--sage-mist) 8px);
  filter: blur(2px);
}
.report-preview-bar {
  height: 8px;
  border-radius: 6px;
  background: var(--sage-mist);
  margin-bottom: 12px;
  overflow: hidden;
}
.report-preview-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 6px;
}
.report-preview-certificate { text-align: center; padding: 30px 20px; }
.report-preview-certificate i { font-size: 2.4rem; color: var(--gold); }
