/* ===== Design tokens (public site) — чёрный фон + микс двух референсов ===== */
:root {
  --bg-deep: #000000;
  --bg-main: #000000;
  --bg-card: #0d0d0d;
  --bg-card-hover: #141414;
  --surface: #141414;
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --text-dim: #6b6b6b;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.28);
  --accent-red: #b91c1c;
  --accent-red-soft: rgba(185, 28, 28, 0.15);
  --link: #7dd3fc;
  --link-hover: #bae6fd;
  --teal: #14b8a6;
  --teal-soft: rgba(20, 184, 166, 0.2);
  --cyan-soft: rgba(125, 211, 252, 0.1);
  --purple-soft: rgba(167, 139, 250, 0.12);
  --emerald-soft: rgba(52, 211, 153, 0.15);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-main);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-top: 5.3rem;
  position: relative;
  overflow-x: hidden;
  max-width: 100vw;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 80% at 10% -5%, rgba(185, 28, 28, 0.06), transparent 45%),
    radial-gradient(ellipse 80% 60% at 92% 15%, rgba(20, 184, 166, 0.05), transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(139, 92, 246, 0.06), transparent 50%);
}
body > * { position: relative; z-index: 1; }
main { overflow-x: hidden; max-width: 100%; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow-x: hidden;
}

/* ===== Back arrow (on all pages except main) ===== */
.page-back {
  margin-bottom: 1.25rem;
}
.page-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.page-back a:hover {
  color: var(--accent);
  text-decoration: none;
}
.page-back a::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 0.15rem;
}

/* ===== Breadcrumbs (global) ===== */
.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.breadcrumb-nav a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb-nav a:hover {
  color: var(--accent);
}
.breadcrumb-nav .breadcrumb-sep {
  margin: 0 0.35rem;
  color: var(--text-dim);
}
.breadcrumb-nav .breadcrumb-current {
  margin: 0;
  color: var(--text-muted);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #000;
  backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover { text-decoration: none; color: #fff; }

.logo-icon {
  color: var(--accent);
  font-size: 1.1rem;
  text-shadow: 0 0 20px var(--accent-glow);
}

.logo-text { white-space: nowrap; }

/* Шапка чуть больше; подвал на 1.75rem меньше по высоте */
.logo-img {
  display: block;
  height: 4.75rem;
  width: auto;
  object-fit: contain;
  /* Увеличиваем визуально без роста высоты шапки */
  transform: scale(1.12);
  transform-origin: left center;
  /* Стабильнее ресайз и меньше артефактов на гранях */
  image-rendering: auto;
  /* Чтобы прозрачные пиксели не “перемешивались” с backdrop-filter/градиентом хедера */
  background-color: rgba(0, 0, 0, 0.92);
}

.footer-logo-img {
  display: block;
  height: calc(4.5rem - 1.75rem);
  width: auto;
  object-fit: contain;
  transform: scale(1.12);
  transform-origin: left center;
  image-rendering: auto;
  /* Подложка под прозрачность (чтобы избежать цветных артефактов на фоновой текстуре) */
  background-color: var(--bg-deep);
}

.footer-logo:has(.footer-logo-img) {
  font-size: 0;
  line-height: 0;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-dropdown {
  position: relative;
}

.nav-trigger {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.nav-trigger:hover,
.nav-trigger[aria-expanded="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 260px;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-dropdown.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-section {
  margin-bottom: 0.75rem;
}

.nav-section:last-child { margin-bottom: 0; }

.nav-section-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}

.nav-panel a {
  display: block;
  font-size: 0.875rem;
  color: #cbd5e1;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 2px;
}

.nav-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.nav-link:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  margin-left: auto;
}

.header-actions:empty {
  display: none;
}

/* Мобильное меню: кнопка-бургер */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 210;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-light);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s;
}

.header.is-menu-open .nav-toggle {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.45);
}

.header.is-menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.is-menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header.is-menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.header.is-menu-open .nav-backdrop {
  display: block;
}

.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
}

