/* AlteraK — публичная тема сайта alterak.ru (порт с WordPress-темы AlteraK Music) */

:root {
  --bg: #07070f;
  --bg-2: #0c0c1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #edeaf7;
  --muted: #9b98b6;
  --accent: #8b5cf6;
  --accent-2: #d946ef;
  --accent-3: #22d3ee;
  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Unbounded", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 12% -6%, rgba(139, 92, 246, 0.16), transparent 65%),
    radial-gradient(650px 400px at 88% 4%, rgba(34, 211, 238, 0.10), transparent 65%),
    radial-gradient(900px 600px at 50% 110%, rgba(217, 70, 239, 0.08), transparent 70%),
    var(--bg);
}

a { color: var(--accent-3); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(9, 9, 20, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s, background 0.25s;
}

.site-header.is-scrolled {
  background: rgba(9, 9, 20, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-brand img.custom-logo { max-height: 42px; width: auto; }

.site-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-title a {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-title a:hover { filter: brightness(1.15); }

.site-description {
  display: none;
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

@media (min-width: 900px) { .site-description { display: inline-block; } }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }

.main-nav a {
  display: block;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.93rem;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--text);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 22, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 12px 24px 20px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 96px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-glow--1 { width: 480px; height: 480px; background: rgba(139, 92, 246, 0.35); top: -160px; left: -120px; animation: drift 14s ease-in-out infinite alternate; }
.hero-glow--2 { width: 420px; height: 420px; background: rgba(217, 70, 239, 0.28); top: 40px; right: -140px; animation: drift 18s ease-in-out infinite alternate-reverse; }
.hero-glow--3 { width: 360px; height: 360px; background: rgba(34, 211, 238, 0.20); bottom: -180px; left: 38%; animation: drift 22s ease-in-out infinite alternate; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(50px, 30px) scale(1.12); }
}

.hero-inner { position: relative; text-align: center; max-width: 880px; margin: 0 auto; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 12px var(--accent-3);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  font-weight: 800;
  margin: 26px 0 18px;
  letter-spacing: -0.01em;
}

.hero-title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-text { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto 34px; }

.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(217, 70, 239, 0.45); color: #fff; }

.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

/* Equalizer */

.eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  height: 54px;
  margin-top: 52px;
}

.eq span {
  width: 7px;
  border-radius: 4px 4px 0 0;
  background: var(--grad);
  opacity: 0.85;
  animation: eq-bounce 1.1s ease-in-out infinite;
  transform-origin: bottom;
}

.eq span:nth-child(1)  { height: 40%; animation-delay: 0s; }
.eq span:nth-child(2)  { height: 75%; animation-delay: 0.12s; }
.eq span:nth-child(3)  { height: 55%; animation-delay: 0.24s; }
.eq span:nth-child(4)  { height: 95%; animation-delay: 0.06s; }
.eq span:nth-child(5)  { height: 65%; animation-delay: 0.3s; }
.eq span:nth-child(6)  { height: 85%; animation-delay: 0.18s; }
.eq span:nth-child(7)  { height: 45%; animation-delay: 0.36s; }
.eq span:nth-child(8)  { height: 70%; animation-delay: 0.09s; }
.eq span:nth-child(9)  { height: 50%; animation-delay: 0.27s; }
.eq span:nth-child(10) { height: 90%; animation-delay: 0.15s; }
.eq span:nth-child(11) { height: 60%; animation-delay: 0.33s; }
.eq span:nth-child(12) { height: 35%; animation-delay: 0.21s; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

/* Chips (категории) */

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chip:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); }

/* ---------- Section ---------- */

.section { padding: 56px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--grad);
}

