/* ==========================================================================
   قالب سایت شخصی — استایل سفارشی
   طراحی: مینیمال، مدرن، RTL، با پشتیبانی تم روشن/تاریک
   ========================================================================== */

/* ---------- 1. توکن‌های طراحی (CSS Variables) ---------- */
:root {
  color-scheme: light;

  /* پالت برند — همان رنگ‌های پلیر پادکست */
  --brand-navy: #111827;
  --brand-navy-blue: #172554;
  --brand-blue-deep: #1e3a8a;
  --brand-blue: #2563eb;
  --brand-blue-bright: #3b82f6;
  --brand-blue-soft: #93c5fd;

  --color-primary: var(--brand-blue);
  --color-primary-dark: var(--brand-blue-deep);
  --color-primary-light: var(--brand-blue-bright);
  --color-primary-soft: #dbeafe;
  --color-accent: var(--brand-blue-bright);

  /* پس‌زمینه و سطوح — تم روشن */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-2: #eff6ff;
  --bg-nav: rgba(255, 255, 255, 0.72);

  /* متن */
  --text-main: var(--brand-navy);
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* مرز و سایه */
  --border-color: #dbeafe;
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 16px 48px rgba(17, 24, 39, 0.12);
  --shadow-primary: 0 8px 22px rgba(37, 99, 235, 0.22);

  /* شعاع گوشه */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* تایپوگرافی */
  --font-fa: 'Vazirmatn', 'Inter', system-ui, sans-serif;
  --font-en: 'Inter', 'Vazirmatn', system-ui, sans-serif;

  /* انتقال‌ها */
  --transition: 0.22s ease;

  /* ته‌رنگ هیرو — محو تدریجی به پس‌زمینه */
  --hero-tint: rgba(37, 99, 235, 0.09);
  --hero-tint-soft: rgba(37, 99, 235, 0.025);

  /* شیشه‌ای (Glassmorphism) — سطوحِ نیمه‌شفاف با محو پس‌زمینه */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px) saturate(120%);
}

/* ---------- تم تاریک ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --color-primary: #60a5fa;
  --color-primary-dark: var(--brand-blue-bright);
  --color-primary-light: var(--brand-blue-soft);
  --color-primary-soft: var(--brand-navy-blue);
  --color-accent: var(--brand-blue-soft);

  --bg-body: #0f172a;
  --bg-surface: var(--brand-navy);
  --bg-surface-2: var(--brand-navy-blue);
  --bg-nav: rgba(17, 24, 39, 0.72);

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;

  --border-color: #334155;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 8px 22px rgba(96, 165, 250, 0.18);

  --hero-tint: rgba(96, 165, 250, 0.07);
  --hero-tint-soft: rgba(96, 165, 250, 0.025);

  --glass-bg: rgba(17, 24, 39, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(12px) saturate(115%);
}

/* ---------- 2. پایه ---------- */
* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-fa);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.8;
  margin: 0;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
  /* چیدمان ستونی تا فوتر همیشه ته صفحه بچسبد (حتی وقتی محتوا کم است) */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ناحیه محتوای اصلی فضای خالی را پر می‌کند تا فوتر به پایین رانده شود */
.site-main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

p {
  color: var(--text-muted);
}

img {
  max-width: 100%;
}

.text-primary-c { color: var(--color-primary) !important; }
.bg-surface { background-color: var(--bg-surface); }

/* اسکرول‌بار سفارشی */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-surface-2); }
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

/* انتخاب متن */
::selection {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- 3. عناصر کمکی عمومی ---------- */
.section {
  padding: 90px 0;
}

.section-sm {
  padding: 60px 0;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.divider-accent {
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  margin: 0.75rem auto 0;
}

/* ---------- 4. دکمه‌ها ---------- */
.btn {
  min-height: 40px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--color-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  padding: 0 0.8rem;
  transition: all var(--transition);
  /* همهٔ آیکون‌ها دقیقاً در مرکز دکمه قرار می‌گیرند */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn i,
.btn .bi {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.btn-primary-c {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--color-primary);
}

.btn:hover,
.btn-primary-c:hover,
.btn-outline-c:hover,
.btn-soft:hover {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
  transform: none;
  box-shadow: none;
}

.btn-outline-c {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--color-primary);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(37, 99, 235, 0.18);
  color: var(--color-primary);
}

.btn-sm {
  min-height: 34px;
  padding-inline: 0.7rem;
  font-size: 0.76rem;
}

.btn-lg {
  min-height: 46px;
  padding-inline: 1.15rem;
  font-size: 0.9rem;
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn-primary-c,
[data-theme="dark"] .btn-outline-c,
[data-theme="dark"] .btn-soft {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.form-control[data-account-locked="true"] {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ---------- 5. پری‌لودر ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--color-primary-soft);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 6. ناوبری ---------- */
.navbar {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-top: 14px;          /* چند پیکسل فاصله از بالای صفحه */
  top: 14px;                 /* حفظ همان فاصله هنگام چسبیدن */
  transition: all var(--transition);
  margin-bottom: 14px;
}

/* خود منو داخل یک باکس شیشه‌ای با گوشه‌های گرد، به عرض کانتینر */
.navbar > .container {
  background: var(--bg-nav);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 1.25rem;
  transition: box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled > .container {
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 1.25rem;
}

.navbar-brand {
  font-weight: 600;
  /* اندازهٔ واکنش‌گرا تا در دستگاه‌های مختلف به دو خط نشکند */
  font-size: clamp(1rem, 0.82rem + 0.7vw, 1.2rem);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.navbar-brand:hover { color: var(--color-primary); }



/* دسکتاپ: فقط متنِ عنوان نمایش داده می‌شود (لوگو مخفی) */
.navbar .brand-logo { display: none; }

/* هدر موبایل: همبرگر (راست) و گروهِ [حساب کاربری + تغییر تم] (چپ)؛ عنوان مخفی */
@media (max-width: 991.98px) {
  .navbar .navbar-brand { display: none; }
  .navbar .mobile-nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* گروه چپِ هدر موبایل: حساب کاربری (راستِ تم) + تغییر تم */
.mobile-nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* دکمهٔ حساب کاربری هدر موبایل — هم‌سبک با دکمهٔ تم و همبرگری */
.mobile-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all var(--transition);
}
.mobile-action-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.navbar-nav .nav-link {
 font-size: 14px;
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  right: 1rem;
  left: 1rem;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--color-primary);
}

.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

/* دکمه تغییر تم */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: rotate(20deg);
}

.desktop-nav-group {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.desktop-account-btn,
.theme-toggle-desktop {
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--color-primary);
  box-shadow: none;
}

.desktop-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
}

.desktop-account-btn:hover,
.desktop-account-btn.active,
.theme-toggle-desktop:hover {
  border-color: transparent;
  background: var(--color-primary);
  color: #fff;
}

.theme-toggle-desktop {
  width: 40px;
}

.theme-toggle-desktop:hover {
  transform: none;
}

[data-theme="dark"] .desktop-nav-group {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .desktop-account-btn,
[data-theme="dark"] .theme-toggle-desktop {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .desktop-account-btn:hover,
[data-theme="dark"] .desktop-account-btn.active,
[data-theme="dark"] .theme-toggle-desktop:hover {
  background: var(--color-primary);
  border-color: transparent;
}

/* ---------- 7. بخش Hero ---------- */
/* ته‌رنگ از بالای سند (پشت ناوبری) شروع می‌شود تا هدر و هیرو یک سطح یکپارچه باشند */
body.home-page::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 720px;
  background: linear-gradient(
    180deg,
    var(--hero-tint) 0%,
    var(--hero-tint-soft) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

.hero {
  position: relative;
  padding: 120px 0 90px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -15%;
  width: 70vw;
  max-width: 720px;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--color-primary-soft), transparent 58%);
  opacity: 0.22;
  filter: blur(44px);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -35%;
  right: -18%;
  width: 55vw;
  max-width: 540px;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--color-primary-soft), transparent 58%);
  opacity: 0.14;
  filter: blur(48px);
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-copy {
  text-align: right;
}

.hero-greeting {
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2.25rem, 4.2vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-avatar {
  width: clamp(240px, 30vw, 360px);
  height: clamp(240px, 30vw, 360px);
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--bg-surface);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-soft), var(--bg-surface-2));
  color: var(--color-primary);
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.hero-avatar i { font-size: 5rem; opacity: 0.65; }

.hero-compact-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.hero-floating-stage {
  --hero-stage-size: clamp(230px, 48vw, 300px);
  position: relative;
  width: var(--hero-stage-size);
  height: var(--hero-stage-size);
  display: grid;
  place-items: center;
}

.hero-avatar-compact {
  width: clamp(138px, 24vw, 188px);
  height: clamp(138px, 24vw, 188px);
  border-width: 6px;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.16);
}

.hero-tech-pill {
  position: absolute;
  z-index: 2;
  min-width: 54px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.08);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  padding: 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  animation: none;
}