.lang-btn:hover { color: #fff; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.lang-switch [data-lang] {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  text-transform: uppercase;
}
.lang-switch [data-lang]:hover { color: #fff; }
.lang-switch [data-lang].active {
  color: #0a0a0a;
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}
.lang-switch [data-lang].active:hover { color: #0a0a0a; }
.lang-switch.is-loading { opacity: 0.85; pointer-events: none; }
.lang-switch.is-loading [data-lang] { cursor: wait; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 3rem 0 3.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(185, 28, 28, 0.08), transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 40%, rgba(20, 184, 166, 0.06), transparent 45%),
    radial-gradient(ellipse 50% 40% at 15% 60%, rgba(139, 92, 246, 0.07), transparent 45%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35em;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hero-desc {
  max-width: 640px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Page hero (inner pages: cases, wiki, review, etc.) */
.page-hero {
  position: relative;
  padding: 2rem 0 1.5rem;
  margin-bottom: 0.5rem;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: -2rem -20% 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(20, 184, 166, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.page-hero h1,
.page-hero .container {
  position: relative;
  z-index: 1;
}
.page-hero h1 { font-size: clamp(1.35rem, 3vw, 1.75rem); color: #fff; margin: 0 0 0.5rem; }
.page-hero p { color: var(--text-muted); margin: 0; }

/* ===== Filters ===== */
.filters {
  padding: 1.25rem 0 1.5rem;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.filter-tag:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  text-decoration: none;
}

.filter-tag.active {
  color: #0a0a0a;
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(232, 155, 44, 0.35);
}

/* ===== Category sections (main + sub) ===== */
#category-sections {
  padding-bottom: 2rem;
}

.category-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5rem; /* при автоскролле название категории остаётся видно под шапкой */
}

.category-section:last-child {
  border-bottom: 0;
}

.category-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-section__title {
  flex: 1;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  letter-spacing: -0.02em;
  overflow: visible;
  padding-top: 0.2rem; /* reserve headroom so icon glow is not clipped */
}

.category-section__title-link {
  color: inherit;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.category-section__title-link:hover,
.category-section__title-link:focus-visible {
  text-decoration: none !important;
  color: #fff;
}

.category-section__icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
/* Эмодзи в заголовке секции — тот же визуальный размер, что у PNG (cat-icon-*.png) */
.category-section__icon:not(:has(.category-section__icon-img)) {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  min-width: clamp(2.5rem, 6vw, 3.25rem);
}
.category-section__icon.has-icon-glow .category-section__icon-img {
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--cat-icon-glow) 25%, transparent)) drop-shadow(0 0 18px color-mix(in srgb, var(--cat-icon-glow) 12%, transparent));
}
.category-section__icon-img {
  width: clamp(2.5rem, 6vw, 3.25rem);
  height: clamp(2.5rem, 6vw, 3.25rem);
  object-fit: contain;
  vertical-align: middle;
}

.category-section__all {
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
}

.category-section__all:hover {
  color: #cbd5e1;
  text-decoration: none;
}

.category-section__all::after {
  content: " →";
  font-weight: 400;
}

.category-section__subcats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.category-section__subcat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.category-section__subcat-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  text-decoration: none;
}

.category-section__subcat-icon,
.category-section__subcat-emoji {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  font-size: 1.5rem;
  line-height: 1;
}

.category-section__cards-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Ширина ровно под 5 карточек (240px + gap 1.35rem), чтобы шестая не подглядывала */
.category-section__cards-row {
  min-width: 0;
  width: 100%;
  max-width: calc(5 * 240px + 4 * 1.35rem);
}

.category-section__cards.sites-grid {
  grid-template-columns: repeat(5, 1fr);
}

/* Кнопки внизу слева и справа под карточками */
.category-section__nav-row {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: calc(5 * 240px + 4 * 1.35rem);
}
.category-section__cards-wrap--has-scroll .category-section__nav-row {
  display: flex;
}
.category-section__nav {
  display: flex;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(30, 33, 42, 0.9);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s, background 0.2s, color 0.2s, opacity 0.2s;
}
.category-section__nav:hover:not(.disabled) {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(40, 44, 56, 0.95);
  color: #fff;
}
.category-section__nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.category-section__nav.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
}
.category-section__nav-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
}

/* В категории больше 5 карточек — видно ровно 5 карточек, прокрутка на следующие 5 */
.category-section__cards.sites-grid.category-section__cards--scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  grid-template-columns: unset;
  gap: 1.35rem;
  padding: 0 0 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-sizing: border-box;
}
.category-section__cards.sites-grid.category-section__cards--scroll::-webkit-scrollbar {
  display: none;
}
.category-section__cards.sites-grid.category-section__cards--scroll .site-card {
  flex: 0 0 auto;
  min-width: 240px;
  width: 240px;
  box-sizing: border-box;
}

