/* =========================================================
   منصة التاريخ – مستر أحمد عبد الناصر مقداد
   style.css : نظام التصميم + مكونات الواجهة
   ========================================================= */

/* ---------- 1. التوكنز (Design Tokens) ---------- */
:root {
  --navy-950: #070c16;
  --navy-900: #0b1220;
  --navy-800: #101a2e;
  --navy-700: #16233c;
  --gold-500: #c9a227;
  --gold-400: #d9b64a;
  --gold-300: #e7cd7d;
  --bronze: #8a6a3b;
  --sand: #efe3cc;
  --parchment: #f7f1e3;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --font-body: "Cairo", system-ui, sans-serif;
  --font-display: "Amiri", "Cairo", serif;

  --container: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* الوضع الليلي (الافتراضي بدون أي تغيير) */
[data-theme="dark"] {
  --bg: var(--navy-950);
  --bg-alt: var(--navy-900);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-solid: #101a2e;
  --border: rgba(201, 162, 39, 0.18);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f3ece0;
  --text-muted: #a9b3c4;
  --accent: var(--gold-400);
  --accent-strong: var(--gold-300);
  --on-accent: #10182a;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --hero-veil: linear-gradient(
    190deg,
    rgba(7, 12, 22, 0.55) 0%,
    rgba(7, 12, 22, 0.86) 55%,
    var(--navy-950) 100%
  );
  --grain-opacity: 0.05;
}

/* تحسين ألوان الوضع النهاري مع توضيح النصوص ولينكات النافبار */
[data-theme="light"] {
  --bg: #fdfbf7;
  --bg-alt: #f4efe4;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --border: rgba(184, 134, 11, 0.35);
  --border-soft: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --text-muted: #334155;
  --accent: #b45309;
  --accent-strong: #92400e;
  --on-accent: #ffffff;
  --shadow: 0 16px 36px -18px rgba(15, 23, 42, 0.15);
  --hero-veil: linear-gradient(
    190deg,
    rgba(15, 23, 42, 0.7) 0%,
    rgba(15, 23, 42, 0.85) 55%,
    rgba(253, 251, 247, 0.98) 100%
  );
  --grain-opacity: 0.04;
}

[data-theme="light"] .main-nav a {
  color: #1e293b;
}

[data-theme="light"] .main-nav a:hover {
  color: var(--accent);
  background: rgba(180, 83, 9, 0.08);
}

[data-theme="light"] .main-nav a.is-active {
  color: var(--accent-strong);
  background: rgba(180, 83, 9, 0.14);
}

[data-theme="light"] .site-header.is-scrolled {
  background: rgba(253, 251, 247, 0.92);
}

[data-theme="light"] .brand-text strong {
  color: #0f172a;
}

/* ---------- 2. الأساسيات ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.85;
  overflow-x: hidden;
  transition:
    background-color 0.4s var(--ease),
    color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  background-image: url("../assets/images/parchment.jpg");
  background-size: 420px;
  mix-blend-mode: overlay;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 0.6rem;
  letter-spacing: -0.2px;
}

p {
  margin: 0 0 1rem;
}

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

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -80px;
  inset-inline-start: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top 0.25s var(--ease);
}
.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. الأزرار ---------- */
.btn-gold,
.btn-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #14192b;
  box-shadow: 0 12px 30px -14px rgba(201, 162, 39, 0.7);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -14px rgba(201, 162, 39, 0.85);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding-inline: 14px;
}
.btn-ghost:hover {
  color: var(--accent);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.w-100 {
  width: 100%;
}

/* ---------- 4. شريط التقدم ---------- */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bronze), var(--gold-300));
}

/* ---------- 5. الهيدر ---------- */
.site-header {
  position: fixed;
  inset-block-start: 3px;
  inset-inline: 0;
  z-index: 110;
  transition:
    background 0.35s var(--ease),
    padding 0.35s var(--ease),
    border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
  padding-block: 16px;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding-block: 8px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  order: -1;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.brand-mark svg {
  width: 22px;
}
.brand-text {
  display: grid;
  line-height: 1.2;
}
.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}
.brand-text small {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.main-nav {
  margin-inline: auto;
}
.main-nav ul {
  display: flex;
  gap: 6px;
}
.main-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  /* حجم ووزن ثابت في الوضعين الليلي والنهاري */
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-muted);
  position: relative;
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.main-nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.main-nav a.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}
.theme-toggle::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) 0%,
    transparent 40%,
    transparent 60%,
    var(--accent) 100%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  animation: ti-spin 3s linear infinite;
}
.theme-toggle:hover::before {
  opacity: 0.35;
}
.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
}
.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.theme-icon svg {
  width: 20px;
  height: 20px;
}

.ti-moon-svg .ti-star {
  opacity: 0.7;
  transform-origin: center;
}
.ti-moon-svg .ti-star-1 {
  animation: ti-twinkle 2.4s ease-in-out infinite;
}
.ti-moon-svg .ti-star-2 {
  animation: ti-twinkle 1.9s ease-in-out 0.6s infinite;
}
.ti-moon-svg .ti-star-3 {
  animation: ti-twinkle 2.8s ease-in-out 1.2s infinite;
}

.ti-sun-svg .ti-rays {
  transform-origin: 12px 12px;
  animation: ti-spin 8s linear infinite;
}
.theme-toggle:hover .ti-sun-svg .ti-rays {
  animation-duration: 3s;
}

@keyframes ti-twinkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
@keyframes ti-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

[data-theme="dark"] .theme-icon--sun,
[data-theme="light"] .theme-icon--moon {
  display: none;
}

/* الهامبرجر */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.hamburger span {
  position: absolute;
  inset-inline: 12px;
  height: 2px;
  background: var(--accent);
  transition:
    transform 0.35s var(--ease),
    opacity 0.2s var(--ease);
}
.hamburger span:nth-child(1) {
  top: 15px;
}
.hamburger span:nth-child(2) {
  top: 21px;
}
.hamburger span:nth-child(3) {
  top: 27px;
}
.hamburger.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* قائمة الموبايل */
.mobile-menu {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 105;
  padding: 100px 24px 32px;
  background: #111;
  backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  transform: translateY(-102%);
  transition: transform 0.45s var(--ease);
  max-height: 100vh;
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateY(0);
}

