/* ==========================================================================
   آکادمی دانا | استایل‌شیت اصلی
   ساختار:
   1) متغیرها و تم
   2) بازنشانی و پایه
   3) تایپوگرافی
   4) اجزای پایه (دکمه، بج، فرم، کارت)
   5) چیدمان (هدر، فوتر، کانتینر)
   6) بخش‌های صفحه اصلی
   7) صفحات داخلی
   8) چت
   9) پنل کاربری
   10) واکنش‌گرایی
   ========================================================================== */

/* ------------------------------ 1) متغیرها ------------------------------- */
:root {
  --brand: #6d5efc;
  --brand-2: #8f7bff;
  --brand-soft: rgba(109, 94, 252, 0.12);
  --accent: #00c2a8;
  --accent-soft: rgba(0, 194, 168, 0.14);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, 0.12);
  --warning: #f5a524;
  --warning-soft: rgba(245, 165, 36, 0.14);
  --success: #17b26a;
  --success-soft: rgba(23, 178, 106, 0.14);
  --star: #f5a524;

  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f2f9;
  --surface-3: #e8e9f4;
  --border: #e3e5f0;
  --border-strong: #cdd0e3;

  --text: #171a2b;
  --text-2: #555a75;
  --text-3: #858aa6;

  --shadow-sm: 0 1px 2px rgba(23, 26, 43, 0.06), 0 2px 8px rgba(23, 26, 43, 0.05);
  --shadow: 0 6px 18px rgba(23, 26, 43, 0.08);
  --shadow-lg: 0 18px 48px rgba(23, 26, 43, 0.14);

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

  --header-h: 74px;
  --container: 1240px;
  --ease: cubic-bezier(0.4, 0.14, 0.3, 1);
  --font: 'Vazirmatn', 'Vazir', 'IRANSansX', Tahoma, system-ui, sans-serif;
}

[data-theme='dark'] {
  --brand: #8b7dff;
  --brand-2: #a795ff;
  --brand-soft: rgba(139, 125, 255, 0.18);
  --accent: #22d3b8;
  --accent-soft: rgba(34, 211, 184, 0.16);

  --bg: #0e1020;
  --bg-2: #141628;
  --surface: #181a2e;
  --surface-2: #1f2237;
  --surface-3: #272b44;
  --border: #2a2e47;
  --border-strong: #3a3f5e;

  --text: #eef0fb;
  --text-2: #b3b8d4;
  --text-3: #838aa8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, 0.6);
}

/* --------------------------- 2) بازنشانی و پایه -------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 15px;
  direction: inherit;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid var(--surface-2); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 10px; z-index: 300;
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm);
}
.skip-link:focus { inset-inline-start: 10px; }

/* ---------------------------- 3) تایپوگرافی ----------------------------- */
h1, h2, h3, h4, h5 { margin: 0 0 12px; line-height: 1.5; font-weight: 800; letter-spacing: -0.2px; }
h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.4; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
h4 { font-size: 17px; }
p { margin: 0 0 14px; color: var(--text-2); }
.lead { font-size: 17px; color: var(--text-2); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
strong, b { font-weight: 700; color: var(--text); }
.gradient-text {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); padding: 6px 14px; border-radius: var(--radius-full);
  margin-bottom: 12px;
}

/* ------------------------------ 4) اجزا -------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.9; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--radius-full); font-weight: 700; font-size: 14.5px;
  border: 1.5px solid transparent; transition: all 0.22s var(--ease); white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 22px -8px var(--brand); }
.btn-primary:hover { box-shadow: 0 12px 28px -8px var(--brand); transform: translateY(-2px); }
.btn-accent { background: linear-gradient(120deg, var(--accent), #38e0c6); color: #04231f; box-shadow: 0 8px 22px -8px var(--accent); }
.btn-accent:hover { transform: translateY(-2px); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-full); display: inline-grid; place-items: center;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  transition: all 0.2s var(--ease); position: relative;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }

/* بج و برچسب */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: #b26b00; border-color: transparent; }
[data-theme='dark'] .badge-warning { color: var(--warning); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 11.5px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}