.hero-tech-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.hero-tech-pill i,
.hero-tech-pill .tech-symbol {
  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1;
}

.tech-top-right { top: 9%; right: 4%; animation-delay: 0s; }
.tech-top-left { top: 18%; left: -2%; animation-delay: -1.1s; }
.tech-mid-right { right: -4%; bottom: 25%; animation-delay: -2.2s; }
.tech-bottom-left { left: 4%; bottom: 17%; animation-delay: -3.1s; }
.tech-bottom-center { right: 30%; bottom: 0; animation-delay: -4s; }

@keyframes skill-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

[data-theme="dark"] .hero-tech-pill {
  background: rgba(17, 24, 39, 0.62);
  border-color: rgba(255, 255, 255, 0.12);
}

/* آمار سریع زیر hero */
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- 8. کارت‌های تحصیلات ---------- */
.academy-jump-section {
  margin-top: -2.8rem;
  padding: 0 0 1.5rem;
  position: relative;
  z-index: 2;
}

.academy-jump-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.1);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
}

.academy-jump-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.academy-jump-icon i { font-size: 1.55rem; }

.academy-jump-copy {
  min-width: 0;
}

.academy-jump-kicker {
  display: inline-flex;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.28rem;
}

.academy-jump-copy h2 {
  margin: 0 0 0.28rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 800;
}

.academy-jump-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.9;
}

.academy-jump-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.academy-jump-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.academy-jump-link {
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.academy-jump-link:hover { color: var(--color-primary); }

[data-theme="dark"] .academy-jump-card {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
}

.edu-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.edu-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-surface-2);
}

.edu-body h5 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
}