.mobile-menu ul {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
}
.mobile-menu a {
  display: block;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 1.05rem;
  font-weight: 600;
}
.mobile-menu a:hover {
  color: var(--accent);
}
.mobile-menu-actions {
  display: grid;
  gap: 10px;
}

/* ---------- 6. الهيرو (تم إزالة الخط السفلي وتعديل الأحجام) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 140px 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -6% -2%;
  z-index: -3;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-veil);
}
.hero-dust {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-dust span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(231, 205, 125, 0.9),
    transparent 70%
  );
  animation: floatDust 18s linear infinite;
  opacity: 0.6;
}
.hero-dust span:nth-child(1) {
  inset-inline-start: 12%;
  top: 70%;
  animation-duration: 22s;
}
.hero-dust span:nth-child(2) {
  inset-inline-start: 28%;
  top: 85%;
  animation-duration: 26s;
  width: 4px;
  height: 4px;
}
.hero-dust span:nth-child(3) {
  inset-inline-start: 46%;
  top: 60%;
  animation-duration: 19s;
}
.hero-dust span:nth-child(4) {
  inset-inline-start: 64%;
  top: 90%;
  animation-duration: 30s;
  width: 8px;
  height: 8px;
}
.hero-dust span:nth-child(5) {
  inset-inline-start: 78%;
  top: 65%;
  animation-duration: 24s;
}
.hero-dust span:nth-child(6) {
  inset-inline-start: 90%;
  top: 80%;
  animation-duration: 28s;
  width: 3px;
  height: 3px;
}

@keyframes floatDust {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  15% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(-40px, -520px, 0);
    opacity: 0;
  }
}

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

.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  font-weight: 900;
  color: #f6efe2;
  margin-bottom: 22px;
  line-height: 1.3;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.hero-title .dots {
  color: var(--gold-400);
}
.hero-title em {
  font-style: normal;
  font-family: var(--font-display);
  color: var(
    --gold-300
  ); /* استخدام لون صريح بدل الـ gradient عشان الهمزة والحرف مايتاكلوش */
  font-weight: 800;
  display: inline-block;
  padding-top: 8px; /* مساحة كافية فوق السطر عشان الهمزة تظهر كاملة */
  line-height: 1.4;
}
.hero-sub {
  max-width: 620px;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  color: #e5dfd5;
  line-height: 1.95;
  font-weight: 500;
}
.hero-sub strong {
  color: var(--gold-300);
  font-weight: 700;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}
.hero .btn-outline {
  color: #f2ead9;
  border-color: rgba(242, 234, 217, 0.45);
}
.hero .btn-outline:hover {
  color: var(--gold-300);
  border-color: var(--gold-300);
}

.hero-portrait {
  position: relative;
}
.portrait-frame {
  position: relative;
  border-radius: 220px 220px var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 12, 22, 0.85), transparent 55%);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.hero-portrait:hover .portrait-frame img {
  transform: scale(1.04);
}

/* ---------- 7. الأقسام العامة ---------- */
.section {
  position: relative;
  padding-block: clamp(64px, 8vw, 120px);
}
.section--timeline,
.section--contact {
  background: var(--bg-alt);
  border-block: 1px solid var(--border-soft);
}

.section-head {
  max-width: 700px;
  margin: 0 auto clamp(36px, 5vw, 60px);
  text-align: center;
}
.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
  position: relative;
  padding-inline-end: 44px;
}
.section-kicker::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  width: 34px;
  height: 1px;
  background: var(--accent);
}
.section-head h2,
.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
}
.section-head p {
  color: var(--text-muted);
}

/* ---------- 8. المميزات (Grid للشاشات الكبيرة + Scroll تفاعلي للموبايل) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.feature-card::after {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-end: -30%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.feature-card:hover::after {
  opacity: 1;
}
.feature-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.feature-icon svg {
  width: 26px;
}
.feature-card h3 {
  font-size: 1.15rem;
}
.feature-card p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- 9. آلة الزمن ---------- */
.tm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.tm-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tm-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.tm-yearbig {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 10px 30px rgba(201, 162, 39, 0.25);
}
.tm-arrows {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
}
.tm-track {
  position: relative;
  padding: 26px 6px 10px;
  touch-action: pan-y;
  cursor: grab;
}
.tm-track-line,
.tm-track-fill {
  position: absolute;
  inset-block-start: 38px;
  inset-inline-end: 6px;
  height: 3px;
  border-radius: 999px;
}
.tm-track-line {
  inset-inline-start: 6px;
  background: var(--border-soft);
}
.tm-track-fill {
  width: 0%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  transition: width 0.45s var(--ease);
}
.tm-rail {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tm-rail::-webkit-scrollbar {
  display: none;
}
.tm-stop {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  transition:
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.tm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border-soft);
  box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.4);
  transition: all 0.3s var(--ease);
}
.tm-year {
  font-size: 0.95rem;
}
.tm-stop:hover {
  color: var(--text);
}
.tm-stop:hover .tm-dot {
  border-color: var(--accent);
}
.tm-stop.is-active {
  color: var(--accent);
  transform: translateY(-2px);
}
.tm-stop.is-active .tm-dot {
  background: var(--accent);
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 7px rgba(201, 162, 39, 0.16);
}
.tm-slider-wrap {
  display: block;
  margin: 6px 0 22px;
}
.tm-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--border-soft);
  direction: rtl;
}
.tm-slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface-solid);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.7);
  cursor: grab;
}
.tm-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface-solid);
  cursor: grab;
}
.tm-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: stretch;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  outline: none;
}
.tm-panel.is-in {
  animation: tmIn 0.6s var(--ease) both;
}
@keyframes tmIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
.tm-media {
  position: relative;
  min-height: 260px;
}
.tm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.05);
}
.tm-badge {
  position: absolute;
  inset-block-end: 14px;
  inset-inline-start: 14px;
  background: rgba(7, 12, 22, 0.78);
  color: var(--gold-300);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.tm-body {
  padding: 26px 26px 30px;
}
.tm-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}
.tm-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-bottom: 10px;
}
.tm-brief {
  color: var(--text-muted);
  line-height: 1.9;
}
.tm-figures {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.tm-figures strong {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.tm-figures ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.tm-figures li {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.88rem;
}

/* ---------- 9.5 الفيديو التعريفي ---------- */
.video-intro-frame {
  position: relative;
  max-width: 920px;
  margin-inline: auto;
}
.video-intro-frame .video-modal-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.video-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.video-poster:hover img {
  transform: scale(1.04);
}
.video-poster-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 8, 16, 0.15) 0%,
    rgba(4, 8, 16, 0.55) 100%
  );
}
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  color: var(--navy-900, #0b1220);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease);
}
.play-btn svg {
  width: 32px;
  height: 32px;
  margin-inline-start: 4px;
}
.video-poster:hover .play-btn {
  transform: scale(1.08);
  background: var(--accent);
}
.video-modal-box {
  padding: 20px;
}
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 10. الكورسات ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border);
}
.filter-btn.is-active {
  background: linear-gradient(135deg, var(--gold-400), var(--bronze));
  color: #14192b;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.28);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.course-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  animation: fadePanel 0.4s var(--ease);
}
.course-card:hover {
  transform: translateY(-8px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.course-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.course-card:hover .course-media img {
  transform: scale(1.07);
}
.course-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-400), var(--bronze));
  color: #14192b;
}
.course-grade {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  background: rgba(7, 12, 22, 0.75);
  color: #efe3cc;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.course-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-body h3 {
  font-size: 1.18rem;
}
.course-body > p {
  color: var(--text-muted);
  font-size: 0.94rem;
}
.course-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 4px 0 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.course-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.course-stats i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.course-progress {
  margin-bottom: 16px;
}
.course-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bronze), var(--gold-300));
}
.course-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
}