/* آواتار */
.avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full); display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px; flex: 0 0 auto; letter-spacing: 0; user-select: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.avatar-sm { width: 34px; height: 34px; font-size: 12.5px; }
.avatar-lg { width: 76px; height: 76px; font-size: 26px; }
.avatar-xl { width: 108px; height: 108px; font-size: 36px; }

/* ستاره‌ها */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }
.rating-num { font-weight: 800; color: var(--text); font-size: 14px; }

/* کارت */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: all 0.25s var(--ease);
}
.card-hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.card-pad-0 { padding: 0; overflow: hidden; }

/* فرم‌ها */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); transition: all 0.2s var(--ease); font-size: 14.5px;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input.error, .textarea.error { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; min-height: 16px; }
.checkbox, .radio { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 4px; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-inline-start: 44px; }
.input-group .ic { position: absolute; inset-inline-start: 14px; color: var(--text-3); pointer-events: none; }

.switch { position: relative; width: 46px; height: 26px; background: var(--border-strong); border-radius: 999px; transition: 0.25s; flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: 0.25s; }
.switch.on { background: var(--brand); }
.switch.on::after { inset-inline-end: 23px; }

/* پوشش کاور دوره */
.cover {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.cover::before {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0, transparent 45%),
                    radial-gradient(circle at 80% 80%, rgba(255,255,255,.25) 0, transparent 40%);
}
.cover::after {
  content: ''; position: absolute; inset: 0; opacity: 0.16;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 26px 26px;
}
.cover .cover-ic { position: relative; color: rgba(255, 255, 255, 0.95); width: 52px; height: 52px; z-index: 1; }
.cover-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; z-index: 2; }
.cover-badges .badge { background: rgba(0, 0, 0, 0.42); color: #fff; border: 0; backdrop-filter: blur(6px); }

/* کارت دوره */
.course-card { display: flex; flex-direction: column; height: 100%; }
.course-card .course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card h3 { font-size: 16.5px; margin: 0; line-height: 1.65; }
.course-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; }
.course-meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }
.price { font-weight: 800; color: var(--text); font-size: 16px; }
.price-old { color: var(--text-3); text-decoration: line-through; font-size: 12.5px; font-weight: 500; }
.teacher-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }

/* نوار پیشرفت */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width 0.6s var(--ease); }

/* زبانه‌ها */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 18px; font-weight: 700; font-size: 14.5px; color: var(--text-3);
  border-bottom: 2.5px solid transparent; transition: 0.2s; white-space: nowrap; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-color: var(--brand); }
.tab-panel { display: none; animation: fadeUp 0.35s var(--ease); }
.tab-panel.active { display: block; }
.pill-tabs { border: 0; gap: 8px; }
.pill-tabs .tab { border: 0; background: var(--surface-2); border-radius: var(--radius-full); padding: 9px 18px; margin: 0; font-size: 14px; }
.pill-tabs .tab.active { background: var(--brand); color: #fff; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(109,94,252,.45); } 70% { box-shadow: 0 0 0 14px rgba(109,94,252,0); } 100% { box-shadow: 0 0 0 0 rgba(109,94,252,0); } }
@keyframes shimmer { 100% { transform: translateX(-100%); } }

/* آکاردئون */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 20px; font-weight: 700; text-align: start; transition: 0.2s;
}
.acc-head:hover { background: var(--surface-2); }
.acc-head .ic { transition: transform 0.3s var(--ease); color: var(--text-3); }
.acc-item.open .acc-head .ic { transform: rotate(180deg); color: var(--brand); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.acc-item.open .acc-body { max-height: 900px; }
.acc-inner { padding: 0 20px 18px; color: var(--text-2); }

/* جدول */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 14px 18px; text-align: start; font-size: 14px; }
th { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 13px; }
tbody tr + tr td { border-top: 1px solid var(--border); }
tbody tr:hover td { background: var(--surface-2); }

