/* ==========================================================================
   لیست دوره‌ها: Glassmorphism کنترل‌شده
   شیشه فقط وقتی معنی داره که پشتش نوری باشه؛ برای همین یه لایه‌ی نور
   خیلی نرم (قرمز برند + خاکستری سرد) پشت صفحه می‌شینه.
   ========================================================================== */

:root {
  --glass: rgba(15,23,42,0.041);
  --glass-hi: rgba(15,23,42,0.068);
  --glass-line: rgba(15,23,42,0.081);
  --glass-line-hi: rgba(15,23,42,0.144);
  --glass-blur: blur(22px) saturate(150%);
  --r-glass: 22px;
}

/* نور پس‌زمینه */
.aurora { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; right: -10vw; top: -14vw; background: #2463eb; opacity: 0.38; }
.aurora i:nth-child(2) { width: 38vw; height: 38vw; left: -12vw; top: 30vh; background: #c9d3e1; opacity: 0.45; }
.aurora i:nth-child(3) { width: 30vw; height: 30vw; right: 20vw; bottom: -18vw; background: #2463eb; opacity: 0.35; }
@media (max-width: 700px) { .aurora i { filter: blur(60px); } .aurora i:nth-child(1) { width: 90vw; height: 90vw; } .aurora i:nth-child(2) { width: 80vw; height: 80vw; } }

/* ---------- سر صفحه ---------- */
.ghead { padding-top: 40px; padding-bottom: 8px; }
@media (min-width: 900px) { .ghead { padding-top: 72px; } }
.ghead h1 { font-size: clamp(30px, 5.4vw, 52px); font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.ghead p { margin-top: 10px; color: var(--text-2); max-width: 36rem; font-size: clamp(15px, 1.8vw, 17px); }

/* ---------- نوار جستجو و فیلتر ---------- */
.gbar {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 40;
  margin-block: 28px 26px;
  padding: 10px;
  display: grid;
  gap: 10px;
  border-radius: 20px;
  background: rgba(237,240,245,0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 20px 40px -24px rgba(15,23,42,0.16);
}
@media (min-width: 900px) { .gbar { grid-template-columns: 300px 1fr auto; align-items: center; } }
.gsearch { position: relative; }
.gsearch svg { position: absolute; top: 50%; inset-inline-start: 14px; width: 18px; height: 18px; margin-top: -9px; color: var(--text-3); pointer-events: none; }
.gsearch input {
  width: 100%;
  height: 44px;
  padding-inline: 42px 14px;
  border: 0;
  border-radius: 13px;
  background: rgba(15,23,42,0.054);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.gsearch input::placeholder { color: var(--text-3); }
.gsearch input:focus { background: rgba(15,23,42,0.081); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.7); }
.gsearch input::-webkit-search-cancel-button { display: none; }
.gsearch__clear { position: absolute; top: 50%; inset-inline-end: 8px; width: 28px; height: 28px; margin-top: -14px; border-radius: 8px; display: none; place-items: center; color: var(--text-2); }
.gsearch__clear:hover { background: rgba(15,23,42,0.072); color: var(--text); }
.gsearch__clear svg { position: static; margin: 0; width: 14px; height: 14px; }
.gsearch.has-value .gsearch__clear { display: grid; }

.gchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -10px; padding-inline: 10px; }
.gchips::-webkit-scrollbar { display: none; }
.gchips button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-2);
  transition: background-color 0.2s, color 0.2s;
}
.gchips button:hover { color: var(--text); background: rgba(15,23,42,0.045); }
.gchips button[aria-pressed="true"] { color: #fff; background: rgba(36,99,235,0.85); box-shadow: inset 0 1px 0 rgba(15,23,42,0.135); }
.gchips small { font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 7px; display: inline-grid; place-items: center; background: rgba(15,23,42,0.072); }
.gchips button[aria-pressed="true"] small { background: rgba(255, 255, 255, 0.25); }

.gsort { position: relative; }
.gsort select {
  appearance: none;
  height: 40px;
  padding-inline: 14px 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(15,23,42,0.054);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.gsort select option { background: #ebeff4; }
.gsort svg { position: absolute; top: 50%; inset-inline-end: 12px; width: 14px; height: 14px; margin-top: -7px; color: var(--text-3); pointer-events: none; }
@media (max-width: 899px) { .gbar__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; } }
@media (min-width: 900px) { .gbar__row { display: contents; } }

.gcount { font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.gcount b { color: var(--text); font-weight: 600; }

/* ---------- فهرست دوره‌ها: سر صفحه، جستجو، نوار دسته‌ها ---------- */
.ghead--catalog { display: grid; gap: 18px; }
@media (min-width: 900px) { .ghead--catalog { grid-template-columns: 1fr auto; align-items: end; gap: 32px; } }
.ghelp { display: flex; flex-wrap: wrap; gap: 8px; }
.ghelp__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(15,23,42,0.045);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.ghelp__link:hover { background: rgba(15,23,42,0.081); box-shadow: inset 0 0 0 1px var(--glass-line-hi); }
.ghelp__link svg { width: 18px; height: 18px; color: var(--text-2); flex: none; }
.ghelp__link--hot { background: rgba(36,99,235,0.22); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.28); }
.ghelp__link--hot:hover { background: rgba(36,99,235,0.34); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.45); }
.ghelp__link--hot svg { color: #1450d2; }
.ghelp__link small { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 11.5px; color: #e8eefd; background: rgba(20,80,210,0.18); }
.ghelp__link small[hidden] { display: none; }

.gbar--catalog { position: relative; top: auto; z-index: 1; display: flex; align-items: center; gap: 8px; margin-block: 26px 6px; padding: 8px; }
.gbar--catalog .gsearch { flex: 1; min-width: 0; }
.gbar--catalog .gsort select { height: 44px; padding-inline: 38px 34px; }
.gsort .gsort__ic { inset-inline-start: 12px; inset-inline-end: auto; width: 17px; height: 17px; margin-top: -8.5px; }
@media (max-width: 420px) {
  /* جا برای جستجو: روی گوشی‌های باریک فقط آیکون مرتب‌سازی + متن کوتاهش */
  .gbar--catalog .gsort select { padding-inline: 34px 26px; font-size: 13.5px; }
  .gbar--catalog .gsort svg:not(.gsort__ic) { inset-inline-end: 9px; }
  .gbar--catalog .gsearch input { font-size: 14.5px; padding-inline: 38px 10px; }
  .gbar--catalog .gsearch > svg { inset-inline-start: 12px; }
}

/* نوار دسته‌ها: زیر هدر می‌چسبه تا وسط فهرست هم بشه دسته رو عوض کرد */
.gcats-sentinel { display: block; height: 1px; margin-top: 4px; }
/* کارت فوکوس‌خورده با Tab زیر هدر و نوار چسبان دسته‌ها پنهان نمونه */
html:has(.gcats) { scroll-padding-top: calc(var(--header-h) + 84px); }
.gcats {
  --fs: 0px;
  --fe: 0px;
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin-inline: calc(var(--gutter) * -1);
  padding-block: 8px 10px;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.gcats.is-stuck {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 -1px 0 rgba(15,23,42,0.063), 0 18px 30px -22px rgba(15,23,42,0.16);
}
@media (min-width: 1200px) { .gcats.is-stuck { border-radius: 0 0 20px 20px; } }
.gcats.has-start { --fs: 36px; }
.gcats.has-end { --fe: 44px; }
.gcats__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  padding: 6px var(--gutter);
  /* در RTL ابتدای نوار سمت راسته: محو شدن فقط سمتی که دکمه‌ی پنهان داره */
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%);
  mask-image: linear-gradient(to left, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%);
}
.gcats__track::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .gcats__track { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}
.gcat {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding-inline: 12px 10px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  background: var(--nm-face, rgba(15,23,42,0.045));
  box-shadow: var(--nm-out-sm, inset 0 0 0 1px var(--glass-line));
  transition: color 0.2s, box-shadow 0.25s var(--ease), background-color 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.gcat svg { width: 19px; height: 19px; flex: none; color: var(--text-3); transition: color 0.2s; }
.gcat small {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(15,23,42,0.063);
}
.gcat:hover { color: var(--text); }
.gcat:hover svg { color: var(--text-2); }
.gcat:active { transform: translateY(1px); }
.gcat[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(180deg, #2463eb, #2463eb);
  box-shadow: inset 0 1px 0 rgba(15,23,42,0.162), 0 10px 22px -10px rgba(36,99,235,0.85);
}
.gcat[aria-pressed="true"] svg { color: #e8eefd; }
.gcat[aria-pressed="true"] small { color: #fff; background: rgba(255, 255, 255, 0.24); }
.gcat.is-empty:not([aria-pressed="true"]) { opacity: 0.45; }
@media (max-width: 559px) {
  .gcat { height: 42px; gap: 7px; padding-inline: 11px 9px; font-size: 13.5px; }
  .gcat svg { width: 18px; height: 18px; }
  .gcat small { min-width: 20px; height: 20px; font-size: 11.5px; }
}
.gcat:focus-visible { outline: 2px solid var(--crimson-text); outline-offset: 2px; border-radius: 14px; }

.gcount[data-count-row] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin: 6px 0 12px; }
.gtoggle { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 4px; font-size: 13.5px; color: var(--text-2); }
.gtoggle[hidden] { display: none; }
.gtoggle i { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(15,23,42,0.09); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background-color 0.2s; }
.gtoggle i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform 0.2s var(--ease), background-color 0.2s; }
.gtoggle[aria-pressed="true"] { color: var(--text); }
.gtoggle[aria-pressed="true"] i { background: var(--crimson); }
.gtoggle[aria-pressed="true"] i::after { transform: translateX(-14px); background: #fff; }

/* ---------- کارت شیشه‌ای ---------- */
.ggrid { display: grid; gap: 16px; }
@media (min-width: 640px) { .ggrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .ggrid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.gcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-glass);
  background: linear-gradient(160deg, rgba(15,23,42,0.063), rgba(15,23,42,0.023) 60%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 rgba(15,23,42,0.09), 0 24px 48px -28px rgba(15,23,42,0.16);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.35s;
  isolation: isolate;
}
.gcard:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--glass-line-hi), inset 0 1px 0 rgba(15,23,42,0.126), 0 30px 60px -28px rgba(15,23,42,0.16), 0 0 0 6px rgba(36,99,235,0.08); }
.gcard:focus-within { box-shadow: inset 0 0 0 1px var(--glass-line-hi), 0 0 0 2px rgba(20,80,210,0.8); }
@media (prefers-reduced-motion: reduce) { .gcard, .gcard:hover { transform: none; } }

/* کل کارت کلیک‌خور */
.gcard__link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.gcard__link:focus-visible { outline: none; }

.gcard__media { position: relative; margin: 8px 8px 0; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; }
.gcard__media .poster { position: absolute; inset: 0; transition: transform 0.6s var(--ease); }
.gcard:hover .gcard__media .poster { transform: scale(1.045); }
.gcard__media .poster::after { background: linear-gradient(180deg, rgba(248, 250, 252, 0) 55%, rgba(248, 250, 252, 0.45)); }
.gcard__media .pz__latin, .gcard__media .poster__brand { display: none; }
/* پوستر ساده (بدون طرح) فقط عنوان لاتین داره؛ اگه اونم پنهان بشه کارت خالی می‌مونه */
.gcard__media .pz--plain .pz__latin, .acourse__media .pz--plain .pz__latin { display: block; font-size: clamp(16px, 11cqh, 30px); text-wrap: balance; }
.gcard__media .pz--plain .poster__brand, .acourse__media .pz--plain .poster__brand { display: block; }
.gcard__media .poster__art { padding: 10cqh 10cqw; }

.gchip {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.108);
}
.gchip--status { inset-inline-start: 10px; }
.gchip--status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.gchip--open::before { background: #1450d2; box-shadow: 0 0 0 3px rgba(20,80,210,0.22); }
.gchip--soon::before { background: #c47f08; }
.gchip--sample { inset-inline-end: 10px; color: #c47f08; }

.gcard__body { padding: 16px 18px 0; display: grid; gap: 8px; flex: 1; align-content: start; }
.gcard__cat { font-size: 12.5px; color: var(--crimson-text); font-weight: 600; }
.gcard__title { font-size: 19px; font-weight: 800; line-height: 1.5; }
.gcard__hook {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gmeta li { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; color: var(--text-2); background: rgba(15,23,42,0.045); }
.gmeta svg { width: 14px; height: 14px; color: var(--text-3); }

.gcard__due { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: #c47f08; }
.gcard__due::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c47f08; }

.gcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 18px; margin-top: 14px; border-top: 1px solid rgba(15,23,42,0.054); }
.gprice { display: grid; line-height: 1.35; }
.gprice s { font-size: 12.5px; color: var(--text-3); }
.gprice b { font-size: 20px; font-weight: 800; }
.gprice b small { font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-inline-start: 4px; }
.gprice--tbd b { font-size: 16px; color: var(--text-2); }
.gbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #2463eb, #2463eb);
  box-shadow: inset 0 1px 0 rgba(15,23,42,0.162), 0 8px 20px -8px rgba(36,99,235,0.8);
  transition: gap 0.25s var(--ease);
}
.gbtn svg { width: 16px; height: 16px; }
.gcard:hover .gbtn { gap: 12px; }
.gbtn--quiet { background: rgba(15,23,42,0.063); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--text); }

/* وضعیت کنار دسته: فقط روی کارت افقی موبایل (روی پوستر جا نیست) */
.gcard__st { display: none; align-items: center; gap: 6px; margin-inline-start: 10px; font-weight: 500; color: var(--text-2); }
.gcard__st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.gcard__st--open::before { background: #1450d2; box-shadow: 0 0 0 3px rgba(20,80,210,0.2); }
.gcard__st--soon::before { background: #c47f08; }

/* ذخیره و مقایسه: دو دکمه‌ی گرد شیشه‌ای گوشه‌ی پوستر، بالای لینک کل کارت */
.inestadore-card-tools { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 4; display: flex; gap: 6px; }
.inestadore-card-tools--foot { position: relative; top: auto; inset-inline-end: auto; display: none; }
.inestadore-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.126);
  transition: background-color 0.2s, color 0.2s, transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.inestadore-ico svg { width: 17px; height: 17px; }
.inestadore-ico:hover { background: rgba(228,233,240,0.75); }
.inestadore-ico:active { transform: scale(0.92); }
.inestadore-ico[aria-pressed="true"] { color: #fff; background: rgba(36,99,235,0.85); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.4); }
.inestadore-ico[data-save-course][aria-pressed="true"] svg { fill: currentColor; }
.inestadore-ico:focus-visible { outline: 2px solid #1450d2; outline-offset: 2px; }
.inestadore-ico:disabled { opacity: 0.6; cursor: progress; }
/* برچسب «نمونه» از گوشه‌ی دکمه‌ها می‌ره پایین پوستر */
.gcard--course .gchip--sample { top: auto; bottom: 10px; inset-inline-end: auto; inset-inline-start: 10px; }

/* ---------- کارت دوره روی گوشی: افقی و جمع‌وجور ----------
   ۴۱ دوره با کارت عمودی روی موبایل بیشتر از ۲۵ هزار پیکسل اسکرول می‌شد؛
   کارت افقی (پوستر کنار متن) همون اطلاعات رو در حدود نصف ارتفاع نشون میده */
@media (max-width: 559px) {
  .ggrid { gap: 12px; }
  .gcard--course { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "media body" "foot foot"; border-radius: 20px; }
  .gcard--course .gcard__media { grid-area: media; align-self: start; margin: 10px; margin-inline-end: 0; aspect-ratio: 4 / 5; border-radius: 14px; }
  .gcard--course .gcard__media .pz--plain .pz__latin { font-size: clamp(12px, 10cqh, 20px); }
  .gcard--course .gchip--status { display: none; }
  .gcard--course .gchip--sample { bottom: 6px; inset-inline-start: 6px; height: 22px; padding: 0 7px; font-size: 11px; }
  .gcard--course .gcard__media .poster__brand { display: none !important; }
  .gcard--course .inestadore-card-tools--media { display: none; }
  .gcard--course .inestadore-card-tools--foot { display: flex; }
  .gcard--course .gbtn__more { display: none; }
  .gcard--course .gcard__acts { gap: 6px; }
  .gcard--course .inestadore-ico { width: 42px; height: 42px; border-radius: 13px; background: rgba(15,23,42,0.054); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--glass-line); }
  .gcard--course .inestadore-ico svg { width: 18px; height: 18px; }
  .gcard--course .gcard__body { grid-area: body; padding: 12px 14px 0; gap: 5px; }
  .gcard--course .gcard__cat { font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
  .gcard--course .gcard__st { display: inline-flex; }
  .gcard--course .gcard__title { font-size: 16px; line-height: 1.6; }
  .gcard--course .gcard__hook { font-size: 13.5px; line-height: 1.85; }
  .gcard--course .gmeta { gap: 4px; margin-top: 2px; }
  .gcard--course .gmeta li { height: 26px; padding: 0 8px; gap: 5px; font-size: 12px; }
  .gcard--course .gmeta svg { width: 13px; height: 13px; }
  .gcard--course .gcard__foot { grid-area: foot; margin-top: 12px; padding: 12px 14px 14px; }
  .gcard--course .gprice b { font-size: 18px; }
  .gcard--course .gbtn { height: 42px; }
  .gcard--course:hover { transform: none; }
}

/* حالت خالی */
.gempty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 56px 20px;
  text-align: center;
  border-radius: var(--r-glass);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--text-2);
}
.gempty b { color: var(--text); font-size: 18px; }
.gempty button { margin-top: 6px; }

/* اگه مرورگر blur رو پشتیبانی نکنه، شیشه کمی مات‌تر میشه که خوانا بمونه */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gcard, .gbar, .gempty { background: rgba(234,238,243,0.92); }
}

.gbar > *, .gbar__row > * { min-width: 0; }
.gchips { flex: 1; }
.gsort { flex: none; }
.gbar { background: rgba(255, 255, 255, 0.72); }
@media (max-width: 899px) {
  .gbar { position: relative; top: auto; }
  .gchips { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); }
}

/* نور محلی پشت یه بخش (صفحه‌ی اول) */
.glow-wrap { position: relative; isolation: isolate; overflow: clip; }
.glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glow i { position: absolute; border-radius: 50%; filter: blur(90px); }
.glow i:nth-child(1) { width: 520px; height: 520px; right: -140px; top: 60px; background: #2463eb; opacity: 0.32; }
.glow i:nth-child(2) { width: 460px; height: 460px; left: -160px; bottom: 40px; background: #c9d3e1; opacity: 0.4; }

/* ---------- صفحه‌ی اول: کاشی دسته‌ها و ردیف «پیشنهادی» ---------- */
.hcats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 44px; }
@media (min-width: 900px) { .hcats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 64px; } }
.hcats .hcat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) { .hcats .hcat:last-child:nth-child(odd) { grid-column: auto; } }
.hcat {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(15,23,42,0.063), rgba(15,23,42,0.018) 60%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 rgba(15,23,42,0.072);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.25s;
}
@media (min-width: 900px) { .hcat { grid-template-columns: 1fr; align-content: start; gap: 18px; padding: 20px 20px 18px; } }
.hcat:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.35), inset 0 1px 0 rgba(15,23,42,0.09), 0 18px 34px -22px rgba(36,99,235,0.7); }
.hcat__ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #1450d2; background: rgba(36,99,235,0.2); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.2); }
.hcat__ic svg { width: 22px; height: 22px; }
.hcat__t { display: grid; gap: 2px; min-width: 0; line-height: 1.5; }
.hcat__t b { font-size: 14.5px; font-weight: 700; }
.hcat__t small { font-size: 12.5px; color: var(--text-3); }
.hcat__go { display: none; }
/* دسته‌های ریز اسم بلندتری دارن؛ روی گوشی آیکون بالای اسم میاد که متن جا داشته باشه */
@media (max-width: 559px) {
  .hcat { grid-template-columns: 1fr; gap: 8px; padding: 12px; align-content: start; }
  .hcat__ic { width: 34px; height: 34px; border-radius: 11px; }
  .hcat__ic svg { width: 18px; height: 18px; }
  .hcat__t b { font-size: 13.5px; }
}
@media (min-width: 900px) {
  .hcat__t b { font-size: 16px; }
  .hcat__go { display: grid; position: absolute; top: 22px; inset-inline-end: 20px; color: var(--text-3); transition: color 0.2s, transform 0.25s var(--ease); }
  .hcat__go svg { width: 18px; height: 18px; }
  .hcat:hover .hcat__go { color: #1450d2; transform: translateX(-3px); }
}
@media (prefers-reduced-motion: reduce) { .hcat:hover { transform: none; } }
.hrow { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hrow__title { font-size: 19px; font-weight: 800; }
.hrow__more { font-size: 14px; color: var(--crimson-text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(20,80,210,0.4); }
.hrow__more:hover { color: #1450d2; }

/* جلسه‌ی رایگان در صفحه‌ی دوره */
.free-lessons { display: grid; gap: 8px; }
.free-lesson { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: 14px; font-weight: 600; background: rgba(15,23,42,0.036); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background-color 0.2s, box-shadow 0.2s; }
.free-lesson:hover { background: rgba(36,99,235,0.16); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.35); }
.free-lesson svg { width: 18px; height: 18px; flex: none; color: #1450d2; }

/* ---------- مقاله‌ها ---------- */
.gbar--blog { grid-template-columns: 1fr; }
@media (min-width: 900px) { .gbar--blog { grid-template-columns: 300px 1fr; } }
.pcover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gcard:hover .pcover { transform: scale(1.045); }

.article { max-width: 760px; padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 900px) { .article { padding-top: 72px; } }
.article__head { margin: 18px 0 26px; display: grid; gap: 14px; }
.article__head h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.4; }
.article__lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-2); line-height: 1.9; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--text-3); }
.article__cover { width: 100%; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 0 0 1px rgba(15,23,42,0.054); }
.prose { font-size: 17.5px; line-height: 2.1; color: #212b38; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 26px; font-weight: 800; line-height: 1.5; color: var(--text); margin-top: 1.8em; }
.prose h3 { font-size: 21px; font-weight: 800; line-height: 1.5; color: var(--text); margin-top: 1.5em; }
.prose h4 { font-size: 18px; font-weight: 700; color: var(--text); }
.prose a { color: var(--crimson-text); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: persian; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin: 1.4em 0; padding: 8px 20px; border-inline-start: 3px solid var(--crimson); color: var(--text); font-size: 1.05em; background: rgba(15,23,42,0.027); border-radius: 0 12px 12px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2em 0; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: rgba(15,23,42,0.063); padding: 2px 6px; border-radius: 6px; }
.prose pre { direction: ltr; overflow-x: auto; background: rgba(15,23,42,0.045); padding: 14px; border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 8px 10px; }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.article__tags span { font-size: 13px; color: var(--text-2); background: rgba(15,23,42,0.045); padding: 4px 12px; border-radius: 999px; }
.article__rel { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.pcover--empty { display: grid; place-items: center; background: radial-gradient(120% 90% at 70% 20%, #2463eb 0%, #f1f3f7 60%); }
.pcover--empty span { font-family: var(--mono); font-weight: 700; font-size: 64px; color: rgba(21,27,35,0.08); direction: ltr; }

/* ==========================================================================
   امتیاز ستاره‌ای
   ========================================================================== */
.stars { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); line-height: 1; }
.stars i {
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3.2 2.7 5.6 6.1.8-4.5 4.2 1.1 6.1L12 17l-5.4 2.9 1.1-6.1-4.5-4.2 6.1-.8z'/%3E%3C/svg%3E");
  display: block;
  width: 80px;
  height: 16px;
  /* پر شدن از راست، مثل خوندن فارسی */
  background: linear-gradient(to left, #c47f08 var(--p), rgba(15,23,42,0.144) var(--p));
  -webkit-mask: var(--star) right center / 16px 16px repeat-x;
  mask: var(--star) right center / 16px 16px repeat-x;
}
.stars b { color: var(--text); font-weight: 700; }
.stars small { font-size: 12px; color: var(--text-3); }
.stars--big i { width: 110px; height: 22px; -webkit-mask-size: 22px 22px; mask-size: 22px 22px; }
.stars--big { font-size: 15px; gap: 10px; }
.stars--big b { font-size: 22px; }
.gcard__rate { margin-top: -2px; }

/* ==========================================================================
   پنل دانشجو
   ========================================================================== */
.acc { padding-top: 32px; padding-bottom: 88px; min-height: 60vh; }
@media (min-width: 900px) { .acc { padding-top: 56px; } }
.acc-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 96px 0; color: var(--text-2); }
.acc-spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(15,23,42,0.18); border-top-color: #fff; animation: accspin 0.8s linear infinite; flex: none; }
@keyframes accspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .acc-spin { animation-duration: 2.4s; } }
.acc-problem p { max-width: 30rem; }

/* فرم‌ها */
.aform { display: grid; gap: 16px; }
.afield { display: grid; gap: 7px; position: relative; }
.afield > span { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.afield input, .afield textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 0;
  border-radius: 13px;
  background: rgba(15,23,42,0.054);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.afield textarea { resize: vertical; min-height: 120px; line-height: 1.9; }
.afield input[dir="ltr"] { text-align: left; }
.afield input:focus, .afield textarea:focus { background: rgba(15,23,42,0.081); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.75); }
.afield input:disabled { color: var(--text-3); }
.afield input::placeholder, .afield textarea::placeholder { color: var(--text-3); }
.afield small, .afield__hint { font-size: 12.5px; color: var(--text-3); }
.afield--pass input { padding-inline-end: 48px; }
.afield__eye { position: absolute; bottom: 6px; left: 6px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); }
.afield__eye:hover, .afield__eye[aria-pressed="true"] { color: var(--text); background: rgba(15,23,42,0.063); }
.afield__eye svg { width: 18px; height: 18px; }
.aerr { min-height: 0; font-size: 14px; color: #1450d2; }
.aerr:empty { display: none; }
.gbtn { border: 0; cursor: pointer; font-family: inherit; justify-content: center; }
.gbtn:disabled { opacity: 0.7; cursor: progress; }
.gbtn--block { width: 100%; height: 50px; font-size: 15px; }
.gbtn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; flex: none; }
.gbtn .acc-spin { width: 15px; height: 15px; }

/* ورود */
.acc-auth { display: grid; place-items: center; padding-block: 8px 24px; }
.acard-auth {
  width: 100%;
  max-width: 440px;
  padding: 28px 22px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(15,23,42,0.072), rgba(15,23,42,0.023) 60%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 rgba(15,23,42,0.09), 0 30px 60px -30px rgba(15,23,42,0.16);
  display: grid;
  gap: 14px;
}
@media (min-width: 640px) { .acard-auth { padding: 36px 34px; } }
.acard-auth h1 { font-size: 26px; font-weight: 800; line-height: 1.4; }
.acard-auth > p { color: var(--text-2); font-size: 15px; }
.acc-lock { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #2463eb, #2463eb); box-shadow: inset 0 1px 0 rgba(15,23,42,0.18), 0 12px 26px -10px rgba(36,99,235,0.9); }
.acc-lock svg { width: 24px; height: 24px; }
.acc-notice { padding: 10px 14px; border-radius: 12px; background: rgba(196,127,8,0.1); color: #c47f08 !important; font-size: 14px !important; }
.acc-help { display: grid; gap: 8px; margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(15,23,42,0.063); font-size: 13.5px; color: var(--text-2); line-height: 1.9; }
.acc-help b { color: var(--text); font-weight: 600; }
.acc-help a, .gempty p a, .asec a:not(.gbtn):not(.gpill), .acc-problem a { color: var(--crimson-text); text-decoration: underline; text-underline-offset: 3px; }

/* سر صفحه */
.acc-head { display: grid; gap: 16px; margin-bottom: 26px; }
@media (min-width: 760px) { .acc-head { grid-template-columns: 1fr auto; align-items: end; } }
.acc-hi { font-size: 14px; color: var(--crimson-text); font-weight: 600; }
.acc-head h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.35; }
.acc-head p { margin-top: 6px; color: var(--text-2); max-width: 38rem; font-size: 15px; }
.acc-head__act { display: flex; gap: 8px; flex-wrap: wrap; }
.gpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(15,23,42,0.054);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  transition: background-color 0.2s;
}
.gpill:hover { background: rgba(15,23,42,0.09); }
.gpill svg { width: 17px; height: 17px; color: var(--text-2); }
.gpill--quiet { background: transparent; }
.acc-crumb { margin-bottom: 18px; }
.acc-crumb a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.acc-crumb a:hover { color: var(--text); }
.acc-crumb svg { width: 16px; height: 16px; transform: scaleX(-1); }

.acard .gcard__hook { -webkit-line-clamp: 2; }
.acard__hint { font-size: 13px; color: var(--text-3); }
.acard .gmeta svg { width: 14px; height: 14px; }

/* صفحه‌ی یک دوره */
.acourse {
  display: grid;
  gap: 18px;
  padding: 10px;
  border-radius: var(--r-glass);
  background: linear-gradient(160deg, rgba(15,23,42,0.063), rgba(15,23,42,0.018) 60%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 rgba(15,23,42,0.072);
}
@media (min-width: 760px) { .acourse { grid-template-columns: 300px 1fr; align-items: center; gap: 26px; } }
.acourse__media { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; }
.acourse__media .poster { position: absolute; inset: 0; }
.acourse__media .pz__latin, .acourse__media .poster__brand { display: none; }
.acourse__media .poster__art { padding: 10cqh 10cqw; }
.acourse__txt { display: grid; gap: 8px; padding: 4px 8px 12px; align-content: center; }
.acourse__txt h1 { font-size: clamp(22px, 3.6vw, 32px); font-weight: 800; line-height: 1.45; }
.acourse__pub { justify-self: start; font-size: 13.5px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

.asec {
  margin-top: 22px;
  padding: 22px 18px;
  border-radius: var(--r-glass);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
@media (min-width: 640px) { .asec { padding: 28px 28px; } }
.asec h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.asec__sub { font-size: 14px; color: var(--text-2); margin: -6px 0 16px; }
.asec__empty { color: var(--text-2); }
.asec__foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12.5px; color: var(--text-3); }
.asec__foot svg { width: 15px; height: 15px; flex: none; }
.agrid2 { display: grid; gap: 0 18px; }
@media (min-width: 900px) { .agrid2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.agrid2 .asec { margin-top: 0; margin-bottom: 18px; }

.alist { display: grid; gap: 10px; }
.aitem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15,23,42,0.036);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.054);
}
.aitem__ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(36,99,235,0.18); color: #1450d2; }
.aitem__ic svg { width: 20px; height: 20px; }
.aitem__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.aitem__main h3 { font-size: 15.5px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.aitem__main small { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aitem--note { align-items: flex-start; }
.aitem__note { font-size: 14.5px; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; line-height: 2; }
.aitem__note a { color: var(--crimson-text); text-decoration: underline; }

/* ستاره‌ی ورودی */
.arate { display: flex; gap: 4px; }
.arate button { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; transition: transform 0.15s, background-color 0.15s; }
.arate button:hover { background: rgba(15,23,42,0.054); }
.arate button:active { transform: scale(0.92); }
.arate svg { width: 28px; height: 28px; fill: rgba(15,23,42,0.126); transition: fill 0.15s; }
.arate button.on svg { fill: #c47f08; }
.areview-st { display: grid; gap: 2px; margin-bottom: 16px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; color: var(--text-2); background: rgba(15,23,42,0.045); }
.areview-st b { color: var(--text); font-size: 14px; }
.areview-st--approved { background: rgba(88, 170, 120, 0.1); }
.areview-st--approved b { color: #8fd6a8; }
.areview-st--pending b { color: #c47f08; }
.areview-st--rejected b { color: #1450d2; }

/* ==========================================================================
   صفحه‌ی دوره: امتیاز، نظرها، کد تخفیف
   ========================================================================== */
.chero__rate { justify-self: start; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.09); }
.chero__rate .stars b { color: #fff; }
.buybox__rate { display: flex; }

.rsum { display: grid; gap: 18px; padding: 20px; border-radius: 18px; background: rgba(15,23,42,0.032); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.054); margin-bottom: 16px; }
@media (min-width: 640px) { .rsum { grid-template-columns: auto 1fr; align-items: center; gap: 32px; padding: 24px 28px; } }
.rsum__avg { display: grid; justify-items: start; gap: 6px; }
.rsum__avg > b { font-size: 46px; font-weight: 800; line-height: 1; }
.rsum__avg small { font-size: 13px; color: var(--text-3); }
.rdist { display: grid; gap: 6px; }
.rdist__row { display: grid; grid-template-columns: 14px 1fr 28px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.rdist__row i { height: 6px; border-radius: 6px; background: rgba(15,23,42,0.072); overflow: hidden; display: flex; }
.rdist__row i b { display: block; height: 100%; border-radius: inherit; background: #c47f08; }
.rdist__row small { color: var(--text-3); text-align: end; }
.rlist { display: grid; gap: 12px; }
@media (min-width: 760px) { .rlist { grid-template-columns: 1fr 1fr; } }
.rcard { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 18px; background: rgba(15,23,42,0.032); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.054); }
.rcard header { display: flex; align-items: center; gap: 12px; }
.rcard header > div { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.rcard header b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard header small { font-size: 12px; color: var(--text-3); }
.rcard__av { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: rgba(36,99,235,0.25); color: #1450d2; }
.rcard p { font-size: 15px; line-height: 2; color: #212b38; white-space: pre-line; overflow-wrap: anywhere; }
.rmore { margin-top: 14px; }
.rnote { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.rnote a { color: var(--crimson-text); text-decoration: underline; text-underline-offset: 3px; }

.coupon { border-radius: 12px; background: var(--bg-raise); border: 1px solid var(--line); }
.coupon summary { list-style: none; cursor: pointer; padding: 11px 14px; font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coupon summary::-webkit-details-marker { display: none; }
.coupon summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--text-3); }
.coupon[open] summary::after { content: "−"; }
.coupon summary:hover { color: var(--text); }
.coupon__form { display: flex; gap: 8px; padding: 0 12px 12px; }
.coupon__form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(15,23,42,0.036); color: var(--text); font: 500 15px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; outline: none; text-align: left; }
.coupon__form input:focus { border-color: rgba(20,80,210,0.75); }
.coupon__form .btn { min-height: 40px; }
.coupon__msg { padding: 0 14px 12px; font-size: 13px; line-height: 1.9; color: var(--text-2); }
.coupon__msg:empty { display: none; }
.coupon__msg.is-bad { color: #1450d2; }
.coupon__msg.is-ok { color: #9fdcb5; }
.coupon__x { color: var(--text-3); text-decoration: underline; font-size: 12.5px; }
.coupon.is-ok { border-color: rgba(88, 170, 120, 0.4); }
.buybox .price__now s { font-size: 15px; font-weight: 500; color: var(--text-3); margin-inline-end: 6px; }
.buybox__mine { font-size: 13px; color: var(--text-3); text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.buybox__mine:hover { color: var(--text); }

/* ==========================================================================
   برگه‌ها: درباره‌ی ما، تماس، قوانین، حریم خصوصی
   ========================================================================== */
.page-article { padding-bottom: 88px; }
.page-article .prose h2 { font-size: 22px; }
.page-article__date { margin-top: 36px; font-size: 13px; color: var(--text-3); }
.contact-list {
  margin-top: 28px;
  display: grid;
  gap: 2px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--glass-line);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.contact-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 14px; padding: 16px 20px; background: rgba(255, 255, 255, 0.92); }
.contact-list dt { color: var(--text-3); font-size: 14px; }
.contact-list dd { margin: 0; color: var(--text); font-size: 16px; overflow-wrap: anywhere; }
.contact-list a { color: var(--crimson-text); }
@media (max-width: 520px) { .contact-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* ==========================================================================
   ورود با تلگرام
   ========================================================================== */
.tg-login { display: grid; justify-items: center; gap: 10px; min-height: 56px; padding: 14px; border-radius: 16px; background: #f1f4f7; box-shadow: inset 3px 3px 7px rgba(15,23,42,0.16), inset -2px -2px 6px rgba(15,23,42,0.041); }
.tg-login iframe { max-width: 100%; }
.tg-login__wait { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.tg-login__fail { font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.9; }
.acc-or { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-3); }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: rgba(15,23,42,0.072); }
.acc-alt summary { list-style: none; cursor: pointer; text-align: center; font-size: 14px; color: var(--text-2); padding: 6px; }
.acc-alt summary::-webkit-details-marker { display: none; }
.acc-alt summary:hover { color: var(--text); }
.acc-alt[open] summary { margin-bottom: 12px; }
.tg-linked { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(42, 171, 238, 0.08); box-shadow: inset 0 0 0 1px rgba(42, 171, 238, 0.25); }
.tg-linked svg { width: 26px; height: 26px; color: #2aabee; flex: none; }
.tg-linked b { display: block; font-size: 15px; }
.tg-linked small { color: var(--text-3); font-size: 12.5px; }
.tg-linked button { margin-inline-start: auto; font-size: 13px; color: var(--text-3); text-decoration: underline; }

/* ==========================================================================
   خرید کارت‌به‌کارت
   ========================================================================== */
.abuy__price { font-size: 15px; color: var(--text-2); }
.abuy__price b { font-size: 24px; color: var(--text); font-weight: 800; }
.abuy__price s { color: var(--text-3); }
.abuy__cpn { display: inline-block; margin-inline-start: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; color: #9fdcb5; background: rgba(88, 170, 120, 0.12); }
.abuy__step { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-end: 10px; border-radius: 9px; font-size: 14px; color: #fff; background: linear-gradient(180deg, #2463eb, #2463eb); vertical-align: 2px; }
.abuy__who { padding: 12px 14px; border-radius: 14px; background: rgba(88, 170, 120, 0.08); box-shadow: inset 0 0 0 1px rgba(88, 170, 120, 0.22); font-size: 14px; color: var(--text-2); }
.abuy__who b { color: var(--text); }
.abuy__login { display: grid; gap: 12px; }
.abuy__login > p { font-size: 14px; color: var(--text-2); line-height: 1.9; }
.abuy__guest { gap: 14px 18px; }
.apay { display: grid; gap: 12px; }
.apay__amount, .apay__sheba { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(15,23,42,0.036); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.063); }
.apay__amount span, .apay__sheba span { font-size: 13px; color: var(--text-3); }
.apay__amount b { font-size: 22px; font-weight: 800; margin-inline-end: auto; }
.apay__amount small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.apay__sheba bdi { font: 500 14px var(--mono); margin-inline-end: auto; overflow-wrap: anywhere; }
/* کارت بانکی: کمی اسکئومورفیک، مثل یه کارت واقعی */
.apay__card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(36,99,235,0.55), transparent 55%), linear-gradient(145deg, #e6ebf1, #f0f3f7);
  box-shadow: inset 0 1px 0 rgba(15,23,42,0.108), inset 0 0 0 1px rgba(15,23,42,0.063), 0 24px 40px -24px rgba(15,23,42,0.16);
  overflow: hidden;
}
.apay__chip { width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #c47f08, #f59f0a); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.055); }
.apay__num { font: 600 clamp(19px, 5vw, 26px) var(--mono); letter-spacing: 0.06em; text-shadow: 0 1px 0 rgba(15,23,42,0.132); }
.apay__card .acopy { position: absolute; top: 16px; left: 16px; }
.apay__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.acopy { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; color: var(--text); background: rgba(15,23,42,0.072); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.09); }
.acopy:hover { background: rgba(15,23,42,0.126); }
.afile { display: block; cursor: pointer; }
.afile input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.afile__box { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; border-radius: 16px; text-align: center; border: 1.5px dashed rgba(15,23,42,0.144); background: rgba(15,23,42,0.023); transition: border-color 0.2s, background-color 0.2s; }
.afile__box svg { width: 28px; height: 28px; color: #1450d2; }
.afile__box b { font-size: 15px; overflow-wrap: anywhere; }
.afile__box small { font-size: 12.5px; color: var(--text-3); }
.afile:hover .afile__box, .afile input:focus-visible + .afile__box { border-color: rgba(20,80,210,0.7); }
.afile.has-file .afile__box { border-style: solid; border-color: rgba(88, 170, 120, 0.45); background: rgba(88, 170, 120, 0.06); }
.aorder { align-items: flex-start; }
.aorder__st { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; color: #c47f08; background: rgba(196,127,8,0.12); }
.aorder--rejected .aorder__st, .aorder__st--rejected { color: #1450d2; background: rgba(20,80,210,0.14); }
.aorder--approved .aorder__st, .aorder__st--approved { color: #9fdcb5; background: rgba(88, 170, 120, 0.12); }
p.aorder__st { justify-self: start; }
.aorder__why { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.9; }
.aorder .aitem__main small { white-space: normal; }
.aorder__why, .aorder__link { overflow-wrap: anywhere; }
.aorder__link { justify-self: start; font-size: 13px; color: var(--crimson-text); text-decoration: underline; text-underline-offset: 3px; }
.aorder__link:hover, .aorder__link:focus-visible { color: var(--text); text-decoration-thickness: 2px; }
.atimeline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--text-2); }
.atimeline__step { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 8px; }
.atimeline__step + .atimeline__step::before { content: "←"; color: var(--text-3); margin-inline-end: 2px; }
.atimeline__step--done, .atimeline__step--current, .atimeline__step--failed { color: var(--text); }
.atimeline__step--current { border-color: var(--text-2); font-weight: 700; }
.atimeline__step--failed { border-style: dashed; font-weight: 700; }

/* «خبرم کن» توی باکس خرید */
.notify { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg-raise); border: 1px solid var(--line); }
.notify b { font-size: 14.5px; }
.notify p { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.notify input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(15,23,42,0.036); color: var(--text); font: inherit; font-size: 14.5px; outline: none; }
.notify input:focus { border-color: rgba(20,80,210,0.75); }
.notify__msg { font-size: 13px; }
.notify__msg.is-bad { color: #1450d2; }
.notify.is-done { border-color: rgba(88, 170, 120, 0.4); }
.buybox__alt { font-size: 13px; color: var(--text-3); text-align: center; text-decoration: underline; text-underline-offset: 3px; }
.buybox__alt:hover { color: var(--text); }
.preview-bar { position: sticky; top: 0; z-index: 90; padding: 10px 16px; text-align: center; font-size: 13.5px; color: #f59f0a; background: #c47f08; }

/* ---------- افزودن به سبد روی کارت دوره (بالای لینک کل کارت) ---------- */
.gcard__acts { display: inline-flex; align-items: center; gap: 8px; }
.gcart { position: relative; z-index: 4; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 13px; cursor: pointer; color: var(--text); background: rgba(15,23,42,0.063); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background 0.2s, color 0.2s; }
.gcart svg { width: 19px; height: 19px; }
.gcart:hover { background: rgba(15,23,42,0.108); }
.gcart.is-in { color: #fff; background: rgba(36,99,235,0.55); }
.gcart:focus-visible { outline: 2px solid rgba(20,80,210,0.9); outline-offset: 2px; }
[data-cart-add].btn svg { width: 18px; height: 18px; }
.gcard__acts .gbtn { white-space: nowrap; }
@media (max-width: 420px) { .gcard__acts .gbtn { padding: 0 13px; font-size: 13.5px; } }

/* ---------- حراج زمان‌دار: بنر، برچسب تخفیف، شمارش معکوس ---------- */
.gsale {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(36,99,235,0.42), rgba(36,99,235,0.14) 55%, rgba(196,127,8,0.1));
  box-shadow: inset 0 0 0 1px rgba(20,80,210,0.32), 0 20px 40px -28px rgba(36,99,235,0.9);
  overflow: hidden;
}
.gsale__main { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.gsale__kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; color: #e8eefd; }
.gsale__kicker i { font-style: normal; color: #c47f08; }
.gsale p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--text); }
.gsale p b { font-size: 17px; font-weight: 800; color: #fff; }
.gsale__extra { display: block; font-size: 13px; color: var(--text-2); }
.gsale__clock { display: grid; justify-items: center; gap: 2px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(15,23,42,0.072); }
.gsale__clock small { font-size: 11.5px; color: var(--text-2); }
.gsale__clock b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: #c47f08; letter-spacing: 0.02em; }
.gsale-link { display: block; color: inherit; text-decoration: none; }
.gsale-link .gsale { transition: box-shadow 0.25s var(--ease); }
.gsale-link:hover .gsale { box-shadow: inset 0 0 0 1px rgba(20,80,210,0.6), 0 20px 40px -24px rgba(36,99,235,1); }
.gsale-link:focus-visible { outline: 2px solid #1450d2; outline-offset: 3px; border-radius: 20px; }
.gsale--home { margin-bottom: 18px; }
.gsale--cart { margin-block: 4px 18px; }
@media (max-width: 559px) {
  .gsale { padding: 14px; gap: 10px; }
  .gsale__clock { grid-auto-flow: column; align-items: baseline; gap: 8px; width: 100%; justify-content: center; }
  .gsale__clock b { font-size: 19px; }
}

/* برچسب درصد روی پوستر، قیمت خط‌خورده و درصد کنار قیمت */
.gchip--off { inset-inline-start: auto; inset-inline-end: 10px; top: auto; bottom: 10px; color: #1b0d03; background: #c47f08; box-shadow: none; font-weight: 800; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gprice--sale small { display: inline-flex; align-items: center; gap: 6px; }
.gprice--sale small em { font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 999px; color: #1b0d03; background: #c47f08; }
.gprice--sale b { color: #fff; }
.price__off { display: inline-block; margin-inline-start: 10px; padding: 2px 9px; border-radius: 999px; font-style: normal; font-size: 12.5px; font-weight: 800; color: #1b0d03; background: #c47f08; vertical-align: middle; }
.buybox__sale { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; color: #e8eefd; background: rgba(36,99,235,0.22); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.25); }
.buybox__sale b { font-size: 17px; font-variant-numeric: tabular-nums; color: #c47f08; }
.buybar__price small s { color: var(--text-3); }

/* اسم مدرس روی کارت‌ها */
.gcard__by { display: flex; align-items: center; gap: 6px; min-width: 0; margin: -2px 0 0; font-size: 13px; color: var(--text-2); }
.gcard__by svg { width: 15px; height: 15px; flex: none; color: var(--text-3); }
.gcard__by b { min-width: 0; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard__by { margin: 8px 12px 0; font-size: 13px; color: var(--text-2); }
.mcard__by b { color: var(--text); }
.mcard__price small s { margin-inline-start: 6px; }
.chero__by { margin: -4px 0 10px; font-size: 15px; color: var(--text-2); }
.chero__by b { color: var(--text); }

/* دکمه‌ی اصلی کارت: افزودن به سبد با متن */
.gcart--text { touch-action: manipulation; width: auto; gap: 7px; padding: 0 14px; font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #2463eb, #2463eb); box-shadow: inset 0 1px 0 rgba(15,23,42,0.162), 0 8px 20px -8px rgba(36,99,235,0.8); white-space: nowrap; }
.gcart--text:hover { background: linear-gradient(180deg, #2463eb, #2463eb); }
.gcart--text svg { width: 17px; height: 17px; }
.gcart--text.is-in { background: rgba(15,23,42,0.09); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.45); }
.gcard__acts { display: inline-flex; align-items: center; gap: 8px; }
.gbtn--more.gbtn--quiet { padding: 0 12px; }
@media (max-width: 559px) {
  /* روی کارت افقی کل کارت لینکه؛ دکمه‌ی «جزئیات» جای «افزودن به سبد» رو نمی‌گیره */
  .gcard--course .gcard__acts .gcart--text ~ .gbtn--more { display: none; }
  .gcard--course .gcart--text { height: 42px; padding: 0 12px; font-size: 13.5px; }
  .gcard--course .gcard__by { font-size: 12.5px; }
  .gcard--course .gchip--off { bottom: 6px; inset-inline-end: 6px; height: 22px; padding: 0 7px; font-size: 11px; }
}

/* نوار سبد خرید پایین صفحه‌ی دوره‌ها */
.gcartbar { position: fixed; inset-inline: 0; bottom: 16px; z-index: 40; display: flex; justify-content: center; padding-inline: var(--gutter); pointer-events: none; }
.gcartbar[hidden] { display: none; }
.gcartbar__in { pointer-events: auto; display: flex; align-items: center; gap: 14px; width: min(720px, 100%); padding: 10px 10px 10px 16px; padding-inline-start: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px rgba(20,80,210,0.3), 0 20px 40px -16px rgba(15,23,42,0.16); }
.gcartbar__info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.gcartbar__info p { margin: 0; font-size: 14px; color: var(--text); }
.gcartbar__info p s { font-size: 12px; color: var(--text-3); margin-inline-start: 4px; }
.gcartbar__info small { font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.gcartbar__info small b { color: #c47f08; }
.gcartbar__meter { display: block; height: 4px; border-radius: 999px; background: rgba(15,23,42,0.09); overflow: hidden; }
.gcartbar__meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c47f08, #1450d2); transform-origin: right; transition: transform 0.4s var(--ease); }
.gcartbar .gbtn { flex: none; }
body.has-cartbar { padding-bottom: 110px; }
/* کارتی که با Tab فوکوس می‌گیره زیر نوار سبد نمی‌مونه */
html:has(body.has-cartbar) { scroll-padding-bottom: 120px; }
body.has-cartbar .toast { bottom: 110px; }
@media (max-width: 899px) {
  .gcartbar { bottom: calc(var(--tabbar-h) + 22px + env(safe-area-inset-bottom)); }
  body.has-cartbar { padding-bottom: calc(var(--tabbar-h) + 130px + env(safe-area-inset-bottom)); }
  body.has-cartbar .toast { bottom: calc(var(--tabbar-h) + 112px + env(safe-area-inset-bottom)); }
}
@media (max-width: 559px) {
  .gcartbar__in { gap: 10px; padding: 9px; padding-inline-start: 12px; border-radius: 16px; }
  .gcartbar__info p { font-size: 13px; }
  .gcartbar__info small { font-size: 11.5px; }
  .gcartbar .gbtn { height: 40px; padding: 0 12px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .gcartbar__meter i { transition: none; } }