/* ===== Site cards ===== */
.sites {
  padding-bottom: 3rem;
}

/* Страница «Все сайты» — ссылка «Назад на главную» и заголовок */
.all-sites-page .sites--all {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
.all-sites-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1rem;
}
.all-sites-back:hover {
  color: var(--accent);
  text-decoration: underline;
}
.all-sites-page .all-sites-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 0 0 2.5rem;
  letter-spacing: -0.02em;
}
.all-sites-title--with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  overflow: visible;
}
.all-sites-title__icon {
  display: none;
  align-items: center;
  font-size: 1.35rem;
  line-height: 1;
  overflow: visible;
}
.all-sites-title__icon:not(:empty) {
  display: inline-flex;
}
/* Эмодзи в заголовке «Все сайты» — как у PNG-иконок категории */
.all-sites-title__icon:not(:has(.all-sites-title__icon-img)) {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  min-width: clamp(2.5rem, 6vw, 3.25rem);
  justify-content: center;
}
.all-sites-title__icon-img {
  width: clamp(2.5rem, 6vw, 3.25rem);
  height: clamp(2.5rem, 6vw, 3.25rem);
  object-fit: contain;
  vertical-align: middle;
}

.all-sites-subcats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.all-sites-subcat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.all-sites-subcat:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  text-decoration: none;
}

.all-sites-subcat__icon,
.all-sites-subcat__emoji {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  font-size: 1.5rem;
  line-height: 1;
}

.sites-grid--all {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.35rem;
}
@media (max-width: 1200px) {
  .sites-grid--all {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .sites-grid--all {
    grid-template-columns: 1fr;
  }
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.35rem;
  align-items: stretch;
}

.site-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.site-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

/* Формат карточек: как TRADEIT — единая высота под блок промокода (бейдж + код). */
.site-card--promo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 360px;
}

.site-card--promo:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
}

/* Поле логотипа: увеличенная высота, плавные скругления */
.site-card--promo .card-logo-area {
  position: relative;
  width: 100%;
  height: 8rem;
  min-height: 8rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-card) 100%);
}

.site-card--promo .card-logo-area::before {
  transition: background 0.25s ease;
}

.site-card--promo .card-logo-area__inner .card-logo__img,
.site-card--promo .card-logo-area__inner .card-logo__text {
  transition: filter 0.25s ease, text-shadow 0.25s ease;
}

/* Свечение за логотипом в карточке: заметное оранжево-янтарное свечение */
.site-card--promo .card-logo-area::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    rgba(139, 92, 246, 0.25) 0%,
    rgba(139, 92, 246, 0.1) 35%,
    rgba(20, 184, 166, 0.04) 55%,
    transparent 75%
  );
  pointer-events: none;
}

/* Свечение цветом лого (авто из картинки) — в тон логотипу */
.site-card--promo .card-logo-area.has-glow::before {
  background: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    color-mix(in srgb, var(--card-glow) 16%, transparent) 0%,
    color-mix(in srgb, var(--card-glow) 6%, transparent) 40%,
    color-mix(in srgb, var(--card-glow) 2%, transparent) 60%,
    transparent 78%
  );
}

.site-card--promo .card-logo-area__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6rem;
  width: 100%;
  box-sizing: border-box;
}

.site-card--promo .card-logo-area__inner .card-logo__img {
  max-height: 7rem;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.25)) drop-shadow(0 0 20px rgba(125, 211, 252, 0.06));
}

.site-card--promo .card-logo-area.has-glow .card-logo__img {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--card-glow) 16%, transparent)) drop-shadow(0 0 22px color-mix(in srgb, var(--card-glow) 7%, transparent));
}

.site-card--promo .card-logo-area__inner .card-logo__text {
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 16px rgba(139, 92, 246, 0.25), 0 0 32px rgba(125, 211, 252, 0.08);
  line-height: 1.2;
}