.course-detail-media {
  aspect-ratio: 16 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.course-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.detail-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 0.82rem;
  color: var(--text);
}
.detail-columns {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  margin-top: 12px;
}
.module {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
}
.module h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--accent);
}
.module li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-inline-start: 16px;
  position: relative;
}
.module li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
}
.outcomes li {
  display: flex;
  gap: 10px;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.outcomes li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

/* ---------- 11. قالوا عنا (عرض بوكس واحد وحجم متناسق) ---------- */
.testimonials-wrapper {
  max-width: 760px;
  margin-inline: auto;
  position: relative;
}
.slider {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.slider-track {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}
.testimonial {
  flex: 0 0 100%;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow);
  text-align: center;
}
.testimonial::before {
  content: "”";
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 28px;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-family: var(--font-display);
}
.testimonial p {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.9;
  max-width: 580px;
  margin: 0 auto 20px;
}
.testimonial-rating {
  color: var(--accent);
  letter-spacing: 4px;
  font-size: 1.15rem;
  margin-bottom: 16px;
}
.testimonial-who {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  text-align: start;
}
.testimonial-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
}
.testimonial-avatar-letter {
  position: relative;
  z-index: 1;
}
.testimonial-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
}
.testimonial-who strong {
  display: block;
  font-size: 1.05rem;
}
.testimonial-who small {
  color: var(--text-muted);
}
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}
.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: grid;
  place-items: center;
}
.slider-btn:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.slider-dots {
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.slider-dot.is-active {
  width: 26px;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- 12. تواصل معنا (تصميم عصري مع صورة المدرس) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: stretch;
}
.contact-card-info {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.contact-teacher-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.contact-teacher-img {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.25);
  flex-shrink: 0;
}
.contact-teacher-details h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}
.contact-teacher-details span {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 700;
}
.contact-info-list {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  transition: border-color 0.25s var(--ease);
}
.contact-info-item:hover {
  border-color: var(--accent);
}
.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-info-icon svg {
  width: 20px;
  height: 20px;
}
.contact-info-text strong {
  display: block;
  font-size: 0.95rem;
}
.contact-info-text small {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.contact-form {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.field .error {
  display: block;
  color: #d9705f;
  font-size: 0.82rem;
  margin-top: 5px;
  min-height: 1em;
}
.field.has-error input,
.field.has-error textarea {
  border-color: #d9705f;
}
.form-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.form-note.is-success {
  color: #57a97b;
}
.form-note.is-error {
  color: #d9705f;
}

/* ---------- 13. الفوتر وأيقونات السوشيال وقائمة الواتساب ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-block: 54px 24px;
  position: relative;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
}
.site-footer p {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--accent);
}
.site-footer nav ul {
  display: grid;
  gap: 8px;
}
.site-footer nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease);
}
.site-footer nav a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.social-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all 0.25s var(--ease);
}
.social-icon-btn svg {
  width: 18px;
  height: 18px;
}
.social-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.whatsapp-newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.whatsapp-newsletter h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.whatsapp-newsletter p {
  font-size: 0.84rem;
  margin-bottom: 12px;
  line-height: 1.6;
}
.whatsapp-form {
  display: flex;
  gap: 8px;
}
.whatsapp-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
}
.whatsapp-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.whatsapp-form button {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

/* ---------- 14. المودالات ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 24px;
}
.modal-root.is-open {
  display: grid;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  animation: modalIn 0.4s var(--ease);
}
.modal-box--wide {
  width: min(920px, 100%);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.modal-switch {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  cursor: pointer;
}
.checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

/* ---------- 15. الألبوم واللايت بوكس ---------- */
.gallery-page {
  padding-top: calc(var(--header-h, 84px) + 48px);
}
.gallery-back {
  margin-top: 18px;
  display: inline-flex;
}
.gallery-masonry {
  columns: 3;
  column-gap: 18px;
}
.gallery-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  cursor: zoom-in;
  display: block;
  width: 100%;
  padding: 0;
  background: none;
}
.gallery-item img {
  width: 100%;
  transition: transform 0.7s var(--ease);
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-caption {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(to top, rgba(7, 12, 22, 0.88), transparent);
  color: #f0e8d8;
  font-size: 0.9rem;
  text-align: start;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.35s var(--ease);
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
  transform: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(4, 8, 16, 0.94);
  padding: 60px 20px;
}
.lightbox.is-open {
  display: grid;
}
.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 92vw);
  animation: fadePanel 0.35s var(--ease);
}
.lightbox-figure img {
  max-height: 78vh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.4);
}
.lightbox-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #e6dcc8;
  margin-top: 14px;
  font-size: 0.9rem;
}
.lightbox-counter {
  color: var(--gold-300);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f0e8d8;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--gold-400);
  color: #14192b;
}
.lightbox-close {
  inset-block-start: 20px;
  inset-inline-end: 20px;
}
.lightbox-prev {
  inset-inline-end: 20px;
  top: 50%;
}
.lightbox-next {
  inset-inline-start: 20px;
  top: 50%;
}

