/* CourseHub — шаблонная таблица стилей (CSS-переменные и компоненты). */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f1f3f7;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef2ff;
  --danger: #e11d48;
  --success: #059669;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow:
    0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px -18px rgba(15, 23, 42, 0.18);
  --shadow-lg:
    0 2px 4px rgba(15, 23, 42, 0.06), 0 24px 60px -30px rgba(15, 23, 42, 0.3);
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 48px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-sub {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 17px;
}

.section-link {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-link svg {
  width: 16px;
  height: 16px;
}

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  transition:
    background 0.2s,
    color 0.2s;
}

.main-nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.main-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.nav-badge.is-empty {
  background: var(--border);
  color: var(--muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.1s;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-outline.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.1s;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: var(--danger);
}

.icon-btn.is-active {
  color: var(--danger);
  background: #fff1f2;
  border-color: #fecdd3;
}

/* Чипы и бейджи */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chip-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.chip-level {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-soft);
}

.level-beginner {
  background: #ecfdf5;
  color: #047857;
}

.level-intermediate {
  background: #eff6ff;
  color: #1d4ed8;
}

.level-advanced {
  background: #fdf4ff;
  color: #a21caf;
}

/* Рейтинги */
.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  width: 16px;
  height: 16px;
  color: var(--border);
}

.star.is-fill {
  color: #f59e0b;
}

.rating-num {
  font-weight: 700;
}

.rating-count {
  color: var(--muted);
  font-size: 14px;
}

/* Карточка курса */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.25s,
    transform 0.25s,
    border-color 0.25s;
}

.course-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: #cbd5e1;
}

.course-cover {
  position: relative;
  display: block;
  height: 168px;
  color: #fff;
}

.course-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 100% at 100% 0,
    rgba(255, 255, 255, 0.25),
    transparent 55%
  );
}

.course-cover .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.course-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.course-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.course-title a {
  color: var(--text);
}

.course-title a:hover {
  color: var(--accent);
}

.course-author {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.course-author:hover {
  color: var(--accent);
}

.course-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.course-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.course-meta svg {
  width: 15px;
  height: 15px;
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.course-price {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.price-old {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.compare-toggle svg {
  width: 16px;
  height: 16px;
}

.compare-toggle.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* Карточка автора */
.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.author-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--text);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 28px;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.author-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.author-role {
  color: var(--muted);
  font-size: 13.5px;
}

.author-stats {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.author-stats .stars {
  margin-right: 6px;
}

/* Герой главной */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      60% 55% at 15% 0%,
      rgba(99, 102, 241, 0.14),
      transparent 60%
    ),
    radial-gradient(
      55% 50% at 90% 10%,
      rgba(139, 92, 246, 0.12),
      transparent 60%
    ),
    radial-gradient(
      45% 45% at 50% 100%,
      rgba(14, 165, 233, 0.08),
      transparent 60%
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto 32px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto 40px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}

.hero-search .btn {
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat b {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 14px;
}

/* Подборки */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.collection-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.collection-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.collection-card .collection-emoji {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 6px;
}

.collection-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.collection-card p {
  color: var(--muted);
  margin: 0;
}

.collection-link {
  margin-top: auto;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.collection-link svg {
  width: 16px;
  height: 16px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
}

.category-chips a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

/* Курс месяца */
.spotlight {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(120deg, #312e81, #4f46e5 60%, #7c3aed);
  color: #fff;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.spotlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.spotlight h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.spotlight h2 a {
  color: #fff;
}

.spotlight h2 a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.spotlight p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 28px;
}

.spotlight-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.spotlight-meta svg {
  width: 16px;
  height: 16px;
}

.spotlight-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-white {
  background: #fff;
  color: var(--accent-strong);
}

.btn-white:hover {
  background: #eef2ff;
  color: var(--accent-strong);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.spotlight-price {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.spotlight-price del {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: 15px;
  margin-left: 8px;
}

.spotlight-visual {
  position: relative;
  height: 260px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 84px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Преимущества */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* CTA-баннер */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 48px;
  text-align: center;
}

.cta-banner h2 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.cta-banner p {
  margin: 0 auto 24px;
  color: var(--muted);
  max-width: 460px;
}

/* Каталог: фильтры */
.filters-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-field .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.select-field select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-chip:hover {
  border-color: var(--accent);
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filters-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 14.5px;
}

.result-count b {
  color: var(--text);
}

.reset-link {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: var(--muted);
  font-family: inherit;
}

.reset-link:hover {
  color: var(--danger);
}

/* Сравнение */
.compare-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table th {
  background: var(--surface-soft);
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}

.compare-table td:first-child {
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}

.compare-course-cell {
  min-width: 220px;
}

.compare-cover {
  height: 88px;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
}

.compare-course-cell h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.3;
}

.compare-course-cell h3 a {
  color: var(--text);
}

.compare-remove {
  margin-top: 10px;
  font-size: 13px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.compare-remove:hover {
  color: var(--danger);
}

.compare-row-price {
  font-size: 17px;
  font-weight: 800;
}

.check-true {
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.check-true svg {
  width: 18px;
  height: 18px;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Хлебные крошки */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .sep {
  color: var(--border);
}

/* Страница курса */
.page-head {
  padding: 48px 0 0;
}

.course-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  align-items: start;
}

.course-hero-info h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.course-hero-short {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 0 20px;
}

.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--text-soft);
  font-size: 14.5px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.course-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.course-hero-meta svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.course-hero-meta .stars {
  display: inline-flex;
  align-items: center;
}

.course-sidebar {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar-cover {
  height: 150px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  font-weight: 800;
}

.sidebar-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.sidebar-price-row .price-current {
  font-size: 30px;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-actions .btn {
  width: 100%;
}

.sidebar-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

.sidebar-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
}

.sidebar-list li span {
  color: var(--muted);
}

.sidebar-list li b {
  font-weight: 600;
  text-align: right;
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.content-block h2 {
  margin: 0 0 18px;
  font-size: 24px;
  letter-spacing: -0.015em;
}

.content-block p {
  color: var(--text-soft);
  margin: 0 0 14px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 14.5px;
}

.skill-item svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  flex-shrink: 0;
}

/* Программа (аккордеон на details) */
.program-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface);
}

.program-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
}

.program-item summary::-webkit-details-marker {
  display: none;
}

.program-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--muted);
  transition: transform 0.2s;
  line-height: 1;
}

.program-item[open] summary::after {
  transform: rotate(45deg);
}

.program-lessons {
  margin: 0;
  padding: 0 20px 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-lessons li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14.5px;
  padding: 8px 10px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.program-lessons li svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Тарифы */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card.is-popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  position: relative;
}

.plan-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-card h3 {
  margin: 0;
  font-size: 18px;
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan-price del {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 8px;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--text-soft);
}

.plan-features li svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Отзывы */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--surface);
}

.review-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-soft);
}