/* مسیر راهنما */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--brand); }

/* بازه‌بندی */
.pagination { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 34px; flex-wrap: wrap; }
.page-btn {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); font-weight: 700; color: var(--text-2); display: grid; place-items: center; transition: 0.2s;
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn[disabled] { opacity: 0.4; pointer-events: none; }

/* اعلان کوچک (Toast) */
.toast-wrap { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 13px 18px;
  box-shadow: var(--shadow-lg); animation: pop 0.3s var(--ease); max-width: 380px; font-size: 14px; font-weight: 600;
}
.toast.success { border-inline-start-color: var(--success); }
.toast.error { border-inline-start-color: var(--danger); }
.toast.info { border-inline-start-color: var(--accent); }

/* پنجره شناور (Modal) */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 14, 26, 0.62); backdrop-filter: blur(4px);
  z-index: 350; display: grid; place-items: center; padding: 20px; animation: fadeIn 0.2s; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 540px;
  box-shadow: var(--shadow-lg); animation: pop 0.28s var(--ease); max-height: 92vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* اسکلت بارگذاری */
.skeleton { background: var(--surface-2); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); animation: shimmer 1.2s infinite;
}
[data-theme='dark'] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); }

/* فاصله‌دهنده تزئینی */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; pointer-events: none; z-index: 0; }

/* نمایش تدریجی هنگام اسکرول */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ------------------------------ 5) چیدمان ------------------------------- */
#app-header { position: sticky; top: 0; z-index: 200; }
.site-header {
  position: sticky; top: 0; z-index: 200; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 19px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent)); box-shadow: 0 8px 20px -8px var(--brand);
}
.brand small { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.5px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 10px; }
.nav-link {
  padding: 9px 14px; border-radius: var(--radius-full); font-weight: 600; font-size: 14.5px; color: var(--text-2);
  transition: 0.2s var(--ease); display: inline-flex; align-items: center; gap: 6px;
}
.nav-link { white-space: nowrap; }
.nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }

.header-search { flex: 1; max-width: 330px; position: relative; }
.header-search .input { padding-inline-start: 42px; border-radius: var(--radius-full); background: var(--surface-2); border-color: transparent; }
.header-search .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.header-actions { display: flex; align-items: center; gap: 9px; margin-inline-start: auto; flex: 0 0 auto; }
.cart-badge {
  position: absolute; top: -4px; inset-inline-start: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); }
.user-btn:hover { border-color: var(--brand); }
.dropdown {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 230px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: 0.22s var(--ease); z-index: 250;
}
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text-2); text-align: start; transition: 0.18s;
}
.dropdown a:hover, .dropdown button:hover { background: var(--brand-soft); color: var(--brand); }
.dropdown hr { margin: 6px 0; }
.dropdown .danger:hover { background: var(--danger-soft); color: var(--danger); }