/* ---------- 16. الحركات والظهور ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@keyframes fadePanel {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-dust {
    display: none;
  }
}

/* =========================================================
   14. تحسينات إضافية (بدون حذف أي تنسيق قديم)
   ========================================================= */

/* ---------- 14.1 وضوح روابط النافبار فوق صورة الهيرو في الوضع النهاري ---------- */
[data-theme="light"] .site-header:not(.is-scrolled) .main-nav a {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(7, 12, 22, 0.75);
}
[data-theme="light"] .site-header:not(.is-scrolled) .main-nav a:hover {
  color: var(--gold-300);
  background: rgba(255, 255, 255, 0.16);
}
[data-theme="light"] .site-header:not(.is-scrolled) .main-nav a.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
[data-theme="light"] .site-header:not(.is-scrolled) .brand-text strong {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(7, 12, 22, 0.7);
}
[data-theme="light"] .site-header:not(.is-scrolled) .brand-text small {
  color: var(--gold-300);
}
/* وضوح زراير "تسجيل الدخول" و"إنشاء حساب" فوق صورة الهيرو
   في الوضع النهاري (كانت بلون غامق على خلفية غامقة) */
[data-theme="light"] .site-header:not(.is-scrolled) .btn-ghost {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(7, 12, 22, 0.75);
}
[data-theme="light"] .site-header:not(.is-scrolled) .btn-ghost:hover {
  color: var(--gold-300);
}
[data-theme="light"] .site-header:not(.is-scrolled) .btn-gold {
  box-shadow:
    0 2px 10px rgba(7, 12, 22, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* ---------- 14.2 مؤشر السحب لسكشن المميزات (يظهر على الموبايل فقط) ---------- */
.features-shell {
  position: relative;
}
.swipe-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
}
.swipe-hint .swipe-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.swipe-hint svg {
  width: 18px;
  height: 18px;
  animation: swipeNudge 1.5s var(--ease) infinite;
}
@keyframes swipeNudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.65;
  }
  50% {
    transform: translateX(-7px);
    opacity: 1;
  }
}
.swipe-hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease),
    visibility 0.35s var(--ease);
}
.features-dots {
  display: none;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}
.features-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  transition: all 0.25s var(--ease);
}
.features-dots span.is-active {
  width: 22px;
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- 14.3 تحسين آلة الزمن والسحب ---------- */
.tm-track {
  touch-action: pan-y;
  user-select: none;
}
.tm-track.is-dragging {
  cursor: grabbing;
}
.tm-rail {
  scroll-behavior: smooth;
  scroll-padding-inline: 40%;
}
.tm-stop:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 12px;
}
.tm-panel {
  touch-action: pan-y;
}
.tm-swipe-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.tm-swipe-hint svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  animation: swipeNudge 1.5s var(--ease) infinite;
}
.tm-progress {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------- 14.4 لمسة مصرية جمالية في نهاية سكشن قالوا عنا ---------- */
/* السكشن نفسه بدون حشو سفلي: الزخرفة هي اللي بتقفل السكشن بشكل بصري نظيف
   وبكده بنشيل الفراغ الفاضي اللي كان بيتكون تحت رسمة الأهرامات */
#testimonials {
  padding-block-end: 0;
}
.egypt-decor {
  position: relative;
  width: 100vw;
  margin-inline-start: calc(50% - 50vw);
  margin-inline-end: calc(50% - 50vw);
  margin-top: clamp(40px, 6vw, 64px);
  pointer-events: none;
  line-height: 0;
}
.egypt-decor svg {
  display: block;
  width: 100%;
  height: clamp(150px, 20vw, 260px);
}
.egypt-decor .decor-sun {
  animation: decorGlow 6s ease-in-out infinite;
  transform-origin: center;
}
.egypt-decor .decor-star {
  animation: decorTwinkle 3.2s ease-in-out infinite;
  transform-origin: center;
}
.egypt-decor .decor-star:nth-child(2n) {
  animation-delay: 0.7s;
}
.egypt-decor .decor-star:nth-child(3n) {
  animation-delay: 1.5s;
}
@keyframes decorGlow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
@keyframes decorTwinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.95;
  }
}

