/* ─────────────────────────────────────────────────────────────────────
   ПОТОК — детальная страница заболевания /disease/<slug>/. Скоуп `.dd-page`.
   Единый язык со страницей специалиста (.sp-page): hero + breadcrumb,
   двухколоночный layout со sticky-aside (карточка-справка + scroll-spy
   навигация по секциям), контентные секции с типографикой CKEditor,
   FAQ-аккордеон, прайс-таблица, карточки специалистов, cta-band.
   ───────────────────────────────────────────────────────────────────── */

.dd-page {
  --gold: #bba88c;
  --gold-dark: #8f7a5e;
  --graphite-nav: #2d323c;
  --graphite-text: #30323D;

  --bg: #ffffff;
  --bg-soft: #f7f5f1;
  --bg-cool: #f8f9fa;
  --border: #e6e3dd;

  --text: #30323D;
  --text-muted: #6b6f78;
  --text-dim: #8a8e96;

  /* Тёплый «внимание» для блока «когда срочно к врачу» — не алый, чтобы
     не выбиваться из бренда, но заметно. */
  --warn-bg: #fdf6f2;
  --warn-border: #e7cdbf;
  --warn-accent: #c2714f;
  --warn-text: #a1543a;

  --shadow-card: 0 8px 24px rgba(45, 50, 60, 0.08);
  --shadow-card-hover: 0 14px 32px rgba(143, 122, 94, 0.18);

  --r-card: 16px;
  --r-pill: 999px;

  --dd-container: 1200px;
  --dd-gutter: 24px;
  /* Sticky-якоря секций встают под навбаром (72px) с воздухом. Совпадает
     с ANCHOR_OFFSET в disease_page.js. */
  --dd-anchor-offset: 96px;

  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.dd-page *,
.dd-page *::before,
.dd-page *::after { box-sizing: border-box; }

.dd-page img,
.dd-page svg { display: block; max-width: 100%; }
.dd-page a { color: inherit; text-decoration: none; }

.dd-container {
  max-width: var(--dd-container);
  margin: 0 auto;
  padding: 0 var(--dd-gutter);
}

.dd-page h1,
.dd-page h2,
.dd-page h3,
.dd-page h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.dd-page h1 { font-size: 38px; letter-spacing: -0.5px; }
.dd-page h2 { font-size: 22px; letter-spacing: -0.2px; }
.dd-page h3 { font-size: 17px; font-weight: 600; }

.dd-page p { margin: 0 0 1em; }
.dd-page p:last-child { margin-bottom: 0; }

.dd-page .eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ── Кнопки ──────────────────────────────────────────────────────── */
.dd-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  transition: all .18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  text-align: center;
}
.dd-page .btn:focus { box-shadow: none; }
.dd-page .btn-gold { background: var(--gold); color: #fff; }
.dd-page .btn-gold:hover {
  background: var(--gold-dark);
  box-shadow: 0 8px 18px rgba(143, 122, 94, 0.3);
  color: #fff;
}
.dd-page .btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-dark);
}
.dd-page .btn-outline:hover { background: var(--gold); color: #fff; }
.dd-page .btn-lg { padding: 15px 28px; font-size: 15px; }

/* ── HERO ─────────────────────────────────────────────────────────── */
.dd-hero {
  background: var(--bg);
  padding: 32px 0 40px;
  border-bottom: 1px solid var(--border);
}
.dd-breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dd-breadcrumb a {
  color: var(--gold-dark);
  border-bottom: 1px dashed transparent;
  transition: border-color .15s;
}
.dd-breadcrumb a:hover { border-bottom-color: currentColor; }
.dd-breadcrumb .sep { color: var(--border); }
.dd-breadcrumb .current { color: var(--text-muted); }

.dd-hero h1 { margin: 0 0 12px; max-width: 880px; }

/* «Также известно как…» — альтернативные/клинические названия (синонимы). */
.dd-akas {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 16px;
  max-width: 820px;
  line-height: 1.5;
}
.dd-akas .lbl { color: var(--text-dim); }
.dd-akas .aka { font-style: italic; }

.dd-hero .lede {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.6;
  margin: 0 0 22px;
}

.dd-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Баннер-картинка под hero (если загружена). Отступ сверху (от CTA-кнопок)
   делаем равным отступу снизу — до нижней полоски hero (= padding-bottom
   hero). Значения держим синхронно по брейкпоинтам (40 / 32 / 26). */
.dd-banner {
  margin: 40px 0 0;
}
.dd-banner img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
}

/* ── Полоса «жалоб» (search_keywords) ─────────────────────────────── */
/* «Язык пациента» — реальная ориентирующая подсказка + длинный хвост для SEO.
   Не скрытый кейворд-стаффинг: видимый, осмысленный блок. */
.dd-keywords {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.dd-keywords-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.dd-keywords .kw-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex: none;
}
.dd-keywords .kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.dd-keywords .kw {
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  line-height: 1.2;
}