.edu-body .edu-degree {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.edu-body .edu-year {
  color: var(--text-soft);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---------- 9. تایم‌لاین سوابق شغلی ---------- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.4rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 24px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-right: 70px;
  margin-bottom: 1rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  right: 0;
  top: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.timeline-dot img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  transition: all var(--transition);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(-6px);
}

.timeline-period {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

.timeline-content h5 { margin: 0 0 0.2rem; font-size: 1rem; }
.timeline-company {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ---------- 10. مهارت‌ها ---------- */
.skills-flex {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.85rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  text-align: right;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.skill-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.skill-item:hover .skill-icon {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.skill-icon img { width: 25px; height: 25px; object-fit: contain; }

.skill-item h6 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: start;
  overflow-wrap: anywhere;
}

.skill-body {
  min-width: 0;
  flex: 1;
}

/* پرداخت کارت‌به‌کارت */
.bank-transfer-box {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
}

.bank-transfer-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border-color);
}

.bank-transfer-box > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.bank-transfer-box span { color: var(--text-muted); }
.bank-transfer-box strong { color: var(--text-main); overflow-wrap: anywhere; }

/* ---------- 11. صفحات داخلی — هدر صفحه + Breadcrumb ---------- */
/* پس‌زمینه آبی تا بالای صفحه و پشت منوی شناور کشیده می‌شود (مثل هیروی صفحه اصلی).
   با margin منفی به بالا کشیده و با padding جبران می‌شود؛ به همین خاطر مستقل از
   ارتفاع منو/نوار جشنواره است و فاصلهٔ محتوا از منو ثابت می‌ماند. */
.page-header {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  padding: 0 0 60px;
  margin-top: -220px;
  padding-top: 286px;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -5%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
}

.page-header h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.page-header p { color: rgba(255,255,255,0.85); max-width: 620px; }

/* تم تاریک: هدر صفحه با گرادیان سرمه‌ایِ کم‌کنتراست و هماهنگ */
[data-theme="dark"] .page-header {
  background: linear-gradient(135deg, var(--brand-navy-blue), var(--brand-navy));
}

/* هدر صفحه اصلی — همان قاب صفحات داخلی با محتوای کامل Hero */
.home-page-header {
  min-height: 600px;
}

.home-page-header .hero-title {
  color: #fff;
}

.home-page-header .hero-role {
  color: var(--brand-blue-soft);
}

.home-page-header .hero-tagline,
.home-page-header .hero-stat .label {
  color: rgba(255, 255, 255, 0.78);
}

.home-page-header .hero-stat .num {
  color: #fff;
}

.home-page-header .hero-tech-pill {
  border-color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .home-page-header .hero-tech-pill {
  background: rgba(17, 24, 39, 0.74);
  border-color: rgba(147, 197, 253, 0.22);
}

/* پیام‌ها بالای پس‌زمینهٔ آبیِ کشیده‌شده دیده شوند */
.site-messages { position: relative; z-index: 3; }

.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0.75rem 0 0;
}

.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.breadcrumb .breadcrumb-item.active { color: #fff; font-weight: 600; }

.breadcrumb-item + .breadcrumb-item::before {
  content: '‹';
  color: rgba(255,255,255,0.6);
}

/* ---------- 12. تب‌ها (آکادمی) ---------- */
.nav-pills-c {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.4rem;
  margin-bottom: 2.5rem;
}

.nav-pills-c .nav-link {
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 1.4rem;
  border: none;
  background: transparent;
}

.nav-pills-c .nav-link.active {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- 13. کارت دوره (آکادمی) ---------- */
.course-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  transition: all var(--transition);
}

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

.course-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.course-type-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-video { background: #dc2626; }
.badge-text { background: #2563eb; }

.course-body { padding: 1.25rem; }

.course-body h5 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.course-instructor {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
}

.course-rating { color: #f59e0b; font-weight: 600; }
.course-price { color: var(--color-primary); font-weight: 700; font-size: 1rem; }
.course-price.free { color: #16a34a; }

/* ---------- 14. وبلاگ ---------- */
.blog-post {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.75rem;
  transition: all var(--transition);
}

.blog-post:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.blog-post-img {
  flex: 0 0 38%;
  min-height: 220px;
  overflow: hidden;
}

.blog-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-post:hover .blog-post-img img { transform: scale(1.06); }

.blog-post-body { padding: 1.5rem; flex: 1; }

.blog-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.6rem;
}

.blog-post-body h4 {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
}

.blog-post-body h4 a { color: var(--text-main); }
.blog-post-body h4 a:hover { color: var(--color-primary); }

.blog-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.blog-date {
  font-size: 0.82rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* سایدبار */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.sidebar-widget h5 {
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.sidebar-widget h5::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--color-primary);
}

.search-box { position: relative; }
.search-box input {
  border-radius: var(--radius-pill);
  padding-left: 2.75rem;
}
.search-box button {
  position: absolute;
  left: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--color-primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { margin-bottom: 0.5rem; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all var(--transition);
}
.cat-list a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.cat-list .count {
  font-size: 0.78rem;
  background: var(--bg-surface-2);
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-pill);
}

.recent-post {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
  align-items: center;
}
.recent-post img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.recent-post h6 {
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
  line-height: 1.5;
}
.recent-post h6 a { color: var(--text-main); }
.recent-post h6 a:hover { color: var(--color-primary); }
.recent-post .r-date { font-size: 0.75rem; color: var(--text-soft); }

/* پاگینیشن */
.pagination .page-link {
  color: var(--text-main);
  border: 1px solid var(--border-color);
  margin: 0 0.2rem;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-surface);
}
.pagination .page-item.active .page-link {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.pagination .page-link:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* ---------- 15. نرم‌افزارها ---------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-pill {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 1.3rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: all var(--transition);
}

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

.product-bestseller {
  position: absolute;
  top: 1rem;
  right: -2.4rem;
  transform: rotate(45deg);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 2.6rem;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.product-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface-2);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-body { padding: 1.35rem; }
.product-body h5 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.product-desc {
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  min-height: 3rem;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.product-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-primary);
}
.product-price small { font-weight: 400; color: var(--text-soft); font-size: 0.75rem; }

/* ---------- 16. فرم‌ها ---------- */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  /* هم‌قدی کارت‌ها فقط در صفحه تماس با کلاس h-100 اعمال می‌شود */
}

.form-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control,
.form-select {
  background: var(--bg-body);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text-main);
  transition: all var(--transition);
}

.form-control::placeholder { color: var(--text-soft); }

.form-control:focus,
.form-select:focus {
  background: var(--bg-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  color: var(--text-main);
}

.input-icon-group {
  position: relative;
}
.input-icon-group .form-control { padding-right: 2.8rem; }
.input-icon-group i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}
.input-icon-group .form-control:focus + i { color: var(--color-primary); }

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  border-color: var(--color-primary);
}

/* خبرنامه — کارت اکسنت */
.newsletter-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  border: none;
}
.newsletter-card .form-card-icon { background: rgba(255,255,255,0.15); color: #fff; }
.newsletter-card h4, .newsletter-card p { color: #fff; }
.newsletter-card p { color: rgba(255,255,255,0.85); }
.newsletter-card .form-control { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); color: #fff; }
.newsletter-card .form-control::placeholder { color: rgba(255,255,255,0.7); }

/* ---------- نوار و مودال جشنواره ---------- */
.campaign-bar {
  position: sticky;
  top: 0;
  z-index: 1031;
  background: var(--color-primary-dark);
  color: #fff;
  font-size: 0.88rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.campaign-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  white-space: nowrap;
  overflow: hidden;
}
.campaign-bar .bi-stars { font-size: 1.05rem; }
.campaign-off {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.7rem;
  font-weight: 700;
}
.campaign-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.campaign-close {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-inline-start: 0.25rem;
  cursor: pointer;
}
.campaign-close:hover { color: #fff; }
/* وقتی نوار جشنواره هست، ناوبری زیر آن می‌چسبد */
.campaign-bar + .navbar { top: 44px; }

/* مودال سراسری پیام/خطا (فرم‌های HTMX) */
.app-modal-content {
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.app-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}
.app-modal-icon.is-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.app-modal-icon.is-error   { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.app-modal-icon.is-info    { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); }
.app-modal-icon.is-warning { background: linear-gradient(135deg, #d97706, #b45309); }

/* ---------- آزمون فصل ---------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }

.quiz-question {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.quiz-q-head { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.quiz-q-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.quiz-q-text { margin: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.9; }
.quiz-q-image { max-width: 100%; border-radius: var(--radius-sm); margin-bottom: 1rem; }

.quiz-choices { display: grid; gap: 0.6rem; }
.quiz-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.quiz-choice input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-choice:hover { border-color: var(--color-primary); background: var(--color-primary-soft); }
.quiz-choice-body { flex: 1; display: flex; align-items: center; gap: 0.75rem; }
.quiz-choice-img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); }
.quiz-choice-text { font-weight: 500; }
.quiz-choice-check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.quiz-choice-check i { opacity: 0; }
.quiz-choice:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.quiz-choice:has(input:checked) .quiz-choice-check {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.quiz-choice:has(input:checked) .quiz-choice-check i { opacity: 1; }

.quiz-result {
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.quiz-result-icon { font-size: 3.5rem; line-height: 1; }
.quiz-result.is-pass .quiz-result-icon { color: #16a34a; }
.quiz-result.is-fail .quiz-result-icon { color: #dc2626; }
.quiz-score { font-size: 3rem; font-weight: 800; margin: 0.5rem 0; }
.quiz-result.is-pass .quiz-score { color: #16a34a; }
.quiz-result.is-fail .quiz-score { color: #dc2626; }

.campaign-modal-content {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
}
.campaign-modal-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  /* هماهنگ با رنگ اصلی سایت */
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-primary);
}
.campaign-modal-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- منوی موبایل اختصاصی ---------- */
.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-brand-card {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text-main);
  border-radius: 18px;
  padding: 0.35rem 0.45rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.mobile-brand-card:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.18);
}
.mobile-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.mobile-brand-kicker {
  width: max-content;
  max-width: 100%;
  border-radius: var(--radius-pill);
  padding: 0.08rem 0.55rem;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  font-size: 0.68rem;
  font-weight: 800;
  margin-top: 0.12rem;
}
.mobile-brand-name {
  max-width: 100%;
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
/* دکمه تغییر تم در هدر موبایل — هم‌اندازه و هم‌سبک با دکمه همبرگری */
.theme-toggle-mobile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border-color: transparent;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.theme-toggle-mobile:hover {
  transform: none;
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
}

.mobile-nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary-soft);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background var(--transition);
}
.mobile-nav-toggle .mnt-bar {
  width: 20px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-toggle.open { background: var(--color-primary); }
.mobile-nav-toggle.open .mnt-bar { background: #fff; }
.mobile-nav-toggle.open .mnt-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.open .mnt-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-nav-toggle.open .mnt-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-main);
}
.drawer-profile:hover { color: var(--text-main); }
.drawer-profile strong,
.drawer-profile small {
  display: block;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-profile strong {
  font-size: 0.96rem;
}
.drawer-profile small {
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.drawer-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.9rem 1rem 0.2rem;
}
.drawer-quick-grid a {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border-radius: 18px;
  padding: 0.75rem 0.35rem;
  color: var(--text-main);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 800;
}
.drawer-quick-grid i {
  color: var(--color-primary);
  font-size: 1.15rem;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background:
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.16), transparent 34%),
    rgba(15, 17, 21, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}
.mobile-drawer-backdrop.open { opacity: 1; visibility: visible; }

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 1045;
  width: min(86vw, 360px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px 0 0 18px;
  box-shadow: -22px 0 70px rgba(31, 41, 55, 0.22);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
}
.mobile-drawer.open { transform: translateX(0); }

[data-theme="dark"] .mobile-drawer {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.82));
  border-left-color: rgba(255, 255, 255, 0.1);
  box-shadow: -22px 0 70px rgba(0, 0, 0, 0.5);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1.1rem + env(safe-area-inset-top, 0px)) 1.05rem 1rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.06), transparent);
  border-radius: 18px 0 0 0;
}
.drawer-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.drawer-close:hover { background: var(--color-primary); color: #fff; }

[data-theme="dark"] .drawer-close {
  background: rgba(255, 255, 255, 0.08);
}

.drawer-links {
  flex: 1;
  padding: 0.75rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 0.78rem;
  border-radius: 18px;
  color: var(--text-main);
  font-weight: 600;
  transition: all var(--transition);
  opacity: 0;
  transform: translateX(24px);
}
.mobile-drawer.open .drawer-links a {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, color 0.2s;
}
.mobile-drawer.open .drawer-links a:nth-child(1) { transition-delay: 0.08s; }
.mobile-drawer.open .drawer-links a:nth-child(2) { transition-delay: 0.14s; }
.mobile-drawer.open .drawer-links a:nth-child(3) { transition-delay: 0.2s; }
.mobile-drawer.open .drawer-links a:nth-child(4) { transition-delay: 0.26s; }
.mobile-drawer.open .drawer-links a:nth-child(5) { transition-delay: 0.32s; }
.mobile-drawer.open .drawer-links a:nth-child(6) { transition-delay: 0.38s; }
.drawer-links .dl-icon {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  background: var(--bg-surface-2);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}
.drawer-links .dl-arrow {
  margin-inline-start: auto;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.drawer-links a:hover,
.drawer-links a.active {
  background:
    linear-gradient(135deg, var(--color-primary-soft), rgba(255, 255, 255, 0.34));
  color: var(--color-primary);
}
.drawer-links a:hover .dl-icon,
.drawer-links a.active .dl-icon {
  background: var(--color-primary);
  color: #fff;
}

.drawer-foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
}

/* ---------- کپچای تصویری ---------- */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.captcha-img {
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-surface-2), var(--color-primary-soft));
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.captcha-box:focus-within .captcha-img {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--hero-tint), 0 4px 14px rgba(37, 99, 235, 0.12);
}
.captcha-box .form-control {
  flex: 1;
  min-width: 120px;
}