/* ---------- 14.5 راسلنا الآن: فورم أصغر وصورة مدرس أكبر ---------- */
.contact-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}
.contact-form {
  max-width: 520px;
  width: 100%;
  margin-inline-start: auto;
  padding: 26px 24px;
}
.contact-form .field {
  margin-bottom: 12px;
}
.contact-form .field label {
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.contact-form .field input,
.contact-form .field textarea {
  padding: 10px 14px;
  font-size: 0.92rem;
}
.contact-form .field textarea {
  min-height: 96px;
}
.contact-teacher-img {
  box-shadow: 0 8px 24px -10px rgba(201, 162, 39, 0.5);
}

/* =========================================================
   15. صفحات مستقلة: تسجيل الدخول / إنشاء حساب / تفاصيل الكورس / الاشتراك
   ========================================================= */

/* ---------- 15.1 بانر علوي بسيط للصفحات الداخلية ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(46px, 7vw, 76px) clamp(30px, 5vw, 48px);
  background: var(--bg-alt);
  border-block-end: 1px solid var(--border-soft);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  inset-block-start: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent 70%
  );
  pointer-events: none;
}
.page-hero-inner {
  position: relative;
  max-width: 680px;
}
.page-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 10px 0 10px;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 0;
}
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.page-breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.page-breadcrumb a:hover {
  color: var(--accent);
}
.page-breadcrumb span[aria-hidden] {
  opacity: 0.6;
}
.page-breadcrumb strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- 15.2 صفحات الدخول والتسجيل ---------- */
.auth-section {
  padding-block: clamp(50px, 7vw, 90px);
}
.auth-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: stretch;
}
.auth-visual {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(
      175deg,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 60%
    ),
    var(--bg-alt);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  inset-block-end: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 72%
  );
}
.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.auth-visual-brand .brand-mark {
  width: 42px;
  height: 42px;
  color: var(--accent);
}
.auth-visual-brand strong {
  display: block;
  font-size: 1.05rem;
}
.auth-visual-brand small {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.auth-visual h2 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin: 28px 0 14px;
  line-height: 1.5;
}
.auth-visual h2 em {
  font-style: normal;
  font-family: var(--font-display);
  background: linear-gradient(
    100deg,
    var(--gold-300),
    #fff3d0 40%,
    var(--bronze)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* تباين أوضح لعبارة "التاريخ حكاية أمة" في الوضع النهاري
   (التدرج الفاتح كان قريب جدًا من خلفية الكارت الفاتحة) */
[data-theme="light"] .auth-visual h2 em {
  background: linear-gradient(
    100deg,
    var(--accent-strong),
    var(--accent) 55%,
    var(--bronze)
  );
  -webkit-background-clip: text;
  background-clip: text;
}
.auth-visual ul {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.auth-visual li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.auth-visual li::before {
  content: "✓";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.75rem;
}
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card h2 {
  font-size: 1.4rem;
  margin-bottom: 22px;
}
.auth-card .checkbox {
  margin-bottom: 20px;
}

/* ---------- 15.3 صفحة تفاصيل الكورس ---------- */
.course-detail-section {
  padding-block: clamp(46px, 7vw, 90px);
}
.course-detail-card {
  max-width: 980px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
}
.detail-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: clamp(28px, 4vw, 44px) 0;
}

/* ---------- 15.4 صفحة الاشتراك في كورس ---------- */
.subscribe-section {
  padding-block: clamp(46px, 7vw, 90px);
}
.subscribe-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: start;
}
.subscribe-course-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.subscribe-course-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  overflow: hidden;
}
.subscribe-course-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.subscribe-course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.subscribe-course-info {
  padding: 22px 22px 26px;
}
.subscribe-course-info h3 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
}
.subscribe-course-info p {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.subscribe-note {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.subscribe-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.subscribe-form-card h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =========================================================
   منصة التاريخ – مستر أحمد عبد الناصر مقداد
   teacher-visual.css : المعالجة البصرية لصور المدرس
   المفهوم: "لوح الأرشيف" — الصورة كقطعة مؤرشفة داخل
   قوس متحفي، مع سكة زمنية، ختم، وطبقات ورق مسطّر.
   لا يتم تعديل الصورة نفسها إطلاقًا — فقط ما حولها.
   ========================================================= */

:root {
  --tv-ink: 8, 13, 24;
  --tv-gold: 201, 162, 39;
  --tv-gold-soft: 231, 205, 125;
  --tv-arch: 48% 48% 14px 14px / 34% 34% 3% 3%;
  --tv-rule: rgba(201, 162, 39, 0.22);
}

/* بطاقة الفوليو في قسم التواصل فقط (خلفية فاتحة في الوضع النهاري) —
   الهيرو يبقى بأسلوبه الداكن في كلا الوضعين لأن خلفيته داكنة دائمًا */
[data-theme="light"] .tv-folio,
[data-theme="light"] .tv-folio-photo {
  --tv-ink: 236, 227, 208;
  --tv-rule: rgba(146, 64, 14, 0.28);
}

/* =========================================================
   1) الهيرو — لوح الأرشيف
   ========================================================= */

.tv-stage {
  position: relative;
  margin: 0 auto;
  width: min(100%, 430px);
  padding-block: clamp(34px, 5vw, 62px);
  padding-inline: clamp(18px, 4vw, 34px);
  isolation: isolate;
  --tv-x: 0;
  --tv-y: 0;
}

/* كلمة ضخمة مفرّغة كخلفية طباعية (دمج التايبوجرافي) */
.tv-word {
  position: absolute;
  z-index: 0;
  top: clamp(-6px, 0.5vw, 10px);
  inset-inline-start: clamp(-26px, -2vw, -6px);
  font-family: var(--font-display, serif);
  font-weight: 700;
  font-size: clamp(4.6rem, 15vw, 9.5rem);
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--tv-gold), 0.42);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  transform: translate3d(
    calc(var(--tv-x) * -14px),
    calc(var(--tv-y) * -10px),
    0
  );
  transition: transform 0.5s var(--ease, ease);
}

/* ورقة مسطّرة مائلة خلف اللوح */
.tv-slab {
  position: absolute;
  z-index: 1;
  inset-block: clamp(52px, 7vw, 84px) clamp(18px, 3vw, 34px);
  inset-inline: clamp(4px, 2vw, 22px) clamp(30px, 6vw, 58px);
  border: 1px solid var(--tv-rule);
  border-radius: 6px;
  background-image:
    repeating-linear-gradient(
      to bottom,
      var(--tv-rule) 0 1px,
      transparent 1px 13px
    ),
    linear-gradient(
      180deg,
      rgba(var(--tv-gold), 0.07),
      rgba(var(--tv-gold), 0.015)
    );
  transform: rotate(-4.6deg)
    translate3d(calc(var(--tv-x) * 8px), calc(var(--tv-y) * 6px), 0);
  transition: transform 0.6s var(--ease, ease);
  pointer-events: none;
}

/* خطوط كنتور طوبوغرافية — إشارة تاريخية مجرّدة بلا أيقونات */
.tv-topo {
  position: absolute;
  z-index: 1;
  width: clamp(190px, 46%, 260px);
  aspect-ratio: 1;
  inset-inline-end: clamp(-18px, -1vw, 0px);
  top: clamp(6px, 2vw, 26px);
  border-radius: 50%;
  background-image: repeating-radial-gradient(
    circle at 62% 38%,
    transparent 0 11px,
    rgba(var(--tv-gold), 0.3) 11px 12px
  );
  -webkit-mask-image: radial-gradient(
    circle at 62% 38%,
    #000 40%,
    transparent 78%
  );
  mask-image: radial-gradient(circle at 62% 38%, #000 40%, transparent 78%);
  opacity: 0.55;
  pointer-events: none;
  transform: translate3d(
    calc(var(--tv-x) * -18px),
    calc(var(--tv-y) * -12px),
    0
  );
  transition: transform 0.6s var(--ease, ease);
}

/* اللوح نفسه */
.tv-plate {
  position: relative;
  z-index: 3;
  transform: translate3d(calc(var(--tv-x) * 10px), calc(var(--tv-y) * 8px), 0);
  transition: transform 0.6s var(--ease, ease);
}

/* خط قوس خارجي محفور (إطار مزدوج) */
.tv-plate::before {
  content: "";
  position: absolute;
  inset: clamp(-16px, -2vw, -10px);
  border: 1px solid rgba(var(--tv-gold), 0.32);
  border-radius: var(--tv-arch);
  pointer-events: none;
}

.tv-arch {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--tv-arch);
  overflow: hidden;
  border: 1px solid rgba(var(--tv-gold), 0.5);
  background: rgb(var(--tv-ink));
  box-shadow:
    0 46px 90px -46px rgba(0, 0, 0, 0.92),
    inset 0 0 0 6px rgba(var(--tv-ink), 0.55),
    inset 0 0 0 7px rgba(var(--tv-gold), 0.28);
}