.site-card--promo .card-logo-area.has-glow .card-logo__text {
  text-shadow: 0 0 16px color-mix(in srgb, var(--card-glow) 16%, transparent), 0 0 32px color-mix(in srgb, var(--card-glow) 7%, transparent);
}

/* Подсветка лого при наведении на карточку */
.site-card--promo:hover .card-logo-area::before {
  background: radial-gradient(
    ellipse 90% 90% at 50% 50%,
    rgba(139, 92, 246, 0.35) 0%,
    rgba(139, 92, 246, 0.15) 40%,
    rgba(20, 184, 166, 0.06) 60%,
    transparent 75%
  );
}

.site-card--promo:hover .card-logo-area.has-glow::before {
  background: radial-gradient(
    ellipse 90% 90% at 50% 50%,
    color-mix(in srgb, var(--card-glow) 28%, transparent) 0%,
    color-mix(in srgb, var(--card-glow) 12%, transparent) 40%,
    color-mix(in srgb, var(--card-glow) 4%, transparent) 60%,
    transparent 78%
  );
}

.site-card--promo:hover .card-logo-area__inner .card-logo__img {
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.4)) drop-shadow(0 0 28px rgba(125, 211, 252, 0.12));
}

.site-card--promo:hover .card-logo-area.has-glow .card-logo__img {
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--card-glow) 28%, transparent)) drop-shadow(0 0 30px color-mix(in srgb, var(--card-glow) 12%, transparent));
}

.site-card--promo:hover .card-logo-area__inner .card-logo__text {
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.35), 0 0 40px rgba(125, 211, 252, 0.1);
}

.site-card--promo:hover .card-logo-area.has-glow .card-logo__text {
  text-shadow: 0 0 20px color-mix(in srgb, var(--card-glow) 28%, transparent), 0 0 40px color-mix(in srgb, var(--card-glow) 12%, transparent);
}

.site-card--promo .card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.5rem 0.75rem 0.35rem;
  padding: 0;
}

/* Блок промокода — фиолетовый, в стиле акцента. Высота под контент (бейдж + промокод). */
.site-card--promo .card-promo-block {
  width: 92%;
  max-width: none;
  min-height: 2.4rem;
  margin: 0 auto 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-self: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s ease;
}

.site-card--promo .card-promo-block:hover {
  background: #7c3aed;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-3px);
}

.site-card--promo .card-promo-block:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.site-card--promo .card-promo-block__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.site-card--promo .card-promo-block .card-promo-field {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  gap: 0.5rem;
}

.site-card--promo .card-promo-block .card-promo-field__code {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.site-card--promo .card-promo-block .card-promo-field__copy {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.site-card--promo .card-promo-block .card-promo-field__copy svg {
  width: 18px;
  height: 18px;
  display: block;
}

.site-card--promo .card-promo-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 1.5rem);
  max-width: 100%;
  margin: 0 0.75rem 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  gap: 0.5rem;
}

.site-card--promo .card-promo-field__code {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e6ec;
  letter-spacing: 0.02em;
}

.site-card--promo .card-promo-field__copy {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.8;
  color: #94a3b8;
}

.site-card--promo .card-promo-field__copy:hover {
  opacity: 1;
  color: #fff;
}

.site-card--promo .card-bonus-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0.85rem 0.75rem;
  line-height: 1.4;
  flex: 1;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ряд из двух одинаковых кнопок — как на референсе */
.site-card--promo .card-actions-row {
  display: flex;
  gap: 0.6rem;
  width: 92%;
  margin: 0 auto;
  margin-top: auto;
  padding: 0 0 0.5rem;
}

.site-card--promo .card-actions-row .btn {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  display: block;
  transition: transform 0.2s ease;
}

.site-card--promo .btn-card-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-card--promo .btn-card-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
}

/* Кнопка «Перейти» — красная, в одном стиле с блоком промокода */
.site-card--promo .btn-card-cta {
  margin-top: auto;
  padding: 0.7rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  display: block;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s ease;
}

.site-card--promo .btn-card-cta--solo {
  width: 92%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

.site-card--promo .card-actions-row .btn-card-cta {
  margin-top: 0;
}

.site-card--promo .btn-card-cta:hover {
  color: #fff;
  background: #7c3aed;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  transform: translateY(-3px);
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--cyan-soft);
  color: var(--link);
}

