/* =========================================================
   منصة أساس للتصميم الإعلاني — الأنماط العامة
   الألوان مستخرجة من صورة الدورة: كحلي → أزرق → تركوازي + برتقالي
   ========================================================= */

:root {
  /* ---- لوحة الألوان ---- */
  --navy-900: #050c22;
  --navy-800: #0a1533;
  --navy-700: #0f2350;
  --blue-600: #1c4fb0;
  --blue-500: #2f6fd6;
  --blue-400: #4f8ef0;
  --teal-600: #12806a;
  --teal-500: #1aa07f;
  --accent:   #f26a2b;
  --accent-2: #ff8a4c;

  --text:   #eef3ff;
  --muted:  #a9b6d4;
  --card:   rgba(255, 255, 255, 0.045);
  --card-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.11);

  --brand-gradient: linear-gradient(135deg, #0a1533 0%, #123a8a 50%, #14876b 100%);
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px -6px rgba(79, 142, 240, 0.45);

  --maxw: 1180px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", "Tahoma", system-ui, -apple-system, sans-serif;
}

/* ---- إعادة ضبط ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* clip يمنع التمرير الأفقي بدون إنشاء حاوية تمرير (لا يكسر sticky ولا scrollIntoView) */
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.85;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* متصفحات قديمة (Safari < 16) لا تدعم overflow: clip — احتياط بلا كسر التمرير الرأسي */
@supports not (overflow: clip) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
}

/* خلفية متدرجة ثابتة خفيفة الحركة */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(47, 111, 214, 0.28), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(26, 160, 127, 0.22), transparent 60%),
    var(--navy-900);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* =========================================================
   الأزرار
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(242, 106, 43, 0.7);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -12px rgba(242, 106, 43, 0.8); }

.btn-ghost {
  background: var(--card-2);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.12); }

.btn-block { width: 100%; }

/* =========================================================
   الشريط العلوي
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 12, 34, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: padding 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.site-header.scrolled {
  background: rgba(5, 12, 34, 0.9);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7);
}

/* ستارة خلف درج قائمة الجوال */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(3, 7, 20, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-scrim.show { opacity: 1; pointer-events: auto; }
body.nav-locked { overflow: hidden; }

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}
.site-header.scrolled .nav { padding: 8px 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.2px;
  justify-self: start;
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px -8px rgba(242, 106, 43, 0.6);
  transition: transform 0.25s ease;
}
.brand:hover .mark { transform: rotate(-6deg) scale(1.04); }
.brand small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 1px;
}

/* عناصر الحساب/اللغة داخل القائمة تظهر في درج الجوال فقط */
.nav-links .nav-acc-item,
.nav-links .nav-lang-item { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: center;
}
.nav-links a {
  position: relative;
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 8px;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(0.5); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.nav-actions .btn { padding: 9px 20px; font-size: 0.9rem; }
.nav-actions .btn-primary .lbl-sm { display: none; }
.nav-actions .btn-primary .lbl-lg { display: inline; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.nav-toggle:hover { background: var(--card); }

/* =========================================================
   عناوين الأقسام
   ========================================================= */
.section { padding: 90px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 46px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-2);
  padding: 6px 14px;
  border: 1px solid rgba(242, 106, 43, 0.35);
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.35;
}
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* =========================================================
   البطل (Hero) + بطاقة الدورة
   ========================================================= */
.hero {
  position: relative;
  padding: 70px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  inset-inline-start: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(79, 142, 240, 0.5), transparent 65%);
  filter: blur(20px);
  animation: float 9s ease-in-out infinite;
  z-index: 0;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 24px); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 46px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  line-height: 1.3;
}
.hero-copy h1 .hl {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p.lead {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 20px 0 30px;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-meta b { color: var(--text); font-size: 1.25rem; display: block; }

/* بطاقة السعر */
.price-card {
  background: linear-gradient(160deg, rgba(28, 79, 176, 0.28), rgba(18, 128, 106, 0.22));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.price-card .tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.price-card .course-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 18px; }
.price-card .price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.price-card .price b { font-size: 2.6rem; font-weight: 800; }
.price-card .price span { color: var(--muted); font-weight: 600; }
.price-card .price-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.price-card ul { display: grid; gap: 12px; margin-bottom: 24px; }
.price-card li { display: flex; align-items: center; gap: 10px; font-size: 0.98rem; }
.price-card li::before {
  content: "✓";
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(26, 160, 127, 0.25);
  color: #7ff0cf;
  font-weight: 800;
  font-size: 0.85rem;
}
.price-card .deadline {
  text-align: center;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* عدّاد التسجيل التنازلي */
.reg-countdown { margin-top: 16px; text-align: center; }
.reg-countdown-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 9px; }
.reg-countdown-grid { display: flex; justify-content: center; gap: 8px; }
.reg-countdown .rc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 9px 6px 7px;
  background: rgba(242, 106, 43, 0.12);
  border: 1px solid rgba(242, 106, 43, 0.38);
  border-radius: 11px;
}
.reg-countdown .rc-cell b {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.reg-countdown .rc-cell small { font-size: 0.66rem; color: var(--muted); margin-top: 3px; }
@media (max-width: 380px) {
  .reg-countdown-grid { gap: 5px; }
  .reg-countdown .rc-cell { min-width: 48px; padding: 7px 4px; }
  .reg-countdown .rc-cell b { font-size: 1.1rem; }
}

/* =========================================================
   معرض الأعمال
   ========================================================= */
.gallery-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-glow); }
.gallery-item .remove {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(5, 12, 34, 0.8);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: none;
}
.gallery-grid.editing .gallery-item .remove { display: block; }
.gallery-grid.editing .gallery-item { outline: 2px dashed rgba(255, 255, 255, 0.25); }

/* أعمال المتدربين — لوحة "قريبًا" حين لا توجد أعمال منشورة بعد */
.sw-soon {
  max-width: 560px;
  margin: 8px auto 0;
  padding: 42px 30px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--card);
}
.sw-soon-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 999px;
  background: rgba(242, 106, 43, 0.14);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.sw-soon p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.9;
  font-size: 1rem;
}

.gallery-admin {
  margin-top: 22px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  display: none;
}
.gallery-admin.open { display: block; }
.gallery-admin .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.gallery-admin p { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
input[type="file"] { color: var(--muted); font-family: inherit; }

/* =========================================================
   بطاقة طلب تصميم خاص
   ========================================================= */
.request-card {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--brand-gradient);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.request-card .ic {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  font-size: 1.8rem;
  flex: 0 0 auto;
  box-shadow: var(--shadow-glow);
}
.request-card .txt { flex: 1 1 320px; }
.request-card h3 { font-size: 1.5rem; font-weight: 800; }
.request-card p { color: rgba(255, 255, 255, 0.8); margin-top: 6px; }

/* =========================================================
   التقييمات
   ========================================================= */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.review:hover { transform: translateY(-5px); background: var(--card-2); }
.review .stars { color: #ffc061; letter-spacing: 3px; margin-bottom: 12px; }
.review p { font-size: 0.98rem; }
.review .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.review .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--brand-gradient);
  border: 1px solid var(--border);
}
.review .who b { display: block; font-size: 0.98rem; }
.review .who span { color: var(--muted); font-size: 0.83rem; }

/* =========================================================
   شريط واتساب
   ========================================================= */
.whatsapp-bar { padding: 40px 0 90px; }
.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 22px 30px;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0f2350, #12806a);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-btn:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -18px rgba(18, 128, 106, 0.7); }
.whatsapp-btn .wa-ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.whatsapp-btn .wa-ic svg { width: 24px; height: 24px; fill: #fff; }

/* زر واتساب عائم */
.wa-float {
  position: fixed;
  inset-inline-start: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  z-index: 60;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.7);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* =========================================================
   التذييل
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 12, 34, 0.6);
  padding: 60px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { font-size: 1rem; margin-bottom: 16px; }