/* الصورة الأصلية: بلا أي تعديل على الشخص */
.tv-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
  display: block;
  transform: scale(1.02);
  transition: transform 1.1s var(--ease, ease);
}

.tv-stage:hover .tv-arch img {
  transform: scale(1.06);
}

/* حجاب سفلي + فينييت على الأطراف فقط (الوجه يبقى كما هو) */
.tv-arch .tv-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      rgba(var(--tv-ink), 0.92) 0%,
      rgba(var(--tv-ink), 0.42) 22%,
      transparent 46%
    ),
    radial-gradient(
      120% 90% at 50% 35%,
      transparent 52%,
      rgba(var(--tv-ink), 0.55) 100%
    );
}

/* حبيبات ورقية دقيقة */
.tv-arch .tv-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.55) 0.5px, transparent 0.5px),
    radial-gradient(rgba(0, 0, 0, 0.5) 0.5px, transparent 0.5px);
  background-size:
    4px 4px,
    6px 6px;
  background-position:
    0 0,
    2px 3px;
}

/* شرائط ضوء أفقية خفيفة تعبر أعلى اللوح (طبقات وعمق) */
.tv-arch .tv-lines {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 46%;
  pointer-events: none;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(var(--tv-gold-soft), 0.16) 0 1px,
    transparent 1px 9px
  );
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}

/* أقواس زوايا (علامات تسجيل أرشيفية) */
.tv-mark {
  position: absolute;
  z-index: 5;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(var(--tv-gold), 0.75);
  pointer-events: none;
}
.tv-mark--tl {
  top: clamp(-24px, -3vw, -18px);
  inset-inline-start: clamp(-24px, -3vw, -18px);
  border-block-end: 0;
  border-inline-end: 0;
}
.tv-mark--br {
  bottom: clamp(-24px, -3vw, -18px);
  inset-inline-end: clamp(-24px, -3vw, -18px);
  border-block-start: 0;
  border-inline-start: 0;
}

/* سكة زمنية عمودية ملتصقة بحرف اللوح */
.tv-rail {
  position: absolute;
  z-index: 6;
  top: 50%;
  inset-inline-start: clamp(-14px, -1.5vw, -6px);
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 9px;
  list-style: none;
  border: 1px solid rgba(var(--tv-gold), 0.34);
  border-radius: 999px;
  background: rgba(var(--tv-ink), 0.72);
  backdrop-filter: blur(7px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
}
.tv-rail li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(var(--tv-gold-soft), 0.9);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.tv-rail li::before {
  content: "";
  width: 1px;
  height: 12px;
  background: rgba(var(--tv-gold), 0.6);
}
.tv-rail li.is-key {
  color: #fff6df;
}
.tv-rail li.is-key::before {
  height: 20px;
  background: rgb(var(--tv-gold-soft));
}

/* لوحة التعريف المحفورة — تتقاطع مع أسفل القوس */
.tv-cap {
  position: relative;
  z-index: 7;
  margin: -34px clamp(-6px, -1vw, 0px) 0 auto;
  width: min(86%, 320px);
  padding: 14px 18px;
  border: 1px solid rgba(var(--tv-gold), 0.42);
  border-radius: 4px;
  background: rgba(var(--tv-ink), 0.86);
  backdrop-filter: blur(9px);
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.95);
  text-align: start;
  transform: translate3d(calc(var(--tv-x) * 14px), calc(var(--tv-y) * 10px), 0);
  transition: transform 0.6s var(--ease, ease);
}
.tv-cap-idx {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: rgba(var(--tv-gold-soft), 0.85);
  margin-bottom: 6px;
}
.tv-cap strong {
  display: block;
  font-family: var(--font-display, serif);
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  color: #f7f0e2;
  line-height: 1.5;
}
.tv-cap span.tv-cap-role {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(243, 236, 224, 0.68);
}
.tv-cap::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  bottom: 8px;
  height: 1px;
  background: linear-gradient(to left, rgba(var(--tv-gold), 0.6), transparent);
}

/* ختم دائري بنص دائري */
.tv-seal {
  position: absolute;
  z-index: 8;
  bottom: 22%;
  inset-inline-end: clamp(-14px, -1vw, -2px);
  width: clamp(74px, 17vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--tv-ink), 0.78);
  border: 1px solid rgba(var(--tv-gold), 0.45);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transform: translate3d(
    calc(var(--tv-x) * -16px),
    calc(var(--tv-y) * -12px),
    0
  );
  transition: transform 0.6s var(--ease, ease);
}
.tv-seal-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(var(--tv-gold-soft), 0.85) 0deg 0.9deg,
    transparent 0.9deg 9deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 70%, #000 72%);
  mask-image: radial-gradient(circle, transparent 70%, #000 72%);
  animation: tvSpin 48s linear infinite;
}
.tv-seal-core {
  display: grid;
  justify-items: center;
  gap: 1px;
  line-height: 1;
  color: rgba(var(--tv-gold-soft), 0.95);
}
.tv-seal-core strong {
  font-family: var(--font-display, serif);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
}
.tv-seal-core small {
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  opacity: 0.85;
}
@keyframes tvSpin {
  to {
    transform: rotate(360deg);
  }
}