/* ---------- 17. حساب کاربری ---------- */
.auth-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

/* جداکنندهٔ «یا» بین فرم ورود و گزینهٔ خارج از ایران */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.auth-divider span { padding: 0 0.75rem; }

.auth-tabs {
  display: flex;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  padding: 0.35rem;
  margin-bottom: 2rem;
}
.auth-tabs .nav-link {
  flex: 1;
  text-align: center;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-weight: 600;
  border: none;
  padding: 0.6rem;
}
.auth-tabs .nav-link.active {
  background: var(--color-primary);
  color: #fff;
}

.password-toggle {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
}

/* پروفایل */
.profile-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-surface);
  box-shadow: var(--shadow-md);
  margin: 0 auto 1rem;
  display: block;
}

.profile-menu { list-style: none; padding: 0; margin: 1.5rem 0 0; text-align: right; }
.profile-menu li { margin-bottom: 0.35rem; }
.profile-menu li form { margin: 0; }
/* دکمه خروج — هم‌تراز و هم‌استایل با لینک‌های منو */
.profile-menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  text-align: right;
  transition: all var(--transition);
}
.profile-menu button:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.profile-menu button i { font-size: 1.15rem; }

/* آواتار قابل کلیک برای تغییر مستقیم تصویر */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.profile-avatar-wrap .profile-avatar {
  margin: 0 auto;
  overflow: hidden;
}
.profile-avatar-wrap .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.avatar-edit-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 3px solid var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}
.profile-avatar-wrap:hover .avatar-edit-badge { background: var(--color-primary-dark); }

/* آمار کاربر در سایدبار پروفایل */
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.profile-stats .p-stat {
  flex: 1;
  background: var(--bg-surface-2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.3rem;
  text-align: center;
}
.profile-stats .num {
  display: block;
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.05rem;
}
.profile-stats .lbl { font-size: 0.7rem; color: var(--text-muted); }
.profile-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-weight: 500;
  transition: all var(--transition);
}
.profile-menu a.active,
.profile-menu a:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.profile-menu a i { font-size: 1.15rem; }

.profile-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .value { font-weight: 600; }

.order-table th { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }
.order-table td, .order-table th { vertical-align: middle; border-color: var(--border-color); }

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
}
.status-paid { background: #dcfce7; color: #16a34a; }
.status-pending { background: #fef3c7; color: #d97706; }
[data-theme="dark"] .status-paid { background: rgba(22,163,74,0.2); }
[data-theme="dark"] .status-pending { background: rgba(217,119,6,0.2); }

.enrolled-course {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.enrolled-course img {
  width: 72px; height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.enrolled-progress {
  height: 6px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.5rem;
}
.enrolled-progress .bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

/* ---------- 18. فوتر ---------- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
  margin-top: 2rem;
  flex-shrink: 0;
}

.footer h5 { font-size: 1.05rem; margin-bottom: 1.25rem; }

.footer-about p { font-size: 0.9rem; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
}
.footer-links a:hover { color: var(--color-primary); padding-right: 0.3rem; }

.social-links { display: flex; gap: 0.6rem; margin-top: 1.25rem; }
.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-links a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: translateY(-4px);
}
.social-links svg { width: 20px; height: 20px; fill: currentColor; }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-soft);
}
.footer-bottom a { color: var(--color-primary); }

/* ---------- 19. دکمه بازگشت به بالا ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-4px); }

/* ---------- 21. جایگزین تصویر (Placeholder خالی) ---------- */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-2);
  color: var(--text-soft);
  border: 1px dashed var(--border-color);
  overflow: hidden;
}
.img-ph i { font-size: 1.9rem; opacity: 0.55; }
/* فقط placeholderهایی که باید کل کادر والد را پر کنند */
.course-thumb .img-ph,
.product-thumb .img-ph,
.blog-post-img .img-ph { width: 100%; height: 100%; }
.edu-logo.img-ph i { font-size: 1.6rem; }
.profile-avatar.img-ph i { font-size: 2.6rem; }

/* ---------- نقش حرفه‌ای زیر نام در Hero ---------- */
.hero-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* ---------- آیکون مهارت‌ها (بدون تصویر اینترنتی) ---------- */
.skill-icon i {
  font-size: 2.1rem;
  color: var(--color-primary);
}

/* ---------- استپر دو مرحله‌ای ورود (شماره موبایل ← کد تایید) ---------- */
.auth-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 76px;
}
.auth-step .step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--bg-surface-2);
  border: 1.5px solid var(--border-color);
  color: var(--text-soft);
  transition: all var(--transition);
}
.auth-step .step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);

}
.auth-step.active .step-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}
.auth-step.active .step-label { color: var(--color-primary); }
.auth-step.done .step-dot {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.auth-step.done .step-label { color: var(--text-muted); }
.auth-steps .step-line {
  flex: 0 0 44px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--border-color);
  margin-top: 17px;
}
.auth-steps .step-line.filled { background: var(--color-primary); }