.footer-grid p { color: var(--muted); font-size: 0.95rem; }
.footer-grid a { color: var(--muted); display: block; padding: 5px 0; transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--text); }
.footer-grid a.footer-contact {
  display: flex;
  align-items: center;
  gap: 9px;
  direction: rtl;
  justify-content: flex-start;
}
.footer-contact-ic {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--card-2);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.footer-contact-ic svg { width: 16px; height: 16px; }
.footer-contact-ic svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-contact-ic--wa svg path { fill: currentColor; stroke: none; }
.footer-grid a.footer-contact:hover .footer-contact-ic {
  background: rgba(242, 106, 43, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}
.footer-contact-tx { direction: ltr; unicode-bidi: plaintext; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.87rem;
}

/* =========================================================
   الصفحات الداخلية + النماذج
   ========================================================= */
.page-hero {
  padding: 70px 0 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
}
.page-hero p { color: var(--muted); margin-top: 12px; font-size: 1.08rem; }

.form-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-card.wide { max-width: 640px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(5, 12, 34, 0.55);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(79, 142, 240, 0.2);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select option { color: #111; }

.form-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 0.92rem; }
.form-switch a { color: var(--accent-2); font-weight: 700; cursor: pointer; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert.err { background: rgba(242, 106, 43, 0.15); border: 1px solid rgba(242, 106, 43, 0.4); color: #ffb38a; }
.alert.ok { background: rgba(26, 160, 127, 0.15); border: 1px solid rgba(26, 160, 127, 0.4); color: #7ff0cf; }

/* لوحة المتدرب بعد الدخول */
.dash { display: none; }
.dash.show { display: block; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}
.lessons-list { display: grid; gap: 12px; }
.lesson {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.lesson .num {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-gradient);
  font-weight: 800;
}
.lesson b { display: block; }
.lesson span { color: var(--muted); font-size: 0.88rem; }
.lesson .lock { margin-inline-start: auto; color: var(--muted); }

/* =========================================================
   شبكة الدورات
   ========================================================= */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.course-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.course-card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  padding: 18px;
  position: relative;
}
.course-card .thumb .badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--accent-gradient);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
}
.course-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card .body h3 { font-size: 1.15rem; font-weight: 800; }
.course-card .body p { color: var(--muted); font-size: 0.92rem; }
.course-card .foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.course-card .foot .p { font-weight: 800; font-size: 1.2rem; }

.soon {
  opacity: 0.6;
}
.soon .thumb { filter: grayscale(0.4); }

/* شارات صغيرة */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

/* منهج الدورة */
.syllabus { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.syllabus .mod {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  transition: background 0.25s ease;
}
.syllabus .mod:hover { background: var(--card-2); }
.syllabus .mod b { display: block; margin-bottom: 6px; }
.syllabus .mod span { color: var(--muted); font-size: 0.9rem; }

/* =========================================================
   حركة الظهور عند التمرير
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   الاستجابة للشاشات
   ========================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .syllabus { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav {
    display: flex;
    justify-content: space-between;
  }
  .nav-links {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: min(320px, 84vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 80px 16px 28px;
    background: var(--navy-900);
    background-image: linear-gradient(180deg, rgba(242, 106, 43, 0.09), transparent 220px);
    border-left: 1px solid var(--border);
    box-shadow: -26px 0 64px -16px rgba(0, 0, 0, 0.65);
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.33, 1, 0.68, 1);
    z-index: 60;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links::before {
    content: "القائمة";
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 0 14px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { list-style: none; }
  .nav-links a {
    display: flex;
    align-items: center;
    padding: 14px 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
  }
  .nav-links a::after { display: none; }
  .nav-links a:hover,
  .nav-links a:focus-visible { background: var(--card); color: var(--text); }
  .nav-links .current-menu-item > a,
  .nav-links .current_page_item > a,
  .nav-links a.active {
    background: rgba(242, 106, 43, 0.14);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  /* عناصر الحساب داخل الدرج */
  .nav-links .nav-acc-item { display: block; margin-top: 6px; list-style: none; }
  .nav-links .nav-acc-item > a { color: var(--text); }
  .nav-links .nav-acc-logout > a { color: var(--accent-2); }
  .nav-toggle { display: block; position: relative; z-index: 61; flex: 0 0 auto; }
  /* رأس الجوال: لوقو + اسم + زر واحد + زر القائمة (اللغة داخل الدرج) */
  .nav { flex-wrap: nowrap; gap: 7px; align-items: center; }
  .brand { flex: 1 1 auto; min-width: 0; gap: 8px; }
  .brand > span { min-width: 0; overflow: hidden; }
  .brand > span,
  .brand > span > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand > span { font-size: 0.92rem; line-height: 1.22; }
  .brand small { font-size: 0.62rem; }
  .brand .mark,
  .brand .brand-logo-img,
  .brand .custom-logo { flex: 0 0 auto; }
  .nav-actions { gap: 5px; flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; }
  .nav-actions .nav-logout { display: none; } /* «خروج» في درج القائمة */
  .nav-actions .btn-primary { padding: 7px 10px; font-size: 0.76rem; white-space: nowrap; flex: 0 0 auto; }
  /* على الجوال: نص أقصر للزر */
  .nav-actions .btn-primary .lbl-lg { display: none; }
  .nav-actions .btn-primary .lbl-sm { display: inline; }
  /* مبدّل اللغة يبقى في الهيدر لكن مصغّراً جداً */
  .nav-actions .gtranslate_wrapper { flex: 0 1 auto; min-width: 0; }
  .nav-actions .gtranslate_wrapper select,
  .nav-actions .gt_selector {
    padding: 4px 4px !important;
    font-size: 0.6rem !important;
    max-width: 58px;
    text-overflow: ellipsis;
  }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .request-card { padding: 28px; }
  .price-card { padding: 24px; }
}

/* =========================================================
   إضافات خاصة بووردبريس
   ========================================================= */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  inset-inline-start: 0;
  top: -120px; /* مخفي عمودياً — لا يسبّب تمريراً أفقياً في RTL */
  z-index: 100000;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

/* شعار الموقع — صورة واحدة بنفس مقاس مربّع الحرف السابق */
.brand .brand-logo-img,
.brand .custom-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
  display: block;
  box-shadow: 0 6px 18px -8px rgba(242, 106, 43, 0.6);
}

/* قوائم ووردبريس */
.nav-links.footer-menu,
.footer-menu { display: block; }
.footer-menu li { display: block; }
.footer-menu a { color: var(--muted); display: block; padding: 5px 0; }
.footer-menu a:hover { color: var(--text); }

.nav-links .menu-item-has-children > a::after { content: " ▾"; opacity: 0.6; }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { color: var(--text); background: var(--card-2); }

/* محتوى الصفحات العادية */
.entry-content { max-width: 760px; margin-inline: auto; font-size: 1.05rem; }
.entry-content h2 { font-size: 1.6rem; margin: 1.6em 0 0.6em; }
.entry-content h3 { font-size: 1.3rem; margin: 1.4em 0 0.5em; }
.entry-content p { margin-bottom: 1.1em; }
.entry-content ul,
.entry-content ol { margin: 0 1.4em 1.1em; list-style: revert; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { color: var(--accent-2); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote {
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 18px;
  color: var(--muted);
  margin: 1.4em 0;
}

/* محاذاة الكتل */
.alignwide { margin-inline: calc(-1 * clamp(0px, 6vw, 120px)); }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.aligncenter { display: block; margin-inline: auto; }

/* ترقيم الصفحات */
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--card-2); color: var(--text); }

/* التذييل: ودجات */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 30px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-widget h4 { margin-bottom: 12px; }
.footer-widget a { color: var(--muted); }
.footer-widget a:hover { color: var(--text); }

/* شريط أدمن ووردبريس */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* =========================================================
   صفحة تسجيل الدخول + لوحة الرسم المتحركة
   ========================================================= */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  padding: 48px 0;
}
.auth-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: stretch;
}

/* واجهة تسجيل دخول مبسّطة (بدون لوحة فنية) */
.auth-page--plain { align-items: flex-start; padding: 40px 0 60px; }
.auth-page--plain .auth-shell {
  grid-template-columns: 1fr;
  max-width: 440px;
  gap: 0;
}
.auth-page--plain .auth-form-wrap { align-items: stretch; }