/* الوضع النهاري: تعزيز الذهبي في الهيرو ليظهر أوضح على خلفيته الداكنة */
[data-theme="light"] .tv-stage {
  --tv-gold: 222, 185, 65;
  --tv-gold-soft: 255, 241, 190;
}
[data-theme="light"] .tv-word {
  -webkit-text-stroke: 1.5px rgba(var(--tv-gold), 0.75);
  opacity: 0.8;
}
[data-theme="light"] .tv-plate::before {
  border-color: rgba(var(--tv-gold), 0.65);
}
[data-theme="light"] .tv-arch {
  border-color: rgba(var(--tv-gold), 0.85);
  box-shadow:
    0 46px 90px -46px rgba(0, 0, 0, 0.92),
    inset 0 0 0 6px rgba(var(--tv-ink), 0.55),
    inset 0 0 0 7px rgba(var(--tv-gold), 0.55);
}
[data-theme="light"] .tv-mark {
  border-color: rgba(var(--tv-gold), 1);
}
[data-theme="light"] .tv-rail {
  border-color: rgba(var(--tv-gold), 0.7);
  background: rgba(var(--tv-ink), 0.88);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .tv-rail li {
  color: rgba(var(--tv-gold-soft), 1);
}
[data-theme="light"] .tv-rail li::before {
  background: rgba(var(--tv-gold), 0.9);
}
[data-theme="light"] .tv-rail li.is-key {
  color: #fffbe6;
}
[data-theme="light"] .tv-rail li.is-key::before {
  background: rgb(var(--tv-gold-soft));
}
[data-theme="light"] .tv-cap {
  border-color: rgba(var(--tv-gold), 0.8);
  background: rgba(var(--tv-ink), 0.92);
}
[data-theme="light"] .tv-cap-idx {
  color: rgba(var(--tv-gold-soft), 1);
}
[data-theme="light"] .tv-cap strong {
  color: #fffbe6;
}
[data-theme="light"] .tv-cap span.tv-cap-role {
  color: rgba(255, 251, 230, 0.95);
}
[data-theme="light"] .tv-cap::after {
  background: linear-gradient(to left, rgba(var(--tv-gold), 0.9), transparent);
}
[data-theme="light"] .tv-seal {
  border-color: rgba(var(--tv-gold), 0.8);
  background: rgba(var(--tv-ink), 0.86);
}
[data-theme="light"] .tv-seal-core {
  color: rgba(var(--tv-gold-soft), 1);
}
[data-theme="light"] .tv-topo {
  opacity: 0.75;
}

/* =========================================================
   2) قسم "راسلنا الآن" — بطاقة أرشيف مدمجة
   ========================================================= */

.contact-teacher-header.tv-folio {
  display: grid;
  grid-template-columns: clamp(112px, 32%, 150px) 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
  position: relative;
  padding-bottom: 22px;
}

.tv-folio-photo {
  position: relative;
  margin: 0;
  isolation: isolate;
}
/* ورقة مسطّرة خلف الصورة */
.tv-folio-photo::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 12px -10px -10px 10px;
  border: 1px solid var(--tv-rule);
  border-radius: 4px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--tv-rule) 0 1px,
    transparent 1px 11px
  );
  transform: rotate(-4deg);
}
.tv-folio-arch {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 5;
  border-radius: 46% 46% 10px 10px / 32% 32% 3% 3%;
  overflow: hidden;
  border: 1px solid rgba(var(--tv-gold), 0.55);
  box-shadow:
    0 24px 50px -28px rgba(0, 0, 0, 0.75),
    inset 0 0 0 4px rgba(var(--tv-ink), 0.5),
    inset 0 0 0 5px rgba(var(--tv-gold), 0.25);
}
.tv-folio-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
  display: block;
  transition: transform 0.9s var(--ease, ease);
}
.contact-card-info:hover .tv-folio-arch img {
  transform: scale(1.05);
}
.tv-folio-arch .tv-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--tv-ink), 0.72),
    transparent 52%
  );
}
/* مسطرة ذهبية رأسية تربط الصورة بالبيانات */
.tv-folio-rule {
  position: absolute;
  z-index: 3;
  inset-block: 16%;
  inset-inline-end: -12px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(var(--tv-gold), 0.75),
    transparent
  );
}
.tv-folio-rule span {
  position: absolute;
  inset-inline-start: -4px;
  width: 9px;
  height: 1px;
  background: rgba(var(--tv-gold), 0.8);
}
.tv-folio-rule span:nth-child(1) {
  top: 12%;
}
.tv-folio-rule span:nth-child(2) {
  top: 50%;
  width: 14px;
  inset-inline-start: -7px;
}
.tv-folio-rule span:nth-child(3) {
  top: 88%;
}
/* رقم أرشيفي على حرف الصورة */
.tv-folio-idx {
  position: absolute;
  z-index: 4;
  bottom: 8px;
  inset-inline-start: 8px;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: rgba(var(--tv-gold-soft), 0.92);
}

.contact-teacher-details.tv-folio-meta .tv-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
}
.tv-folio-meta .tv-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.tv-folio-meta h3 {
  font-family: var(--font-display, serif);
}
.tv-folio-eras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.tv-folio-eras li {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-alt);
}
.tv-folio-eras li:first-child {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* =========================================================
   3) التجاوب
   ========================================================= */

@media (max-width: 1200px) {
  .tv-stage {
    width: min(100%, 400px);
  }
}

@media (max-width: 992px) {
  .tv-stage {
    width: min(100%, 380px);
  }
  .tv-word {
    font-size: clamp(4rem, 17vw, 7rem);
  }
}

@media (max-width: 768px) {
  .contact-teacher-header.tv-folio {
    grid-template-columns: clamp(104px, 34%, 132px) 1fr;
    gap: 16px;
  }
}

