/* ===== BLOG (Static Blog API) =====
   Дополняет style.css + article.css сайта; кладётся в /blog/blog.css.
   После правок поднять CSS_VERSION в server.py и вызвать /blog-api/rebuild. */

.blog-crumbs { font-size: 14px; color: var(--text); opacity: .7; margin-bottom: 30px; }
.blog-crumbs a { color: var(--text); text-decoration: none; }
.blog-crumbs a:hover { color: var(--red); }

.art-cols__text h1.blog-h1,
h1.blog-h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1; overflow-wrap: anywhere; }

.blog-date { font-size: 14px; color: var(--text); opacity: .7; }

/* текст статьи */
.blog-content { gap: 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.blog-content > * + * { margin-top: 18px; }
.blog-content h2 { font-size: 36px; margin-top: 36px; }
.blog-content h2:first-child { margin-top: 0; }
.blog-content h3 { font-size: 20px; font-weight: 700; margin-top: 28px; }
.blog-content a { color: var(--red); }
.blog-content strong, .blog-content b { font-weight: 700; }
.blog-content ul, .blog-content ol { padding-left: 22px; }
.blog-content li + li { margin-top: 8px; }
.blog-content ul li::marker { color: var(--red); }
.blog-content blockquote { margin: 0; padding-left: 25px; border-left: 2px solid var(--red); }
.blog-content img { max-width: 100%; height: auto; }
.blog-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.blog-content th, .blog-content td { border: 1px solid rgba(255,255,255,0.25); padding: 10px 12px; text-align: left; }

.blog-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.blog-tags li { font-size: 13px; padding: 5px 12px; border: 1px solid rgba(255,255,255,0.25); }

/* список статей */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.blog-card {
  display: flex; flex-direction: column;
  background: #14181B; outline: 1px solid rgba(255,255,255,0.25); outline-offset: -1px;
  color: var(--text); text-decoration: none;
  transition: outline-color .2s;
}
.blog-card:hover { outline-color: rgba(255,255,255,0.5); }
.blog-card:hover .blog-card__title { color: var(--red); }
.blog-card__img { aspect-ratio: 16 / 10; background: rgba(255,255,255,0.04); overflow: hidden; }
.blog-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 26px; }
.blog-card__title { font-size: 18px; font-weight: 700; line-height: 1.3; transition: color .2s; }
.blog-card__excerpt { font-size: 15px; line-height: 1.5; opacity: .85; }

.blog-pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.blog-pager__item {
  min-width: 40px; padding: 8px 12px; text-align: center;
  color: var(--text); text-decoration: none; border: 1px solid rgba(255,255,255,0.25);
}
.blog-pager__item--active { background: var(--red-dark); border-color: var(--red-dark); }

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-content h2 { font-size: 30px; }
  .blog-related { grid-template-columns: 1fr; }
  /* в article.css медиа в колонке схлопывается (flex-basis 0) — обложку статьи показываем */
  .blog-hero .art-media { flex: none; }
}