/* ── LAYOUT ───────────────────────────────────────────────────────── */
.dd-layout { padding: 44px 0 24px; }
.dd-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Sticky-aside ─────────────────────────────────────────────────── */
.dd-aside {
  position: sticky;
  top: var(--dd-anchor-offset);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dd-facts {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(45, 50, 60, 0.02);
}
.dd-facts-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin: 0 0 12px;
}
.dd-facts ul { list-style: none; padding: 0; margin: 0; }
.dd-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
}
.dd-facts li:first-child { padding-top: 0; border-top: 0; }
.dd-facts li:last-child { padding-bottom: 0; }
.dd-facts .label {
  font-size: 12.5px;
  color: var(--text-muted);
}
.dd-facts .value { color: var(--text); font-weight: 500; }
.dd-facts .fact-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dd-facts .fact-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--gold-dark);
  border: 1px solid var(--border);
}

.dd-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.dd-side-nav .label {
  font-family: 'Roboto Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 4px 14px 8px;
}
.dd-side-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all .15s;
  cursor: pointer;
}
.dd-side-nav a:hover { color: var(--text); }
.dd-side-nav a.is-active {
  color: var(--gold-dark);
  border-left-color: var(--gold);
  background: var(--bg-soft);
}

/* ── CONTENT ──────────────────────────────────────────────────────── */
.dd-content { min-width: 0; }
.dd-section {
  padding: 0 0 48px;
  scroll-margin-top: var(--dd-anchor-offset);
}
.dd-section:last-child { padding-bottom: 0; }
.dd-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.dd-section-head h2 { font-size: 22px; }
.dd-section-head .count {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

/* Типографика контента из CKEditor */
.dd-prose { font-size: 16px; line-height: 1.7; color: var(--text); }
.dd-prose > *:first-child { margin-top: 0; }
.dd-prose > *:last-child { margin-bottom: 0; }
.dd-prose p { margin: 0 0 1em; }
.dd-prose h2,
.dd-prose h3,
.dd-prose h4 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 1.6em 0 0.5em;
}
.dd-prose h2 { font-size: 19px; }
.dd-prose h3 { font-size: 17px; }
.dd-prose h4 { font-size: 15px; }
.dd-prose ul,
.dd-prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.dd-prose li { margin: 0 0 0.5em; line-height: 1.6; }
.dd-prose li:last-child { margin-bottom: 0; }
.dd-prose a {
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold);
  transition: color .15s;
}
.dd-prose a:hover { color: var(--gold); }
.dd-prose strong { font-weight: 600; }
.dd-prose blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--gold);
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
  font-style: italic;
}
.dd-prose img { border-radius: 10px; margin: 1em 0; }
.dd-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 14.5px;
}
.dd-prose th,
.dd-prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.dd-prose th { background: var(--bg-soft); font-weight: 600; }

/* «О заболевании» — первая секция как paper-card с золотой полоской */
.dd-lead-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 30px;
  position: relative;
}
.dd-lead-card::before {
  content: '';
  position: absolute;
  top: 0; left: 30px;
  width: 48px; height: 2px;
  background: var(--gold);
}

/* «Когда срочно к врачу» — тёплый блок-предупреждение */
.dd-urgent {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn-accent);
  border-radius: var(--r-card);
  padding: 22px 26px;
}
.dd-urgent .dd-prose a { color: var(--warn-text); border-bottom-color: var(--warn-accent); }
.dd-section--urgent .dd-section-head h2 { color: var(--warn-text); }

