/* ==========================================================================
   Блог /blog/: список (картки з обкладинкою) і сторінка статті (зміст ліворуч, текст по центру).
   Доповнює styles.css і seo-page.css; лише токени сайту, без картинок і шрифтів ззовні.
   ========================================================================== */

.blog-wrap { padding-top: clamp(92px, 8vw, 112px); }
.blog-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); }
.blog-crumbs a { color: var(--accent-deep); font-weight: 500; }
.blog-crumbs a:hover { text-decoration: underline; }
.blog-h1 { margin: 18px 0 clamp(28px, 4vw, 44px); font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; max-width: 24ch; }
.blog-list .blog-h1 { max-width: none; }

/* ---- сторінка статті ---- */
.blog-layout { display: grid; grid-template-columns: 270px minmax(0, 760px); gap: clamp(32px, 5vw, 64px); align-items: start; justify-content: center; padding-bottom: clamp(48px, 7vw, 88px); }
.blog-layout:not(:has(.blog-toc)) { grid-template-columns: minmax(0, 760px); }
.blog-toc { position: sticky; top: 96px; align-self: start; }
.blog-toc__card { background: var(--surface-tint); border: 1px solid var(--hair); border-radius: 18px; padding: 20px 20px 14px; }
.blog-toc__h { margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.blog-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.blog-toc li a { display: block; padding: 8px 10px; margin-inline: -10px; border-radius: 10px; font-size: .94rem; line-height: 1.35; color: var(--ink-2); }
.blog-toc li a:hover { background: var(--accent-soft); color: var(--accent-deep); }

.blog-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-bottom: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--hair); font-size: .92rem; color: var(--muted); }
.blog-meta__by { display: inline-flex; align-items: center; gap: 10px; }
.blog-meta__by svg { color: var(--accent-deep); }
.blog-share { display: inline-flex; align-items: center; gap: 8px; }
.blog-share__l { margin-right: 2px; }
.blog-share a, .blog-share button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hair-2); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.blog-share a:hover, .blog-share button:hover, .blog-share button.is-done { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-soft); }

.blog-figure { margin: 24px 0 8px; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; background: #efeaff; }
.blog-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-lead { font-size: 1.28rem; line-height: 1.55; color: var(--ink); margin: 0 0 8px; }
.blog-sec { scroll-margin-top: 96px; margin-top: clamp(36px, 5vw, 52px); }
.blog-sec h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; }
.blog-prose { font-size: 1.12rem; line-height: 1.7; color: var(--ink-2); }
.blog-prose p { margin: 0; }
.blog-prose p + p, .blog-prose ul, .blog-prose ol, .blog-prose ul + p, .blog-prose ol + p { margin-top: 1.1em; }
.blog-prose ul, .blog-prose ol { padding-left: 1.35em; }
.blog-prose li + li { margin-top: .4em; }
.blog-prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.blog-prose a:hover { text-decoration-thickness: 2px; }
.blog-prose :not(pre) > code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; padding: .12em .42em; border-radius: 6px; background: var(--accent-softer); color: var(--accent-deep); }
.blog-prose img { max-width: 100%; height: auto; border-radius: 16px; }

.blog-faq details { border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); margin-top: 10px; }
.blog-faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; }
.blog-faq summary::-webkit-details-marker { display: none; }
.blog-faq summary::after { content: '+'; flex: none; font-size: 1.3rem; line-height: 1; color: var(--accent-deep); }
.blog-faq details[open] summary::after { content: '\2212'; }
.blog-faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); line-height: 1.65; }

.blog-cta { margin-top: clamp(40px, 6vw, 60px); padding: clamp(24px, 4vw, 36px); border-radius: 24px; color: #fff; background: linear-gradient(135deg, #1a1633 0%, #563bdc 100%); }
.blog-cta h2 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.2; color: #fff; }
.blog-cta p { margin: 0 0 22px; color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.55; max-width: 52ch; }

/* ---- «Читайте також» і список статей: картки з обкладинкою ---- */
.blog-more { background: var(--surface-tint); border-top: 1px solid var(--hair); padding-block: clamp(48px, 7vw, 88px); }
.blog-more .blog-wrap { padding-top: 0; }
.blog-more__h { margin: 0 0 24px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
.blog-more__h--sub { margin-top: clamp(40px, 6vw, 64px); }
.blog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
.blog-card { display: flex; flex-direction: column; min-width: 0; }
.blog-card__cover { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; }
.blog-cover { display: grid; place-items: center; width: 100%; height: 100%; transition: transform .35s ease; }
.blog-cover svg { width: 34%; height: auto; opacity: .92; }
.blog-cover--0 { background: linear-gradient(135deg, #6a4cff 0%, #a58bff 100%); color: #fff; }
.blog-cover--1 { background: linear-gradient(135deg, #1a1633 0%, #563bdc 100%); color: #c6f432; }
.blog-cover--2 { background: linear-gradient(135deg, #efeaff 0%, #d8cdff 100%); color: #563bdc; }
.blog-cover.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card:hover .blog-cover { transform: scale(1.04); }
.blog-card__min { position: absolute; left: 12px; bottom: 12px; padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(26,22,51,.72); color: #fff; backdrop-filter: blur(6px); }
.blog-card h2, .blog-card h3 { margin: 16px 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.25; letter-spacing: -.005em; }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--accent-deep); }
.blog-card p { margin: 0; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-list-sec { padding-bottom: clamp(56px, 8vw, 104px); }

.blog-sol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.blog-sol a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 22px; border: 1px solid var(--hair); border-radius: 18px; background: var(--surface); }
.blog-sol a:hover { border-color: var(--accent); }
.blog-sol b { font-weight: 600; color: var(--ink); line-height: 1.3; }
.blog-sol span { flex: none; color: var(--muted); font-size: .94rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1020px) {
  .blog-layout { grid-template-columns: minmax(0, 760px); }
  .blog-toc { position: static; }
  .blog-grid, .blog-sol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .blog-grid, .blog-sol { grid-template-columns: 1fr; }
  .blog-lead { font-size: 1.15rem; }
  .blog-prose { font-size: 1.05rem; }
}