.section-link { color: var(--muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.section-link:hover { color: var(--accent-3); }

/* ---------- Post cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.card-thumb--empty {
  background:
    radial-gradient(320px 200px at 30% 20%, rgba(139, 92, 246, 0.4), transparent 70%),
    radial-gradient(320px 220px at 80% 90%, rgba(34, 211, 238, 0.25), transparent 70%),
    var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb--empty .note {
  font-size: 2.6rem;
  opacity: 0.5;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(7, 7, 15, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-cat:hover { color: var(--accent-3); }

.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-title { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.4; font-weight: 700; }

.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-3); }

.card-excerpt { color: var(--muted); font-size: 0.92rem; margin: 0; }


/* ---------- News cards: neon highlight ---------- */

@media (prefers-reduced-motion: no-preference) {
  .card--news {
    animation: news-neon 2.6s ease-in-out infinite;
  }
}

.card--news {
  border-color: rgba(217, 70, 239, 0.38);
}

@keyframes news-neon {
  0%, 100% {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow:
      0 0 0 1px rgba(139, 92, 246, 0.28),
      0 0 16px rgba(139, 92, 246, 0.22),
      0 0 34px rgba(34, 211, 238, 0.12);
  }
  50% {
    border-color: rgba(217, 70, 239, 0.6);
    box-shadow:
      0 0 0 1px rgba(217, 70, 239, 0.35),
      0 0 24px rgba(217, 70, 239, 0.3),
      0 0 52px rgba(139, 92, 246, 0.18);
  }
}

.card--news:hover {
  animation: none;
  border-color: rgba(217, 70, 239, 0.75);
  box-shadow:
    0 0 0 1px rgba(217, 70, 239, 0.45),
    0 0 28px rgba(217, 70, 239, 0.35),
    0 18px 44px rgba(0, 0, 0, 0.5);
}

.card-cat--news {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow:
    0 0 14px rgba(139, 92, 246, 0.55),
    0 0 4px rgba(217, 70, 239, 0.45);
}

.card-cat--news:hover { color: #fff; }

/* ---------- Archive / list header ---------- */

.page-head {
  padding: calc(var(--header-h) + 56px) 0 24px;
  text-align: center;
}

.page-head .container { max-width: 880px; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 10px;
}

.page-desc { color: var(--muted); margin: 0 auto; max-width: 640px; }

.page-title .grad,
.entry-title .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Single / page content ---------- */

.content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 48px) 24px 40px;
}

.content-wrap--wide { max-width: 1000px; }

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent-3); }

.entry-meta .sep { opacity: 0.4; }

.entry-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.entry-thumb img { width: 100%; display: block; }

/* Prose */

.entry-content { font-size: 1.02rem; }

.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote,
.entry-content > figure,
.entry-content > h1, .entry-content > h2, .entry-content > h3,
.entry-content > h4, .entry-content > h5, .entry-content > h6 { margin-top: 0; }

.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 1.25em; }

.entry-content a { text-decoration: underline; text-decoration-color: rgba(34, 211, 238, 0.4); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--accent-2); }

.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-display);
  margin: 1.9em 0 0.7em;
  line-height: 1.3;
}

.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.22rem; }
.entry-content h4 { font-size: 1.05rem; }

.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.45em; }
.entry-content li::marker { color: var(--accent); }

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  color: var(--muted);
  font-style: italic;
}

.entry-content img { border-radius: var(--radius-sm); }

.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { color: var(--muted); font-size: 0.85rem; text-align: center; margin-top: 10px; }

.entry-content code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.88em;
}

.entry-content pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.entry-content pre code { background: none; border: none; padding: 0; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.93rem; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--surface-2); font-weight: 700; }

.entry-content hr { border: none; height: 1px; background: var(--border); margin: 2.2em 0; }

.entry-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px; }

.entry-tags a {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.entry-tags a:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Post nav ---------- */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.post-nav div { min-width: 0; }
.post-nav .nav-next { text-align: right; }

.post-nav span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }

.post-nav a { color: var(--text); font-weight: 700; font-size: 0.95rem; line-height: 1.35; display: block; }
.post-nav a:hover { color: var(--accent-3); }

@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav .nav-next { text-align: left; } }

/* ---------- Pagination ---------- */

.pagination, .posts-navigation {
  margin-top: 44px;
  display: flex;
  justify-content: center;
}

.nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

a.page-numbers:hover { color: var(--text); border-color: var(--accent); }

