/* Стили статей. Основа: seo-article-template_3.html, токены из base.css */

.reading-progress{ position: fixed; top: 0; left: 0; height: 3px; background: var(--amber); width: 0%; z-index: 100; }
.skip-link{ position: absolute; left: -999px; top: 0; background: var(--amber); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 6px; }
.skip-link:focus{ left: 12px; top: 12px; }
.visually-hidden{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.article-wrap{
  max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 64px;
  display: grid; grid-template-columns: minmax(0, 720px) 260px; gap: 56px; align-items: start;
}
.article{ font-size: 17px; line-height: 1.7; }
.article h1{ font-size: clamp(24px, 3.6vw, 40px); font-weight: 700; }
.article h2{ font-size: clamp(22px, 2.6vw, 28px); margin-top: 2.2em; }
.article h3{ font-size: 19px; margin-top: 1.6em; }
.article p{ max-width: 68ch; }
.article a{ color: var(--amber); text-decoration-thickness: 1.5px; }
.article ul, .article ol{ padding-left: 22px; margin: 0 0 1.2em; }
.article li{ margin-bottom: 6px; }
.article section{ scroll-margin-top: 84px; }

.category-tag{ display: inline-block; font-size: 13px; font-weight: 600; background: var(--amber-soft); color: var(--amber); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.article-lead{ font-size: 19px; color: var(--text-muted); }
.article-meta{
  display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--text-muted);
  padding: 16px 0; margin: 16px 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.article-meta strong{ color: var(--text); font-weight: 600; }
.article-meta a{ color: var(--text); font-weight: 600; text-decoration: none; }

/* Обложка и картинки в тексте */
.cover{ margin: 0 0 32px; }
.cover img, .article-img img{ display: block; width: 100%; height: auto; border-radius: 12px; background: var(--bg-panel); }
.article-img{ margin: 28px 0; }
.article-img figcaption{ font-size: 14px; color: var(--text-muted); margin-top: 10px; }

/* Видео YouTube: превью грузится сразу, плеер только по клику */
.video{ margin: 0 0 32px; }
.yt{ position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--text) center/cover no-repeat; cursor: pointer; border: 0; width: 100%; padding: 0; display: block; }
.yt::after{ content: ''; position: absolute; inset: 0; background: rgba(31,28,23,.25); transition: background .15s; }
.yt:hover::after{ background: rgba(31,28,23,.1); }
.yt .play{ position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 72px; height: 72px; border-radius: 50%; background: var(--amber); display: flex; align-items: center; justify-content: center; }
.yt .play::before{ content: ''; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.yt iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption{ font-size: 14px; color: var(--text-muted); margin-top: 10px; }

.quick-answer{ background: var(--bg-panel); border-left: 3px solid var(--amber); padding: 20px 24px; border-radius: 8px; margin: 0 0 32px; }
.quick-answer p{ margin: 0; max-width: none; }
.quick-answer .label{ display: block; font-family: 'Unbounded', sans-serif; font-size: 12px; font-weight: 600; color: var(--amber); margin-bottom: 8px; }

blockquote{ background: var(--amber-soft); border-left: 3px solid var(--amber); margin: 28px 0; padding: 18px 24px; border-radius: 8px; }
blockquote p{ margin: 0; }
blockquote cite{ display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--text-muted); }

.article table{ width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article th, .article td{ text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article thead th{ font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 13px; }
.table-wrap{ position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.note{ background: var(--bg-panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; margin: 24px 0; font-size: 16px; }
.note strong{ color: var(--amber); }

.key-takeaways{ background: var(--bg-panel); border-radius: 12px; padding: 24px 28px; margin: 40px 0; }
.key-takeaways h2{ margin-top: 0; font-size: 20px; }
.key-takeaways ul{ margin: 0; }

/* Лид-магнит */
.hp{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq{ margin-top: 48px; }
.faq-item{ border-bottom: 1px solid var(--line); }
.faq-item summary{ cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-weight: 600; gap: 16px; }
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{ content: '+'; font-family: 'Unbounded', sans-serif; font-size: 20px; color: var(--amber); flex-shrink: 0; }
.faq-item[open] summary::after{ content: '–'; }
.faq-answer{ padding: 0 0 18px; color: var(--text-muted); }
.faq-answer p{ margin: 0; }

.author-box{ display: flex; gap: 18px; align-items: flex-start; background: var(--bg-panel); border-radius: 12px; padding: 24px; margin-top: 48px; }
.author-box img{ width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box h2{ font-size: 17px; margin: 0 0 4px; }
.author-box p{ margin: 0; font-size: 15px; color: var(--text-muted); }

.sources{ margin-top: 32px; font-size: 15px; color: var(--text-muted); }
.sources h2{ font-size: 18px; }

/* Оглавление */
.toc{ position: sticky; top: 88px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--bg-panel); }
.toc h2{ font-size: 14px; margin: 0 0 12px; }
.toc ol{ margin: 0; padding-left: 18px; font-size: 14px; }
.toc li{ margin-bottom: 8px; }
.toc a{ color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a.is-active{ color: var(--amber); }
.toc .toc-cta{ display: block; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-muted); }
.toc .toc-cta a{ display: block; margin-top: 8px; color: var(--amber); font-weight: 600; text-decoration: none; }
.toc-mobile{ display: none; }

/* Читайте также + CTA */
.after-article{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px 80px; }
.after-article h2{ font-size: 22px; }
.related-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 48px; }
.related-card{ overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; background: var(--bg-panel); display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.related-card:hover{ border-color: var(--amber); }
.related-card .thumb{ display: block; width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 16/9; object-fit: cover; margin: -20px -20px 4px; border-bottom: 1px solid var(--line); }
.related-card .cat{ font-size: 12px; color: var(--amber); font-weight: 600; }
.related-card h3{ font-size: 16px; margin: 0; }
.cta-box{ padding: 36px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-box h2{ margin: 0 0 8px; font-size: 24px; }
.cta-box p{ margin: 0; color: var(--text-muted); max-width: 560px; }

@media (max-width: 960px){
  .article-wrap{ grid-template-columns: minmax(0, 1fr); padding: 20px 16px 48px; gap: 0; }
  .toc{ display: none; }
  .toc-mobile{ display: block; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-panel); }
  .toc-mobile summary{ padding: 14px 18px; cursor: pointer; font-weight: 600; font-family: 'Unbounded', sans-serif; font-size: 14px; }
  .toc-mobile ol{ margin: 0; padding: 0 18px 18px 36px; font-size: 15px; }
  .after-article{ padding: 0 16px 56px; }
  .cta-box{ padding: 24px 20px; }
  .cta-box .btn{ width: 100%; }
}
@media (prefers-reduced-motion: reduce){ .reading-progress{ transition: none; } }
