/* Shared blog surface tokens — index + post pages */
:root {
  --blog-ink: #1b1f24;
  --blog-muted: #646b75;
  --blog-faint: #9ca3b0;
  --blog-line: #e8eaef;
  --blog-line-soft: rgba(0, 0, 255, 0.08);
  --blog-blue: #0000ff;
  --blog-blue-hover: #0000d6;
  --blog-surface: #ffffff;
  --blog-page: #f4f5f8;
  --blog-glow: rgba(0, 0, 255, 0.07);
  --blog-radius: 20px;
  --blog-radius-lg: 28px;
  /* Канон обложки: Open Graph 1200×630 ≈ 1.91:1 */
  --blog-cover-ratio: 191 / 100;
  --blog-cover-hint: '1200×630';
}

body.blog-index,
body.blog-post-page {
  background-color: var(--blog-page);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(0, 0, 255, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 45% at 92% 8%, rgba(59, 130, 246, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f8fb 0%, var(--blog-page) 42%, #f3f4f7 100%);
  background-attachment: fixed;
  color: var(--blog-ink);
  overflow-x: clip;
}

.blog-cta-band {
  background:
    linear-gradient(145deg, rgba(246, 248, 255, 0.95) 0%, rgba(238, 242, 255, 0.92) 100%);
  border-radius: var(--blog-radius-lg);
  padding: 48px 40px;
  text-align: center;
  margin: 28px 0 48px;
  border: 1px solid var(--blog-line-soft);
  position: relative;
  overflow: hidden;
}

.blog-cta-band::before {
  content: '';
  position: absolute;
  inset: -40% auto auto -20%;
  width: 55%;
  height: 90%;
  background: radial-gradient(circle, rgba(0, 0, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.blog-cta-band h2 {
  position: relative;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--blog-ink);
  margin: 0 0 12px;
}

.blog-cta-band p {
  position: relative;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--blog-muted);
  margin: 0 auto 24px;
  max-width: 36rem;
}

.blog-cta-band .cta-buttons {
  position: relative;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .blog-cta-band {
    padding: 36px 22px;
  }

  .blog-cta-band .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Единый кадр обложки (listing + post + related) */
.blog-cover-frame {
  position: relative;
  aspect-ratio: var(--blog-cover-ratio);
  overflow: hidden;
  background: #0f1226;
}

.blog-cover-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-cover-fallback {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(14px, 2.5vw, 24px);
  box-sizing: border-box;
  background: linear-gradient(160deg, #0000ff 0%, #1d4ed8 48%, #0f172a 100%);
  color: #fff;
  font-size: clamp(0.95rem, 1.6vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