/* ---------- ورود پیامکی / کد تایید (OTP) ---------- */
.otp-field {
  margin: 1.5rem 0 1rem;
}
.otp-input {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.35rem, 2vw, 0.6rem);
  direction: ltr;
  width: min(100%, 360px);
  margin: 0 auto;
}
.otp-input input {
  width: 100%;
  min-width: 0;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-main);
  transition: all var(--transition);
}
.otp-input input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}
/* محافظ چیدمان در برابر پیام‌های تزریقی اعتبارسنجی عمومی/نسخه‌های کش‌شده */
.otp-input > .live-validation-message {
  display: none !important;
}
.otp-input.is-invalid input {
  border-color: var(--bs-form-invalid-color, #dc3545);
}
.otp-input.is-invalid input:focus {
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
}
.otp-feedback {
  min-height: 1.35rem;
  margin-top: 0.65rem;
  color: var(--bs-form-invalid-color, #dc3545);
  font-size: 0.875rem;
  line-height: 1.35rem;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition);
}
.otp-feedback.is-visible {
  visibility: visible;
  opacity: 1;
}
.countdown-wrap { color: var(--text-muted); font-size: 0.9rem; }
.countdown-wrap .timer { font-weight: 700; color: var(--color-primary); }
/* تا پایان شمارش معکوس، دکمه ارسال مجدد پنهان است (صفحه شلوغ نشود) */
.resend-btn.disabled { display: none; }
.verify-phone {
  font-weight: 700;
  direction: ltr;
  display: inline-block;
  color: var(--text-main);
}

/* ---------- فوتر مینیمال ---------- */
.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand { max-width: 320px; }
.footer-brand p { font-size: 0.9rem; margin: 0.75rem 0 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}
.footer-nav a:hover { color: var(--color-primary); }

/* محل قرارگیری نماد اعتماد الکترونیکی */
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 88px;
  height: 88px;
  text-align: center;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  transition: all var(--transition);
}
.trust-badge:hover { border-color: var(--color-primary); color: var(--color-primary); }
.trust-badge i { font-size: 1.5rem; color: var(--color-primary); }

/* کادر کوچک و نقطه‌چینِ نماد اعتماد (هم برای کد رسمی، هم پیش‌فرض) */
.trust-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.trust-box .trust-badge { border: none; box-shadow: none; }

/* ---------- 22. صفحات جزئیات (دوره / وبلاگ / نرم‌افزار) ---------- */

/* لینک عنوان کارت‌ها */
.course-body h5 a,
.product-body h5 a { color: var(--text-main); transition: color var(--transition); }
.course-body h5 a:hover,
.product-body h5 a:hover { color: var(--color-primary); }

/* متای صفحه جزئیات (در هدر) */
.detail-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.92rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: 0.4rem; color: rgba(255,255,255,0.9); }
.detail-meta i { color: #fff; }
.detail-type-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem; font-weight: 700;
  margin-bottom: 1rem;
}

/* پخش‌کننده ویدیو (جای‌گیر) */
.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-soft), var(--bg-surface-2));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color);
}
.video-player .play-btn {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--color-primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; box-shadow: var(--shadow-primary);
  transition: transform var(--transition);
}
.video-player .play-btn:hover { transform: scale(1.08); }

/* تب‌های صفحه جزئیات */
.detail-tabs { border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; gap: 0.25rem; flex-wrap: wrap; }
.detail-tabs .nav-link {
  border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-weight: 600; padding: 0.75rem 1.1rem; background: transparent;
}
.detail-tabs .nav-link.active {
  color: var(--color-primary); border-bottom-color: var(--color-primary); background: transparent;
}

/* سرفصل‌ها / فهرست جلسات */
.curriculum { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.curriculum-head {
  background: var(--bg-surface-2); padding: 0.9rem 1.25rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.lesson-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface); transition: background var(--transition);
}
.lesson-item:last-child { border-bottom: none; }
.lesson-item:hover { background: var(--bg-surface-2); }
.lesson-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; /* شماره درس داخل دایره */
}
.lesson-title { flex: 1; font-weight: 500; }
.lesson-meta { color: var(--text-soft); font-size: 0.82rem; display: flex; align-items: center; gap: 0.75rem; }
.lesson-free { color: #16a34a; font-weight: 600; font-size: 0.78rem; }
.lesson-item.locked .lesson-title { color: var(--text-muted); }
.lesson-item.locked .lesson-icon { background: var(--bg-surface-2); color: var(--text-soft); }

/* کارت خرید/ثبت‌نام چسبان */
.purchase-card {
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.5rem;
  position: sticky; top: 110px; box-shadow: var(--shadow-sm);
}
.purchase-media { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1.25rem; }
.purchase-price { font-size: 1.7rem; font-weight: 800; color: var(--color-primary); }
.purchase-price del { font-size: 0.9rem; font-weight: 400; color: var(--text-soft); margin-inline-start: 0.5rem; }

.info-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.info-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list .k { color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.info-list .k i { color: var(--color-primary); }
.info-list .v { font-weight: 600; }

/* لیست ویژگی‌ها */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.9rem; color: var(--text-muted); }
.feature-list li i { color: var(--color-primary); font-size: 1.2rem; margin-top: 0.15rem; flex-shrink: 0; }

/* محتوای مقاله */
.article-content { font-size: 1.05rem; line-height: 2.1; }
.article-content p { color: var(--text-muted); margin-bottom: 1.25rem; }
.article-content h2, .article-content h3 { margin: 2rem 0 1rem; }
.article-content ul, .article-content ol { color: var(--text-muted); margin-bottom: 1.25rem; padding-right: 1.25rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-right: 4px solid var(--color-primary); background: var(--bg-surface-2);
  padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin: 1.5rem 0;
  color: var(--text-main); font-weight: 500;
}
/* بلوک کد — پنجره ادیتور با تم تیره */
.article-content pre {
  position: relative;
  background: var(--brand-navy);
  color: #e6edf3;
  padding: 3rem 1.25rem 1.25rem;
  border-radius: 14px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  margin: 1.5rem 0;
  font-family: 'Consolas', 'Menlo', monospace;
  font-size: 0.88rem;
  line-height: 1.9;
  box-shadow: var(--shadow-md);
}
.article-content pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: #1f2937;
  border-bottom: 1px solid #374151;
  border-radius: 14px 14px 0 0;
}
.article-content pre::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
}
.article-figure { aspect-ratio: 16/8; border-radius: var(--radius-md); overflow: hidden; margin: 1.5rem 0; }
.article-inline-image {
  margin: 1.75rem auto;
  max-width: 92%;
}
.article-inline-image.is-stretched {
  max-width: 100%;
}
.article-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface-2);
}
.article-inline-image figcaption {
  margin-top: 0.65rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* جعبه نویسنده / مدرس */
.author-box {
  display: flex; gap: 1.25rem; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.5rem;
}
.author-avatar { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; }

/* نظرات */
.review-item { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border-color); }
.review-item:last-child { border-bottom: none; }
.review-avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.review-stars { color: #f59e0b; font-size: 0.85rem; }

/* گالری نرم‌افزار */
.gallery-main { aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 0.85rem; }
.gallery-thumbs { display: flex; gap: 0.75rem; }
.gallery-thumbs > * { flex: 1; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; }

/* اشتراک‌گذاری */
.share-btns { display: flex; gap: 0.5rem; }
.share-btns a,
.share-btns button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  background: var(--bg-surface); padding: 0; cursor: pointer;
  transition: all var(--transition);
}
.share-btns a:hover,
.share-btns button:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* برچسب‌های مقاله */
.tag-pill {
  display: inline-block; font-size: 0.8rem; color: var(--text-muted);
  background: var(--bg-surface-2); border: 1px solid var(--border-color);
  padding: 0.3rem 0.85rem; border-radius: var(--radius-pill); transition: all var(--transition);
}
.tag-pill:hover { background: var(--color-primary-soft); color: var(--color-primary); }