.review-name {
  font-weight: 600;
  font-size: 15px;
}

.review-date {
  color: var(--muted);
  font-size: 13px;
}

.review-stars {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.review-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

/* Автор: страница */
.author-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}

.author-profile .avatar {
  width: 96px;
  height: 96px;
  font-size: 32px;
  flex-shrink: 0;
}

.author-profile h1 {
  margin: 0 0 4px;
  font-size: 32px;
  letter-spacing: -0.02em;
}

.author-role {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.author-bio {
  color: var(--text-soft);
  max-width: 640px;
  margin: 0;
}

.author-profile-stats {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.author-profile-stats .stat b {
  font-size: 22px;
}

/* Пустые состояния */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  margin: 0 auto;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 16px;
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  color: var(--muted);
  margin: 0 0 20px;
}

/* Футер */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 40px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-about {
  color: var(--muted);
  font-size: 14px;
  max-width: 280px;
  margin: 0;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--muted);
  font-size: 14.5px;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

/* Баннер сравнения внизу каталога */
.compare-dock {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
  z-index: 60;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px 10px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
}

.compare-dock.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.compare-dock b {
  font-size: 14.5px;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
  }

  .spotlight {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 64px 0;
  }

  .hero h1 {
    font-size: 36px;
  }

  .collections-grid {
    grid-template-columns: 1fr;
  }

  .author-profile {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .author-profile-stats {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px;
    gap: 6px;
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .course-hero-info h1 {
    font-size: 30px;
  }

  .content-block {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .hero-stats {
    gap: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .filters-row {
    flex-direction: column;
  }
}
/* Django-вариант: статические классы вместо JS coverStyle/avatarStyle */
.course-cover,.course-sidebar-cover{position:relative;overflow:hidden}
.cover-indigo{background:linear-gradient(135deg,#4f46e5,#818cf8)}
.cover-violet{background:linear-gradient(135deg,#7c3aed,#c084fc)}
.cover-sky{background:linear-gradient(135deg,#0284c7,#38bdf8)}
.cover-teal{background:linear-gradient(135deg,#0f766e,#2dd4bf)}
.cover-slate{background:linear-gradient(135deg,#334155,#94a3b8)}
.cover-emerald{background:linear-gradient(135deg,#047857,#34d399)}
.cover-amber{background:linear-gradient(135deg,#b45309,#fbbf24)}
.cover-rose{background:linear-gradient(135deg,#be123c,#fb7185)}
.cover-orange{background:linear-gradient(135deg,#c2410c,#fb923c)}
.cover-fuchsia{background:linear-gradient(135deg,#a21caf,#e879f9)}
.cover-initials{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:58px;font-weight:800;letter-spacing:-.05em;opacity:.95}
.avatar-indigo{background:linear-gradient(135deg,#4f46e5,#818cf8);color:#fff}.avatar-sky{background:linear-gradient(135deg,#0284c7,#38bdf8);color:#fff}.avatar-rose{background:linear-gradient(135deg,#be123c,#fb7185);color:#fff}.avatar-emerald{background:linear-gradient(135deg,#047857,#34d399);color:#fff}
.course-sidebar{display:flex;flex-direction:column;gap:12px}.course-sidebar-cover{height:190px;border-radius:20px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:54px;font-weight:800}.course-sidebar-price{display:flex;gap:10px;align-items:baseline}.course-sidebar-price b{font-size:28px}.course-sidebar-price del{color:var(--muted)}
.course-lead{font-size:18px;color:var(--text-soft);max-width:760px}.stars,.review-stars{color:#f59e0b}.skill-item{background:var(--surface-soft);border-radius:12px;padding:14px}.program-list{display:grid;gap:10px}.program-module{border:1px solid var(--border);border-radius:12px;padding:14px 18px}.program-module summary{font-weight:700;cursor:pointer}.program-module ul{margin:12px 0 0;padding-left:22px}.compare-wrap{overflow:auto}.compare-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden}.compare-table th,.compare-table td{padding:18px;border-bottom:1px solid var(--border);border-right:1px solid var(--border);vertical-align:top;text-align:left}.compare-table th:last-child,.compare-table td:last-child{border-right:0}.compare-table tr:last-child td{border-bottom:0}.compare-course-cell{min-width:190px}.compare-cover{height:90px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:28px;margin-bottom:10px}.compare-course-cell h3{font-size:16px;margin:0 0 6px}.compare-course-cell .btn{margin-top:10px}.plan-card{position:relative}.author-card .btn{margin-left:auto}.icon-btn.is-active{color:#e11d48}