.page-numbers.current {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

/* ---------- Search form ---------- */

.search-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.search-field {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 12px 20px;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-field:focus { border-color: var(--accent); }

.search-submit {
  background: var(--grad);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.95rem;
}

.search-submit:hover { filter: brightness(1.1); }

/* ---------- Comments ---------- */

.comments-area { margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--border); }

.comments-title, .comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.comment-list { list-style: none; margin: 0; padding: 0; }

.comment-list .comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.comment-list .children { list-style: none; margin: 14px 0 0; padding-left: 22px; }

.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

.comment-author img { border-radius: 50%; }

.comment-author .fn { font-weight: 700; font-style: normal; color: var(--text); }

.comment-metadata { font-size: 0.78rem; }
.comment-metadata a { color: var(--muted); }

.comment-content { color: var(--text); font-size: 0.95rem; }

.comment-content p { margin: 0 0 0.6em; }

.reply a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comment-form label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  margin-bottom: 16px;
}

.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }

.comment-form .submit {
  background: var(--grad);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  padding: 13px 30px;
  cursor: pointer;
  font-size: 0.95rem;
}

.comment-notes, .logged-in-as { color: var(--muted); font-size: 0.85rem; }

/* ---------- 404 / no results ---------- */

.no-results { text-align: center; padding: 70px 20px; }

.no-results .big {
  font-size: 5rem;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-family: var(--font-display);
  font-weight: 800;
}

.no-results h2 { font-family: var(--font-display); }

.no-results .search-form { margin-top: 26px; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05), transparent 40%), var(--bg-2);
  position: relative;
}

.footer-wave { display: block; width: 100%; height: 40px; margin-top: -1px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0 30px;
}

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

.footer-brand .site-title { font-size: 1.15rem; }

.footer-about { color: var(--muted); font-size: 0.92rem; margin-top: 12px; max-width: 380px; }

.footer-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-menu ul, .footer-widget ul { list-style: none; margin: 0; padding: 0; }

.footer-menu li, .footer-widget li { margin-bottom: 9px; }

.footer-menu a, .footer-widget a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.footer-menu a:hover, .footer-widget a:hover { color: var(--accent-3); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent-3); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .eq span, .hero-kicker .dot, .hero-glow { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Misc ---------- */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 999;
}

.skip-link:focus { left: 0; }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a44; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ============================================================
   Дополнения для Django-версии сайта
   ============================================================ */

/* ============================================================
   Django-часть: дополнения к теме для шаблонов alterak-cms.
   Все стили опираются на переменные темы выше.
   ============================================================ */

/* ---------- Шапка: кнопки аккаунта ---------- */

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.user-menu { display: flex; align-items: center; gap: 10px; }

.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex: 0 0 auto;
}

.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip:hover .user-name { color: var(--text); }

.btn--sm { padding: 8px 16px; font-size: 0.82rem; }

@media (max-width: 640px) {
    .user-name { display: none; }
    .header-actions .btn--sm { padding: 7px 12px; }
}

/* ---------- Отступ под фиксированной шапкой ---------- */

.page-body { padding: calc(var(--header-h) + 48px) 0 48px; }

.page-head-inner { max-width: 880px; margin: 0 auto 30px; text-align: center; }
.page-head-inner .page-title { margin-bottom: 10px; }
.page-head-inner .hero-kicker { margin-bottom: 18px; }

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-3); }
.breadcrumbs .sep { opacity: 0.4; }

/* Старый eyebrow = kicker темы */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); }

/* ---------- Фильтры и поиск списка ---------- */

.filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter-tab:hover { color: var(--text); border-color: var(--accent); }
.filter-tab.is-active { background: var(--grad); border-color: transparent; color: #fff; }

.filters .search-form { margin: 0; max-width: 420px; flex: 1; min-width: 260px; }
.filters .search-field { border-radius: 999px; }
.filters .search-submit { padding: 11px 20px; font-size: 0.88rem; }

.cat-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.cat-filter-label,
.cat-filter-group {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.cat-filter-group { margin-left: 8px; }

.cat-chip {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cat-chip:hover { color: var(--text); border-color: var(--accent); }
.cat-chip.is-active { background: var(--grad); border-color: transparent; color: #fff; }
.cat-chip-count { opacity: 0.7; font-size: 0.75rem; }

/* ---------- Формы ---------- */

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-top: 26px;
}
.form-card h2, .form-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.1rem; }
.form-hint { font-size: 0.85rem; color: var(--muted); margin: 0 0 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 14px; }
.field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="search"],
.field input[type="number"],
.field textarea,
.field select,
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card textarea {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea, .form-card textarea { resize: vertical; min-height: 110px; line-height: 1.6; }

.field input:focus, .field textarea:focus, .field select:focus,
.form-card input:focus, .form-card textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.field .errorlist, .form-card .errorlist {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--accent-2);
}

.form-errors {
    background: rgba(217, 70, 239, 0.12);
    border: 1px solid rgba(217, 70, 239, 0.4);
    color: #f5c6f0;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
}

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.form-note { font-size: 0.8rem; color: var(--muted); }
.form-note a { color: var(--accent-3); }

/* Капча-картинка (вход/регистрация/контакты) */
.captcha-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.captcha-image {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

/* ---------- Капча-ползунок ---------- */

.captcha { margin: 6px 0 16px; }
.captcha-track {
    position: relative;
    height: 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    align-items: center;
    user-select: none;
}
.captcha-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.35), rgba(217, 70, 239, 0.45));
    transition: width 0.08s linear;
}
.captcha-text {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    pointer-events: none;
}
.captcha input[type="range"] {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: grab;
    margin: 0;
}
.captcha.is-done .captcha-fill { background: linear-gradient(90deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.5)); }
.captcha.is-done .captcha-text { color: var(--accent-3); font-weight: 700; }

/* ---------- Сообщения (тосты) ---------- */

.messages {
    position: fixed;
    top: calc(var(--header-h) + 12px);
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}
.message {
    background: rgba(12, 12, 26, 0.92);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: message-in 0.25s ease both;
}
.message.success { border-left-color: var(--accent-3); }
.message.error { border-left-color: var(--accent-2); }
@keyframes message-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Комментарии (публичная часть) ---------- */

.comments-area { max-width: 780px; margin: 0 auto; }

.comments-title { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; }
.comments-title .count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { margin-bottom: 14px; }
.comment-list .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    flex: 0 0 auto;
}
.comment-metadata { font-size: 0.76rem; color: var(--muted); }
.comment-content p { margin: 0 0 0.5em; white-space: pre-line; overflow-wrap: anywhere; }
.comment-content p:last-child { margin-bottom: 0; }

.comments-empty { color: var(--muted); font-size: 0.9rem; }

/* ---------- Пагинация и «Показать ещё» ---------- */

.pagination { margin-top: 40px; display: flex; justify-content: center; }
.page-numbers.is-disabled { opacity: 0.4; pointer-events: none; }
.page-numbers.dots, .page-numbers.is-gap { border-color: transparent; background: transparent; pointer-events: none; }

.list-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 26px; }
.list-more-status { margin: 0; font-size: 0.82rem; color: var(--muted); }
.list-more.is-done [data-list-more-btn],
.list-more [data-list-more-btn][hidden] { display: none; }
.list-more.is-loading [data-list-more-btn] { opacity: 0.55; pointer-events: none; }
.list-more.is-loading .list-more-status { color: var(--accent-3); }
.list-more.is-error .list-more-status { color: var(--accent-2); }

/* Номера страниц остаются в разметке для браузеров без JS; с JS их прячет лента */
html.js-infinite .pagination[data-list-pagination] { display: none; }

/* ---------- Статья ---------- */

.article.content-wrap { max-width: 780px; }

.entry-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.entry-lead {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    margin: 0 0 28px;
}
.entry-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}
.article-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Встроенные видео в контенте */
.video-embed {
    margin: 22px 0;
    aspect-ratio: 16 / 9;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-embed--vertical { aspect-ratio: 9 / 16; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ---------- Контакты ---------- */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 26px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.contact-item .ic {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--accent-3);
    font-size: 0.8rem;
    font-weight: 800;
}
.contact-item .lbl { display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 3px; }
.contact-item .val { color: var(--text); font-size: 0.92rem; }
.contact-form-card { padding: 26px; }
.contact-form-card h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 6px; }

@media (max-width: 860px) {
    .contact-layout { grid-template-columns: 1fr; }
}

/* ---------- О проекте ---------- */

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 30px;
    align-items: start;
    margin-top: 10px;
}
.about-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.7; margin: 0 0 18px; }
.donation-wrap--about .donation-card { padding: 18px; }