/* ---------- 23. صفحه ورود/تایید مستقل + صفحه مطالعه ---------- */

/* صفحه احراز هویت مستقل — فقط باکس وسط صفحه */
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}
.auth-screen::before {
  content: '';
  position: absolute;
  top: -15%; inset-inline-end: -10%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--color-primary-soft), transparent 70%);
  opacity: 0.7; z-index: 0;
}
.auth-screen > * { position: relative; z-index: 1; }
.auth-brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.4rem; color: var(--text-main);
  margin-bottom: 1.5rem;
}
.auth-brand:hover { color: var(--color-primary); }

/* صفحه مطالعه دوره — محافظت از محتوا (غیرقابل انتخاب/کپی) */
.reader-card,
.reader-card * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.reader-content { min-height: 120px; }
.reader-canvas {
  display: block;
  width: 100%;
  pointer-events: none;
}

/* ---------- پلیر اختصاصی پادکست در محتوای EditorJS ---------- */
.podcast-player {
  position: relative;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: stretch;
  margin: 1.75rem 0;
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #e5e7eb;
  background:
    radial-gradient(circle at 12% 15%, rgba(59, 130, 246, 0.3), transparent 34%),
    linear-gradient(135deg, var(--brand-navy), var(--brand-navy-blue));
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.2);
  direction: rtl;
  user-select: none;
}
.podcast-player::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: inherit;
}
.podcast-player audio { display: none; }
.podcast-visual {
  position: relative;
  min-height: 126px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(145deg, var(--brand-blue), var(--brand-blue-deep));
  overflow: hidden;
}
.podcast-visual > i { font-size: 2.25rem; }
.podcast-wave {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0.78;
}
.podcast-wave b {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: #fff;
}
.podcast-wave b:nth-child(2), .podcast-wave b:nth-child(4) { height: 14px; }
.podcast-wave b:nth-child(3) { height: 22px; }
.podcast-player.playing .podcast-wave b { animation: podcast-wave 0.8s ease-in-out infinite alternate; }
.podcast-player.playing .podcast-wave b:nth-child(2) { animation-delay: -0.2s; }
.podcast-player.playing .podcast-wave b:nth-child(3) { animation-delay: -0.45s; }
.podcast-player.playing .podcast-wave b:nth-child(4) { animation-delay: -0.3s; }
@keyframes podcast-wave { to { height: 22px; } }
.podcast-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 0.2rem 0;
}
.podcast-heading h3 {
  margin: 0.15rem 0 0;
  color: #fff;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}
.podcast-kicker {
  color: var(--brand-blue-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.podcast-caption {
  margin: 0.35rem 0 0;
  color: #aeb9c9;
  font-size: 0.85rem;
  line-height: 1.7;
}
.podcast-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  direction: ltr;
}
.podcast-controls button {
  flex: 0 0 auto;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.podcast-play {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% !important;
  background: var(--brand-blue) !important;
  font-size: 1.2rem;
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.3);
}
.podcast-speed {
  min-width: 34px;
  height: 30px;
  padding: 0 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 6px;
  font-size: 0.72rem;
}
.podcast-mute { font-size: 1.05rem; }
.podcast-time {
  min-width: 38px;
  color: #cbd5e1;
  font-size: 0.75rem;
  text-align: center;
}
.podcast-seek {
  --podcast-progress: 0%;
  min-width: 80px;
  flex: 1;
  height: 5px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--brand-blue-bright) var(--podcast-progress), rgba(255,255,255,0.2) var(--podcast-progress));
}
.podcast-seek::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  -webkit-appearance: none;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-blue-bright);
}
.podcast-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-blue-bright);
}
.podcast-player.is-loading .podcast-play { opacity: 0.65; }
.podcast-player.has-error::before {
  content: 'فایل صوتی در دسترس نیست';
  position: absolute;
  inset-inline: 1rem;
  bottom: 0.25rem;
  color: #fca5a5;
  font-size: 0.72rem;
  text-align: center;
}
@media (max-width: 575.98px) {
  .podcast-player { grid-template-columns: 76px minmax(0, 1fr); gap: 0.8rem; padding: 0.8rem; }
  .podcast-visual { min-height: 108px; }
  .podcast-visual > i { font-size: 1.65rem; }
  .podcast-caption { display: none; }
  .podcast-controls { gap: 0.35rem; }
  .podcast-play { width: 38px; height: 38px; }
  .podcast-time { min-width: 34px; font-size: 0.68rem; }
  .podcast-speed { display: none; }
}

/* صفحه مطالعه دوره — وضعیت‌های درس */
.lesson-item.active { background: var(--color-primary-soft); }
.lesson-item.active .lesson-icon { background: var(--color-primary); color: #fff; }
.lesson-item.completed .lesson-icon { background: #dcfce7; color: #16a34a; }
[data-theme="dark"] .lesson-item.completed .lesson-icon { background: rgba(22, 163, 74, 0.2); }
.lesson-item a.lesson-title { color: inherit; }
.lesson-item a.lesson-title:hover { color: var(--color-primary); }

/* ---------- پلیر اختصاصی ویدیو درس ---------- */
.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  user-select: none;
}
.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
/* واترمارک متحرک شماره کاربر */
.vp-watermark {
  position: absolute;
  top: 12%;
  left: 10%;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: top 1.6s ease-in-out, left 1.6s ease-in-out;
  direction: ltr;
}
/* لایه بارگذاری ویدیو */
.vp-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: rgba(0, 0, 0, 0.65);
  color: #e5e7eb;
  font-size: 0.9rem;
}
.vp-loading[hidden] { display: none; }

/* دکمه بزرگ پخش وسط */
.vp-big-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  z-index: 2;
  transition: transform var(--transition), opacity var(--transition);
}
.vp-big-play:hover { transform: scale(1.08); }
.video-shell.playing .vp-big-play { opacity: 0; pointer-events: none; }
/* نوار کنترل */
.vp-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  direction: ltr;
  padding: 1.4rem 0.9rem 0.65rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  opacity: 0;
  transition: opacity var(--transition);
}
.video-shell:hover .vp-controls,
.video-shell:not(.playing) .vp-controls { opacity: 1; }
.vp-controls button {
  border: 0;
  background: none;
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.vp-controls button:hover { color: var(--color-primary-light); }
.vp-time {
  color: #e5e7eb;
  font-size: 0.78rem;
  min-width: 38px;
  text-align: center;
}
.vp-seek {
  --vp-progress: 0%;
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right, var(--color-primary) var(--vp-progress), rgba(255, 255, 255, 0.25) var(--vp-progress));
  cursor: pointer;
  outline: none;
}
.vp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-primary);
  cursor: pointer;
}
.vp-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-primary);
  cursor: pointer;
}

/* سایدبار چسبان صفحه مطالعه */
.sticky-side { position: sticky; top: 110px; }

/* کارت خواندن درس */
.reader-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.reader-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* ---------- 20. مدیا کوئری‌ها ---------- */

/* ≥1200px — دسکتاپ بزرگ */
@media (min-width: 1200px) {
  .container { max-width: 1180px; }
}