@media (max-width: 576px) {
  .tv-stage {
    width: min(100%, 320px);
    padding-inline: 16px;
    padding-block: 40px 28px;
  }
  .tv-word {
    font-size: clamp(3.2rem, 18vw, 5rem);
    inset-inline-start: 4px;
    top: 4px;
    opacity: 0.42;
  }
  .tv-topo {
    width: 150px;
  }
  .tv-rail {
    padding: 9px 7px;
    gap: 8px;
  }
  .tv-rail li {
    font-size: 0.56rem;
  }
  .tv-cap {
    width: 100%;
    margin-inline: 0;
    margin-top: -26px;
    padding: 12px 14px;
  }
  .tv-seal {
    width: 62px;
    bottom: 24%;
  }
  .tv-mark {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 400px) {
  .contact-teacher-header.tv-folio {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 22px;
  }
  .tv-folio-photo {
    width: 132px;
  }
  .tv-folio-rule {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tv-seal svg {
    animation: none;
  }
  .tv-word,
  .tv-slab,
  .tv-topo,
  .tv-plate,
  .tv-cap,
  .tv-seal {
    transform: none !important;
  }
}

/* تحييد الأنماط القديمة للصورة الدائرية داخل بطاقة التواصل */
.tv-folio-arch img.contact-teacher-img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* =========================================================
   تنسيقات صفحة الاشتراك المطابقة للتصميم الاحترافي (style.css)
   ========================================================= */

.subscribe-maestro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: start;
}

.subscribe-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.subscribe-form-card h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

/* تنسيق الصفوف الأفقية للحقول */
.field-row-horizontal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.field label span {
  color: #e53e3e;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  transition: all 0.25s var(--ease);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* العمود الأيسر (وسيلة الدفع + التنبيهات) */
.subscribe-side-column {
  display: grid;
  gap: 24px;
}

.payment-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.payment-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.payment-box-header svg {
  color: var(--accent);
}

.wallet-card-inner {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.wallet-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.wallet-title-row svg {
  color: var(--accent);
}

.wallet-number-display {
  font-family: monospace;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.btn-copy-wallet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn-copy-wallet:hover {
  background: var(--accent);
  color: var(--on-accent);
}

/* قائمة التنبيهات */
.payment-alerts-box ul.alerts-list {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.payment-alerts-box ul.alerts-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.payment-alerts-box ul.alerts-list li svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 4px;
}

.payment-alerts-box ul.alerts-list li a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 700;
}

/* التجاوب (Responsive) للموبايل والشاشات المتوسطة */
@media (max-width: 992px) {
  .subscribe-maestro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .field-row-horizontal {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .subscribe-form-card {
    padding: 24px 18px;
  }
}
/* =========================================================
   إخفاء الأيقونات العائمة في الهيرو وإظهارها عند السكرول
   ========================================================= */
.float-whatsapp-fixed,
.float-top-fixed {
  position: fixed;
  inset-block-end: 28px;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s var(--ease),
    visibility 0.35s var(--ease),
    transform 0.35s var(--ease);
  transform: translateY(10px);
}

.float-whatsapp-fixed {
  inset-inline-end: 28px; /* أقصى اليمين */
}

.float-top-fixed {
  inset-inline-start: 28px; /* أقصى اليسار */
}

/* حالة الظهور عند النزول لأسفل */
.float-whatsapp-fixed.is-visible,
.float-top-fixed.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.float-btn svg {
  width: 24px;
  height: 24px;
}

/* زر الواتساب */
.float-whatsapp {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.float-whatsapp:hover {
  transform: translateY(-4px) scale(1.06);
  background: #20ba5a;
  box-shadow: 0 16px 35px -6px rgba(37, 211, 102, 0.5);
}

/* زر الصعود لأعلى */
.float-top {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

.float-top:hover {
  transform: translateY(-4px) scale(1.06);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #10182a;
  border-color: transparent;
  box-shadow: 0 16px 35px -6px rgba(201, 162, 39, 0.5);
}

@media (max-width: 576px) {
  .float-whatsapp-fixed {
    inset-block-end: 18px;
    inset-inline-end: 18px;
  }
  .float-top-fixed {
    inset-block-end: 18px;
    inset-inline-start: 18px;
  }
  .float-btn {
    width: 44px;
    height: 44px;
  }
  .float-btn svg {
    width: 20px;
    height: 20px;
  }
}
/* =========================================================
   تنسيق وتحسين اللوجو الأساسي
   ========================================================= */
.site-logo {
  height: 44px; /* حجم متناسق ومثالي للهيدر */
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

/* في الوضع الليلي: إزالة أي خلفية بيضاء قد تكون موجودة بدمج الصورة، 
   أو إزالة فلتر العكس تماماً لو كان اللوجو ملوناً أو أبيض بطبيعته */
[data-theme="dark"] .site-logo {
  /* استخدمنا هنا تأثير إضاءة خفيف (Glow) بدلاً من قلب الألوان العكسي لكي لا يفسد ألوان اللوجو */
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
}

/* =========================================================
   أزرار الهيدر والتحكم
   ========================================================= */
.header-actions .desktop-register-btn {
  display: inline-flex;
}

.header-actions .mobile-login-btn {
  display: inline-flex;
}
/* تنسيقات الشاشات الصغيرة (الموبايل) */
@media (max-width: 992px) {
  .site-header .container.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    padding-inline: 10px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  .brand-text strong {
    font-size: 0.95rem;
  }

  .brand-text small {
    font-size: 0.62rem;
  }

  .main-nav {
    display: none;
  }

  /* إخفاء زر "إنشاء حساب" في الموبايل لأنه غالباً بيكون جوه القائمة أو مش مساحته الهيدر */
  .header-actions .desktop-register-btn {
    display: none !important;
  }

  /* ترتيب الأزرار في الموبايل: [زر الوضع] -> [زر القائمة] -> [زر تسجيل الدخول] (حسب الترتيب المطلوب) */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .header-actions .mobile-login-btn {
    display: inline-flex;
    padding: 5px 9px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border-color: var(--border);
  }
}
@media (max-width: 992px) {
  .header-actions .btn-ghost {
    display: inline-flex !important;
  }
}
@media (max-width: 992px) {
  .header-actions .btn-ghost {
    display: inline-flex !important;
    padding: 10px 18px !important;
    font-size: 0.92rem !important;
    border-radius: 999px !important;
  }
}
@media (max-width: 992px) {
  /* جعل حاوية الأزرار تتحرك وتأخذ مساحة مرنة لتقترب من اللوجو وتتوسط النافبار */
  .header-actions {
    margin-inline-start: auto; /* يدفع مجموعة الأزرار لتقترب من اللوجو */
    gap: 16px; /* زيادة المسافة البسيطة بين الأزرار نفسها لتبدو منظمة */
  }

  /* تعديل المسافة الكلية للنافبار */
  .site-header .container.header-inner {
    padding-inline: 14px;
  }
}