/* تغییر زبان */
.lang-menu { position: relative; }
.lang-toggle { width: auto; min-width: 44px; gap: 5px; padding: 0 9px; }
.lang-code { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.lang-dropdown { min-width: 190px; }
.lang-drop-head { padding: 7px 12px 8px; font-size: 11.5px; font-weight: 800; color: var(--text-3); }
.lang-option { justify-content: flex-start; }
.lang-option.active { background: var(--brand-soft); color: var(--brand); }
.lang-option.active::after { content: '✓'; margin-inline-start: auto; font-weight: 900; }
.drawer-lang { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.drawer-lang > span { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.lang-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lang-pills .lang-option {
  justify-content: center; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 10px; padding: 9px 5px; font-size: 12px; font-weight: 700;
}
.lang-pills .lang-option.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.lang-pills .lang-option.active::after { display: none; }

.menu-toggle { display: none; }

/* جستجوی پیشنهادی */
.suggest {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 240; max-height: 380px; overflow-y: auto;
}
.suggest a { display: flex; gap: 12px; align-items: center; padding: 11px 14px; transition: 0.15s; }
.suggest a:hover { background: var(--brand-soft); }
.suggest .s-cover { width: 44px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: 0 0 auto; }
.suggest .s-title { font-size: 13.5px; font-weight: 700; }
.suggest .s-sub { font-size: 11.5px; color: var(--text-3); }

/* منوی موبایل */
.drawer {
  position: fixed; inset: 0 auto 0 0; width: 300px; max-width: 86vw; background: var(--surface); z-index: 320;
  transform: translateX(-100%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow-y: auto; padding: 18px;
}
html[dir='rtl'] .drawer { inset: 0 0 0 auto; transform: translateX(100%); }
.drawer.open, html[dir='rtl'] .drawer.open { transform: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10,12,22,.55); z-index: 310; opacity: 0; visibility: hidden; transition: 0.3s; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--text-2);
}
.drawer-link:hover, .drawer-link.active { background: var(--brand-soft); color: var(--brand); }

/* فوتر */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 15px; margin-bottom: 16px; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: var(--text-3); font-size: 14px; transition: 0.2s; display: inline-flex; align-items: center; gap: 7px; }
.footer-links a:hover { color: var(--brand); transform: translateX(-4px); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 40px; padding: 20px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }
.socials { display: flex; gap: 9px; }
.socials a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); transition: 0.2s; }
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); }

/* ------------------------- 6) بخش‌های صفحه اصلی -------------------------- */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 18px; font-size: clamp(27px, 3.5vw, 42px); text-wrap: balance; }
.hero .lead { font-size: 17.5px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats .num { font-size: 26px; font-weight: 900; color: var(--text); }
.hero-stats .lbl { font-size: 13px; color: var(--text-3); }
.hero-visual { position: relative; }
.hero-art {
  border-radius: var(--radius-lg); padding: 22px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); position: relative; z-index: 2;
}
.hero-art .mini-course { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 10px; }
.hero-art .mini-course .mc-cover { width: 62px; height: 48px; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: 0 0 auto; }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700;
  animation: floaty 5s ease-in-out infinite; z-index: 3;
}
.float-card.f1 { top: 6%; inset-inline-start: -22px; }
.float-card.f2 { bottom: 8%; inset-inline-end: -18px; animation-delay: 1.6s; }

.trust-bar { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; padding: 22px 0; opacity: 0.75; }
.trust-bar span { font-weight: 800; font-size: 15px; color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }

.cat-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: 0.25s var(--ease); }
.cat-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
.cat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }

.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step .step-num {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-bottom: 16px;
}
.feature { display: flex; gap: 15px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature .f-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.feature h4 { margin-bottom: 4px; }
.feature p { margin: 0; font-size: 13.5px; }

.teacher-card { text-align: center; padding: 26px 20px; }
.teacher-card .avatar { margin: 0 auto 14px; }
.teacher-card h4 { margin-bottom: 2px; }
.teacher-card .t-role { font-size: 12.5px; color: var(--text-3); min-height: 38px; }
.teacher-stats { display: flex; justify-content: space-around; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 12.5px; }
.teacher-stats b { display: block; font-size: 15px; }

.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.quote::before { content: '”'; position: absolute; top: 6px; inset-inline-end: 20px; font-size: 70px; color: var(--brand); opacity: 0.16; font-family: serif; }
.quote p { font-size: 14.5px; }

.plan-card { padding: 30px 26px; display: flex; flex-direction: column; }
.plan-card.highlight { border-color: var(--brand); box-shadow: 0 22px 50px -22px var(--brand); position: relative; }
html[lang='en'] .plan-card.highlight::before { content: 'Most popular'; }
.plan-card.highlight::before {
  content: 'پرطرفدار'; position: absolute; top: -13px; inset-inline-start: 26px; background: var(--brand); color: #fff;
  padding: 3px 14px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.plan-price { font-size: 34px; font-weight: 900; color: var(--text); }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--text-3); }