/* <992px — تبلت */
@media (max-width: 991.98px) {
  .navbar {
    top: max(0.65rem, env(safe-area-inset-top, 0px));
    margin-top: max(0.65rem, env(safe-area-inset-top, 0px));
    margin-bottom: 0.75rem;
    padding: 0;
  }

  .campaign-bar + .navbar {
    top: calc(44px + max(0.55rem, env(safe-area-inset-top, 0px)));
  }

  .navbar > .container {
    width: calc(100% - 1.5rem);
    max-width: none;
    min-height: 72px;
    margin-inline: auto;
    padding: 0.48rem;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.38));
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(31, 41, 55, 0.14);
  }

  .navbar.scrolled > .container {
    min-height: 66px;
    padding: 0.4rem;
    box-shadow: 0 14px 38px rgba(31, 41, 55, 0.18);
  }

  [data-theme="dark"] .navbar > .container {
    background:
      linear-gradient(135deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.58));
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  }

  .mobile-action-btn,
  .theme-toggle-mobile,
  .mobile-nav-toggle {
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 20px rgba(31, 41, 55, 0.08);
  }

  .mobile-nav-actions {
    gap: 0.45rem;
  }

  .mobile-nav-toggle {
    width: 46px;
    flex: 0 0 46px;
    gap: 0;
  }

  .mobile-nav-toggle .mnt-bar {
    width: 18px;
  }

  .mobile-nav-group {
    flex: 0 0 auto;
    gap: 0.32rem;
    border-radius: 18px;
    padding: 0.18rem;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.28);
  }

  .mobile-action-btn,
  .theme-toggle-mobile {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    box-shadow: none;
  }

  [data-theme="dark"] .mobile-action-btn,
  [data-theme="dark"] .theme-toggle-mobile,
  [data-theme="dark"] .mobile-nav-toggle {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.22);
  }

  [data-theme="dark"] .mobile-nav-group {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
  }

  [data-theme="dark"] .mobile-brand-card:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-brand-card {
    align-self: stretch;
    padding-inline: 0.25rem;
  }

  .mobile-brand-name {
    font-size: 0.78rem;
  }

  /* منوی بازشونده: یکپارچه با همان کادر — بدون باکس دوم */
  .navbar-collapse {
    border-top: 1px solid var(--border-color);
    margin-top: 0.65rem;
    padding: 0.65rem 0.15rem 0.4rem;
  }
  .navbar .collapsing { transition-duration: 0.22s; }

  .navbar-nav { gap: 0.2rem; }
  .navbar-nav .nav-link {
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
  }
  .navbar-nav .nav-link::after { display: none; }
  .navbar-nav .nav-link:hover { background: var(--bg-surface-2); }
  .navbar-nav .nav-link.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 600;
  }

  /* ردیف تغییر تم در انتهای منوی موبایل */
  .navbar-collapse > .d-flex {
    border-top: 1px solid var(--border-color);
    margin-top: 0.65rem;
    padding-top: 0.85rem;
  }

  .hero { padding: 100px 0 70px; text-align: center; }
  .hero.home-page-header {
    min-height: 0;
    margin-top: -220px;
    padding: 240px 0 80px;
  }
  .hero-copy { text-align: center; }
  .hero-title {
    font-size: clamp(1.55rem, 6.4vw, 2rem);
    white-space: normal;
    text-wrap: balance;
  }
  .hero-stats { justify-content: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-floating-stage { --hero-stage-size: 245px; }
  .hero-tech-pill {
    height: 31px;
    padding: 0 0.58rem;
    font-size: 0.72rem;
  }
  .hero-tech-pill img {
    width: 16px;
    height: 16px;
  }
  .tech-top-left { left: 0; }
  .tech-mid-right { right: 0; }

  .academy-jump-section {
    margin-top: -2.2rem;
    padding-bottom: 1rem;
  }

  .academy-jump-card {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: center;
    border-radius: 24px;
    padding: 1rem;
  }

  .academy-jump-icon {
    margin: 0 auto;
  }

  .academy-jump-actions {
    justify-content: center;
  }

  .academy-jump-btn {
    width: 100%;
    justify-content: center;
  }

  /* وبلاگ: سایدبار به پایین منتقل می‌شود */
  .blog-post { flex-direction: column; }
  .blog-post-img { flex: none; width: 100%; min-height: 200px; }
  .blog-post-body { padding: 1.5rem; }

  /* صفحات جزئیات: کارت خرید دیگر چسبان نباشد */
  .purchase-card { position: static; top: auto; margin-top: 1.5rem; }
  .sticky-side { position: static; }
}

/* <768px — موبایل بزرگ */
@media (max-width: 767.98px) {
  .section { padding: 60px 0; }

  .timeline::before { right: 23px; }
  .timeline-item { padding-right: 64px; }
  .timeline-dot { width: 48px; height: 48px; }
  .timeline-dot img { width: 28px; height: 28px; }

  .form-card, .auth-card { padding: 1.5rem; }

  /* پروفایل: سایدبار بالای محتوا */
  .order-table { font-size: 0.82rem; }
}

/* <576px — موبایل کوچک */
@media (max-width: 575.98px) {
  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }

  /* هدر موبایل مثل نوار native به لبه‌ها می‌چسبد */
  .navbar { padding-left: 0; padding-right: 0; }

  .hero-stats { gap: 1.5rem; }
  .hero-stat .num { font-size: 1.5rem; }

  .academy-jump-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    text-align: right;
    padding: 0.85rem;
    gap: 0.8rem;
  }

  .academy-jump-icon {
    width: 48px;
    height: 48px;
    border-radius: 17px;
  }

  .academy-jump-icon i {
    font-size: 1.3rem;
  }

  .academy-jump-copy p {
    display: none;
  }

  .academy-jump-actions {
    grid-column: 1 / -1;
    gap: 0.55rem;
  }

  .skills-flex { gap: 1rem; }

  .nav-pills-c { flex-wrap: wrap; border-radius: var(--radius-md); }

  .footer { text-align: center; }
  .social-links { justify-content: center; }
  .footer-main { flex-direction: column; text-align: center; gap: 1.75rem; }
  .footer-brand { max-width: none; }
  .footer-nav { justify-content: center; }
  .otp-input input { height: 52px; font-size: 1.25rem; }

  .auth-card, .form-card { padding: 1.25rem; }

  .back-to-top { width: 42px; height: 42px; bottom: 16px; left: 16px; }
}

/* ---------- لایهٔ شیشه‌ای روی کارت‌ها و پنل‌ها (Glassmorphism) ----------
   بعد از تعریف پایهٔ کارت‌ها می‌آید تا پس‌زمینهٔ نیمه‌شفاف جایگزین رنگ تخت شود. */
