/* Блог: /blog/ и статьи (страницы собирает агент блога, репозиторий STACK/blog-agent), блок «Блог» на главной. */

.blog-head { padding-top: clamp(28px, 5vw, 60px); }
.blog-head h1 { margin: 10px 0 0; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .95; letter-spacing: -.06em; font-weight: 760; }
.blog-head .crumbs, .blog-article .crumbs { color: #8d9188; }
.blog-head .crumbs a, .blog-article .crumbs a { color: #c9cbc2; }
.blog-head .svc-lead { margin: 18px 0 0; max-width: 40em; color: #c9cbc2; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.5; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.blog-card {
  display: grid; align-content: start; gap: 10px; padding: 12px 12px 22px; border-radius: 18px;
  background: #171816; border: 1px solid #33352e; color: #dedfd8; text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .3s var(--ease-out);
}
.blog-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--paper); }
.blog-card .blog-meta { margin: 6px 8px 0; font-size: .85rem; color: #8d9188; }
.blog-card b { margin: 0 8px; color: #fafaf8; font-size: 1.2rem; line-height: 1.25; }
.blog-card .blog-lead { margin: 0 8px; color: #b7bcb0; font-size: .95rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card:hover { background: #20221d; border-color: #5a5d53; transform: translateY(-3px); }
.blog-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.blog-article { max-width: 860px; padding-top: clamp(28px, 5vw, 56px); }
.blog-article h1 { margin: 12px 0 0; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.02; letter-spacing: -.05em; font-weight: 740; }
.blog-article-lead { margin: 20px 0 0; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.5; color: #dedfd8; }
.blog-cover { display: block; width: 100%; height: auto; margin: 30px 0 10px; border-radius: 22px; background: var(--paper); }
.blog-body h2 { margin: 42px 0 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -.035em; font-weight: 700; }
.blog-body p { margin: 0 0 16px; font-size: 1.1rem; line-height: 1.7; color: #d2d2ca; }
.blog-faq { margin-top: 46px; }
.blog-faq h2 { margin: 0 0 14px; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.blog-faq details { border-top: 1px solid #33352e; }
.blog-faq details:last-child { border-bottom: 1px solid #33352e; }
.blog-faq summary { cursor: pointer; list-style: none; position: relative; padding: 18px 40px 18px 0; font-weight: 650; font-size: 1.08rem; color: #fafaf8; }
.blog-faq summary::-webkit-details-marker { display: none; }
.blog-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--lime); font-size: 1.5rem; transition: transform .2s ease; }
.blog-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.blog-faq details p { margin: 0 0 18px; color: #c9cbc2; line-height: 1.6; }
.blog-service { margin-top: 46px; }
.blog-service h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

/* главная: свежие статьи (site.js берёт /blog/latest.json; без статей блок скрыт) */
.home-blog[hidden] { display: none; }
.home-blog-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 26px; }
.home-blog-head h2 { margin: 0; }
.home-blog-head a { color: var(--lime); font-weight: 650; text-decoration: none; }
.home-blog-head a:hover { text-decoration: underline; text-underline-offset: .2em; }
@media (prefers-reduced-motion: reduce) { .blog-card { transition: none; } .blog-card:hover { transform: none; } }
