/* Templay — блог «Статьи». Подключается только на страницах blog/ (поверх style.css). */
:root {
  --tip-bg: #fff6d1;
  --note-bg: #e6f7ff;
  --quote-bg: #f1eaff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tip-bg: #3a3314;
    --note-bg: #14323f;
    --quote-bg: #2e2266;
  }
}

/* ---------- Шапка статьи ---------- */
.post-hero { padding: 40px 0 8px; }
.post-hero .container { max-width: 800px; }
.post-hero h1 { font-size: clamp(27px, 5.2vw, 44px); margin: 0 0 14px; overflow-wrap: break-word; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 22px; }
.post-meta span {
  font-weight: 800; font-size: 14px; padding: 4px 12px; border: 2px solid var(--line);
  border-radius: 999px; background: var(--surface);
}
.post-cover {
  margin: 0 0 8px; border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; background: var(--surface); line-height: 0;
}
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; }

/* ---------- Текст статьи ---------- */
.post { padding: 24px 0 24px; }
.post .container { max-width: 800px; }
.post-body {
  max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.7;
  overflow-wrap: break-word; hyphens: auto;
}
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.1em; }
.post-body p.lead { font-size: 21px; line-height: 1.55; color: var(--text); font-weight: 700; max-width: none; margin-bottom: 1.3em; }
.post-body h2 { font-size: clamp(22px, 3.4vw, 30px); margin: 1.9em 0 .6em; scroll-margin-top: 90px; }
.post-body h3 { font-size: clamp(18px, 2.6vw, 21px); margin: 1.6em 0 .5em; }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.post-body li { margin-bottom: .45em; padding-left: .2em; }
.post-body ul li::marker { color: var(--pink); font-size: 1.15em; }
.post-body ol li::marker { color: var(--purple); font-weight: 900; }
.post-body a { color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--pink); }
.post-body b { font-weight: 900; }
.post-body blockquote {
  margin: 1.6em 0; padding: 18px 22px; background: var(--quote-bg);
  border: 3px solid var(--line); border-left-width: 10px; border-left-color: var(--purple);
  border-radius: 16px; font-weight: 700; font-style: italic;
}
.post-body blockquote > :last-child { margin-bottom: 0; }
.post-body .tip, .post-body .note {
  margin: 1.6em 0; padding: 16px 20px 16px 58px; position: relative;
  border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); font-size: 17px; line-height: 1.6;
}
.post-body .tip { background: var(--tip-bg); }
.post-body .note { background: var(--note-bg); }
.post-body .tip::before, .post-body .note::before {
  position: absolute; left: 16px; top: 13px; font-size: 26px; line-height: 1.3;
}
.post-body .tip::before { content: "💡"; }
.post-body .note::before { content: "📌"; }
.post-body .tip > :last-child, .post-body .note > :last-child { margin-bottom: 0; }
.post-body .tip p, .post-body .note p { margin-bottom: .6em; }

/* ---------- Поделиться ---------- */
.share { max-width: 720px; margin: 36px auto 0; padding-top: 22px; border-top: 3px dashed var(--line); }
.share-title { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 15px; margin: 0 0 12px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-row .btn { padding: 9px 16px; font-size: 13px; border-radius: 12px; }
.share-row .btn-vk { background: #0077ff; color: #fff; }
.share-row .btn-tg { background: #27a7e7; color: #fff; }
.share-row .btn.copied { background: var(--lime); color: var(--ink); }

/* ---------- CTA ---------- */
.post-cta { padding: 16px 0 24px; }
.post-cta .container { max-width: 800px; }
.cta-card {
  background: var(--yellow); color: var(--ink); border: 3px solid var(--line); border-radius: 26px;
  box-shadow: 7px 7px 0 var(--ink); padding: 30px 30px 32px; position: relative; overflow: hidden;
}
.cta-card.is-purple { background: var(--purple); color: #fff; }
.cta-card.is-cyan { background: var(--cyan); }
.cta-card .sticker { background: var(--surface); color: var(--text); }
.cta-card h2 { font-size: clamp(22px, 3.6vw, 32px); margin: 0 0 10px; }
.cta-card p { margin: 0 0 18px; font-size: 18px; font-weight: 700; max-width: 560px; }
.cta-card .hero-actions { margin: 0; }
.cta-card .btn-ghost { color: var(--text); }
.cta-emoji { position: absolute; right: 22px; top: 14px; font-size: 72px; line-height: 1; rotate: 8deg; pointer-events: none; }
.cta-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 4px 0 22px; }
.cta-game {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--surface);
  border: 3px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s;
}
.cta-game:hover { transform: translateY(-3px) rotate(-.5deg); }
.cta-game img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 373; object-fit: cover; border-bottom: 3px solid var(--line); }
.cta-game span { padding: 10px 12px 12px; font-weight: 800; font-size: 14px; line-height: 1.3; }
.cta-game em { display: block; font-style: normal; font-weight: 800; font-size: 12px; color: var(--pink); margin-top: 4px; }

/* ---------- Ещё статьи / ВКонтакте ---------- */
.more { padding: 40px 0 8px; }
.more h2 { font-size: clamp(24px, 4vw, 34px); margin-bottom: 0; }
.vk-block { padding: 24px 0 64px; }
.vk-card {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between;
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px;
}
.vk-card h3 { margin: 0 0 4px; }
.vk-card p { margin: 0; color: var(--muted); font-weight: 600; max-width: 520px; }
.vk-card .btn { background: #0077ff; color: #fff; }

/* ---------- Список статей ---------- */
.blog-hero { padding: 48px 0 8px; }
.blog-hero h1 { margin-bottom: 14px; }
.post-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); margin: 34px 0 0; }
.post-card {
  display: flex; flex-direction: column; color: var(--text); text-decoration: none;
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .15s;
}
.post-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.post-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 3px solid var(--line); }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-meta { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.post-card h3 { font-size: 18px; line-height: 1.25; margin: 0 0 8px; }
.post-card p { margin: 0 0 14px; color: var(--muted); font-weight: 600; font-size: 15px; line-height: 1.5; }
.post-card .more-link { margin-top: auto; font-weight: 900; color: var(--purple); }
.post-card:hover .more-link { color: var(--pink); }
.blog-empty { margin-top: 30px; font-weight: 700; color: var(--muted); }
.blog-list { padding: 8px 0 72px; }
.blog-vk { padding-bottom: 72px; }

@media (max-width: 720px) {
  .post-hero { padding: 24px 0 4px; }
  .post-body { font-size: 17px; }
  .post-body p.lead { font-size: 19px; }
  .post-body .tip, .post-body .note { padding: 14px 16px 14px 50px; }
  .post-body .tip::before, .post-body .note::before { left: 12px; font-size: 24px; }
  .cta-card { padding: 22px 20px 24px; }
  .cta-emoji { font-size: 48px; right: 12px; top: 10px; }
  .cta-games { grid-template-columns: 1fr; }
  .cta-game { flex-direction: row; align-items: stretch; }
  .cta-game img { width: 42%; height: auto; min-height: 100%; flex: none; aspect-ratio: auto; border-bottom: 0; border-right: 3px solid var(--line); }
  .cta-game span { align-self: center; }
  .vk-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .post-card, .cta-game { transition: none; } }

/* Текущий пункт меню */
.nav a[aria-current="page"] { color: var(--pink); }