.plan-features { display: flex; flex-direction: column; gap: 12px; margin: 22px 0; flex: 1; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.plan-features .ic { color: var(--success); margin-top: 5px; }

.stat-card { text-align: center; padding: 26px 18px; }
.stat-card .num { font-size: 32px; font-weight: 900; }
.stat-card .ic { margin: 0 auto 10px; width: 30px; height: 30px; color: var(--brand); }

.cta-band {
  border-radius: var(--radius-lg); padding: 52px 40px; text-align: center; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #5b4bdb, #6d5efc 45%, #00c2a8);
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: 0.9; }
.cta-band .btn-outline { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--brand); }

.newsletter { display: flex; gap: 10px; max-width: 480px; margin: 22px auto 0; }
.newsletter .input { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.newsletter .input::placeholder { color: rgba(255,255,255,.75); }

/* --------------------------- 7) صفحات داخلی ----------------------------- */
.page-hero { padding: 40px 0 34px; background: linear-gradient(180deg, var(--brand-soft), transparent); border-bottom: 1px solid var(--border); }
.page-hero h1 { margin-bottom: 8px; }

.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.filter-group { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border: 0; margin: 0; padding: 0; }
.filter-group h4 { font-size: 14px; margin-bottom: 12px; }
.filter-list { display: flex; flex-direction: column; gap: 9px; max-height: 260px; overflow-y: auto; padding-inline-end: 4px; }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row .input { padding: 9px 12px; font-size: 13.5px; }
.filter-toggle { display: none; }

.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.course-layout > * { min-width: 0; }
.courses-layout { grid-template-columns: 300px minmax(0, 1fr); }
.cart-layout { grid-template-columns: minmax(0, 1fr) 350px; }
.dash-columns { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.contact-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.course-cover-lg { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; position: relative; }
.course-side { position: sticky; top: calc(var(--header-h) + 20px); }
.lesson-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: var(--radius-sm);
  transition: 0.18s; font-size: 14px;
}
.lesson-row:hover { background: var(--surface-2); }
.lesson-row .l-idx { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--text-2); flex: 0 0 auto; }
.lesson-row .l-title { flex: 1; }
.lesson-row .l-dur { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
#countdown, #live-countdown { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.lesson-row.locked { opacity: 0.62; }
.preview-chip { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 9px; font-weight: 700; }

.rating-summary { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center; }
.rating-big { font-size: 56px; font-weight: 900; line-height: 1; color: var(--text); }
.rating-bars .rb { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.rating-bars .progress { flex: 1; }

.review { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

.teacher-profile-hero { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.skill-list { display: flex; gap: 8px; flex-wrap: wrap; }

.progress-steps { display: flex; align-items: center; gap: 0; margin-bottom: 30px; }
.pstep { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--text-3); }
.pstep .n { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); font-size: 13px; }
.pstep.done { color: var(--success); }
.pstep.done .n { background: var(--success); color: #fff; }
.pstep.active { color: var(--brand); }
.pstep.active .n { background: var(--brand); color: #fff; }
.pstep-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; }

.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-aside { background: linear-gradient(150deg, #5b4bdb, #6d5efc 40%, #00c2a8); color: #fff; padding: 56px 46px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-aside h2, .auth-aside p { color: #fff; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 44px 24px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.auth-feature .ic { color: #fff; background: rgba(255,255,255,.18); border-radius: 10px; padding: 8px; width: 38px; height: 38px; }

.download-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 26px; }
.download-card .d-icon { width: 78px; height: 78px; border-radius: 20px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.os-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--text-2); }

.sticky-cta {
  position: fixed; inset-block-end: 0; inset-inline: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 20px; display: none; z-index: 190; box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}

/* -------------------------------- 8) چت -------------------------------- */
.chat-wrap {
  display: grid; grid-template-columns: 320px 1fr; height: calc(100dvh - var(--header-h) - 190px);
  min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.conv-list { border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg-2); }
.conv-head { padding: 16px; border-bottom: 1px solid var(--border); }
.conv-search { position: relative; }
.conv-search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; height: 17px; }
.conv-search .input { padding-inline-start: 38px; padding-block: 9px; font-size: 13.5px; border-radius: var(--radius-full); }
.conv-tabs { display: flex; gap: 6px; margin-top: 12px; }
.conv-tab { flex: 1; padding: 7px; border-radius: var(--radius-full); font-size: 12.5px; font-weight: 700; color: var(--text-3); background: var(--surface-2); }
.conv-tab.active { background: var(--brand); color: #fff; }
.conv-scroll { flex: 1; overflow-y: auto; }
.conv-item { display: flex; gap: 12px; padding: 13px 15px; cursor: pointer; transition: 0.18s; border-bottom: 1px solid var(--border); position: relative; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: var(--brand-soft); }
.conv-item.active::before { content: ''; position: absolute; inset-block: 0; inset-inline-end: 0; width: 3px; background: var(--brand); }
.conv-item .c-body { flex: 1; min-width: 0; }
.conv-item .c-title { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.conv-item .c-last { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-dot { min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.dot-online { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px var(--surface); }

.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface); }
.chat-back { display: none; }
@media (max-width: 900px) { .chat-back { display: grid !important; } }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: var(--bg); }
.msg { display: flex; gap: 10px; max-width: 76%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 11px 15px; font-size: 14px;
  box-shadow: var(--shadow-sm); position: relative; word-break: break-word;
}
.msg.me .bubble { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.msg .m-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); margin-top: 5px; }
.msg.me .m-meta { justify-content: flex-end; color: rgba(255,255,255,.85); }
.msg .sender { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--text-3); background: var(--surface-2); padding: 4px 14px; border-radius: 999px; }
.typing { display: flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: floaty 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.chat-input { border-top: 1px solid var(--border); padding: 13px 16px; background: var(--surface); }
.chat-input-row { display: flex; align-items: flex-end; gap: 10px; }
.chat-input .textarea { min-height: 46px; max-height: 140px; border-radius: var(--radius); padding: 12px 15px; }
.emoji-bar { display: flex; gap: 6px; margin-bottom: 9px; flex-wrap: wrap; }
.emoji-bar button { font-size: 19px; width: 34px; height: 34px; border-radius: 10px; transition: 0.18s; }
.emoji-bar button:hover { background: var(--surface-2); transform: scale(1.12); }
.chat-empty { display: grid; place-items: center; height: 100%; text-align: center; color: var(--text-3); }
.chat-gate { padding: 64px 26px; text-align: center; max-width: 720px; margin: 0 auto; }
.chat-gate h2 { margin-bottom: 10px; }
.chat-gate p { max-width: 520px; margin: 0 auto 24px; }

/* ----------------------------- 9) پنل کاربری ---------------------------- */
.dash-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 28px; align-items: start; }
.dash-layout > * { min-width: 0; }
.dash-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: sticky; top: calc(var(--header-h) + 18px); }
.dash-user { text-align: center; padding: 14px 10px 18px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.dash-nav a { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; color: var(--text-2); transition: 0.18s; }
.dash-nav a:hover { background: var(--surface-2); color: var(--text); }
.dash-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px var(--brand); }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat-mini { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat-mini .si-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat-mini .si-val { font-size: 22px; font-weight: 900; line-height: 1.3; }
.course-progress-row { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); transition: 0.2s; }
.course-progress-row:hover { border-color: var(--brand); background: var(--surface-2); }
.course-progress-row .cp-cover { width: 92px; height: 64px; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: 0 0 auto; }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-3); }
.empty-state .ic { width: 54px; height: 54px; color: var(--border-strong); margin-bottom: 14px; }