/* ── FAQ-аккордеон ────────────────────────────────────────────────── */
.dd-faq { display: flex; flex-direction: column; gap: 10px; }
.dd-faq .faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .15s;
}
.dd-faq .faq-item.is-open { border-color: var(--gold); }
.dd-faq .faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}
.dd-faq .faq-q .toggle {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  transition: transform .2s ease, background .15s, color .15s;
}
.dd-faq .faq-item.is-open .faq-q .toggle {
  transform: rotate(45deg);
  background: var(--gold);
  color: #fff;
}
.dd-faq .faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.dd-faq .faq-item.is-open .faq-a { max-height: 1200px; }
.dd-faq .faq-a-inner {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.dd-faq .faq-a-inner p { margin: 0 0 0.6em; }
.dd-faq .faq-a-inner p:last-child { margin-bottom: 0; }

/* ── Прайс — тот же визуал, что на странице «Цены» ────────────────── */
.dd-price-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 1px 0 rgba(45, 50, 60, 0.03);
}
.dd-price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.dd-price-head h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.2px;
}
.dd-price-head .pt-license {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
  padding: 4px 10px;
  background: rgba(187, 168, 140, 0.12);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.dd-price-head .pt-license.note {
  background: rgba(45, 50, 60, 0.05);
  color: var(--text-muted);
}
.dd-price-list { padding: 4px 0; }
.dd-price-sub {
  padding: 14px 24px 6px;
  font-family: 'Roboto Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.dd-price-list .price-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
}
.dd-price-list .price-line:first-child { border-top: 0; }
.dd-price-sub + .price-line { border-top: 0; }
.dd-price-list .price-line:hover { background: rgba(187, 168, 140, 0.04); }
.dd-price-list .pn { font-size: 15px; color: var(--text); line-height: 1.4; }
.dd-price-list .pa {
  font-family: 'Roboto Mono', monospace;
  font-size: 17px;
  color: var(--gold-dark);
  font-weight: 500;
  white-space: nowrap;
}
.dd-price-list .pd {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.dd-prices-foot {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.dd-prices-note { font-size: 14px; color: var(--text-muted); margin: 0; }
.dd-prices-note a { color: var(--gold-dark); border-bottom: 1px dashed currentColor; }

/* ── Специалисты — карточки как в списке /team/ ───────────────────── */
.dd-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.dd-spec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 18px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .2s ease;
  cursor: pointer;
  color: var(--text);
}
.dd-spec-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(187, 168, 140, 0.5);
  transform: translateY(-3px);
}
.dd-spec-photo,
.dd-spec-photo-ph {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  margin-bottom: 16px;
}
.dd-spec-photo-ph {
  background: repeating-linear-gradient(135deg, #efeae0 0 8px, #e6e0d3 8px 16px);
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-family: 'Roboto Mono', monospace;
  font-size: 24px;
  font-weight: 700;
}
.dd-spec-last { font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.dd-spec-first { font-size: 14.5px; font-weight: 400; margin-top: 2px; color: var(--text); }
.dd-spec-title {
  font-size: 13px;
  color: var(--text-muted);
  margin: 11px 0 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.45em * 3);
}
.dd-spec-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gold-dark);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 6px;
}
.dd-spec-stage svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.dd-spec-aud {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.dd-spec-aud svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.dd-spec-card .btn { width: 100%; padding: 10px 16px; font-size: 13.5px; margin-top: auto; }

/* ── CTA-band ────────────────────────────────────────────────────── */
.dd-cta-band {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 56px 0;
  position: relative;
}
.dd-cta-band::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 2px;
  background: var(--gold);
}
.dd-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.dd-cta-text { flex: 1 1 320px; }
.dd-cta-text h3 { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.dd-cta-text p { font-size: 15px; color: var(--text-muted); max-width: 560px; margin: 0; }
.dd-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Back-to-top ──────────────────────────────────────────────────── */
.dd-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gold-dark);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 50;
  transition: opacity .2s, transform .2s;
}
.dd-to-top[hidden] { opacity: 0; transform: translateY(8px); pointer-events: none; display: grid; }
.dd-to-top:hover { color: var(--gold); }

/* ── АДАПТИВ ──────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .dd-page h1 { font-size: 30px; }
  .dd-hero { padding: 24px 0 32px; }
  .dd-hero .lede { font-size: 15.5px; }

  .dd-layout { padding: 32px 0 16px; }
  .dd-layout-grid { grid-template-columns: 1fr; gap: 28px; }
  .dd-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }
  .dd-facts { flex: 1 1 320px; }
  /* На узких экранах scroll-spy теряет смысл — контент листается линейно. */
  .dd-side-nav { display: none; }

  .dd-banner { margin-top: 32px; }

  .dd-cta-inner { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .dd-cta-text { flex: 1 1 auto; }
  .dd-cta-actions { width: 100%; justify-content: center; }
  .dd-cta-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 576px) {
  .dd-page h1 { font-size: 25px; }
  .dd-hero { padding: 20px 0 26px; }
  .dd-hero-ctas { flex-direction: column; align-items: stretch; }
  .dd-hero-ctas .btn { width: 100%; }
  .dd-banner { margin-top: 26px; }

  .dd-section { padding-bottom: 36px; }
  .dd-lead-card { padding: 22px 20px; }
  .dd-lead-card::before { left: 20px; }
  .dd-urgent { padding: 20px 18px; }
  .dd-prose { font-size: 15.5px; }

  .dd-faq .faq-q { font-size: 14.5px; padding: 14px 16px; }
  .dd-faq .faq-a-inner { padding: 0 16px 16px; font-size: 14px; }

  /* Прайс: строка в столбик (имя / цена / длительность). */
  .dd-price-head { padding: 16px 18px; }
  .dd-price-sub { padding: 12px 18px 4px; }
  .dd-price-list .price-line {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 18px;
  }
  .dd-price-list .pa { font-size: 18px; }

  /* Специалисты — 2 в ряд, как на /team/ на мобиле. */
  .dd-team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dd-spec-card { padding: 22px 12px 16px; }
  .dd-spec-photo,
  .dd-spec-photo-ph { width: 92px; height: 92px; margin-bottom: 12px; }
  .dd-spec-last { font-size: 15px; }
  .dd-spec-first { font-size: 13px; }
  .dd-spec-title { font-size: 12px; margin: 9px 0 11px; }
  .dd-spec-stage, .dd-spec-aud { font-size: 11.5px; }
  .dd-spec-card .btn { font-size: 12.5px; padding: 9px 10px; }

  .dd-cta-band { padding: 40px 0; }
  .dd-cta-text h3 { font-size: 22px; }
  .dd-cta-actions { flex-direction: column; }
  .dd-cta-actions .btn { width: 100%; }

  .dd-to-top { right: 16px; bottom: 16px; }
}