@media (max-width: 1024px) {
    .about-layout { grid-template-columns: 1fr; }
    .about-aside .donation-card { max-width: 360px; margin: 0 auto; }
}

/* ---------- Аккаунт: вход, регистрация, профиль ---------- */

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 36px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto;
}
.auth-layout--narrow { grid-template-columns: minmax(0, 560px); justify-content: center; }

.auth-aside h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 16px 0 12px; }
.auth-aside p { color: var(--muted); }

.auth-points { list-style: none; margin: 16px 0 22px; padding: 0; color: var(--muted); font-size: 0.92rem; }
.auth-points li { margin-bottom: 8px; padding-left: 22px; position: relative; }
.auth-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--grad);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}
.auth-card h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 6px; }
.auth-card--center { text-align: center; }
.auth-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.auth-hint { color: var(--muted); font-size: 0.88rem; }
.auth-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.auth-help { margin-top: -6px; margin-bottom: 14px; }
.auth-help code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.85em; }

.profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    max-width: 980px;
    margin: 0 auto 26px;
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    flex: 0 0 auto;
}
.profile-title h1 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 4px; }
.profile-title p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.profile-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
}

.profile-groups { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.us-badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}
.us-badge--info { border-color: rgba(139, 92, 246, 0.55); }
.us-badge--off { color: var(--muted); }

.access-summary { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.access-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.access-block h3 { margin: 0 0 10px; font-size: 0.95rem; }
.access-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 0.86rem; border-bottom: 1px dashed var(--border); }
.access-row:last-child { border-bottom: 0; }
.access-name { color: var(--text); font-weight: 600; }
.access-actions { color: var(--muted); text-align: right; }

@media (max-width: 860px) {
    .auth-layout { grid-template-columns: 1fr; }
    .profile-actions { margin-left: 0; }
}

/* ---------- Сбор денег (ЮMoney) ---------- */

.donation-wrap { margin: 0 auto 30px; }
.donation-wrap--home-sidebar {
    max-width: var(--container);
    margin: 0 auto 30px;
    padding: 0 24px;
}
.donation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.donation-title { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 6px; }
.donation-desc { color: var(--muted); font-size: 0.9rem; max-width: 520px; margin: 0 auto 16px; }
.donation-widget { position: relative; max-width: 100%; margin: 0 auto; overflow: hidden; }
.donation-widget iframe { display: block; margin: 0 auto; }

.donation-card--soft { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4); }

.donation-card--glow { animation: donation-glow 3.2s ease-in-out infinite; }
@keyframes donation-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.28), 0 0 12px rgba(139, 92, 246, 0.18); }
    50% { box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.48), 0 0 26px rgba(217, 70, 239, 0.32); }
}

.donation-card--shine { position: relative; overflow: hidden; }
.donation-card--shine::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(105deg, transparent, rgba(34, 211, 238, 0.14), transparent);
    transform: skewX(-18deg);
    animation: donation-shine 4.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes donation-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }

.donation-card--pulse { animation: donation-pulse 2.6s ease-in-out infinite; }
@keyframes donation-pulse {
    0%, 100% { border-color: var(--border); }
    50% { border-color: rgba(139, 92, 246, 0.7); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14); }
}

.donation-card--lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.donation-card--lift:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }

/* ---------- Партнёрский блок «Яндекс Браузер» ---------- */

.promo {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px 14px;
    margin-top: 30px;
}
.promo-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.promo-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fc3f1d;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}
.promo-text { min-width: 0; }
.promo-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin: 0; }
.promo-desc { margin: 4px 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--muted); }
.promo-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.promo-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4); }
.promo-link { font-size: 0.85rem; font-weight: 600; color: var(--accent-3); white-space: nowrap; }
.promo-link:hover { color: var(--accent-2); }
.promo-erid { display: block; margin-top: 10px; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--muted); }

.promo--card .promo-actions { flex-direction: column; align-items: stretch; gap: 9px; }
.promo--card .promo-link { text-align: center; }

.promo--strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 20px;
    max-width: 780px;
    margin: 34px auto 0;
    padding: 14px 18px;
}
.promo--strip .promo-actions { margin-top: 0; }
.promo--strip .promo-erid { grid-column: 1 / -1; margin-top: 4px; }

.footer-promo { color: var(--muted); }
.footer-promo a { color: var(--muted); text-decoration: underline; }

