/* ===== Статьи / блог — подключается ПОСЛЕ style.css =====
   Цвета берутся из переменных style.css (--accent-dark, --text и т.д.) */
:root {
  --a-accent: var(--accent-dark);
  --a-accent-soft: rgba(49, 130, 206, 0.09);
  --a-warn: #c05621;
  --a-warn-soft: rgba(237, 137, 54, 0.12);
  --a-muted: #718096;
  --a-border: #dbe4ee;
}

/* Светлая «бумажная» область, как блок «Обо мне» на главной */
.article {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text);
  padding: 140px 0 90px;
}
.article-container { max-width: 800px; margin: 0 auto; }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; font-size: 14px; color: var(--a-muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a { color: var(--a-accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.article-tag { display: inline-block; background: var(--a-accent-soft); color: var(--a-accent); padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; }
.article h1 {
  font-size: 42px; font-weight: normal; line-height: 1.25; color: var(--text);
  margin: 16px 0 14px; border-left: 4px solid var(--accent-dark); padding-left: 26px;
}
.article-meta { color: var(--a-muted); font-size: 15px; padding-left: 30px; }

.article-hero { margin: 32px 0 36px; }
.article-hero img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 20px 40px rgba(13, 27, 42, .12); }

.article-body { font-size: 17px; line-height: 1.8; color: var(--text-2); }
.article-body p { margin: 0 0 18px; }
.article-body strong { color: var(--text); }
.article-body a { color: var(--a-accent); }
.article-lead { font-size: 20px; line-height: 1.7; color: var(--text); }
.article-body h2 {
  font-size: 28px; font-weight: normal; line-height: 1.3; color: var(--text);
  margin: 52px 0 18px; padding-left: 18px; border-left: 4px solid var(--accent-dark);
  scroll-margin-top: 110px;
}
.article-body h3 { font-size: 19px; font-weight: 600; color: var(--text); margin: 30px 0 12px; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 20px; }
.article-body li { margin-bottom: 8px; }

/* Содержание */
.article-toc { background: #fff; border: 1px solid var(--a-border); border-radius: 16px; padding: 22px 26px; margin: 8px 0 36px; }
.article-toc strong { display: block; margin-bottom: 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--a-muted); }
.article-toc ol { margin: 0; padding-left: 22px; }
.article-toc li { margin-bottom: 6px; }
.article-toc a { color: var(--a-accent); text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }

/* Карточки внутри статьи */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 20px 0 28px; }
.compare-card { background: #fff; border: 1px solid var(--a-border); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 6px 18px rgba(13, 27, 42, .05); }
.compare-card h3 { margin-top: 0; font-size: 18px; }
.compare-card p, .compare-card li { font-size: 16px; line-height: 1.65; }
.compare-card p:last-child, .compare-card ul:last-child { margin-bottom: 0; }
.compare-card.accent { border-top: 4px solid var(--accent-dark); }
.compare-card.warm { border-top: 4px solid #ed8936; }
.compare-card.cool { border-top: 4px solid var(--blue); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; margin: 12px 0 24px; }
.chips li { background: #fff; border: 1px solid var(--a-border); color: var(--text); padding: 6px 14px; border-radius: 999px; font-size: 15px; margin: 0; }

.signs { list-style: none; counter-reset: sign; padding: 0 !important; display: grid; gap: 12px; margin: 20px 0 28px; }
.signs li { counter-increment: sign; position: relative; padding: 16px 18px 16px 62px; background: #fff; border: 1px solid var(--a-border); border-radius: 14px; margin: 0; line-height: 1.65; }
.signs li::before { content: counter(sign); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-dark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }

.callout { border-radius: 14px; padding: 18px 22px; margin: 26px 0; background: var(--sky); border-left: 4px solid var(--accent-dark); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { background: var(--a-warn-soft); border-left-color: #ed8936; }

.article-figure { margin: 28px 0; }
.article-figure svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--a-border); border-radius: 16px; }
.article-figure figcaption { font-size: 14px; color: var(--a-muted); margin-top: 10px; text-align: center; }

/* Призыв к записи — в цветах шапки сайта */
.article-cta { text-align: center; padding: 34px 28px; border-radius: 20px; background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); color: #fff; margin: 56px 0 36px; }
.article-cta p { margin: 0 0 10px; font-size: 18px; line-height: 1.6; }
.article-cta .btn:hover { background: var(--accent); color: var(--navy); }

.article-author { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--a-border); border-radius: 16px; padding: 18px 22px; }
.article-author img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.article-author p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--a-muted); }
.article-author strong { color: var(--text); font-size: 17px; }

/* Карточки-анонсы статей (в статье и на странице специализации) */
.related { margin-top: 56px; }
.related h2, .articles-teaser h2 { font-size: 30px; font-weight: normal; color: var(--text); margin-bottom: 24px; }
.article-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.article-card { display: flex; flex-direction: column; background: #fff; border: 2px solid transparent; border-radius: 20px; overflow: hidden; color: var(--text); text-decoration: none; box-shadow: 0 8px 20px rgba(13, 27, 42, .06); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.article-card:hover, .article-card:focus-visible { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(99, 179, 237, .25); border-color: var(--accent); }
.article-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.article-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card-body .article-tag { align-self: flex-start; font-size: 12px; }
.article-card-title { font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--text); }
.article-card-more { margin-top: auto; color: var(--a-accent); font-weight: 600; font-size: 14px; }
.related .article-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Страница специализации */
.specialization-card { position: relative; }
.specialization-link { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.specialization-link::after { content: ""; position: absolute; inset: 0; border-radius: 20px; } /* вся карточка кликабельна */
.specialization-card.has-article { border-color: var(--accent-dark); }
.articles-teaser { max-width: 1200px; margin: 80px auto 0; }
.articles-teaser h2 { text-align: center; font-size: 36px; }

@media (max-width: 768px) {
  .article { padding: 120px 0 60px; }
  .article h1 { font-size: 30px; padding-left: 18px; }
  .article-meta { padding-left: 22px; }
  .article-lead { font-size: 18px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 23px; margin-top: 40px; }
  .articles-teaser h2, .related h2 { font-size: 26px; }
  .article-cta { padding: 26px 18px; }
}
@media (max-width: 480px) {
  .article h1 { font-size: 25px; }
  .signs li { padding-left: 56px; }
  .compare-card { padding: 18px 16px 14px; }
  .article-toc { padding: 18px 18px; }
  .article-author { flex-direction: column; text-align: center; }
}
