/* SEO-страницы: блог, услуги, ниши — рядом с works.css */

/* ---------- Хабы (/services, /niches, /blog) ---------- */

.sf-hub {
  padding-top: clamp(112px, 12vw, 152px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.sf-hub .wk-crumbs { margin-bottom: clamp(16px, 2vw, 24px); }
.sf-hub .h-display { max-width: 14em; margin-bottom: 0; }
.sf-hub__lead {
  max-width: 38em;
  margin: clamp(16px, 2vw, 24px) 0 0;
  font-size: var(--fs-lead);
  color: var(--ink-soft);
}
.sf-hub__grid { margin-top: clamp(36px, 5vw, 64px); }
.work-card__media--wide { aspect-ratio: 16 / 9; }

/* ---------- Раскладка страницы: текст + боковая колонка ---------- */

.sf-layout {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(48px, 7vw, 96px);
}
.sf-layout:has(.sf-article-main) { padding-top: 1vw; }
@media (min-width: 1000px) {
  .sf-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .sf-side { position: sticky; top: 96px; }
}

.sf-side { display: grid; gap: 16px; }
.sf-side__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  container-type: inline-size;
}
.sf-side__media img { width: 100%; height: 100%; object-fit: cover; }
.sf-side__media .mock { position: absolute; inset: 0; }
.sf-card {
  padding: var(--s-5, 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.sf-card__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sf-links { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.sf-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
}
.sf-links li:last-child a { border-bottom: 0; padding-bottom: 0; }
.sf-links a::after { content: "→"; color: var(--ink-soft); transition: transform var(--t-fast, .2s) var(--ease, ease); }
@media (hover: hover) {
  .sf-links a:hover { color: var(--accent); }
  .sf-links a:hover::after { transform: translateX(3px); color: var(--accent); }
}

/* ---------- Компактная обложка статьи ---------- */

.sf-cover {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  aspect-ratio: 21 / 9;
  max-height: 400px;
}
.sf-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .sf-cover { aspect-ratio: 16 / 9; } }

/* ---------- Текст (статьи, услуги, ниши) ---------- */

.sf-prose {
  min-width: 0;
  max-width: 44rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #24262b;
}
.sf-article { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 96px); }
.sf-article-main { min-width: 0; display: grid; gap: clamp(24px, 3vw, 40px); }
.sf-article-main .sf-prose { max-width: none; }
.sf-side .sf-links a { font-size: 0.875rem; line-height: 1.35; }

.sf-prose h2 {
  margin: clamp(36px, 5vw, 56px) 0 14px;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--ink);
  text-wrap: balance;
}
.sf-prose > :first-child,
.sf-prose > .sf-prose__section:first-child > h2:first-child { margin-top: 0; }
.sf-prose__section + .sf-prose__section h2 { margin-top: clamp(32px, 4.5vw, 48px); }

.sf-prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}
.sf-prose blockquote {
  margin: 0 0 1.4em;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.sf-prose blockquote p:last-child { margin-bottom: 0; }
.sf-prose code {
  padding: 1px 6px;
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: 6px;
}
.sf-prose p { margin: 0 0 1em; }
.sf-prose p:last-child { margin-bottom: 0; }
.sf-prose strong { font-weight: 600; color: var(--ink); }

.sf-prose ul,
.sf-prose ol { margin: 0 0 1.2em; padding: 0; }
.sf-prose ul { list-style: none; }
.sf-prose ul li {
  position: relative;
  padding-left: 1.4em;
}
.sf-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.7em;
  height: 1.5px;
  background: var(--accent);
}
.sf-prose ol { padding-left: 1.4em; }
.sf-prose ol li::marker { color: var(--accent); font-weight: 600; }
.sf-prose li + li { margin-top: 0.5em; }

.sf-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.sf-prose a:hover { color: var(--accent); }

/* Таблицы: карточка с прокруткой на узких экранах */
.sf-table {
  margin: 0 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.sf-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.sf-table th,
.sf-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.sf-table tr:last-child th,
.sf-table tr:last-child td { border-bottom: 0; }
.sf-table thead th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.sf-table tbody th { font-weight: 500; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Блок «Смотрите также» (мобильная раскладка) ---------- */

.sf-related-inline { margin-top: clamp(32px, 4vw, 48px); }