.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before { content: ''; position: absolute; inset-block: 6px; inset-inline-start: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before { content: ''; position: absolute; inset-inline-start: -26px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

.notif-item { display: flex; gap: 13px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); transition: 0.2s; cursor: pointer; }
.notif-item:hover { border-color: var(--brand); background: var(--surface-2); }
.notif-item.unread { background: var(--brand-soft); border-color: transparent; }
.notif-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); flex: 0 0 auto; }

/* --------------------------- 10) واکنش‌گرایی ----------------------------- */
@media (max-width: 1650px) {
  .header-inner { gap: 12px; }
  .main-nav { gap: 2px; margin-inline-start: 4px; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
  .header-actions { gap: 6px; }
  .header-search { max-width: 260px; }
}

@media (max-width: 1480px) {
  .header-search { display: none; }
  .main-nav { gap: 2px; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
  .header-actions { gap: 5px; }
}

@media (max-width: 1280px) {
  .nav-link { padding: 8px 8px; font-size: 12.5px; }
}

@media (max-width: 1180px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
}

@media (max-width: 1040px) {
  .header-actions > a.btn-primary { display: none; }
}

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout { grid-template-columns: 1fr; }
  .courses-layout, .cart-layout, .dash-columns, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-toggle { display: inline-flex; }
  .course-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { grid-template-columns: minmax(0, 1fr); }
  .dash-side { position: static; }
  .dash-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .dash-nav a { white-space: nowrap; }
  .dash-user { display: none; }
}

@media (max-width: 900px) {
  .main-nav, .header-search { display: none; }
  .menu-toggle { display: inline-grid; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .chat-wrap { grid-template-columns: 1fr; height: calc(100dvh - 245px); min-height: 360px; }
  .conv-list { display: none; }
  .chat-wrap.mobile-list .conv-list { display: flex; }
  .chat-wrap.mobile-list .chat-main { display: none; }
  .rating-summary { grid-template-columns: 1fr; gap: 16px; }
  .teacher-profile-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .download-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .sticky-cta { display: block; }
  body.has-sticky-cta { padding-bottom: 76px; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding-inline: 16px; }
  .hero { padding: 34px 0 44px; }
  .hero-visual { order: 0; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .float-card { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .cta-band { padding: 36px 22px; }
  .newsletter { flex-direction: column; }
  .card { padding: 18px; }
  .btn { padding: 11px 18px; }
  .modal-body, .modal-head, .modal-foot { padding: 18px; }
  .conv-list { display: none; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 4px; }
  .header-actions > [data-theme-toggle],
  .header-actions > a.btn { display: none; }
  .header-lang { display: none; }
  .brand { font-size: 16px; gap: 8px; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
  .user-btn { padding: 3px; gap: 0; }
  .user-btn > span, .user-btn > .ic { display: none; }
  .msg { max-width: 92%; }
  .progress-steps { flex-direction: column; align-items: stretch; }
  .pstep-line { display: none; }
}

@media print {
  .site-header, .site-footer, .sticky-cta, .filters { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------- اعلان سراسری و حساب‌های نمونه ------------------------- */
.site-announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 46px 9px 16px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  text-align: center;
}
.site-announcement.is-maintenance { background: linear-gradient(90deg, #f0932b, #e5484d); }
.site-announcement .ic { flex: 0 0 auto; }
.site-announcement button {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: inherit;
  background: rgba(255,255,255,.16);
}
.site-announcement button:hover { background: rgba(255,255,255,.28); }

.demo-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.demo-account-grid .btn {
  justify-content: space-between;
  gap: 8px;
  padding-inline: 11px;
  font-size: 12px;
  min-height: 42px;
}
.demo-account-grid .btn small {
  font-size: 10px;
  opacity: .68;
  font-weight: 500;
}
@media (max-width: 480px) {
  .demo-account-grid { grid-template-columns: 1fr; }
  .site-announcement { font-size: 12px; padding-inline: 38px 10px; }
  .dash-days { display: none; }
}

@media (max-width: 380px) {
  .header-inner { gap: 8px; }
  .header-actions .user-menu { display: none; }
  .brand { font-size: 14px; gap: 6px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
}