@media (max-width: 760px) {
    .promo--strip { grid-template-columns: 1fr; gap: 12px; margin-top: 26px; }
    .promo--strip .promo-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .promo--strip .promo-link { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .donation-card--glow,
    .donation-card--pulse,
    .donation-card--shine::after { animation: none; }
    .donation-card--lift { transition: none; }
}

/* ---------- Просмотр картинок (img-zoom) ---------- */

html.is-zoom-open { overflow: hidden; }

.prose img.is-zoomable,
.entry-thumb img.is-zoomable { cursor: zoom-in; }
.prose img.is-zoomable:hover,
.entry-thumb img.is-zoomable:hover { filter: brightness(1.06); }
.prose img.is-zoomable:focus-visible,
.entry-thumb img.is-zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.img-zoom {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2.5vw, 40px);
}
.img-zoom[hidden] { display: none; }

.img-zoom__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 14, 0.9);
    -webkit-backdrop-filter: blur(8px) saturate(0.9);
    backdrop-filter: blur(8px) saturate(0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.img-zoom.is-visible .img-zoom__backdrop { opacity: 1; }
.img-zoom.is-closing .img-zoom__backdrop { opacity: 0; transition-duration: 0.18s; }

.img-zoom__stage {
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    pointer-events: none;
}

.img-zoom__img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--zoom-w, 94vw);
    max-height: 84vh;
    max-height: min(84vh, calc(100dvh - 130px));
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.3s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-zoom.is-effect-scale .img-zoom__img { transform: scale(0.78); }
.img-zoom.is-effect-fade .img-zoom__img { transform: none; }
.img-zoom.is-effect-slide .img-zoom__img { transform: translateY(38px) scale(0.97); }
.img-zoom.is-effect-flip .img-zoom__img {
    transform: perspective(1400px) rotateY(-82deg) scale(0.92);
    transform-origin: center center;
    transition: opacity 0.3s ease, transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-zoom.is-visible .img-zoom__img { opacity: 1; transform: none; }

.img-zoom.is-closing .img-zoom__img {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.16s ease, transform 0.2s ease;
}

.img-zoom__caption {
    max-width: min(84vw, 900px);
    padding: 0 4px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(226, 231, 244, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease 0.08s;
}
.img-zoom__caption:empty { display: none; }
.img-zoom.is-visible .img-zoom__caption { opacity: 1; }

.img-zoom__close,
.img-zoom__nav {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(22, 26, 44, 0.74);
    color: #eef1fa;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: background 0.16s ease, transform 0.16s ease, opacity 0.22s ease;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.img-zoom.is-visible .img-zoom__close,
.img-zoom.is-visible .img-zoom__nav { opacity: 1; }
.img-zoom__close:hover,
.img-zoom__nav:hover { background: rgba(82, 62, 140, 0.94); }
.img-zoom__close:focus-visible,
.img-zoom__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.img-zoom__close { top: clamp(10px, 2.5vw, 24px); right: clamp(10px, 2.5vw, 24px); font-size: 24px; }
.img-zoom__nav { top: 50%; transform: translateY(-50%); }
.img-zoom__nav:hover { transform: translateY(-50%) scale(1.06); }
.img-zoom__nav--prev { left: clamp(6px, 1.4vw, 22px); }
.img-zoom__nav--next { right: clamp(6px, 1.4vw, 22px); }
.img-zoom__nav[hidden] { display: none; }

.img-zoom__counter {
    position: absolute;
    left: 50%;
    bottom: clamp(10px, 2.4vw, 22px);
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(20, 24, 40, 0.68);
    color: rgba(232, 236, 248, 0.88);
    font-size: 12px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.img-zoom.is-visible .img-zoom__counter { opacity: 1; }
.img-zoom__counter:empty { display: none; }

.img-zoom.is-closing .img-zoom__close,
.img-zoom.is-closing .img-zoom__nav,
.img-zoom.is-closing .img-zoom__counter { opacity: 0; }

@media (max-width: 760px) {
    .img-zoom { padding: 6px; }
    .img-zoom__img { max-width: var(--zoom-w, 98vw); max-height: min(76vh, calc(100dvh - 120px)); }
    .img-zoom__close { width: 38px; height: 38px; }
    .img-zoom__nav { width: 34px; height: 34px; font-size: 18px; background: rgba(22, 26, 44, 0.62); }
    .img-zoom__caption { max-width: 92vw; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .img-zoom__img,
    .img-zoom__backdrop,
    .img-zoom__caption,
    .img-zoom__close,
    .img-zoom__nav { transition-duration: 0.01ms !important; }
}


/* ===== Голосования (polls) — стиль alterak-music ===== */
.poll-card { margin: 0; }
.poll-card--embed { margin: 18px 0; }
.poll-chip { display: inline-block; margin-bottom: 10px; }
.poll-question { font-family: var(--font-title, "Unbounded", sans-serif); font-size: 1.05rem; margin: 0 0 14px; }
.poll-closed-note { color: var(--muted, #999); font-size: .85rem; margin: 0 0 12px; }
.poll-form .poll-options { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.poll-option label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px; background: var(--surface-2, rgba(255,255,255,.02));
  cursor: pointer; transition: border-color .2s;
}
.poll-option label:hover { border-color: rgba(139,92,246,.45); }
.poll-option input[type="radio"] { accent-color: var(--accent, #8b5cf6); }
.poll-submit { margin-top: 2px; }
.poll-results { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.poll-result { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.poll-result-label { font-weight: 600; }
.poll-result.is-mine .poll-result-label { color: var(--accent, #8b5cf6); }
.poll-bar {
  grid-column: 1 / -1; display: block; height: 8px; border-radius: 99px;
  background: var(--surface-2, rgba(255,255,255,.06)); overflow: hidden;
}
.poll-bar-fill {
  display: block; height: 100%; border-radius: 99px;
  background: var(--grad, linear-gradient(120deg,#8b5cf6,#d946ef,#22d3ee));
}
.poll-result-count { font-size: .85rem; color: var(--muted, #999); }
.poll-total { color: var(--muted, #999); font-size: .85rem; margin: 8px 0 0; }
.polls-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.poll-card--embed.poll-card { max-width: 560px; }

/* ===== Спойлеры — порт alterak-spoilers ===== */
.ak-spoiler {
  margin: 18px 0;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
  background: var(--surface, #141420);
  overflow: hidden;
  transition: border-color .25s;
}
.ak-spoiler:hover { border-color: rgba(139,92,246,.45); }
.ak-spoiler-open { border-color: var(--accent, #8b5cf6); }
.ak-spoiler-toggle {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 18px;
  border: 0; background: none; color: var(--text, #eee);
  font: inherit; font-weight: 600; text-align: left; cursor: pointer; position: relative;
}
.ak-spoiler-toggle::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grad, linear-gradient(120deg,#8b5cf6,#d946ef,#22d3ee));
  opacity: 0; transition: opacity .25s;
}
.ak-spoiler-open .ak-spoiler-toggle::before,
.ak-spoiler-toggle:hover::before { opacity: 1; }
.ak-spoiler-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: none; border-radius: 50%; color: #fff;
  background: var(--grad, linear-gradient(120deg,#8b5cf6,#d946ef,#22d3ee));
  box-shadow: 0 0 10px rgba(139,92,246,.45);
  transition: transform .3s cubic-bezier(.25,.8,.25,1);
}
.ak-spoiler-open .ak-spoiler-icon { transform: rotate(135deg); }
.ak-spoiler-title { flex: 1; }
.ak-spoiler-body { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.25,.8,.25,1); }
.ak-spoiler-body.ak-spoiler-body-open { max-height: 2000px; transition: max-height .45s cubic-bezier(.25,.8,.25,1); }
.ak-spoiler-content { padding: 4px 20px 20px 58px; color: var(--text, #ddd); }
.ak-spoiler-content iframe { margin: 10px 0; max-width: 100%; }
.ak-spoiler-content a[target="_blank"] { text-decoration: underline dotted; }
.ak-spoiler-content a[target="_blank"]::before { content: "\25B6 "; color: var(--accent-3, #22d3ee); }
@media (max-width: 600px) { .ak-spoiler-content { padding-left: 20px; } }
@media (prefers-reduced-motion: reduce) { .ak-spoiler-icon, .ak-spoiler-body { transition: none; } }
