/* Help-центр MomsLab
   Палитра и шрифт — те же, что на сайте (projects/landing/src/styles.scss,
   components/header). Меняются только здесь. */

/* Gotham лежит в ассетах лендинга: /<lang>/assets/fonts/. Путь относительный —
   справка всегда живёт на /<lang>/faq/, поэтому одна и та же таблица стилей
   годится для любого языка. */
@font-face {
  font-family: 'Gotham';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/Gotham/GothamRegular.woff') format('woff');
}
@font-face {
  font-family: 'Gotham';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../../assets/fonts/Gotham/GothamMedium.woff') format('woff');
}
@font-face {
  font-family: 'Gotham';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/Gotham/GothamBold.woff') format('woff');
}

:root {
  --brand:        #8250C4;   /* фиолетовый из логотипа и градиента кнопок */
  --brand-dark:   #6A3EA6;
  --brand-soft:   #F4EFFB;
  --accent:       #ED80A4;   /* розовый: активный пункт меню на сайте */
  --primary:      linear-gradient(147.66deg, #FF8CB3 17.89%, #DB638B 95.61%);
  --text:         #324066;   /* цвет текста сайта */
  --text-muted:   #767B8D;
  --bg:           #FFFFFF;
  --surface:      #FAF9FD;
  --border:       #E6E2F0;
  --radius:       15px;
  --wrap:         760px;
  --font: 'Gotham', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ каркас */

/* Шапка повторяет сайт: логотип, меню, язык, «Войти». На сайте она прозрачная
   и белеет при прокрутке — здесь сразу белая и липкая: то же самое без скрипта. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; flex: none; }
.logo img { display: block; width: 160px; height: auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 auto;
}
.site-nav a {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  transition: 0.15s;
}
.site-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }

.lang-switch {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--text-muted);
  white-space: nowrap;
  transition: 0.15s;
}
.lang-switch:hover { color: var(--accent); }

.btn-login {
  font-weight: 500;
  font-size: 14px;
  min-width: 117px;
  height: 40px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 100px;
  background: var(--primary);
  box-shadow: 0 25px 20px rgba(211, 107, 143, 0.2);
  color: #fff;
  transition: all 0.3s;
}
.btn-login:hover { color: #fff; transform: translateY(-3px); }
.btn-login:active { transform: translateY(1px); box-shadow: none; }

/* ------------------------------------------------------------ частые вопросы */

.popular {
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 28px;
}
.popular h2 { margin: 0 0 10px; font-size: 18px; }
.popular ul { margin: 0; padding-left: 20px; }
.popular li { margin-bottom: 7px; }
.popular a { color: var(--brand-dark); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 6px; letter-spacing: -0.01em; }
h3 { font-size: 20px; line-height: 1.3; margin: 36px 0 6px; letter-spacing: -0.01em; }
h4 { font-size: 18px; line-height: 1.4; margin: 0; font-weight: 600; }
h5 { font-size: 16px; margin: 20px 0 6px; font-weight: 600; }

/* Заголовок группы — крупная веха между зонами страницы */
.group-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin: 52px 0 4px;
  padding-top: 24px;
  border-top: 2px solid var(--brand-soft);
}
.group-title:first-of-type { margin-top: 32px; }

.lead { font-size: 18px; color: var(--text-muted); margin: 0 0 28px; }
.cat-desc { color: var(--text-muted); margin: 0 0 16px; font-size: 15px; }
.muted { color: var(--text-muted); font-size: 14px; }

/* ------------------------------------------------------------ поиск */

.search { position: relative; margin: 0 0 32px; }

.search input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  appearance: none;
}
.search input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: var(--bg);
}

.results {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.results a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.results a:last-child { border-bottom: 0; }
.results a:hover, .results a:focus { background: var(--brand-soft); }
.results .r-cat { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.results .empty { padding: 14px 16px; color: var(--text-muted); font-size: 15px; }

/* ------------------------------------------------------------ оглавление */

.toc { margin: 0 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--brand-soft);
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  color: var(--brand-dark);
}
.toc a:hover { background: #E7E0FA; }
.toc .count { color: var(--text-muted); font-size: 13px; }
.toc .nav-group {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 10px 0 -2px;
}
.toc .nav-group:first-child { margin-top: 0; }

/* ------------------------------------------------------------ вопрос-ответ */

.category { scroll-margin-top: 106px;   /* высота липкой шапки + отступ */ }

.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 10px 0;
  background: var(--bg);
  scroll-margin-top: 106px;   /* высота липкой шапки + отступ */
}
.qa[open] { background: var(--surface); }

.qa summary {
  cursor: pointer;
  padding: 16px 20px;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
  color: var(--brand);
  flex: none;
}
.qa[open] summary::after { content: "\2212"; }
.qa summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--radius); }

.answer { padding: 0 20px 4px; }
.article .answer { padding: 0; }

/* Подзаголовок внутри ответа на странице статьи — это h2, но по смыслу
   он мельче обычного h2 раздела. */
.article .answer h2 { font-size: 19px; margin: 26px 0 8px; letter-spacing: 0; }

.answer p { margin: 0 0 14px; }
.answer ul, .answer ol { margin: 0 0 14px; padding-left: 22px; }
.answer li { margin: 0 0 6px; }

.answer ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
.answer ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 10px;
}
.answer ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
}

.note {
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 14px;
  font-size: 16px;
}

.more { font-size: 15px; margin: 4px 0 16px; }

/* ------------------------------------------------------------ страница статьи */

.crumbs { font-size: 14px; color: var(--text-muted); margin: 0 0 12px; }
.crumbs a { color: var(--text-muted); }
.crumbs span { margin: 0 4px; }

.related {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 18px; margin: 0 0 10px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin-bottom: 6px; }

.updated { margin-top: 32px; font-size: 14px; color: var(--text-muted); }

/* ------------------------------------------------------------ подвал */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 48px;
  text-align: center;
}
.site-footer p { margin: 0 0 8px; }

/* ------------------------------------------------------------ мобильные */

@media (max-width: 900px) {
  /* Меню сайта на мобильном прячется в бургер; здесь просто убираем его —
     логотип и «Войти» доводят женщину туда же. */
  .site-nav { display: none; }
  .header-inner { min-height: 72px; gap: 12px; }
  .logo img { width: 110px; }
  .btn-login { min-width: 0; }
  .category, .qa { scroll-margin-top: 88px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  h3 { font-size: 17px; }
  .wrap { padding: 24px 16px 48px; }
  .qa summary { padding: 14px 16px; }
  .answer { padding: 0 16px 4px; }
  .header-inner { padding: 0 16px; }
  .header-actions { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