/* ---- اللوحة الفنية ---- */
.auth-art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(28,79,176,0.28), rgba(18,128,106,0.20));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  min-height: 480px;
}
.auth-art-glow {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,142,240,0.5), transparent 62%);
  filter: blur(24px);
  animation: authGlow 9s ease-in-out infinite;
}
@keyframes authGlow {
  0%,100% { transform: translate(-30px,-20px) scale(1); }
  50%     { transform: translate(30px,25px) scale(1.12); }
}
.auth-canvas {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* رسم الأشكال */
.ac-board { stroke-dasharray: 1300; stroke-dashoffset: 1300; animation: acDraw 8s ease-in-out infinite; }
.ac-grid  { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: acDraw 8s ease-in-out infinite .5s; }
.ac-circle{ stroke-dasharray: 300;  stroke-dashoffset: 300;  animation: acDraw 8s ease-in-out infinite 1s; }
.ac-tri   { stroke-dasharray: 240;  stroke-dashoffset: 240;  animation: acDraw 8s ease-in-out infinite 1.5s; }
.ac-curve { stroke-dasharray: 360;  stroke-dashoffset: 360;  animation: acDraw 8s ease-in-out infinite 2s; }

@keyframes acDraw {
  0%   { stroke-dashoffset: var(--l, 1300); opacity: 0; }
  8%   { opacity: 1; }
  45%  { stroke-dashoffset: 0; opacity: 1; }
  78%  { stroke-dashoffset: 0; opacity: 1; }
  92%  { opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.ac-dot { animation: acBob 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ac-dot-1 { animation-delay: 0s; }
.ac-dot-2 { animation-delay: .6s; }
.ac-dot-3 { animation-delay: 1.2s; }
.ac-dot-4 { animation-delay: 1.8s; }
@keyframes acBob {
  0%,100% { transform: translateY(0); opacity: .9; }
  50%     { transform: translateY(-9px); opacity: 1; }
}

.ac-pen {
  animation: acPen 8s ease-in-out infinite;
  transform-box: view-box;
}
@keyframes acPen {
  0%   { transform: translate(92px, 316px) rotate(8deg); }
  25%  { transform: translate(150px, 250px) rotate(-6deg); }
  50%  { transform: translate(250px, 300px) rotate(10deg); }
  75%  { transform: translate(300px, 220px) rotate(-4deg); }
  100% { transform: translate(92px, 316px) rotate(8deg); }
}

.auth-tools {
  position: relative;
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.auth-chip {
  padding: 7px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  animation: acPulse 2.6s ease-in-out infinite;
}
.auth-tools .auth-chip:nth-child(2) { animation-delay: .35s; }
.auth-tools .auth-chip:nth-child(3) { animation-delay: .7s; }
@keyframes acPulse {
  0%,100% { transform: translateY(0); box-shadow: 0 0 0 rgba(79,142,240,0); }
  50%     { transform: translateY(-4px); box-shadow: 0 10px 24px -12px rgba(79,142,240,0.6); }
}
.auth-art-cap {
  position: relative;
  margin-top: 20px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  text-align: center;
}

/* ---- بطاقة النموذج ---- */
.auth-form-wrap { display: flex; align-items: center; }
.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow);
}
.auth-card .brand { margin-bottom: 22px; }
.auth-title { font-size: 1.7rem; font-weight: 800; }
.auth-sub { color: var(--muted); margin: 8px 0 22px; font-size: 0.98rem; }
.auth-form .field { margin-bottom: 16px; }
.auth-remember {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 0.9rem;
}
.auth-remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.auth-forgot { color: var(--accent-2); font-size: 0.85rem; font-weight: 600; }
.auth-forgot:hover { text-decoration: underline; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 0.92rem; }
.auth-switch a { color: var(--accent-2); font-weight: 700; }
.auth-note { text-align: center; margin-top: 18px; font-size: 0.8rem; color: var(--muted); }
.auth-note a { color: var(--muted); text-decoration: underline; }
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

@media (max-width: 900px) {
  .auth-page { padding: 20px 0; min-height: auto; align-items: flex-start; }
  .auth-shell { grid-template-columns: 1fr; gap: 14px; max-width: 520px; }

  /* اللوحة الفنية: شريط علوي رفيع — لا تدفع نموذج إنشاء الحساب للأسفل */
  .auth-art {
    order: -1;
    min-height: 0;
    padding: 12px 18px;
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .auth-canvas { max-width: 74px; height: 54px; flex: 0 0 auto; }
  .auth-art-glow { width: 200px; height: 200px; }
  .auth-tools { display: none; }
  .auth-art-cap { font-size: 0.78rem; margin: 0; }

  .auth-form-wrap { align-items: flex-start; }
  .auth-card { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .auth-art { padding: 10px 14px; gap: 10px; }
  .auth-canvas { max-width: 58px; height: 42px; }
  .auth-art-cap { font-size: 0.72rem; }
  .auth-card { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-art-glow,
  .ac-board, .ac-grid, .ac-circle, .ac-tri, .ac-curve,
  .ac-dot, .ac-pen, .auth-chip { animation: none !important; }
  .ac-board, .ac-grid, .ac-circle, .ac-tri, .ac-curve { stroke-dashoffset: 0; opacity: 1; }
}

/* ---- تسجيل الدخول: Google + فاصل + الجوال + reCAPTCHA ---- */
.auth-social { margin-bottom: 14px; }
.auth-social .nsl-container { margin: 0 !important; }
.auth-social .nsl-container-buttons { width: 100%; }
.auth-social .nsl-button {
  width: 100% !important;
  border-radius: 999px !important;
  min-height: 48px !important;
  font-family: inherit !important;
  font-weight: 700 !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 14px 0 18px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* مُدخل الجوال الدولي (intl-tel-input) داخل الواجهة الداكنة */
.field .iti { width: 100%; direction: ltr; }
.field input.phone-iti,
.field input.iti__tel-input {
  direction: ltr;
  text-align: left;
}
/* مساحة كافية على اليسار لعلم الدولة ورمز الاتصال */
.iti--separate-dial-code input.phone-iti,
.iti--separate-dial-code input.iti__tel-input {
  padding-inline-start: 96px !important;
}
.iti__selected-flag,
.iti__country-container { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.iti--separate-dial-code .iti__selected-flag,
.iti--separate-dial-code .iti__country-container { background: rgba(255, 255, 255, 0.06); }
.iti--separate-dial-code .iti__selected-dial-code { color: var(--text); }
.iti__arrow { border-top-color: var(--muted); }
.iti__arrow--up { border-bottom-color: var(--muted); }
.iti__dropdown-content,
.iti__country-list {
  background: #0f1a37;
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  direction: ltr;
}
.iti__country.iti__highlight { background: rgba(255, 255, 255, 0.08); }
.iti__dial-code { color: var(--muted); }
.iti__search-input {
  background: rgba(5, 12, 34, 0.6);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.g-recaptcha { margin: 4px 0 16px; }
@media (max-width: 360px) {
  .g-recaptcha { transform: scale(0.86); transform-origin: top right; }
}

/* =========================================================
   صفحة تفاصيل الدورة (single course)
   ========================================================= */
.course-single { padding: 40px 0 90px; }
.course-single-head { max-width: 820px; margin-bottom: 28px; }
.course-back { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.course-back:hover { color: var(--text); }
.course-single-head h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 12px 0;
}
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}
.course-meta b { color: var(--text); }
.cm-stars { color: #ffc061; letter-spacing: 2px; }

.course-single-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.course-main { min-width: 0; }

.course-video {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
  margin-bottom: 28px;
}
.course-video img,
.course-video iframe,
.course-video video,
.course-video .tutor-video-player {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
.course-video-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: var(--brand-gradient);
  color: #fff; font-weight: 700;
}

.course-block { margin-bottom: 34px; }
.course-block > h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.course-desc {
  position: relative;
  color: var(--text);
  max-height: 280px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.course-desc.is-open { max-height: none; }
.course-desc::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(transparent, var(--navy-900));
  pointer-events: none;
}
.course-desc.is-open::after { display: none; }
.course-desc p { margin-bottom: 1em; }
.course-desc h2, .course-desc h3 { margin: 1.2em 0 .5em; font-weight: 800; }
.course-desc ul, .course-desc ol { margin: 0 1.4em 1em; list-style: revert; }
.course-desc img { border-radius: var(--radius-sm); margin: 10px 0; }
.course-readmore {
  margin-top: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
.course-readmore:hover { background: rgba(255, 255, 255, 0.12); }

/* لوحة بيضاء لمحتوى Tutor (منهج/مميزات/متطلبات) لأن تنسيقه فاتح */
.course-panel {
  background: #fff;
  color: #1c2333;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.course-panel a { color: #1c4fb0; }
.course-panel ul { list-style: revert; margin: 0 1.2em; }
.course-panel li { margin-bottom: 6px; }

/* البطاقة الجانبية */
.course-aside { position: sticky; top: 84px; display: grid; gap: 18px; }
.course-enroll-card {
  background: linear-gradient(160deg, rgba(28,79,176,0.28), rgba(18,128,106,0.20));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.ce-price {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: center;
}
.ce-facts { margin-top: 18px; display: grid; gap: 10px; }
.ce-facts li {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.ce-facts li:last-child { border-bottom: 0; }
.ce-facts span { color: var(--muted); }
.ce-facts b { color: var(--text); }

.course-instructor {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.course-instructor h3 { font-size: 1.05rem; margin-bottom: 14px; }
.ci-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ci-row img { width: 48px; height: 48px; border-radius: 50%; }
.ci-row b { display: block; }
.ci-row span { color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .course-single-grid { grid-template-columns: 1fr; }
  .course-aside { position: static; order: -1; }
}

/* =========================================================
   شريط الاحترافية المتحرك (قبل البطل)
   ========================================================= */
.prohero {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(28,79,176,0.10), rgba(18,128,106,0.10));
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.prohero-glow {
  position: absolute;
  inset: -40% 0;
  background: radial-gradient(600px 120px at 50% 50%, rgba(79,142,240,0.25), transparent 70%);
  animation: proGlow 8s ease-in-out infinite;
}
@keyframes proGlow {
  0%, 100% { transform: translateX(-20%); }
  50% { transform: translateX(20%); }
}
.prohero-track {
  display: flex;
  width: max-content;
  animation: proMarquee 34s linear infinite;
}
.prohero:hover .prohero-track { animation-play-state: paused; }
.prohero-row { display: flex; align-items: center; }
.prohero-item {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.2px;
  padding: 0 18px;
  white-space: nowrap;
  opacity: 0.9;
}
.prohero-sep { color: var(--accent-2); font-size: 0.6rem; opacity: 0.7; }
@keyframes proMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   ميزات البطل (26 يوم / بث مباشر ...) — بطاقات متحركة
   ========================================================= */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-meta .hm-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 12px 34px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: hmIn 0.6s ease forwards;
  animation-delay: var(--d, 0s);
}
.hero-meta .hm-item::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.14), transparent);
  animation: hmShine 5s ease-in-out infinite;
  animation-delay: calc(var(--d, 0s) + 1s);
}
.hero-meta .hm-dot {
  position: absolute;
  inset-inline-end: 14px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 0 rgba(242,106,43,0.5);
  animation: hmPulse 2.4s ease-in-out infinite;
}
.hero-meta .hm-item b { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.hero-meta .hm-sub { font-size: 0.82rem; color: var(--muted); }
@keyframes hmIn { to { opacity: 1; transform: none; } }
@keyframes hmShine {
  0%, 70%, 100% { inset-inline-start: -60%; }
  85% { inset-inline-start: 120%; }
}
@keyframes hmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,106,43,0.45); }
  50% { box-shadow: 0 0 0 7px rgba(242,106,43,0); }
}

/* =========================================================
   بطاقة السعر: صورة + السعر القديم المشطوب
   ========================================================= */
.price-card-img {
  margin: -6px -6px 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--brand-gradient);
  animation: pcImg 0.8s ease both;
}
.price-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes pcImg { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.price .price-old {
  position: relative;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0;
  animation: oldIn 0.5s ease 0.35s forwards;
}
.price .price-old::after {
  content: "";
  position: absolute;
  inset-inline: -2px;
  top: 52%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: inline-start;
  animation: strikeIn 0.45s ease 0.7s forwards;
}
.price .price-now { display: inline-flex; align-items: baseline; gap: 8px; }
.price .price-now b {
  font-size: 2.6rem;
  font-weight: 800;
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  animation: priceIn 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) 0.5s forwards;
}
.price .price-now > span { color: var(--muted); font-weight: 600; }
@keyframes oldIn { to { opacity: 0.85; } }
@keyframes strikeIn { to { transform: scaleX(1); } }
@keyframes priceIn { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .prohero-track, .prohero-glow,
  .hero-meta .hm-item, .hero-meta .hm-item::after, .hero-meta .hm-dot,
  .price-card-img, .price .price-old, .price .price-old::after, .price .price-now b {
    animation: none !important;
  }
  .hero-meta .hm-item { opacity: 1; transform: none; }
  .price .price-old { opacity: 0.85; }
  .price .price-old::after { transform: scaleX(1); }
  .price .price-now b { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .hero-meta .hm-item { flex: 1 1 100%; }
  .prohero-track { animation-duration: 24s; }
}

/* =========================================================
   لوحة الطالب (Tutor LMS 4.x) — إعادة تنسيق داكنة واحترافية
   البنية: .tutor-dashboard-layout > .tutor-dashboard-sidebar + المحتوى
   ========================================================= */

/* إخفاء جولة التعريف (FTUE) المزعجة */
.tutor-modal:has(.tutor-tour-modal),
.tutor-tour-modal { display: none !important; }

body.tutor-screen-frontend-dashboard { color: var(--text); }

.tutor-dashboard-layout {
  max-width: var(--maxw);
  margin: 36px auto 90px;
  padding: 0 22px;
  gap: 26px;
  align-items: start;
}
@media (min-width: 901px) {
  .tutor-dashboard-layout {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
  }
}

/* ---- الشريط الجانبي (يمين في RTL) ---- */
.tutor-dashboard-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  position: sticky;
  top: 84px;
}
.tutor-dashboard-sidebar-logo { padding: 6px 10px 14px; opacity: 0.85; }
.tutor-dashboard-sidebar-logo img { max-height: 30px; width: auto; }

.tutor-dashboard-sidebar-nav,
.tutor-dashboard-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.tutor-dashboard-sidebar-nav > li,
.tutor-dashboard-sidebar li { list-style: none; }

.tutor-dashboard-sidebar a,
.tutor-dashboard-sidebar-nav a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 11px 14px !important;
  border-radius: 12px;
  color: var(--muted) !important;
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.5;
  border: 0 !important;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.tutor-dashboard-sidebar a:hover { background: var(--card-2); color: var(--text) !important; }

.tutor-dashboard-sidebar li.active > a,
.tutor-dashboard-sidebar a.active,
[class*="tutor-dashboard-menu-"].active > a {
  background: linear-gradient(135deg, rgba(242, 106, 43, 0.24), rgba(255, 138, 76, 0.12)) !important;
  color: var(--text) !important;
  box-shadow: inset 3px 0 0 var(--accent);
}
.tutor-dashboard-sidebar a [class*="tutor-icon-"],
.tutor-dashboard-sidebar a svg {
  font-size: 1.15rem;
  width: 20px;
  opacity: 0.9;
  flex: 0 0 auto;
}
/* روابط الحساب الصغيرة أسفل القائمة */
.tutor-dashboard-sidebar a.tutor-small { font-size: 0.86rem; padding: 9px 14px !important; }
.tutor-dashboard-sidebar hr,
.tutor-dashboard-sidebar .tutor-hr { border-color: var(--border); opacity: 0.6; }

/* ---- منطقة المحتوى ---- */
.tutor-dashboard-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
@media (min-width: 901px) {
  .tutor-dashboard-main { min-height: 60vh; }
}
body.tutor-screen-frontend-dashboard h1,
body.tutor-screen-frontend-dashboard h2,
body.tutor-screen-frontend-dashboard h3,
body.tutor-screen-frontend-dashboard h4,
body.tutor-screen-frontend-dashboard .tutor-color-black,
body.tutor-screen-frontend-dashboard .tutor-color-secondary { color: var(--text) !important; }
body.tutor-screen-frontend-dashboard .tutor-color-muted,
body.tutor-screen-frontend-dashboard .tutor-fs-7 { color: var(--muted) !important; }

/* التبويبات الفرعية (المسجلين / المفضّلة / محاولات الاختبار) */
body.tutor-screen-frontend-dashboard .tutor-nav {
  border-bottom: 1px solid var(--border) !important;
}
body.tutor-screen-frontend-dashboard .tutor-nav-item a,
body.tutor-screen-frontend-dashboard .tutor-nav-link {
  color: var(--muted) !important;
  font-weight: 600;
}
body.tutor-screen-frontend-dashboard .tutor-nav-item a.active,
body.tutor-screen-frontend-dashboard .tutor-nav-link.is-active {
  color: var(--text) !important;
  border-bottom-color: var(--accent) !important;
}

/* بطاقات / صناديق داخل اللوحة */
body.tutor-screen-frontend-dashboard .tutor-card,
body.tutor-screen-frontend-dashboard [class*="tutor-course-card"],
body.tutor-screen-frontend-dashboard .tutor-dashboard-info-cards > * {
  background: rgba(5, 12, 34, 0.4) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
}
body.tutor-screen-frontend-dashboard .tutor-card-title a,
body.tutor-screen-frontend-dashboard [class*="course-name"] a { color: var(--text) !important; }

/* الجداول */
body.tutor-screen-frontend-dashboard .tutor-table,
body.tutor-screen-frontend-dashboard .tutor-table th,
body.tutor-screen-frontend-dashboard .tutor-table td {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: transparent !important;
}
body.tutor-screen-frontend-dashboard .tutor-table thead th { background: var(--card-2) !important; }

/* الأزرار */
body.tutor-screen-frontend-dashboard .tutor-btn { border-radius: 999px !important; font-weight: 700 !important; }
body.tutor-screen-frontend-dashboard .tutor-btn-primary {
  background: var(--accent-gradient) !important;
  border: 0 !important;
  color: #fff !important;
}
body.tutor-screen-frontend-dashboard .tutor-btn-outline-primary,
body.tutor-screen-frontend-dashboard .tutor-btn-ghost,
body.tutor-screen-frontend-dashboard .tutor-btn-secondary {
  background: var(--card-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* الحقول */
body.tutor-screen-frontend-dashboard input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.tutor-screen-frontend-dashboard select,
body.tutor-screen-frontend-dashboard textarea,
body.tutor-screen-frontend-dashboard .tutor-form-control {
  background: rgba(5, 12, 34, 0.55) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
}

/* أشرطة التقدّم */
body.tutor-screen-frontend-dashboard .tutor-progress-bar,
body.tutor-screen-frontend-dashboard [class*="progress"] > [class*="track"] { background: var(--card-2) !important; }
body.tutor-screen-frontend-dashboard [class*="progress"] [class*="filled"],
body.tutor-screen-frontend-dashboard .tutor-progress-value { background: var(--accent-gradient) !important; }

/* شريط الترحيب العلوي */
body.tutor-screen-frontend-dashboard .tutor-dashboard-header,
body.tutor-screen-frontend-dashboard [class*="dashboard-title-wrap"],
body.tutor-screen-frontend-dashboard .tutor-user-profile-info {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* التنقّل السفلي للجوال */
.tutor-dashboard-nav-mobile,
.tutor-dashboard-nav-mobile-list {
  background: rgba(5, 12, 34, 0.96) !important;
  border-top: 1px solid var(--border) !important;
}
.tutor-dashboard-nav-mobile a,
.tutor-dashboard-nav-mobile-text { color: var(--muted) !important; }
.tutor-dashboard-nav-mobile a.active,
.tutor-dashboard-nav-mobile .active .tutor-dashboard-nav-mobile-text { color: var(--text) !important; }

/* =========================================================
   لوحة الطالب — الجوال (إصلاح شامل للتوافق)
   ========================================================= */
@media (max-width: 900px) {
  /* القائمة عمود جانبي ثابت على اليمين + المحتوى على يساره */
  .tutor-dashboard-layout {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
    max-width: 720px;
    margin: 14px auto 40px;
    padding: 0 10px !important;
  }

  .tutor-dashboard-sidebar {
    grid-column: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    position: sticky !important;
    top: 66px;
    align-self: start !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px !important;
  }
  .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav { order: 1; }
  .tutor-dashboard-sidebar .tutor-see-all-courses { order: 2; }
  .tutor-dashboard-main { grid-column: 2 !important; }
  .tutor-dashboard-layout .tutor-dashboard-sidebar .tutor-dashboard-sidebar-logo,
  .tutor-dashboard-sidebar .tutor-dashboard-sidebar-logo { display: none !important; }
  .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav,
  .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav > ul,
  .tutor-dashboard-sidebar > ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
  .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav > ul > li,
  .tutor-dashboard-sidebar li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    list-style: none !important;
  }
  .tutor-dashboard-sidebar li > a,
  .tutor-dashboard-sidebar-nav a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 9px 4px !important;
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    border-radius: 12px !important;
  }
  .tutor-dashboard-sidebar li > a > span,
  .tutor-dashboard-sidebar-nav a > span { display: block !important; word-break: break-word; }
  .tutor-dashboard-sidebar li > a [class*="tutor-icon-"],
  .tutor-dashboard-sidebar li > a svg {
    font-size: 1.2rem !important;
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
  }
  /* عنصر تسجيل الخروج: مفصول عمّا فوقه بخط + مسافة */
  .tutor-dashboard-sidebar .tutor-dashboard-menu-logout {
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--border) !important;
  }
  .tutor-dashboard-menu-logout > a { color: var(--accent) !important; }

  /* رابط "تصفّح الدورات": بطاقة مستقلة أسفل القائمة بمسافة واضحة */
  .tutor-dashboard-sidebar .tutor-see-all-courses {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-height: 46px !important;
    margin: 12px 2px 2px !important;
    padding: 10px 4px !important;
    font-size: 0.62rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
    color: var(--muted) !important;
    background: var(--card-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
  }
  .tutor-dashboard-sidebar .tutor-see-all-courses svg { width: 15px !important; height: 15px !important; flex: 0 0 auto; }

  /* بطاقة المحتوى */
  .tutor-dashboard-main {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 14px 12px !important;
    border-radius: var(--radius-sm);
  }
  .tutor-dashboard-body,
  .tutor-dashboard-page { padding: 0 !important; }

  /* رأس اللوحة: لا التصاق ولا ارتفاع ثابت (كان يسبّب تداخل الترحيب مع عنوان الصفحة) */
  .tutor-dashboard-header {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 0 18px !important;
  }
  .tutor-dashboard-header-inner { height: auto !important; min-height: 0 !important; }

  /* إخفاء شريط تنقّل الجوال الأفقي (استُبدل بالقائمة العموديّة على اليمين) */
  .tutor-dashboard-layout > .tutor-dashboard-nav-mobile,
  .tutor-dashboard-nav-mobile { display: none !important; }

  /* رأس الترحيب: تكديس رأسي بلا تداخل */
  .tutor-dashboard-header { margin-bottom: 16px; }
  .tutor-dashboard-header-inner {
    display: flex !important;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
  }
  .tutor-dashboard-header-left {
    order: 2;
    width: 100%;
    gap: 6px;
  }
  .tutor-dashboard-header-right {
    order: 1;
    width: auto;
  }
  .tutor-dashboard-header-left .tutor-h5,
  .tutor-dashboard-header-left [class*="tutor-h5"] {
    font-size: 1.05rem !important;
    line-height: 1.5;
    word-break: break-word;
  }
  .tutor-dashboard-header-left .tutor-tiny,
  .tutor-dashboard-header-left [class*="tutor-tiny"] {
    flex-wrap: wrap;
    font-size: 0.8rem !important;
    color: var(--muted) !important;
  }
  .tutor-dashboard-header-user img,
  .tutor-dashboard-header-user .tutor-avatar { width: 44px !important; height: 44px !important; }

  /* عنوان الصفحة + التبويبات الفرعية */
  .tutor-dashboard-page > * > .tutor-dashboard-title,
  .tutor-dashboard-courses-wrapper > .tutor-fs-5,
  .tutor-dashboard-content-title { font-size: 1.1rem !important; margin-bottom: 12px !important; }

  .tutor-nav.tutor-nav-small,
  .tutor-dashboard-page .tutor-nav {
    flex-wrap: wrap !important;
    width: 100% !important;
    overflow: visible !important;
    gap: 2px 8px !important;
    row-gap: 0 !important;
  }
  .tutor-nav.tutor-nav-small .tutor-nav-item,
  .tutor-dashboard-page .tutor-nav .tutor-nav-item { flex: 0 0 auto; }
  .tutor-nav.tutor-nav-small .tutor-nav-link,
  .tutor-dashboard-page .tutor-nav a {
    padding: 8px 6px !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  /* الجداول: تمرير أفقي بدل الانضغاط */
  body.tutor-screen-frontend-dashboard .tutor-table-responsive,
  body.tutor-screen-frontend-dashboard .tutor-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* بطاقات الدورات: عمود واحد */
  .tutor-dashboard-courses-card,
  .tutor-dashboard-page [class*="tutor-course-listing"],
  .tutor-dashboard-page .tutor-grid { grid-template-columns: 1fr !important; }

  /* رسالة "لا توجد دورات" تكون واضحة */
  .tutor-dashboard-page .tutor-empty-state,
  .tutor-dashboard-page [class*="empty"] { padding: 28px 12px !important; text-align: center; }
}

@media (max-width: 420px) {
  .tutor-dashboard-nav-mobile a,
  .tutor-dashboard-nav-mobile-list a { padding: 7px 9px !important; font-size: 0.68rem !important; }
  .tutor-dashboard-main { padding: 14px 12px !important; }
}

/* =========================================================
   مبدّل اللغة (GTranslate)
   ========================================================= */
.gtranslate_wrapper { display: inline-flex; align-items: center; }
.gtranslate_wrapper select,
.gt_selector {
  background: var(--card-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  padding: 7px 12px !important;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  outline: none;
}
.gtranslate_wrapper select option { color: #111; }
.gt_float_switcher { border-radius: 12px !important; }
/* على الجوال: مبدّل اللغة داخل درج القائمة (لا في شريط الأزرار) — القواعد في كتلة رأس الجوال أعلاه. */

/* =========================================================
   عروض البطل: بطاقة السعر + بطاقة "قريباً"
   ========================================================= */
.hero-offers { display: grid; gap: 18px; align-content: start; }

.soon-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(15, 35, 80, 0.55), rgba(5, 12, 34, 0.55));
  overflow: hidden;
  box-shadow: var(--shadow);
}
.soon-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.soon-thumb img { width: 100%; height: 100%; object-fit: cover; }
.soon-thumb.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,12,34,0.15), rgba(5,12,34,0.72));
}
.soon-stamp {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  padding: 8px 22px;
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  transform: rotate(-7deg);
  backdrop-filter: blur(2px);
  animation: soonPulse 3s ease-in-out infinite;
}
@keyframes soonPulse {
  0%, 100% { transform: rotate(-7deg) scale(1); opacity: 0.92; }
  50% { transform: rotate(-7deg) scale(1.05); opacity: 1; }
}
.soon-body { padding: 20px 22px 22px; }
.soon-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffd9b0;
  background: rgba(242, 106, 43, 0.18);
  border: 1px solid rgba(242, 106, 43, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.soon-body h3 { font-size: 1.15rem; font-weight: 800; line-height: 1.4; }
.soon-body p { color: var(--muted); font-size: 0.92rem; margin: 8px 0 16px; }
.soon-body .btn-ghost { opacity: 0.95; }

@media (max-width: 980px) {
  .hero-offers { max-width: 460px; margin-inline: auto; }
}

/* سطر المعلومات القانونية في التذييل */
.footer-legal {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  justify-content: center;
}
.footer-legal a { color: var(--muted); text-decoration: underline; }
.footer-legal a:hover { color: var(--text); }
.footer-legal .sep { opacity: 0.5; }
.footer-legal + .footer-bottom { border-top: 0; margin-top: 6px; padding-top: 8px; }

/* ============================================================
   قسم "تفاصيل الدورة" + محاور الدورة
   ============================================================ */
html { scroll-behavior: smooth; }
#course-details, #syllabus, #pricing, #portfolio, #reviews { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.course-details-section .details-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 34px;
  align-items: start;
  margin-bottom: 44px;
}
.details-intro p {
  color: var(--muted);
  line-height: 2;
  margin: 0 0 15px;
  font-size: 1.01rem;
}
.details-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.details-jump:hover {
  background: var(--card-2);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.details-jump .dj-ic { animation: djBounce 1.6s ease-in-out infinite; }
@keyframes djBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .details-jump .dj-ic { animation: none; } }

.details-facts {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.details-facts .df-row {
  display: grid;
  grid-template-columns: 38% 62%;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.details-facts .df-row:last-child { border-bottom: 0; }
.details-facts dt { margin: 0; color: var(--muted); font-size: 0.88rem; }
.details-facts dd { margin: 0; color: var(--text); font-weight: 700; font-size: 0.93rem; }

.syllabus-wrap { margin-top: 8px; }
.syllabus-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}
details.syllabus-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
details.syllabus-item[open] {
  border-color: rgba(242, 106, 43, 0.5);
  background: var(--card-2);
}
details.syllabus-item > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
}
details.syllabus-item > summary::-webkit-details-marker { display: none; }
.syl-num {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}
.syl-title { flex: 1; line-height: 1.5; font-size: 1rem; }
.syl-chev {
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  opacity: 0.65;
}
details.syllabus-item[open] .syl-chev { transform: rotate(-135deg); }
.syllabus-body { padding: 2px 22px 20px; }
details.syllabus-item[open] .syllabus-body { animation: sylOpen 0.28s ease both; }
@keyframes sylOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { details.syllabus-item[open] .syllabus-body { animation: none; } }
.syllabus-body p { color: var(--muted); line-height: 1.9; margin: 4px 0 10px; }
.syllabus-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.syllabus-body li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.94rem;
}
.syllabus-body li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.syllabus-goal {
  max-width: 880px;
  margin: 24px auto 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(47, 111, 214, 0.16), rgba(26, 160, 127, 0.14));
  border: 1px solid var(--border);
}
.syllabus-goal h3 { margin: 0 0 8px; color: var(--text); font-size: 1.05rem; }
.syllabus-goal p { margin: 0; color: var(--muted); line-height: 1.9; }

.details-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

/* رابط "استعرض المحاور" في صفحة الدورة المفردة */
.course-jump {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.course-jump:hover { text-decoration: underline; }
.course-single .syllabus-list,
.course-single .syllabus-goal { max-width: none; }

@media (max-width: 860px) {
  .course-details-section .details-grid { grid-template-columns: 1fr; gap: 22px; }
}

/* =========================================================
   لوحة الطالب ← تسليم أعمالي
   ========================================================= */
.asas-sw { color: var(--text); max-width: 720px; }
.asas-sw-head { margin-bottom: 18px; }
.asas-sw-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.asas-sw-lead { color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.8; }

.asas-sw-note {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.asas-sw-note--ok { background: rgba(26, 160, 127, 0.14); color: #7ee0c6; border-color: rgba(26, 160, 127, 0.4); }
.asas-sw-note--err { background: rgba(242, 106, 43, 0.14); color: #ffc4a3; border-color: rgba(242, 106, 43, 0.4); }

.asas-sw-form {
  display: grid;
  gap: 16px;
  background: rgba(5, 12, 34, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.asas-sw-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
  opacity: 0;
}
.asas-sw-field { display: grid; gap: 7px; }
.asas-sw-label { font-weight: 700; font-size: 0.9rem; }
.asas-sw-hint { color: var(--muted); font-size: 0.78rem; }
.asas-sw-form select,
.asas-sw-form textarea,
.asas-sw-form input[type="file"] {
  width: 100%;
  background: rgba(5, 12, 34, 0.55) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.9rem;
}
.asas-sw-form input[type="file"] { padding: 9px 12px; }
.asas-sw-form textarea { resize: vertical; min-height: 74px; }
.asas-sw-submit { justify-self: start; padding-inline: 26px !important; }

.asas-sw-subtitle { font-size: 1.02rem; font-weight: 800; margin: 30px 0 14px; }
.asas-sw-list { display: grid; gap: 12px; }
.asas-sw-item {
  display: flex;
  gap: 14px;
  background: rgba(5, 12, 34, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.asas-sw-thumb { flex: 0 0 96px; }
.asas-sw-thumb img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.asas-sw-fileic {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.asas-sw-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.asas-sw-course { font-size: 0.96rem; }
.asas-sw-date { color: var(--muted); font-size: 0.78rem; }
.asas-sw-badge {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 2px 0;
}
.asas-sw-badge--wait { background: rgba(242, 106, 43, 0.18); color: #ffc4a3; }
.asas-sw-badge--ok { background: rgba(26, 160, 127, 0.18); color: #7ee0c6; }
.asas-sw-usernote { color: var(--muted); font-size: 0.86rem; margin: 2px 0 0; line-height: 1.7; }
.asas-sw-feedback {
  font-size: 0.86rem;
  margin: 4px 0 0;
  line-height: 1.7;
  background: rgba(47, 111, 214, 0.12);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 11px;
}

@media (max-width: 560px) {
  .asas-sw-item { flex-direction: column; }
  .asas-sw-thumb, .asas-sw-thumb img, .asas-sw-fileic { width: 100%; flex-basis: auto; }
  .asas-sw-thumb img, .asas-sw-fileic { height: 180px; }
}

/* =========================================================
   قسم "الدورات التدريبية" في الرئيسية
   (بطاقة الدورة المدفوعة + محاورها كوحدة، ثم فاصل، ثم الدورة القادمة)
   ========================================================= */
.training-courses .tc-block { margin-inline: auto; }
.training-courses .tc-block--main { max-width: 780px; }
.training-courses .tc-block--soon { max-width: 520px; }

.price-card--tc,
.soon-card--tc {
  max-width: none;
  width: 100%;
  margin: 0;
}

.training-courses .tc-syllabus {
  position: relative;
  margin-top: 14px;
  padding-top: 30px;
}
.training-courses .tc-syllabus::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}
.tc-syllabus-head { text-align: center; margin-bottom: 20px; }
.tc-syllabus-head h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 6px 0;
  color: var(--text);
}
.tc-syllabus-sub { color: var(--muted); font-size: 0.9rem; margin: 0; }

.tc-split {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 40px auto;
}
.tc-split::before,
.tc-split::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.tc-split span {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.training-courses .details-cta { margin-top: 34px; }

@media (max-width: 600px) {
  .training-courses .tc-syllabus { padding-top: 26px; }
}

/* رابط "خروج" في ترويسة الموقع */
.nav-logout {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-logout:hover { color: var(--text); border-color: var(--accent); background: var(--card-2); }
@media (max-width: 720px) {
  .nav-logout { font-size: 0.78rem; padding: 5px 9px; }
}

/* بطاقة السعر — حالة "أنت مشترك" */
.tag--enrolled {
  background: rgba(26, 160, 127, 0.16) !important;
  color: #7ee0c6 !important;
  border: 1px solid rgba(26, 160, 127, 0.45) !important;
}
.price-card--enrolled .btn-primary { background: var(--teal-500); }

/* =========================================================
   منهج الدورة المغلق (لغير المشتركين)
   ========================================================= */
.course-locked-note {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(242, 106, 43, 0.12);
  border: 1px solid rgba(242, 106, 43, 0.4);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.course-locked-note .cln-ic { font-size: 1.4rem; flex: 0 0 auto; }
.course-locked-note .cln-txt { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 3px; }
.course-locked-note .cln-txt b { color: var(--text); font-size: 0.98rem; }
.course-locked-note .cln-txt span { color: var(--muted); font-size: 0.85rem; }
.course-locked-note .btn { flex: 0 0 auto; }

/* إشعار «لم تدفع» في لوحة الطالب */
.asas-dash-paywall {
  background: rgba(242, 106, 43, 0.12);
  border: 1px solid rgba(242, 106, 43, 0.45);
  border-radius: 16px;
  padding: 22px 22px 20px;
  margin: 0 0 22px;
}
.asas-dash-paywall-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.asas-dash-paywall-brand img,
.asas-dash-paywall-brand .custom-logo,
.asas-dash-paywall-brand .site-brand img { max-height: 52px; width: auto; }
.asas-dash-paywall-brand strong { font-size: 1.1rem; color: var(--accent, #f26a2b); }
.asas-dash-paywall-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.asas-dash-paywall-ic { font-size: 1.5rem; line-height: 1.2; flex: 0 0 auto; }
.asas-dash-paywall-body { flex: 1; min-width: 220px; }
.asas-dash-paywall-body b { display: block; font-size: 1.02rem; margin-bottom: 4px; color: var(--text, #0a1533); }
.asas-dash-paywall-body p { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.75; color: var(--muted, #5a6b8c); }
.asas-dash-paywall-body .btn { display: inline-block; }
.asas-dash-paywall-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.asas-dash-paywall-links a {
  font-size: 0.85rem;
  color: var(--muted, #5a6b8c);
  text-decoration: underline;
}
.asas-dash-paywall-links a:hover { color: var(--accent, #f26a2b); }
@media (max-width: 560px) {
  .asas-dash-paywall { padding: 16px; }
  .asas-dash-paywall-body .btn { width: 100%; text-align: center; }
}

.asas-curriculum { display: grid; gap: 10px; }
.asas-cur-topic {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(5, 12, 34, 0.35);
  overflow: hidden;
}
.asas-cur-topic > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
}
.asas-cur-topic > summary::-webkit-details-marker { display: none; }
.act-num {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--brand-gradient);
  color: #fff; font-size: 0.9rem;
}
.act-title { flex: 1; line-height: 1.5; font-size: 0.96rem; }
.act-chev {
  flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  opacity: 0.6;
}
.asas-cur-topic[open] .act-chev { transform: rotate(-135deg); }
.asas-cur-lessons { list-style: none; margin: 0; padding: 4px 8px 10px; display: grid; gap: 2px; }
.asas-cur-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.asas-cur-lesson a { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; width: 100%; }
.asas-cur-lesson a:hover { color: var(--accent-2); }
.asas-cur-lesson .acl-ic { flex: 0 0 auto; font-size: 0.8rem; opacity: 0.75; }
.asas-cur-lesson.is-locked { color: var(--muted); }
.asas-cur-lesson.is-locked .acl-lock { opacity: 0.9; filter: grayscale(0.2); }
.asas-cur-lesson.is-locked .acl-title { opacity: 0.7; }
.asas-cur-lesson.is-empty { font-style: italic; opacity: 0.6; font-size: 0.82rem; }
.asas-curriculum--locked .asas-cur-lesson { cursor: default; }
.asas-cur-empty { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .course-locked-note { padding: 14px; }
  .course-locked-note .btn { width: 100%; }
}

/* =========================================================
   لوحة الطالب — واجهة "دوراتي" مُعاد تصميمها (شبيهة بيوتيوب)
   ========================================================= */
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-wrapper { max-width: 780px; }

body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-card {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* التبويبات الفرعية: حبوب أنيقة */
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  border: 0 !important;
  margin-bottom: 20px;
}
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item,
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item button,
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item a {
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  background: var(--card) !important;
  transition: all 0.16s ease;
}
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item.active button,
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item a.active,
body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-tab .tutor-nav-item .is-active {
  background: var(--accent-gradient) !important;
  color: #fff !important;
  border-color: transparent !important;
}

body.tutor-screen-frontend-dashboard .tutor-dashboard-courses-list { gap: 16px !important; }

/* ---- بطاقة الدورة (متابعة التعلّم) ---- */
body.tutor-screen-frontend-dashboard .tutor-progress-card {
  display: block !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 14px 40px -22px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card > * { width: 100% !important; }
body.tutor-screen-frontend-dashboard .tutor-progress-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 106, 43, 0.5);
  box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.75), var(--shadow-glow);
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-inner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-800);
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.4s ease;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card:hover .tutor-progress-card-thumbnail img { transform: scale(1.05); }
body.tutor-screen-frontend-dashboard .tutor-progress-card-thumbnail::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(5, 12, 34, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card:hover .tutor-progress-card-thumbnail::after { opacity: 1; }

body.tutor-screen-frontend-dashboard .tutor-progress-card-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-title {
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  color: var(--text) !important;
  margin: 0 !important;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-details {
  color: var(--muted) !important;
  font-size: 0.85rem !important;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-bar { margin-top: 8px; }
body.tutor-screen-frontend-dashboard .tutor-progress-card-bar .tutor-progress-bar,
body.tutor-screen-frontend-dashboard .tutor-progress-bar {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
}
body.tutor-screen-frontend-dashboard .tutor-progress-bar-fill {
  background: var(--accent-gradient) !important;
  border-radius: 999px !important;
}

/* زر "تابع التعلّم" */
body.tutor-screen-frontend-dashboard .tutor-progress-card-actions {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  width: 100% !important;
  background: transparent !important;
  padding: 0 20px 18px !important;
  margin: 0 !important;
}
body.tutor-screen-frontend-dashboard .tutor-progress-card-actions > * { width: 100% !important; }
body.tutor-screen-frontend-dashboard .tutor-progress-card-actions .tutor-btn,
body.tutor-screen-frontend-dashboard .tutor-progress-card-actions a.tutor-btn {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  justify-content: center !important;
  align-items: center;
  gap: 8px;
  padding: 12px 20px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  background: var(--accent-gradient) !important;
  border: 0 !important;
  color: #fff !important;
}

/* رأس الترحيب — أنظف وأكبر */
body.tutor-screen-frontend-dashboard .tutor-dashboard-header-left .tutor-h5,
body.tutor-screen-frontend-dashboard .tutor-dashboard-header-left [class*="tutor-h5"] {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
}

/* الحالة الفارغة — دعوة جميلة */
body.tutor-screen-frontend-dashboard .tutor-empty-state,
body.tutor-screen-frontend-dashboard [class*="empty-state"] {
  background: var(--card) !important;
  border: 1px dashed var(--border) !important;
  border-radius: 18px !important;
  padding: 40px 24px !important;
  text-align: center;
}

@media (max-width: 720px) {
  body.tutor-screen-frontend-dashboard .tutor-progress-card-inner { grid-template-columns: 1fr; }
  body.tutor-screen-frontend-dashboard .tutor-progress-card-content { padding: 16px; }
  body.tutor-screen-frontend-dashboard .tutor-progress-card-actions { padding: 0 16px 16px !important; }
  body.tutor-screen-frontend-dashboard .tutor-dashboard-header-left .tutor-h5 { font-size: 1.1rem !important; }
}

/* =========================================================
   مشغّل الدرس — وضع تركيز مستقل (single-lesson.php)
   ========================================================= */
.asas-lp-body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}
.asas-lp-body.admin-bar .asas-lp-top { top: 32px; }

.asas-lp {
  --lp-top-h: 60px;
  --lp-foot-h: 68px;
  --lp-panel-w: 380px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- الشريط العلوي ---- */
.asas-lp-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--lp-top-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: rgba(5, 12, 34, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.asas-lp-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.asas-lp-back:hover { background: var(--card-2); border-color: rgba(255,255,255,0.22); }
.asas-lp-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.asas-lp-top-course {
  min-width: 0;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.asas-lp-top-course a {
  color: var(--text);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asas-lp-top-course a:hover { color: var(--accent-2); }
.asas-lp-top-actions { display: inline-flex; align-items: center; gap: 8px; }
.asas-lp-panel-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.asas-lp-panel-toggle:hover { background: var(--card-2); border-color: rgba(255,255,255,0.22); }
.asas-lp-panel-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.asas-lp-logout {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(242,106,43,0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-2);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}
.asas-lp-logout:hover { background: rgba(242,106,43,0.12); }

/* ---- الشبكة (اللوحة على اليمين في RTL) ---- */
.asas-lp-body-grid {
  flex: 1;
  display: grid;
  grid-template-columns: var(--lp-panel-w) minmax(0, 1fr);
  align-items: start;
}
.asas-lp-panel { grid-column: 1; grid-row: 1; }
.asas-lp-main  { grid-column: 2; grid-row: 1; }
.asas-lp--panel-collapsed .asas-lp-body-grid { grid-template-columns: 0 minmax(0, 1fr); }
.asas-lp--panel-collapsed .asas-lp-panel {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

/* ---- المحتوى ---- */
.asas-lp-main {
  min-width: 0;
  padding: 26px clamp(16px, 4vw, 48px) calc(var(--lp-foot-h) + 40px);
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
.asas-lp-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}
.asas-lp-video iframe,
.asas-lp-video video,
.asas-lp-video .tutor-video-player,
.asas-lp-video .tutor-ratio,
.asas-lp-plyr {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
.asas-lp-video--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.asas-lp-video--ph { display: grid; place-items: center; color: var(--muted); font-weight: 600; background: var(--navy-800); }
.asas-lp-video--ph span { position: static; }
.asas-lp-soon { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px; }
.asas-lp-soon b { font-size: 1.15rem; color: var(--text); }
.asas-lp-soon > span { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.asas-lp-lesson-soon {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.asas-lp-lesson.is-soon > a { opacity: 0.75; }

/* ---- تغليف يوتيوب بمشغّل Plyr: واجهة نظيفة، الإطار كامل (بلا اقتصاص) ---- */
.asas-lp-video--yt { --plyr-color-main: var(--accent); }
.asas-lp-video--yt .plyr,
.asas-lp-video--yt .plyr__video-wrapper,
.asas-lp-video--yt .plyr__video-embed,
.asas-lp-video--yt .plyr__video-embed__container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  transform: none !important;
  background: #000;
  overflow: hidden !important;
}
/* تكبير طفيف يملأ الإطار ويقصّ شريط/شعار يوتيوب من الحواف */
.asas-lp-video--yt .plyr iframe,
.asas-lp-video--yt .plyr__video-embed iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 100% !important;
  height: 100% !important;
  transform: translate(-50%, -50%) scale(1.28) !important;
  transform-origin: center center !important;
  border: 0;
}
.asas-lp-video--yt .plyr__control--overlaid,
.asas-lp-video--yt .plyr__controls { z-index: 4; }

/* حماية العرض: علامة مائية تومض كل 30 ثانية بمكان متفرّق + درع علوي */
.asas-lp-wm {
  position: absolute;
  z-index: 10;
  top: 12%;
  inset-inline-start: 8%;
  pointer-events: none;
  user-select: none;
  font-size: clamp(11px, 1.5vw, 15px);
  font-weight: 600;
  color: #fff;
  opacity: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.5s ease;
}
.asas-lp-shield {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 54px;
  z-index: 5;
  background: transparent;
}
/* يغطّي شعار «YouTube» أسفل يسار الإطار أثناء التشغيل + توقيع خفيف للاستوديو */
.asas-lp-corner {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  padding: 5px 12px 5px 10px;
  background: #0d0d0f;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-top-right-radius: 8px;
  pointer-events: none;
  user-select: none;
}
.asas-lp-video--yt:fullscreen,
.asas-lp-video--yt:-webkit-full-screen { border-radius: 0; }
.asas-lp-video--yt:fullscreen .asas-lp-wm { font-size: 18px; }

.asas-lp-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
}
.asas-lp-headline h1 {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.asas-lp-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(26,160,127,0.16);
  color: #7ee0c6;
  border: 1px solid rgba(26,160,127,0.4);
  font-size: 0.78rem;
  font-weight: 700;
}
.asas-lp-done-badge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.asas-lp-desc {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 0.98rem;
}
.asas-lp-desc p { margin: 0 0 0.8em; }

/* ---- النقاش ---- */
.asas-lp-discuss {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.asas-lp-discuss h2 { font-size: 1.2rem; font-weight: 700; }
.asas-lp-discuss-sub { color: var(--muted); font-size: 0.9rem; margin: 6px 0 22px; }
.asas-lp-comments { list-style: none; margin: 0 0 26px; padding: 0; }
.asas-lp-comments .comment,
.asas-lp-comments > li { margin: 0 0 14px; }
.asas-lp-comments .children { list-style: none; margin: 12px 0 0; padding-inline-start: clamp(14px, 4vw, 40px); border-inline-start: 2px solid var(--border); }
.asas-lp-comments .comment-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}
.asas-lp-comments .comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.asas-lp-comments .comment-author img { border-radius: 50%; }
.asas-lp-comments .comment-author .fn { font-weight: 700; font-style: normal; font-size: 0.9rem; }
.asas-lp-comments .comment-author .says { display: none; }
.asas-lp-comments .comment-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 8px; }
.asas-lp-comments .comment-meta a { color: inherit; text-decoration: none; }
.asas-lp-comments .comment-content { font-size: 0.92rem; line-height: 1.8; color: var(--text); }
.asas-lp-comments .comment-content p { margin: 0 0 0.6em; }
.asas-lp-comments .reply { margin-top: 8px; }
.asas-lp-comments .comment-reply-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: none;
}
.asas-lp-nocomment { color: var(--muted); font-size: 0.9rem; padding: 10px 0; }

.asas-lp-discuss .comment-respond {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.asas-lp-cform-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.asas-lp-discuss .comment-form { display: flex; flex-direction: column; gap: 12px; }
.asas-lp-discuss .comment-form-comment { margin: 0; }
.asas-lp-discuss textarea,
.asas-lp-discuss input[type="text"],
.asas-lp-discuss input[type="email"],
.asas-lp-discuss input[type="url"] {
  width: 100%;
  background: var(--navy-900);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 12px 14px;
  resize: vertical;
}
.asas-lp-discuss textarea:focus,
.asas-lp-discuss input:focus { outline: none; border-color: var(--accent); }
.asas-lp-discuss .comment-form-cookies-consent { flex-direction: row; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.asas-lp-discuss .comment-form-cookies-consent input { width: auto; }
.asas-lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  align-self: flex-start;
}
.asas-lp-btn-primary { background: var(--accent-gradient); color: #fff; }
.asas-lp-btn-primary:hover { filter: brightness(1.06); }
.asas-lp-discuss .logged-in-as { font-size: 0.78rem; color: var(--muted); }
.asas-lp-discuss .logged-in-as a { color: var(--accent-2); text-decoration: none; }

/* ---- لوحة المحاور ---- */
.asas-lp-panel {
  position: sticky;
  top: var(--lp-top-h);
  align-self: stretch;
  height: calc(100vh - var(--lp-top-h));
  display: flex;
  flex-direction: column;
  background: var(--navy-800);
  border-inline-end: 1px solid var(--border);
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.asas-lp-topic.is-complete > summary .asas-lp-topic-meta { color: #7ee0c6; }
.asas-lp-panel-head {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.asas-lp-panel-course { font-weight: 700; font-size: 0.95rem; line-height: 1.5; margin-bottom: 12px; }
.asas-lp-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  overflow: hidden;
}
.asas-lp-progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent-gradient); transition: width 0.4s ease; }
.asas-lp-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.asas-lp-progress-meta b { color: var(--accent-2); font-size: 0.92rem; }

.asas-lp-panel-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 30px; }
.asas-lp-panel-scroll::-webkit-scrollbar { width: 8px; }
.asas-lp-panel-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }

.asas-lp-cur-empty { color: var(--muted); font-size: 0.88rem; padding: 16px; }
.asas-lp-topic { border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.asas-lp-topic > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.asas-lp-topic > summary::-webkit-details-marker { display: none; }
.asas-lp-topic > summary:hover { background: var(--card); }
.asas-lp-topic-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.asas-lp-topic-title { line-height: 1.5; }
.asas-lp-topic-meta { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.asas-lp-topic-chev {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-inline-start: 4px;
}
.asas-lp-topic[open] > summary .asas-lp-topic-chev { transform: rotate(-135deg); }

.asas-lp-lessons { list-style: none; margin: 2px 0 8px; padding: 0; }
.asas-lp-lesson { margin: 0; }
.asas-lp-lesson.is-empty { color: var(--muted); font-size: 0.8rem; padding: 8px 14px 8px 40px; }
.asas-lp-lesson > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.5;
  transition: background 0.15s, color 0.15s;
}
.asas-lp-lesson > a:hover { background: var(--card); color: var(--text); }
.asas-lp-lesson-state {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
}
.asas-lp-lesson-state svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.asas-lp-ic-play { fill: currentColor !important; stroke: none !important; }
.asas-lp-lesson-title { flex: 1; min-width: 0; }
.asas-lp-lesson.is-done > a { color: #7ee0c6; }
.asas-lp-lesson.is-done .asas-lp-lesson-state { border-color: rgba(26,160,127,0.5); background: rgba(26,160,127,0.16); color: #7ee0c6; }
.asas-lp-lesson.is-current > a {
  background: rgba(242,106,43,0.14);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}
.asas-lp-lesson.is-current .asas-lp-lesson-state { border-color: var(--accent); color: var(--accent-2); }

/* ---- الشريط السفلي (يمتد تحت عمود المحتوى فقط) ---- */
.asas-lp-foot {
  position: fixed;
  bottom: 0;
  inset-inline-start: var(--lp-panel-w);
  inset-inline-end: 0;
  z-index: 25;
  height: var(--lp-foot-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(14px, 4vw, 40px);
  background: rgba(5, 12, 34, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  transition: inset-inline-start 0.28s ease;
}
.asas-lp--panel-collapsed .asas-lp-foot { inset-inline-start: 0; }
.asas-lp-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.asas-lp-nav-btn:hover { background: var(--card-2); border-color: rgba(255,255,255,0.22); }
.asas-lp-nav-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.asas-lp-nav-btn.is-disabled { opacity: 0.32; pointer-events: none; }
.asas-lp-nav-finish { border-color: rgba(26,160,127,0.45); color: #7ee0c6; }

.asas-lp-complete-form { margin: 0; }
.asas-lp-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.1s;
}
.asas-lp-complete:hover { filter: brightness(1.07); }
.asas-lp-complete:active { transform: translateY(1px); }
.asas-lp-complete svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.asas-lp-complete.is-done {
  background: rgba(26,160,127,0.16);
  color: #7ee0c6;
  border: 1px solid rgba(26,160,127,0.4);
}

.asas-lp-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0,0,0,0.55);
}

/* ---- الجوال / اللوحي ---- */
@media (max-width: 1024px) {
  .asas-lp-body-grid,
  .asas-lp--panel-collapsed .asas-lp-body-grid { grid-template-columns: minmax(0, 1fr); }
  .asas-lp-panel,
  .asas-lp-main { grid-column: 1; }
  .asas-lp-panel {
    position: fixed;
    top: 0;
    height: 100dvh;
    width: min(340px, 86vw);
    z-index: 40;
    inset-inline-start: 0;
    inset-inline-end: auto;
    border-inline-end: 1px solid var(--border);
    border-inline-start: 0;
    transform: translateX(100%);
    opacity: 1;
    pointer-events: none;
    box-shadow: -12px 0 40px -10px rgba(0,0,0,0.6);
  }
  .asas-lp--panel-open .asas-lp-panel { transform: translateX(0); pointer-events: auto; }
  .asas-lp-foot,
  .asas-lp--panel-collapsed .asas-lp-foot { inset-inline-start: 0; }
  .asas-lp-top-course { font-size: 0.85rem; }
  .asas-lp-back span { display: none; }
  .asas-lp-back { padding: 8px 10px; }
}
@media (max-width: 560px) {
  .asas-lp-foot {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }
  .asas-lp-complete-form,
  .asas-lp-complete { order: -1; width: 100%; }
  .asas-lp-complete { width: 100%; justify-content: center; }
  .asas-lp-nav-btn { flex: 1; justify-content: center; }
  .asas-lp-main { padding-bottom: 160px; }
  .asas-lp-logout { padding: 7px 10px; font-size: 0.78rem; }
}


/* =========================================================
   البطل — كوكبة الأدوات: صفّ زجاجي مرتّب على قوس + خطوط رابطة (بلا تداخل)
   ========================================================= */
.hero-tools3d {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: clamp(146px, 18vw, 196px);
  margin: 0 0 26px;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  pointer-events: none;
}

/* هالة ضوئية ناعمة خلف الكوكبة */
.ht3d-aura {
  position: absolute;
  inset: 4% 2% 12% 2%;
  border-radius: 50%;
  background:
    radial-gradient(52% 60% at 24% 62%, rgba(242, 106, 43, 0.28), transparent 70%),
    radial-gradient(50% 58% at 76% 62%, rgba(47, 111, 214, 0.26), transparent 72%),
    radial-gradient(44% 50% at 50% 20%, rgba(26, 160, 127, 0.22), transparent 72%);
  filter: blur(30px);
  opacity: 0.85;
  animation: ht3dAura 14s ease-in-out infinite alternate;
}
@keyframes ht3dAura {
  0%   { transform: scale(1) rotate(0deg); opacity: 0.7; }
  100% { transform: scale(1.06) rotate(6deg); opacity: 0.95; }
}

/* الخطوط الرابطة (كوكبة) */
.ht3d-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.ht3d-links path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.ht3d-links-base { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; }
.ht3d-links-glow {
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2;
  stroke-dasharray: 26 300;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
  animation: ht3dTrace 5.5s linear infinite;
}
@keyframes ht3dTrace {
  from { stroke-dashoffset: 326; }
  to   { stroke-dashoffset: 0; }
}
.ht3d-dot {
  fill: #fff;
  opacity: 0.55;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
  animation: ht3dDot 3.4s ease-in-out infinite;
}
.ht3d-dot:nth-of-type(2) { animation-delay: 0.4s; }
.ht3d-dot:nth-of-type(3) { animation-delay: 0.8s; }
.ht3d-dot:nth-of-type(4) { animation-delay: 1.2s; }
.ht3d-dot:nth-of-type(5) { animation-delay: 1.6s; }
@keyframes ht3dDot {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.9; }
}

/* الصفّ: توزيع متساوٍ مضمون (flex) — لا تداخل أبداً */
.ht3d-rail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 1.6vw, 18px);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ht3d {
  --tile: clamp(58px, 8.6vw, 96px);
  flex: 0 0 auto;
  width: var(--tile);
  height: var(--tile);
  display: grid;
  place-items: center;
  border-radius: 24px;
  transform-style: preserve-3d;
  translate: var(--px, 0) var(--py, 0);
  background:
    linear-gradient(142deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.02) 58%),
    radial-gradient(130% 130% at 20% 8%, rgba(255, 255, 255, 0.2), transparent 55%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 34px 60px -24px rgba(0, 0, 0, 0.7),
    0 10px 22px -10px rgba(0, 0, 0, 0.5),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -22px 40px -28px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(18px) saturate(1.45) brightness(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.45) brightness(1.06);
  will-change: transform, translate;
}
.ht3d > i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 34%);
  mix-blend-mode: screen;
  opacity: 0.5;
}
.ht3d::after {
  content: "";
  position: absolute;
  inset: -32%;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.45;
  z-index: -1;
}
.ht3d svg {
  width: 50%;
  height: 50%;
  fill: none;
  stroke: rgba(255, 255, 255, 0.97);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.5));
}

/* قوس مرتّب: الحواف أسفل، الوسط أعلى وأبرز — كل بلاطة تميل نحو المركز */
.ht3d--1 { transform: translateY(20px) rotateX(12deg) rotateY(-18deg) rotateZ(-3deg); animation: ht3dBob 6.5s ease-in-out infinite; }
.ht3d--1::after { background: var(--accent); }
.ht3d--2 { transform: translateY(2px)  rotateX(11deg) rotateY(-9deg)  rotateZ(-1.5deg); animation: ht3dBob 7.2s ease-in-out infinite; animation-delay: -1.6s; }
.ht3d--2::after { background: var(--blue-400); }
.ht3d--3 { --tile: clamp(66px, 10vw, 112px); transform: translateY(-14px) rotateX(9deg) rotateY(0deg) scale(1.04); animation: ht3dBob 6s ease-in-out infinite; animation-delay: -3.1s; z-index: 2; }
.ht3d--3::after { background: var(--teal-500); opacity: 0.55; }
.ht3d--4 { transform: translateY(2px)  rotateX(11deg) rotateY(9deg)   rotateZ(1.5deg); animation: ht3dBob 7.2s ease-in-out infinite; animation-delay: -4.4s; }
.ht3d--4::after { background: var(--accent-2); }
.ht3d--5 { transform: translateY(20px) rotateX(12deg) rotateY(18deg)  rotateZ(3deg); animation: ht3dBob 6.5s ease-in-out infinite; animation-delay: -2.3s; }
.ht3d--5::after { background: var(--blue-500); }

/* طفو خفيف موحّد — لا يغيّر الترتيب، فقط يتنفّس */
@keyframes ht3dBob {
  0%, 100% { margin-top: 0; }
  50%      { margin-top: -12px; }
}

@media (max-width: 900px) {
  .hero-tools3d { max-width: 460px; height: clamp(128px, 30vw, 168px); }
}
@media (max-width: 560px) {
  .hero-tools3d { max-width: 100%; height: 118px; margin-bottom: 20px; }
  .ht3d { --tile: clamp(46px, 15vw, 62px); border-radius: 18px; }
  .ht3d--3 { --tile: clamp(52px, 17vw, 72px); }
  .ht3d--1, .ht3d--5 { transform: translateY(14px) rotateX(10deg) rotateY(0deg); }
  .ht3d--2, .ht3d--4 { transform: translateY(3px) rotateX(10deg) rotateY(0deg); }
  .ht3d--3 { transform: translateY(-10px) rotateX(8deg) scale(1.03); }
  .ht3d-links { opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
  .ht3d, .ht3d-aura, .ht3d-links-glow, .ht3d-dot { animation: none; }
  .ht3d-links-glow { display: none; }
}
/* =========================================================
   معرض «نماذج مصممة» — توزيع منظّم حسب اتجاه الصورة (مربّع فوق + طوليان تحته)
   ========================================================= */
.pf-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* الكمبيوتر: 4 أعمدة = 14 مربّعاً */
  gap: 14px;
  max-width: 1040px;
  margin: 26px auto 0;
  align-items: start;
  direction: ltr; /* عمود [مربّع+طوليان] يبدأ من اليسار */
}
.pf-col { display: flex; flex-direction: column; gap: 14px; }
/* الجوال/اللوح: عمودان فقط (7 مربّعات) — يُخفى العمودان 3 و4 */
@media (max-width: 1000px) {
  .pf-gallery {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    align-items: stretch; /* العمودان بنفس الارتفاع */
  }
  .pf-gallery .pf-col:nth-child(n + 3) { display: none; }
  /* توزيع الفراغ الزائد بين البطاقات فيتساوى طول العمودين ولا تبقى مساحة فارغة */
  .pf-col { justify-content: space-between; }
}
@media (max-width: 560px) {
  .pf-gallery { max-width: 100%; gap: 10px; margin-top: 20px; }
  .pf-col { gap: 10px; }
}
@media (max-width: 360px) {
  .pf-gallery { gap: 8px; }
  .pf-col { gap: 8px; }
}

.pf-card {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.pf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 56px -22px rgba(0, 0, 0, 0.62);
}
.pf-card-frame {
  position: relative;
  width: 100%;
  background: var(--navy-900);
}
/* احتياط فقط — الإطار يأخذ نسبته الفعلية من style المضمّن (متوسط نِسَب صوره) */
.pf-card--sq   .pf-card-frame { aspect-ratio: 1 / 1; }
.pf-card--tall .pf-card-frame { aspect-ratio: 2 / 3; }
.pf-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.pf-img.is-active { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
  .pf-img { transition: none; }
}