.badge.bonus {
  background: rgba(139, 92, 246, 0.22);
  color: var(--accent-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rating-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 0.5em;
  line-height: 1.5;
}

.card-withdraw {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0 0 1rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  color: #0a0a0a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Страница обзора: свечение за лого в сайдбаре и анимации кнопок */
.review-sidebar-site-logo::before {
  content: "";
  position: absolute;
  inset: -15%;
  z-index: 0;
  background: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    rgba(139, 92, 246, 0.28) 0%,
    rgba(139, 92, 246, 0.12) 40%,
    rgba(20, 184, 166, 0.05) 60%,
    transparent 78%
  );
  pointer-events: none;
  transition: background 0.25s ease;
}

.review-sidebar-site-logo.has-glow::before {
  background: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    color-mix(in srgb, var(--card-glow) 18%, transparent) 0%,
    color-mix(in srgb, var(--card-glow) 8%, transparent) 45%,
    color-mix(in srgb, var(--card-glow) 2%, transparent) 65%,
    transparent 80%
  );
}

.review-sidebar-site-logo img {
  transition: filter 0.25s ease;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.28)) drop-shadow(0 0 18px rgba(125, 211, 252, 0.08));
}
.review-sidebar-site-logo.has-glow img {
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--card-glow) 18%, transparent)) drop-shadow(0 0 20px color-mix(in srgb, var(--card-glow) 8%, transparent));
}

.review-sidebar-site-logo .review-logo {
  transition: text-shadow 0.25s ease;
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.28), 0 0 28px rgba(125, 211, 252, 0.08);
}
.review-sidebar-site-logo.has-glow .review-logo {
  text-shadow: 0 0 14px color-mix(in srgb, var(--card-glow) 18%, transparent), 0 0 28px color-mix(in srgb, var(--card-glow) 8%, transparent);
}

.review-sidebar .sidebar-buttons .btn {
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.review-sidebar .sidebar-buttons .btn-primary:hover,
.review-sidebar .sidebar-buttons .btn-review-go:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}
.review-sidebar .sidebar-buttons .btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Иконка «копировать» (буфер обмена) — везде одинаковый вид */
.icon-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-copy svg {
  width: 18px;
  height: 18px;
  display: block;
  vertical-align: middle;
}
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== Info section ===== */
.info {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(20, 184, 166, 0.02) 50%, transparent 100%);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-block {
  padding-left: 1rem;
  border-left: 3px solid var(--border-light);
  border-radius: 0 8px 8px 0;
}
.info-block:nth-child(1) { border-left-color: var(--accent); }
.info-block:nth-child(2) { border-left-color: var(--teal); }
.info-block:nth-child(3) { border-left-color: var(--link); }

.info-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem;
}

.info-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  padding: 2.5rem 0 2rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.03);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.footer-logo:hover { color: var(--text); text-decoration: none; }

.footer-logo-accent {
  color: var(--accent);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.footer-social a:hover { color: var(--accent); background: rgba(255, 255, 255, 0.06); text-decoration: none; }

.footer-social svg { width: 20px; height: 20px; display: block; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.footer-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.footer-nav a:hover { color: var(--link); text-decoration: none; }

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 720px;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
  opacity: 0.8;
}

/* ===== Copy toast ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(20, 184, 166, 0.2);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 200;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  body {
    padding-top: 4.35rem;
  }

  .header-inner {
    padding: 0.35rem 0.85rem;
    gap: 0.65rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .logo-img {
    height: 3.35rem;
    transform: scale(1.06);
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-actions {
    margin-left: 0;
  }

  /* Выдвижная панель навигации */
  .nav-main {
    position: fixed;
    top: 0;
    right: 0;
    width: min(90vw, 320px);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 4.75rem 1rem 1.5rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.2rem;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 200;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s;
  }

  .header.is-menu-open .nav-main {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-main .nav-link {
    display: block;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.95rem;
    min-height: 2.75rem;
    line-height: 1.35;
  }

  .sites-grid,
  .category-section__cards.sites-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .sites-grid,
  .category-section__cards.sites-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav { justify-content: flex-start; }
}

/* ===== Wiki-skins: сетка каталога; отступ сайдбара задаётся в wiki-skins.html ===== */
#skins-section .skins-layout { align-items: start; }
#skins-section .skins-sidebar {
  align-self: start !important;
}
