/* Гайды и статьи: список гайдов и отдельная страница статьи. Общие стили в site.css/doc.css. */

/* ---------- Список гайдов ---------- */
.guides-page { max-width: 980px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.guide-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.guide-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(var(--shadow-rgb), 0.08); }
.guide-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.guide-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--brand-soft); }
.guide-icon img { width: 26px; height: 26px; }
.guide-card h2 { font-size: var(--fs-20); font-weight: 600; margin: 0; }
.guide-card p { color: var(--ink-2); font-size: var(--fs-14); line-height: 1.5; margin: 0; flex: 1; }
.guide-meta { font-size: 0.8125rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.guide-meta::before { content: "⏱"; }
.guide-arrow { align-self: flex-end; color: var(--brand); font-weight: 600; font-size: var(--fs-14); }

/* ---------- Статья ---------- */
.article-page { max-width: 720px; margin: 0 auto; padding: 40px var(--gutter) 96px; }
.breadcrumb { font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 20px; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); }
.article-page h1 { font-size: var(--fs-40); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.article-lead { font-size: var(--fs-20); color: var(--ink-2); line-height: 1.5; margin: 0 0 12px; max-width: 34em; }
.article-meta { color: var(--ink-2); font-size: var(--fs-14); margin: 0 0 32px; }
.article-body h2 { font-size: var(--fs-28); font-weight: 700; margin: 40px 0 14px; letter-spacing: -0.01em; }
.article-body h2:first-child { margin-top: 0; }
.article-body p { line-height: 1.7; margin: 0 0 16px; max-width: 62ch; }
.article-body ul, .article-body ol:not(.article-steps) { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 8px; max-width: 62ch; }
.article-body li { line-height: 1.6; }

.article-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.article-steps li { position: relative; padding: 16px 16px 16px 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); line-height: 1.55; }
.article-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 0.8125rem; }

.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r-sm); margin: 0 0 20px; line-height: 1.55; }
.callout-tip { background: var(--brand-soft); border: 1px solid var(--brand-line); }
.callout-warn { background: var(--amber-soft); border: 1px solid var(--amber-line); }
.callout::before { flex: none; font-size: 1.1em; line-height: 1.4; }
.callout-tip::before { content: "💡"; }
.callout-warn::before { content: "⚠️"; }
.callout p, .callout ul { margin: 0; }

.article-faq { border-top: 1px solid var(--line); margin-top: 8px; }
.article-faq details { border-bottom: 1px solid var(--line); }
.article-faq summary { position: relative; padding: 16px 32px 16px 0; font-weight: 500; cursor: pointer; list-style: none; }
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.article-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.article-faq p { padding: 0 0 16px; color: var(--ink-2); line-height: 1.6; margin: 0; }

.article-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 32px; }

.related-guides { margin-top: 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.related-guides h2 { font-size: var(--fs-20); font-weight: 600; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.related-grid a { display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 500; font-size: var(--fs-14); transition: border-color 0.15s, color 0.15s; }
.related-grid a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Видео (плеер загружается только по клику) ---------- */
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0e1a2b; margin-bottom: 8px; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.78; }
.video-play-icon { position: absolute; inset: 0; display: grid; place-items: center; }
.video-play-icon span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--brand); font-size: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.video-play:hover .video-play-icon span, .video-play:focus-visible .video-play-icon span { transform: scale(1.08); }
.video-caption { font-size: 0.8125rem; color: var(--ink-2); margin: 0 0 24px; }
.video-caption a { color: var(--brand); }

@media (max-width: 760px) {
  .article-page { padding-top: 24px; padding-bottom: 56px; }
  .article-page h1 { font-size: var(--fs-28); }
  .article-lead { font-size: var(--fs-16); }
  .article-body h2 { font-size: var(--fs-20); margin-top: 28px; }
}
