/* pages.css — блоки внутренних страниц IQ007 СВАО.
   Дополняет styles.css, не переопределяет его.
   Все размеры завязаны на переменные из styles.css. */

/* ── Акцент страницы ───────────────────────────────── */
.page--blue   { --c-accent: var(--c-blue-dark); --c-accent-soft: var(--c-blue-soft); --c-accent-dark: #00719e; }
.page--green  { --c-accent: var(--c-green);     --c-accent-soft: #E1F1EA;            --c-accent-dark: #26654A; }
.page--violet { --c-accent: var(--c-violet);    --c-accent-soft: #E7E2F5;            --c-accent-dark: #1E0F4C; }
.page--orange,
.page         { --c-accent: var(--c-orange);    --c-accent-soft: var(--c-orange-soft); --c-accent-dark: var(--c-orange-dark); }

.page .hero--sub h1 .accent,
.page .hero--sub .credibility .num,
.page .eyebrow                  { color: var(--c-accent-dark); }
.page .eyebrow                  { background: var(--c-accent-soft); }
.page .btn-primary              { background: var(--c-accent); box-shadow: 0 6px 20px rgba(0,0,0,.14); }
.page .btn-primary:hover        { background: var(--c-accent-dark); }

/* ── Хлебные крошки ────────────────────────────────── */
.breadcrumbs {
  padding: 13px 0; font-size: 14px; color: var(--c-text-soft);
  border-bottom: 1px solid var(--c-line); background: #fff;
}
.breadcrumbs .container { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.breadcrumbs a { color: var(--c-text-soft); }
.breadcrumbs a:hover { color: var(--c-accent); }
.breadcrumbs .sep { margin: 0 8px; opacity: .4; }
.breadcrumbs .current { color: var(--c-text); font-weight: 500; }

/* ── Hero внутренней страницы ──────────────────────── */
.hero--sub {
  height: auto; min-height: 0; padding: 56px 0 64px;
  background: linear-gradient(135deg, #fff 0%, var(--c-accent-soft) 62%, #fff 100%);
}
.hero--sub .container { align-items: center; }
.hero--sub h1 { font-size: clamp(28px, 3.5vw, 50px); }
.hero--sub .visual img { max-height: 420px; filter: drop-shadow(0 20px 50px rgba(0,0,0,.16)); }
.hero--sub .lead { max-width: 620px; font-size: clamp(16px, 1.2vw, 18px); }
.hero--sub .credibility { margin-top: 4px; }

/* ── Проза ─────────────────────────────────────────── */
.prose { max-width: 750px; margin: 0 auto; font-size: 17px; line-height: 1.62; }
.prose--narrow { max-width: 680px; }
.prose p { margin-bottom: 18px; color: var(--c-text); }
.prose h3 { font-size: clamp(20px, 2vw, 26px); margin: 34px 0 14px; }
.prose-list { list-style: none; margin: 0 0 20px; }
.prose-list li { position: relative; padding: 8px 0 8px 30px; }
.prose-list li::before {
  content: ''; position: absolute; left: 4px; top: 18px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent);
}
.prose-note {
  background: var(--c-accent-soft); border-radius: var(--radius-sm);
  padding: 18px 22px; font-size: 16px; margin: 22px 0;
  border-left: 4px solid var(--c-accent);
}

/* ── Универсальная сетка карточек ──────────────────── */
/* Элемент грида по умолчанию имеет min-width:auto и не даёт колонке сжаться
   уже своего содержимого — на узком экране это выносит вёрстку за экран.
   Обнуляем и разрешаем переносить длинные слова. */
.cardgrid > *, .steps > *, .iconcards > *, .relgrid > *,
.routes > *, .postgrid > *, .quotes > *, .bigcards > *,
.statrow > *, .checkwrap > *, .methodbox > *, .pricebox > * {
  min-width: 0;
  overflow-wrap: break-word;
}

.cardgrid { display: grid; gap: 16px; }
.cardgrid--2 { grid-template-columns: repeat(2, 1fr); }
.cardgrid--3 { grid-template-columns: repeat(3, 1fr); }
.cardgrid--4 { grid-template-columns: repeat(4, 1fr); }
.cardgrid--5 { grid-template-columns: repeat(5, 1fr); }
.ucard {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, border-color .15s ease;
}
.ucard:hover { transform: translateY(-3px); border-color: var(--c-accent); }
.ucard-top {
  font-family: var(--font-h); font-size: 28px; color: var(--c-accent); line-height: 1;
}
.ucard-top small {
  display: block; font-family: var(--font-b); font-size: 13px;
  color: var(--c-text-soft); font-weight: 500; margin-top: 6px;
}
.ucard h3 { font-size: 18px; line-height: 1.2; }
.ucard p { font-size: 14.5px; color: var(--c-text-soft); line-height: 1.5; flex: 1; }
.ucard-group {
  font-size: 13.5px; font-weight: 600; color: var(--c-text); line-height: 1.3;
  padding-left: 22px; position: relative;
}
.ucard-group::before { content: '👥'; position: absolute; left: 0; top: 0; font-size: 13px; }
.ucard-badge {
  background: var(--c-accent-soft); color: var(--c-accent-dark);
  padding: 8px 12px; border-radius: 8px; font-family: var(--font-h);
  font-size: 13.5px; text-align: center; line-height: 1.25;
}

/* ── Шаги / модули ─────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-item {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 24px; transition: transform .15s ease, box-shadow .15s ease;
}
.step-item:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.step-no {
  font-family: var(--font-h); font-size: 14px; color: var(--c-accent);
  letter-spacing: .06em; margin-bottom: 10px; text-transform: uppercase;
}
.step-item h3 { font-size: 19px; margin-bottom: 8px; }
.step-item p { font-size: 14.5px; color: var(--c-text-soft); }

/* ── Чек-лист результатов ──────────────────────────── */
.checkwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.checkwrap--full { grid-template-columns: 1fr; }
.checkwrap--full .checklist { max-width: 860px; margin: 0 auto; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checklist li {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 17px 22px 17px 56px; font-size: 16px; position: relative; font-weight: 500;
}
.checklist li::before {
  content: '✓'; position: absolute; left: 18px; top: 17px;
  width: 26px; height: 26px; background: var(--c-accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.checklist li small {
  display: block; font-weight: 400; color: var(--c-text-soft);
  font-size: 14px; margin-top: 4px;
}
.checkvisual { background: var(--c-bg-cream); border-radius: var(--radius); padding: 36px; text-align: center; }
.checkvisual img { max-height: 360px; margin: 0 auto; }

/* ── Карточки с иконкой ────────────────────────────── */
.iconcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.iconcard {
  background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--c-line);
  padding: 22px 22px 22px 70px; position: relative; font-size: 15px; line-height: 1.5;
  color: var(--c-text-soft);
}
.iconcard-i {
  position: absolute; left: 16px; top: 18px; width: 44px; height: 44px;
  background: var(--c-accent); color: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: 18px;
}
.iconcard strong {
  display: block; font-family: var(--font-h); font-size: 17px;
  margin-bottom: 6px; color: var(--c-text); font-weight: 400;
}

/* ── Две крупные карточки ──────────────────────────── */
.bigcards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bigcard { background: var(--c-violet); color: #fff; border-radius: var(--radius); padding: 36px; }
.bigcard--alt { background: var(--c-accent); }
.bigcard-n { font-family: var(--font-h); font-size: 62px; line-height: 1; margin-bottom: 12px; }
.bigcard h3 { font-size: 22px; color: #fff; margin-bottom: 10px; }
.bigcard p { opacity: .92; font-size: 16px; }

/* ── Блок «методика» ───────────────────────────────── */
.methodbox {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 48px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px;
  align-items: center; position: relative; overflow: hidden;
}
.methodbox::after {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255,255,255,.08); bottom: -210px; right: -160px; pointer-events: none;
}
.methodbox h2 { color: #fff; margin-bottom: 12px; }
.methodbox p { font-size: 17px; margin-bottom: 16px; opacity: .95; }
.methodbox ul { list-style: none; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.methodbox ul li { padding-left: 28px; position: relative; font-size: 16px; }
.methodbox ul li::before { content: '✓'; position: absolute; left: 0; color: var(--c-yellow); font-weight: 700; }
.methodbox-fox { text-align: center; position: relative; z-index: 1; }
.methodbox-fox img { max-height: 340px; margin: 0 auto; }
.eyebrow--ghost { background: rgba(255,255,255,.18) !important; color: #fff !important; }

/* ── Сравнительная таблица ─────────────────────────── */
.ctable-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--c-line); background: #fff; }
.ctable { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15.5px; }
.ctable th, .ctable td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--c-line); }
.ctable th { font-family: var(--font-h); font-weight: 400; font-size: 15px; background: var(--c-bg-cream); }
.ctable th.us, .ctable td.us { background: var(--c-accent-soft); }
.ctable th.us { color: var(--c-accent-dark); }
.ctable tr:last-child td { border-bottom: none; }
.ctable-note { text-align: center; color: var(--c-text-soft); font-size: 15px; margin-top: 18px; }

/* ── Цитаты родителей ──────────────────────────────── */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.quote blockquote { font-family: var(--font-h); font-size: 19px; line-height: 1.28; }
.quote figcaption { color: var(--c-text-soft); font-size: 14px; margin-top: auto; }

/* ── Цена ──────────────────────────────────────────── */
.pricebox { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: stretch; }
.pricebox-main {
  background: var(--c-accent); color: #fff; border-radius: var(--radius);
  padding: 44px 40px; position: relative; overflow: hidden;
}
.pricebox-main::after {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.08); bottom: -160px; right: -160px;
}
.pricebox-lab {
  font-family: var(--font-h); font-size: 13px; opacity: .9; margin-bottom: 14px;
  letter-spacing: .08em; text-transform: uppercase; position: relative;
}
.pricebox-lab--dark { color: var(--c-orange-dark); opacity: 1; }
.pricebox-num { font-family: var(--font-h); font-size: clamp(42px, 5.4vw, 76px); line-height: 1; margin-bottom: 12px; position: relative; }
.pricebox-unit { font-size: 17px; opacity: .92; margin-bottom: 26px; position: relative; }
.pricebox-list { display: flex; flex-direction: column; gap: 9px; font-size: 15.5px; position: relative; }
.pricebox-pay {
  background: var(--c-yellow); border-radius: var(--radius); padding: 38px;
  display: flex; flex-direction: column; justify-content: center;
}
.pricebox-pay ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.pricebox-pay li { padding-left: 28px; position: relative; font-size: 15.5px; font-weight: 500; }
.pricebox-pay li::before { content: '✓'; position: absolute; left: 0; color: var(--c-orange-dark); font-weight: 700; }

/* ── Кому не подойдём ──────────────────────────────── */
.not-for-lead { color: var(--c-text-soft); font-size: 17px; margin-bottom: 8px; }
.not-for-note { margin-top: 16px; font-style: italic; color: var(--c-accent-dark); }

/* ── Перелинковка ──────────────────────────────────── */
.relgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.relcard {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, border-color .15s ease;
}
.relcard:hover { transform: translateY(-3px); border-color: var(--c-accent); }
.relcard h3 { font-size: 19px; line-height: 1.2; }
.relcard p { font-size: 14.5px; color: var(--c-text-soft); flex: 1; line-height: 1.5; }
.relcard-meta { font-size: 13px; color: var(--c-accent-dark); font-weight: 600; }
.relcard-go { font-family: var(--font-h); font-size: 14px; color: var(--c-accent); }

/* ── Маршруты (районные страницы) ──────────────────── */
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.route {
  background: #fff; border-left: 4px solid var(--c-accent); border-radius: var(--radius-sm);
  padding: 22px 24px; box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.route-how { font-family: var(--font-h); font-size: 17px; margin-bottom: 4px; }
.route-time { color: var(--c-accent-dark); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.route p { font-size: 14.5px; color: var(--c-text-soft); line-height: 1.5; }

/* ── Ряд цифр ──────────────────────────────────────── */
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.statrow-i {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center;
}
.statrow-i .n { display: block; font-family: var(--font-h); font-size: clamp(30px, 3.4vw, 44px); color: var(--c-accent); line-height: 1; }
.statrow-i .l { display: block; margin-top: 10px; font-size: 14.5px; color: var(--c-text-soft); line-height: 1.35; }

/* ── Блог ──────────────────────────────────────────── */
.postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.postcard {
  background: #fff; border: 2px solid var(--c-line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, border-color .15s ease;
}
.postcard:hover { transform: translateY(-3px); border-color: var(--c-accent); }
.postcard-tag {
  align-self: flex-start; background: var(--c-accent-soft); color: var(--c-accent-dark);
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: .05em;
}
.postcard h3 { font-size: 20px; line-height: 1.2; }
.postcard p { font-size: 14.5px; color: var(--c-text-soft); flex: 1; line-height: 1.5; }
.postcard-meta { font-size: 13px; color: var(--c-text-soft); border-top: 1px solid var(--c-line); padding-top: 12px; }

.article { max-width: 730px; margin: 0 auto; font-size: 17.5px; line-height: 1.68; }
.article p { margin-bottom: 20px; }
.article h2 { font-size: clamp(24px, 2.8vw, 34px); margin: 42px 0 16px; }
.article h3 { font-size: clamp(19px, 2.1vw, 24px); margin: 32px 0 12px; }
.article ul, .article ol { margin: 0 0 22px 0; padding-left: 0; list-style: none; }
.article ul li { position: relative; padding: 7px 0 7px 30px; }
.article ul li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }
.article ol { counter-reset: n; }
.article ol li { position: relative; padding: 7px 0 7px 38px; counter-increment: n; }
.article ol li::before {
  content: counter(n); position: absolute; left: 0; top: 6px; width: 24px; height: 24px;
  background: var(--c-accent); color: #fff; border-radius: 50%; font-family: var(--font-h);
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.article blockquote {
  border-left: 4px solid var(--c-accent); background: var(--c-accent-soft);
  padding: 20px 24px; border-radius: var(--radius-sm); margin: 26px 0;
  font-size: 17px; font-style: normal;
}
/* Таблицы норм шире мобильного экрана — прокручиваем их внутри себя,
   иначе вбок уезжает вся страница. */
.article-table { overflow-x: auto; margin: 26px 0; -webkit-overflow-scrolling: touch; }
.article-table table { margin: 0; min-width: 440px; }
.article table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15.5px; }
.article th, .article td { padding: 13px 16px; border-bottom: 1px solid var(--c-line); text-align: left; }
.article th { background: var(--c-bg-cream); font-family: var(--font-h); font-weight: 400; }
.article-toc {
  background: var(--c-bg-cream); border-radius: var(--radius); padding: 26px 30px; margin-bottom: 34px;
}
.article-toc strong { font-family: var(--font-h); font-weight: 400; display: block; margin-bottom: 12px; }
.article-toc ol { margin: 0; }
.article-toc a { color: var(--c-accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-meta { color: var(--c-text-soft); font-size: 15px; margin-bottom: 8px; }

/* ── Футер: популярные запросы ─────────────────────── */
/* Футер — единый фиолетовый блок. Свои фоны у секций не задаём: чёрные полосы
   вперемешку с фиолетовым читались как чужие куски. Разделяем тонкой линией. */
.footer-seo {
  color: rgba(255,255,255,.62); padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer-seo .label {
  font-family: var(--font-h); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: 14px;
}
.footer-seo-links { display: flex; flex-wrap: wrap; gap: 7px 14px; }
.footer-seo-links a { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.5; }
.footer-seo-links a:hover { color: var(--c-yellow); }

/* ── Футер: колонки меню ───────────────────────────── */
.footer-nav {
  color: #fff; padding: 42px 0 36px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.footer-nav .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.footer-nav h5 {
  font-family: var(--font-h); font-weight: 400; font-size: 15px; color: #fff;
  margin-bottom: 14px;
}
.footer-nav a { display: block; font-size: 14.5px; color: rgba(255,255,255,.6); padding: 4px 0; }
.footer-nav a:hover { color: var(--c-yellow); }

/* ── Шапка: выпадающее меню ────────────────────────── */
.nav-drop { position: relative; }
.nav-drop > a::after { content: '▾'; font-size: 10px; margin-left: 5px; opacity: .55; }
.nav-drop-panel {
  position: absolute; top: 100%; left: -18px; z-index: 60;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0,0,0,.14); padding: 12px;
  display: grid; grid-template-columns: repeat(2, minmax(258px, 1fr)); gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel { opacity: 1; visibility: visible; transform: translateY(0); }
/* Базовое .nav a { white-space: nowrap } обрезало длинные названия
   («Нейропсихологическое обследование», «Программирование и робототехника») —
   в выпадающем меню перебиваем его явно, иначе текст режется. */
.nav-drop-panel a {
  display: block; padding: 10px 14px; border-radius: 8px; font-size: 14.5px;
  font-weight: 500; line-height: 1.25; white-space: normal;
}
.nav-drop-panel a:hover { background: var(--c-orange-soft); color: var(--c-orange-dark); }
.nav-drop-panel a small { display: block; font-weight: 400; font-size: 12.5px; color: var(--c-text-soft); margin-top: 2px; }

.nav a.is-active { color: var(--c-orange); font-weight: 600; }

/* ── Мобильное меню ────────────────────────────────── */
.nav-toggle {
  display: none; background: none; padding: 10px; margin-left: 2px;
  flex-direction: column; gap: 5px; border-radius: 10px; flex: 0 0 auto;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--c-text);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.nav-locked { overflow: hidden; }

/* Меню-панель на планшете и мобиле. 900px — точка, где горизонтальное меню
   перестаёт помещаться рядом с логотипом и кнопкой. */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-header .nav {
    display: none; position: fixed; inset: auto 0 0 0; top: 0;
    background: #fff; z-index: 120; padding: 84px 20px 32px;
    flex-direction: column; align-items: stretch; gap: 0;
    overflow-y: auto; height: 100dvh;
  }
  .site-header .nav.is-open { display: flex; }
  .site-header .nav > a,
  .site-header .nav .nav-drop > a {
    display: block; padding: 15px 4px; font-size: 17px; font-weight: 600;
    border-bottom: 1px solid var(--c-line);
  }
  .nav-drop { position: static; }
  .nav-drop > a::after { content: none; }
  .nav-drop-panel {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding: 4px 0 12px;
    grid-template-columns: 1fr; background: transparent;
  }
  .nav-drop-panel a { padding: 11px 12px; font-size: 15px; }
  .nav-drop-panel a small { color: var(--c-text-soft); }
}
@media (max-width: 640px) {
  /* Базовые стили прячут меню и кнопку целиком — возвращаем их для многостраничника */
  .site-header .nav.is-open { display: flex; }
  .site-header .nav-toggle { display: flex; }
  .site-header .header-cta { display: flex; }
  .site-header .header-cta .btn-ghost { display: none; }
  .site-header .header-cta .btn-primary { font-size: 13px; padding: 10px 14px; }
  .site-header .header-cta .btn-primary .full { display: none; }
  .site-header .header-cta .btn-primary .short { display: inline !important; }
}

/* ── Адаптив ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .cardgrid--5 { grid-template-columns: repeat(3, 1fr); }
  .cardgrid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-nav .container { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .hero--sub { padding: 40px 0 48px; }
  .hero--sub .container { grid-template-columns: 1fr; }
  .hero--sub .visual { order: -1; }
  .hero--sub .visual img { max-height: 240px; }
  .cardgrid--3, .cardgrid--5, .steps, .iconcards, .quotes, .relgrid, .routes, .postgrid { grid-template-columns: repeat(2, 1fr); }
  .checkwrap { grid-template-columns: 1fr; }
  .bigcards, .pricebox, .methodbox { grid-template-columns: 1fr; }
  .methodbox { padding: 32px; }
  .methodbox-fox { display: none; }
  .statrow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-drop-panel { grid-template-columns: 1fr; }
  .footer-nav .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cardgrid--2, .cardgrid--3, .cardgrid--4, .cardgrid--5,
  .steps, .iconcards, .quotes, .relgrid, .routes, .postgrid { grid-template-columns: 1fr; }
  .pricebox-main, .pricebox-pay { padding: 30px 24px; }
  .prose { font-size: 16.5px; }
  .article { font-size: 17px; }
  .ucard, .relcard, .quote { padding: 22px; }
}

/* ── Зона нажатия ──────────────────────────────────── */
/* Крестик промо-полосы был 15×22px — пальцем не попасть.
   Даём нормальную зону нажатия, не меняя вид самого символа. */
.promo-bar .promo-close {
  min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 2px;
}

/* ── Реальные фото занятий ─────────────────────────── */
/* Герой с фотографией вместо лиса-иллюстрации: лису нужна прозрачность
   и тень, фотографии — скругление и обрезка по кадру. */
.hero--sub .visual--photo img {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: var(--radius); filter: none;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.gallery-i {
  margin: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--c-bg-cream); aspect-ratio: 3 / 2;
}
.gallery-i--wide { grid-column: span 2; grid-row: span 2; aspect-ratio: 3 / 2.04; }
.gallery-i img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.gallery-i:hover img { transform: scale(1.04); }
.gallery-note {
  text-align: center; color: var(--c-text-soft);
  font-size: 15px; margin-top: 16px;
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-i--wide { grid-column: span 2; grid-row: auto; aspect-ratio: 3 / 2; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero--sub .visual--photo img { max-height: 260px; }
}

/* ── Видео с занятия ───────────────────────────────── */
.videobox { max-width: 900px; margin: 0 auto; }
.videobox-v {
  width: 100%; display: block; border-radius: var(--radius);
  background: #000; aspect-ratio: 16 / 9; object-fit: cover;
  box-shadow: 0 20px 50px rgba(0,0,0,.16);
}
.videobox-note {
  text-align: center; color: var(--c-text-soft);
  font-size: 15px; margin-top: 14px;
}

/* Анимации-лисы отдаём видеофайлом (в 27 раз легче GIF) — размеры как у картинки. */
.not-for .visual video { max-width: 100%; height: auto; display: block; }

/* ── Типографика строк ─────────────────────────────── */
/* Замер показал: при ширине 940px строка выходила ~100 знаков, 21% строк были
   длиннее 85. Комфортный предел чтения — около 80 знаков, поэтому колонки
   текста сузили (см. .prose и .article выше). Секции остаются на всю ширину —
   узкой становится только сама строка. */

/* Многострочный заголовок браузер по умолчанию рвёт как попало: длинная строка
   и обрубок в две буквы. balance выравнивает строки по ширине. */
h1, h2, h3,
.hero h1, .hero--sub h1,
.section-head h2, .ucard h3, .step-item h3, .relcard h3, .postcard h3,
.bigcard h3, .article h2, .article h3, .not-for h2, .methodbox h2 {
  text-wrap: balance;
}

/* Для абзацев balance не годится (он для коротких блоков) — pretty убирает
   висячие строки из одного слова в конце абзаца. */
p, li, .lead, .prose p, .article p, .checklist li, .faq p {
  text-wrap: pretty;
}

/* Длинные слова и склеенные неразрывным пробелом пары не должны выпирать
   за экран на узких телефонах. */
.prose, .article, .checklist li, .ucard, .iconcard, .step-item, .relcard, .postcard {
  overflow-wrap: break-word;
}

/* Ограничение длины строки там, где текст шёл во всю ширину контейнера.
   Единица ch привязана к шрифту, поэтому предел держится при любом кегле.
   66ch по замеру даёт около 82 знаков на кириллице (72ch давали до 95). */
.faq details p,
.section-head p,
.dir-card .lead,
.not-for .text p,
.not-for .text li,
.prose, .article {
  max-width: 66ch;
}
.prose, .article { margin-left: auto; margin-right: auto; }

/* Подписи под галереей, таблицей и видео — по центру и той же мерой. */
.gallery-note, .ctable-note, .videobox-note {
  max-width: 68ch; margin-left: auto; margin-right: auto;
}

/* ── Отзывы с Яндекс.Карт ──────────────────────────── */
/* Колонки, а не сетка: отзывы разной длины, при одинаковых карточках
   половина остаётся полупустой и всё превращается в стену. */
.revwrap {
  column-count: 3;
  column-gap: 18px;
}
.rev {
  break-inside: avoid;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.rev-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rev-ava {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: 16px;
}
.rev-who { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.rev-who b { font-size: 14.5px; font-weight: 600; }
.rev-who small { font-size: 12px; color: var(--c-text-soft); }
.rev-stars { margin-left: auto; color: #FFB020; font-size: 13px; letter-spacing: 1px; }
.rev blockquote {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--c-text);
  font-family: var(--font-b);
  font-weight: 400;
}
.rev-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-accent-dark);
  background: var(--c-accent-soft);
  padding: 4px 10px;
  border-radius: 100px;
}
.rev-note {
  text-align: center;
  color: var(--c-text-soft);
  font-size: 15px;
  margin-top: 22px;
  max-width: 68ch;
  margin-left: auto; margin-right: auto;
}

@media (max-width: 1000px) { .revwrap { column-count: 2; } }
@media (max-width: 640px)  { .revwrap { column-count: 1; } .rev { padding: 16px 18px; } }

/* Документы школы (/dokumenty/): сканы лицензии, прайса и выписки */
.docgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.docgrid-item { margin: 0; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 18px; padding: 14px; }
.docgrid-item img { display: block; width: 100%; height: auto; border-radius: 10px; }
.docgrid-item figcaption { margin-top: 12px; font-weight: 600; line-height: 1.35; }
@media (max-width: 700px) { .docgrid { grid-template-columns: 1fr; } }

/* Типографика (Альберт 09.10): строки абзаца уравнены по длине, заголовки тоже, в статьях строка ≤78 знаков; justify нельзя */
h1,h2,h3{text-wrap:balance}
p,li{text-wrap:balance}
.article p,.article li,.prose p,.prose li{max-width:78ch}

/* ── Обложка статьи блога ── */
.post-cover { max-width: 860px; margin: 40px auto 0; padding: 0 20px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 2px solid var(--c-line); aspect-ratio: 1200 / 630; object-fit: cover; }
.postcard-img { display: block; width: calc(100% + 56px); max-width: none; margin: -28px -28px 4px; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }

/* Цена на «Скорочтении»: две колонки на компьютере, одна на телефоне (Safari не сжимал инлайн-сетку) */
.sk-price { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.sk-price > * { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 760px) {
  .sk-price { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sk-price > div { padding: 28px 22px !important; }
}