.course-card,
.product-card,
.blog-post,
.form-card,
.purchase-card,
.auth-card,
.campaign-modal-content,
.app-modal-content {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* ---------- تطبیق کلاس‌های ابزاری بوت‌استرپ با تم تاریک ----------
   این کلاس‌ها (text-muted، form-text، bg-light و ...) رنگ تیرهٔ ثابتی دارند که
   در حالت تاریک نامرئی می‌شوند؛ اینجا با متغیرهای تم هماهنگ می‌شوند. */
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-body-secondary,
[data-theme="dark"] .form-text {
  color: var(--text-muted) !important;
}
[data-theme="dark"] .text-body,
[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-black {
  color: var(--text-main) !important;
}
[data-theme="dark"] .bg-white { background-color: var(--bg-surface) !important; }
[data-theme="dark"] .bg-light {
  background-color: var(--bg-surface-2) !important;
  color: var(--text-muted) !important;
}
[data-theme="dark"] .bg-success-subtle { background-color: rgba(34, 197, 94, 0.16) !important; }
[data-theme="dark"] .bg-danger-subtle { background-color: rgba(239, 68, 68, 0.16) !important; }
[data-theme="dark"] .bg-warning-subtle { background-color: rgba(245, 158, 11, 0.16) !important; }

/* ---------- انتخاب درگاه پرداخت (چک‌اوت) ---------- */
.gateway-options { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.gateway-option { flex: 1; min-width: 130px; cursor: pointer; margin: 0; }
.gateway-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  clip-path: inset(50%);
}
.gateway-option-inner {
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600; color: var(--text-main);
  transition: all var(--transition);
}
.gateway-option input:checked + .gateway-option-inner {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.gateway-option input:focus-visible + .gateway-option-inner {
  outline: 3px solid color-mix(in srgb, var(--color-primary) 24%, transparent);
  outline-offset: 2px;
}
.gateway-logo { height: 26px; width: auto; max-width: 90px; object-fit: contain; }
.gateway-logo-placeholder {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 500;
  white-space: nowrap;
}
.gateway-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}
.gateway-label small { color: var(--text-muted); font-size: 0.7rem; font-weight: 500; }
.payment-method-logo { display: block; max-width: 130px; max-height: 54px; object-fit: contain; }
.wallet-address { font-size: 0.82rem; word-break: break-all; }
.live-validation-message { display: block; }

/* ---------- نقشهٔ راه یادگیری ---------- */
.roadmap-card {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  color: inherit;
  text-decoration: none;
  transition: all var(--transition);
}
.roadmap-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
  color: inherit;
}
.roadmap-card-cover { position: relative; aspect-ratio: 16 / 9; background: var(--bg-surface-2); }
.roadmap-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.roadmap-card-cover .img-ph { width: 100%; height: 100%; font-size: 2.5rem; }
.roadmap-tag {
  position: absolute; top: 0.75rem; inset-inline-start: 0.75rem;
  background: var(--color-primary); color: #fff;
  font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
}
.roadmap-tag.free { background: #16a34a; }
.roadmap-card-body { padding: 1.25rem; }
.roadmap-card-body h5 { margin-bottom: 0.5rem; }
.roadmap-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.roadmap-steps-count { font-size: 0.83rem; color: var(--color-primary); font-weight: 600; }

/* مسیر گام‌ها با خط نقطه‌چین (واقعاً شبیه یک مسیر) */
.roadmap-path { position: relative; }
.roadmap-step { position: relative; display: flex; gap: 1.1rem; padding-bottom: 1.75rem; }
.roadmap-step:last-child { padding-bottom: 0; }
.roadmap-step::before {
  content: '';
  position: absolute;
  top: 46px;
  bottom: -2px;
  inset-inline-start: 21px;          /* وسط نود (در RTL سمت راست) */
  border-inline-start: 2px dashed var(--color-primary-light);
}
.roadmap-step:last-child::before { display: none; }
.roadmap-node {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-body);  /* شکستن خط نقطه‌چین دور نود */
}
.roadmap-step-card {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.roadmap-step.locked .roadmap-step-card { opacity: 0.7; }
.roadmap-step-num { font-size: 0.72rem; color: var(--color-primary); font-weight: 700; }
.roadmap-step-card h5 { margin: 0.2rem 0 0.4rem; font-size: 1.05rem; }
.roadmap-step-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.roadmap-lock { color: var(--text-soft); font-size: 0.85rem; display: inline-flex; align-items: center; }

/* ---------- صفحه اصلی فشرده ---------- */
.home-compact-section {
  padding: 30px 0;
}

.home-experience-section {
  background: var(--bg-body);
}

.home-compact-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.home-compact-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.home-compact-title i {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--color-primary);
  font-size: 1rem;
}

.home-compact-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color));
}

.home-education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.home-compact-section .edu-card {
  gap: 0.65rem;
  padding: 0.7rem;
  border-radius: 14px;
  box-shadow: none;
}

.home-compact-section .edu-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.home-compact-section .edu-body h5 {
  margin-bottom: 0.12rem;
  font-size: 0.88rem;
}

.home-compact-section .edu-body .edu-degree {
  margin-bottom: 0.08rem;
  font-size: 0.8rem;
}

.home-compact-section .edu-body .edu-year {
  font-size: 0.73rem;
}

.home-experience-section .timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.65rem;
  max-width: none;
  padding: 0;
}

.home-experience-section .timeline::before {
  display: none;
}

.home-experience-section .timeline-item {
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
}

.home-experience-section .timeline-dot {
  right: 0.7rem;
  top: 0.7rem;
  width: 36px;
  height: 36px;
  border-width: 1px;
  border-radius: 11px;
  box-shadow: none;
}

.home-experience-section .timeline-dot img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.home-experience-section .timeline-content {
  height: 100%;
  min-height: 116px;
  padding: 0.7rem 3.55rem 0.7rem 0.8rem;
  border-radius: 14px;
}

.home-experience-section .timeline-content:hover {
  transform: translateY(-2px);
}

.home-experience-section .timeline-period {
  margin-bottom: 0.25rem;
  padding: 0.12rem 0.55rem;
  font-size: 0.69rem;
}

.home-experience-section .timeline-content h5 {
  margin-bottom: 0.08rem;
  font-size: 0.88rem;
}

.home-experience-section .timeline-company {
  margin-bottom: 0.22rem;
  font-size: 0.78rem;
}

.home-experience-section .timeline-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-skills-section .skills-flex {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 0.5rem;
}

.home-skills-section .skill-item {
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  border-radius: 13px;
  box-shadow: none;
}

.home-skills-section .skill-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 9px;
  box-shadow: none;
}

.home-skills-section .skill-icon img {
  width: 20px;
  height: 20px;
}

.home-skills-section .skill-item h6 {
  font-size: 0.78rem;
  line-height: 1.35;
}

/* ---------- زبان بصری یکپارچه برای دکمه‌های سایت ---------- */
:is(.filter-pill, .nav-pills-c .nav-link, .page-link, .academy-jump-link) {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.8rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--color-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all var(--transition);
}

:is(.filter-pill, .nav-pills-c .nav-link, .page-link, .academy-jump-link):hover,
.filter-pill.active,
.nav-pills-c .nav-link.active,
.page-item.active .page-link {
  border-color: transparent;
  background: var(--color-primary);
  color: #fff;
  box-shadow: none;
}

:is(.search-box button, .share-btns a, .share-btns button, .back-to-top) {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--color-primary);
  box-shadow: none;
}

:is(.search-box button, .share-btns a, .share-btns button, .back-to-top):hover {
  border-color: transparent;
  background: var(--color-primary);
  color: #fff;
}

:is(.desktop-account-btn, .theme-toggle-desktop) {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

[data-theme="dark"] :is(.filter-pill, .nav-pills-c .nav-link, .page-link, .academy-jump-link),
[data-theme="dark"] :is(.search-box button, .share-btns a, .share-btns button, .back-to-top),
[data-theme="dark"] :is(.desktop-account-btn, .theme-toggle-desktop) {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 767.98px) {
  .home-compact-section {
    padding: 24px 0;
  }

  .home-compact-heading {
    margin-bottom: 0.7rem;
  }

  .home-education-grid,
  .home-experience-section .timeline {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82vw);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.45rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .home-education-entry,
  .home-experience-section .timeline-item {
    scroll-snap-align: start;
  }

  .home-skills-section .skills-flex {
    grid-template-columns: none;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(135px, 43vw);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.45rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .home-skills-section .skill-item {
    scroll-snap-align: start;
  }

  .home-education-grid::-webkit-scrollbar,
  .home-experience-section .timeline::-webkit-scrollbar,
  .home-skills-section .skills-flex::-webkit-scrollbar {
    display: none;
  }
}
