/* ДоброСправка · Blog Article Enhanced Styles
   Generated — import via <link rel="stylesheet" href="/blog/blog-article.css">
   Requires base styles already in page (--navy, --blue, --border, --text, etc.)
*/

/* ── Reading progress bar ── */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .1s linear;
  z-index: 9999;
  pointer-events: none;
}

/* ── Article header redesign ── */
.article-header {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border, #E2E5EA);
  margin-bottom: 36px;
}
.article-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.article-cluster {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.article-stamp {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 20px;
}
.article-header h1 {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy, #1a1a2e);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted, #718096);
  align-items: center;
}
.article-meta .meta-sep { color: var(--border, #ddd); }

/* ── Article body typography ── */
.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-2, #4a5568);
}
.article-body > p:first-of-type {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text, #1a2332);
}
.article-body h2 {
  font-size: clamp(19px, 2.5vw, 24px);
  font-weight: 800;
  color: var(--navy, #1a1a2e);
  margin: 44px 0 16px;
  letter-spacing: -.01em;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #1a2332);
  margin: 28px 0 12px;
  scroll-margin-top: 80px;
}

/* ── Callout blocks ── */
.callout {
  border-radius: 10px;
  padding: 20px 24px;
  margin: 28px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-body { flex: 1; }
.callout-body p { margin: 0; font-size: 15px; line-height: 1.65; }
.callout--warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.callout--warn .callout-body p { color: #7c2d12; }
.callout--tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.callout--tip .callout-body p { color: #1e3a8a; }
.callout--law {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}
.callout--law .callout-body p { color: #581c87; }
.callout--ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.callout--ok .callout-body p { color: #14532d; }

/* Keep legacy block names working */
.check-block {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 22px 24px;
  margin: 28px 0;
}
.check-block h3 { font-size: 16px; font-weight: 700; color: #14532d; margin: 0 0 12px; }
.check-block li { color: #166534; }
.warn-block {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
.warn-block p { margin: 0; font-size: 15px; color: #7c2d12; }

/* ── TOC sidebar card ── */
.bsb-toc {}
.bsb-toc h3 { cursor: default; }
.bsb-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  counter-reset: toc;
}
.bsb-toc-list li { counter-increment: toc; }
.bsb-toc-list a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.4;
  transition: color .15s;
}
.bsb-toc-list a::before {
  content: counter(toc) ".";
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 16px;
}
.bsb-toc-list a:hover,
.bsb-toc-list a.active { color: #2563eb; }
.bsb-toc-list li:last-child a { border-bottom: none; }

/* ── Share bar ── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--border, #E2E5EA);
  border-bottom: 1px solid var(--border, #E2E5EA);
  margin: 40px 0 32px;
  flex-wrap: wrap;
}
.share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #718096);
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  font-family: inherit;
}
.share-btn:hover { opacity: .85; text-decoration: none; }
.share-tg  { background: #2CA5E0; color: #fff; }
.share-vk  { background: #4C6EA2; color: #fff; }
.share-copy { background: #f3f4f6; color: #374151; }

/* ── Related articles cards ── */
.related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border, #E2E5EA); }
.related h3 { font-size: 20px; font-weight: 800; color: var(--navy, #1a1a2e); margin-bottom: 20px; }
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.related-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border, #E2E5EA);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
  gap: 12px;
}
.related-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card-cluster {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #9ca3af;
}
.related-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1a2332);
  line-height: 1.45;
}
.related-card-arrow {
  font-size: 16px;
  color: #2563eb;
  align-self: flex-end;
}

/* ── Grid overflow fix: main-column must not outgrow its grid track ── */
/* Without min-width:0 a grid item can expand beyond minmax(0,1fr) when */
/* child grids (related-list, services-grid) have auto-fill columns.    */
.blog-layout > main { min-width: 0; }

@media (max-width: 600px) {
  .related-list { grid-template-columns: 1fr; }
  .share-bar { gap: 6px; }
}
