/* Собрано build.py — не редактировать вручную. */

/* ===== variables.css ===== */
/* Дизайн-токены проекта «Оригами» */
:root {
  /* Основная палитра */
  --color-ink: #2E3238;
  --color-ink-soft: #4A4F56;
  --color-muted: #6B7178;
  --color-white: #ffffff;

  --color-teal: #3EBEBD;
  --color-teal-dark: #1E7B7A;
  --color-teal-light: #EAF8F8;
  --color-teal-pale: #E3F5F5;
  --color-teal-link: #2A9D9C;

  --color-orange: #EE7431;
  --color-orange-dark: #C2551A;
  --color-orange-light: #FDE9DD;

  --color-yellow: #F6A82C;
  --color-yellow-dark: #C77E0A;
  --color-yellow-light: #FFF7E8;
  --color-yellow-pale: #FFF1DE;

  /* Служебные цвета */
  --color-line: #EDEFF1;
  --color-sand: #E3DAD0;
  --color-gray-bg: #FAFBFC;
  --color-slot-bg: #F4F6F7;
  --color-slot-border: #C9D2D6;
  --color-slot-text: #8A939A;

  /* Тени */
  --shadow-header: 0 2px 12px rgba(46, 50, 56, 0.08);
  --shadow-card: 0 6px 18px rgba(46, 50, 56, 0.06);
  --shadow-card-soft: 0 4px 14px rgba(46, 50, 56, 0.05);
  --shadow-raised: 0 12px 30px rgba(46, 50, 56, 0.12);
  --shadow-photo: 0 16px 40px rgba(46, 50, 56, 0.15);
  --shadow-orange: 0 8px 20px rgba(238, 116, 49, 0.35);

  /* Радиусы */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Сетка */
  --container: 1160px;
  --container-narrow: 900px;
  --container-text: 800px;
  --gutter: 24px;

  /* Типографика */
  --font-main: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-accent: 'PT Serif', Georgia, serif;
}

/* ===== fonts.css ===== */
/* Локальные шрифты в формате woff2 (папка /fonts) */

/* Nunito — вариативный шрифт, вес 400–900 */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* PT Serif — только курсивное начертание для цитат */
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pt-serif-italic-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pt-serif-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pt-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pt-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== reset.css ===== */
/* Базовый сброс */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-main);
  color: var(--color-ink);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
figcaption,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

blockquote {
  padding: 0;
}

/* По умолчанию браузер показывает адрес курсивом */
address {
  font-style: normal;
}

/* Атрибуты width и height у картинок нужны, чтобы страница не прыгала при
   загрузке, но браузер применяет их как размеры. Ширину перебивают стили
   блоков, а высота осталась бы от атрибута и растянула бы фотографию —
   поэтому height: auto. Блоки, которым нужна своя высота, задают её сами. */
img {
  height: auto;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-teal-link);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

/* ===== typography.css ===== */
/* Типографика: блоки title, text, quote, accent с модификаторами */
.title {
  font-weight: 900;
  line-height: 1.2;
}

.title--xl {
  font-size: 44px;
  line-height: 1.18;
}

.title--lg {
  font-size: 38px;
  line-height: 1.15;
}

.title--md {
  font-size: 34px;
}

.title--sm {
  font-size: 26px;
  line-height: 1.25;
}

.text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink-soft);
}

.text--lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-ink);
}

.text--lg {
  font-size: 16.5px;
  line-height: 1.75;
}

.text--sm {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-muted);
}

.quote {
  font-family: var(--font-accent);
  font-style: italic;
  line-height: 1.6;
}

.accent--orange {
  color: var(--color-orange);
}

.accent--yellow {
  color: var(--color-yellow);
}

/* ===== layout.css ===== */
/* Страница целиком — блок page на <body>.
   Его модификаторы описывают состояния: page--a11y, page--menu-open,
   page--lightbox-open (см. a11y.css, burger.css, lightbox.css). */
.page {
  position: relative;
}

/* Контейнеры и секции */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--text {
  max-width: var(--container-text);
}

.section {
  background: var(--color-white);
}

.section--teal {
  background: var(--color-teal-light);
}

.section--teal-solid {
  background: var(--color-teal);
}

.section--sand {
  background: var(--color-yellow-light);
}

.section--overflow {
  overflow: hidden;
}

.section__inner {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section__inner--wide-gap {
  gap: 48px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.section__inner--tight-bottom {
  padding-bottom: 8px;
}

.section__inner--no-top {
  padding-top: 0;
}

/* Текст только для скринридеров: заголовок, который не нужен визуально */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== topbar.css ===== */
/* Верхняя оранжевая полоса */
.topbar {
  background: var(--color-yellow);
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
  padding: 8px var(--gutter);
  display: flex;
  justify-content: center;
  gap: var(--gutter);
  flex-wrap: wrap;
  text-align: center;
}

/* ===== header.css ===== */
/* Шапка сайта */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  box-shadow: var(--shadow-header);
}

.header__top {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

/* Телефон и бургер в правой части шапки */
.header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header__phone {
  font-weight: 900;
  font-size: 19px;
  color: var(--color-ink);
  white-space: nowrap;
}

.header__facts {
  border-top: 1px solid #F1F3F5;
  background: #FDFBF7;
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo__img {
  height: 64px;
  width: auto;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__name {
  font-weight: 900;
  font-size: 25px;
  letter-spacing: 2.5px;
  color: var(--color-ink);
}

.logo__tagline {
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--color-muted);
  font-weight: 700;
}

/* Факты о школе — список определений: термин «время работы», значение «9:00–18:00».
   В разметке dt идёт перед dd, как требует спецификация,
   а row-reverse ставит значение слева, как в макете. */
.facts {
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.facts__item {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 8px;
}

.facts__value {
  font-weight: 900;
  font-size: 16px;
}

.facts__value--yellow {
  color: var(--color-yellow);
}

.facts__value--teal {
  color: var(--color-teal);
}

.facts__value--orange {
  color: var(--color-orange);
}

.facts__label {
  margin: 0;
  font-size: 13px;
  color: var(--color-muted);
  font-weight: 600;
}

/* ===== nav.css ===== */
/* Основное меню */
.nav {
  background: var(--color-teal);
}

.nav__list {
  padding-top: 11px;
  padding-bottom: 11px;
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 15px;
}

.nav__link {
  color: var(--color-white);
}

/* Хлебные крошки */
.breadcrumbs {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-muted);
}

.breadcrumbs__list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumbs__item::after {
  content: '/';
  margin-left: 8px;
  color: var(--color-muted);
}

.breadcrumbs__item:last-child::after {
  content: none;
}

.breadcrumbs__current {
  color: var(--color-ink);
}

/* ===== burger.css ===== */
/* Бургер-меню: до 600px основное меню сворачивается в выпадающую панель */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--color-teal-light);
  border: 2px solid var(--color-teal);
  border-radius: var(--radius-sm);
  padding: 0;
  flex-shrink: 0;
}

.burger__line {
  display: block;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--color-teal-dark);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Раскрытый бургер превращается в крестик */
.burger--active .burger__line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.burger--active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger--active .burger__line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .burger {
    display: flex;
  }

  /* Меню скрыто, пока не нажат бургер */
  .nav {
    display: none;
  }

  .nav--open {
    display: block;
    animation: nav-drop 0.22s ease;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding-top: 4px;
    padding-bottom: 10px;
    font-size: 16px;
  }

  .nav__item {
    display: block;
  }

  .nav__item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .nav__link {
    display: block;
    padding: 13px 2px;
  }

  /* Кнопка слабовидящих плавает поверх панели — прячем её на время */
  .page--menu-open .a11y-toggle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav--open {
    animation: none;
  }

  .burger__line {
    transition: none;
  }
}

/* ===== a11y.css ===== */
/* Версия для слабовидящих */
.a11y-toggle {
  position: fixed;
  top: 112px;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-teal-light);
  border: 2px solid var(--color-teal);
  border-right: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  padding: 9px 16px 9px 14px;
  font-weight: 800;
  font-size: 13px;
  color: var(--color-teal-dark);
  box-shadow: 0 6px 16px rgba(46, 50, 56, 0.15);
}

/* Эффекты режима вешаем на блоки страницы по отдельности, а НЕ на body.
   filter у предка делает его точкой отсчёта для position: fixed — кнопка
   переставала держаться экрана и уезжала вверх вместе со страницей.
   Поэтому сама кнопка и полноэкранный просмотр фото из выборки исключены. */
.page--a11y > *:not(.a11y-toggle):not(.lightbox) {
  filter: grayscale(1) contrast(1.05);
  zoom: 1.15;
}

/* Просмотрщику фильтр можно задать напрямую: на его собственное
   позиционирование это не влияет, мешают только фильтры предков */
.page--a11y .lightbox {
  filter: grayscale(1) contrast(1.05);
}

.page--a11y a {
  text-decoration: underline !important;
}

/* Заглушка под фотографию */
.photo-slot {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-slot-bg);
  border: 2px dashed var(--color-slot-border);
  color: var(--color-slot-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.photo-slot--rounded {
  border-radius: var(--radius-md);
}

/* ===== buttons.css ===== */
/* Кнопки и ссылки-кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: var(--shadow-orange);
}

.btn--secondary {
  background: var(--color-white);
  color: var(--color-teal-dark);
  border: 2px solid var(--color-teal);
  padding: 12px 28px;
}

.btn--light {
  background: var(--color-white);
  color: var(--color-teal-dark);
}

.btn--self-start {
  align-self: flex-start;
}

/* Круглая кнопка с иконкой — стрелки слайдеров */
.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-teal);
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.icon-btn--sm {
  width: 40px;
  height: 40px;
}

/* Кнопка, оформленная как текстовая ссылка */
.text-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

/* Метки-пилюли */
.pill {
  align-self: flex-start;
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.pill--yellow {
  background: var(--color-yellow-pale);
  color: var(--color-yellow-dark);
}

.pill--teal {
  background: var(--color-teal-pale);
  color: var(--color-teal-dark);
}

.pill--orange {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.pill--sand {
  background: var(--color-yellow-light);
  color: var(--color-yellow-dark);
}

/* ===== section-head.css ===== */
/* Заголовок секции */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-head--center {
  text-align: center;
  align-items: center;
}

.section-head__kicker {
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 13px;
}

.section-head__kicker--orange {
  color: var(--color-orange);
}

.section-head__kicker--teal {
  color: var(--color-teal-dark);
}

.section-head__kicker--yellow {
  color: var(--color-yellow-dark);
}

.section-head__note {
  font-size: 16px;
  color: var(--color-muted);
  max-width: 560px;
}

/* ===== hero.css ===== */
/* Первый экран */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 22% center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 34%, rgba(255, 255, 255, 0.93) 50%, rgba(255, 255, 255, 0.6) 68%, rgba(255, 255, 255, 0.12) 100%);
}

.hero__inner {
  position: relative;
  padding-top: 76px;
  padding-bottom: 64px;
}

.hero__content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero__text {
  max-width: 540px;
  color: var(--color-ink);
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__features {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 180px;
}

.hero-feature__icon {
  flex-shrink: 0;
}

.hero-feature__label {
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.35;
}

/* ===== author.css ===== */
/* Подпись автора: фото, имя и роль.
   Используется в блоке «История школы» и в отзывах. */
.author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.author__photo--sm {
  width: 52px;
  height: 52px;
}

.author__info {
  display: flex;
  flex-direction: column;
}

.author__name {
  font-weight: 800;
  font-size: 16px;
}

.author__role {
  font-size: 14px;
  color: var(--color-muted);
}

/* ===== mission.css ===== */
/* Секция «Наша миссия» */
.mission__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.mission__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mission__title {
  font-size: 36px;
}

.mission__media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.mission__photo {
  width: 100%;
  /* Снимок вертикальный: в прежнюю полосу 380 px не помещались
     ни самолётик сверху, ни ноги мальчика. Кадрируем выше середины. */
  height: 480px;
  object-fit: cover;
  object-position: center 12%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-photo);
}

.mission__card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin: -60px 28px 0;
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission__card-logo {
  width: 40px;
  height: auto;
  align-self: flex-start;
}

.mission__card-text {
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--color-ink);
}

.mission__banner {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 30px 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(46, 50, 56, 0.07);
}

.mission__banner-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 240px;
}

.mission__banner-title {
  font-weight: 900;
  font-size: 19px;
}

.mission__banner-text {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ===== method.css ===== */
/* Секция «Как мы работаем» */
.method-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.method-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-card__icon--yellow {
  background: var(--color-yellow-pale);
  color: var(--color-yellow);
}

.method-card__icon--teal {
  background: var(--color-teal-pale);
  color: var(--color-teal);
}

.method-card__icon--orange {
  background: var(--color-orange-light);
  color: var(--color-orange);
}

.method-card__title {
  font-size: 18px;
  font-weight: 800;
}

/* ===== school-life.css ===== */
/* Секция «Что будет в школе» */
.life-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.life-card {
  background: var(--color-white);
  border: 2px solid var(--color-teal);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.life-card--yellow {
  border-color: var(--color-yellow);
}

.life-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.life-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-teal);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.life-card--yellow .life-card__icon {
  background: var(--color-yellow);
}

.life-card__title {
  font-size: 22px;
  font-weight: 900;
}

/* Список с галочками */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.check-list__item {
  display: flex;
  gap: 10px;
}

.check-list__item::before {
  content: '✓';
  color: var(--color-teal);
  font-weight: 900;
  flex-shrink: 0;
}

.check-list--yellow .check-list__item::before {
  color: var(--color-yellow);
}

.check-list--orange .check-list__item::before {
  color: var(--color-orange);
}

/* ===== slider.css ===== */
/* Общие элементы слайдеров */
.slider {
  overflow: hidden;
}

.slider__track {
  display: flex;
  gap: 20px;
  align-items: stretch;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.slider__nav--sm {
  gap: 14px;
}

.slider__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Кадров в «Истории школы» два десятка — в одну строку точки не встают */
  flex-wrap: wrap;
  gap: 8px;
}

.slider__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--color-sand);
  padding: 0;
  transition: width 0.3s, background 0.3s;
}

.slider__dot--active {
  width: 28px;
  background: var(--color-orange);
}

.slider__dot--sm {
  width: 8px;
  height: 8px;
}

.slider__dot--sm.slider__dot--active {
  width: 24px;
  background: var(--color-yellow);
}

/* ---------- Слайдер на прокрутке (для телефонов) ----------
   На широком экране блок остаётся обычной сеткой, на телефоне
   превращается в горизонтальную ленту с прилипанием карточек.
   Свайп обрабатывает сам браузер, JS нужен только для точек. */
.swipe-slider__dots {
  display: none;
}

@media (max-width: 560px) {
  .swipe-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Выходим за поля контейнера, чтобы лента шла от края до края */
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 4px var(--gutter);
  }

  .swipe-slider::-webkit-scrollbar {
    display: none;
  }

  .swipe-slider > * {
    /* Край следующей карточки виден — подсказка, что ленту можно листать */
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .swipe-slider__dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}

/* ===== directions.css ===== */
/* Слайдер направлений развития */
.directions__title {
  max-width: 700px;
  line-height: 1.25;
}

.direction {
  flex: 0 0 calc((100% - 40px) / 3);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.direction--yellow {
  background: var(--color-yellow-light);
}

.direction--teal {
  background: var(--color-teal-light);
}

.direction--orange {
  background: var(--color-orange-light);
}

.direction--dark {
  background: var(--color-ink);
  justify-content: center;
}

.direction__num {
  align-self: flex-start;
  color: var(--color-white);
  font-weight: 900;
  font-size: 17px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.direction--yellow .direction__num {
  background: var(--color-yellow);
}

.direction--teal .direction__num {
  background: var(--color-teal);
}

.direction--orange .direction__num {
  background: var(--color-orange);
}

.direction__title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.direction__list {
  padding-left: 20px;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  color: var(--color-ink-soft);
  line-height: 1.5;
}

.direction__note {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-white);
  font-weight: 700;
}

.direction__note--muted {
  font-size: 14.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== programs.css ===== */
/* Карточки программ и услуг */
.program-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card-soft);
}

.program-card__img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.program-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.program-card__title {
  font-size: 20px;
  font-weight: 800;
}

/* ===== prices.css ===== */
/* Стоимость обучения */
.prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* Не растягиваем карточки по самой высокой: перечни услуг сильно разной
     длины, и у коротких карточек оставалось бы пустое поле в пол-экрана. */
  align-items: start;
}

.price-card {
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.price-card--main {
  background: var(--color-white);
  border: 3px solid var(--color-orange);
}

.price-card--teal {
  background: var(--color-teal-light);
}

.price-card--yellow {
  background: var(--color-yellow-light);
}

.price-card__badge {
  position: absolute;
  top: -14px;
  left: var(--gutter);
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

.price-card__name {
  font-weight: 800;
  font-size: 18px;
  margin-top: 6px;
}

.price-card__time {
  font-size: 14.5px;
  color: var(--color-muted);
  font-weight: 700;
}

.price-card__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-card__sum {
  font-weight: 900;
  font-size: 40px;
  color: var(--color-ink);
}

.price-card__sum--teal {
  color: var(--color-teal-dark);
}

.price-card__sum--soon {
  font-size: 28px;
  color: var(--color-yellow-dark);
}

.price-card__period {
  font-size: 15px;
  color: var(--color-muted);
  font-weight: 700;
}

/* Подзаголовок внутри перечня услуг: без галочки, отделяет группу пунктов */
.price-card__subtitle {
  font-weight: 800;
  font-size: 15px;
  margin-top: 4px;
}

.price-card__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

/* ===== teachers.css ===== */
/* Педагогический состав */
.teacher-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.teacher-card__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.teacher-card__slot {
  width: 100%;
  aspect-ratio: 1;
}

.teacher-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teacher-card__name {
  font-weight: 800;
  font-size: 17px;
}

.teacher-card__role {
  font-size: 14px;
  font-weight: 700;
}

.teacher-card__role--orange {
  color: var(--color-orange);
}

.teacher-card__role--teal {
  color: var(--color-teal-dark);
}

.teacher-card__role--yellow {
  color: var(--color-yellow-dark);
}

.teacher-card__role--orange-dark {
  color: var(--color-orange-dark);
}

/* ===== docs.css ===== */
/* Лицензия и документы */
.docs {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.docs__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--color-ink);
  box-shadow: var(--shadow-card-soft);
}

/* Документа ещё нет: карточка-заглушка без ссылки и без иконки скачивания.
   Когда файл появится, обёртку меняют обратно на
   <a class="doc-link" href="..." download> и возвращают стрелку. */
.doc-link--empty {
  border-style: dashed;
  box-shadow: none;
  color: var(--color-muted);
}

.doc-link--empty .doc-link__title {
  color: var(--color-muted);
}

.doc-link--empty .doc-link__icon {
  opacity: 0.55;
}

.doc-link__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-link__icon--orange {
  background: var(--color-orange-light);
  color: var(--color-orange);
}

.doc-link__icon--yellow {
  background: var(--color-yellow-pale);
  color: var(--color-yellow);
}

.doc-link__icon--teal {
  background: var(--color-teal-pale);
  color: var(--color-teal);
}

.doc-link__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.doc-link__title {
  font-weight: 800;
  font-size: 16px;
}

.doc-link__meta {
  font-size: 13.5px;
  color: var(--color-muted);
}

/* ===== cta.css ===== */
/* Бирюзовая полоса-призыв */
.cta {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
}

.cta__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cta__title {
  color: var(--color-white);
}

.cta__text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

/* ===== story.css ===== */
/* История школы и фото со звёздами */
.story {
  padding-top: 80px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
}

.story__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.story__quote {
  font-size: 22px;
  line-height: 1.55;
  color: var(--color-ink);
}

.story__media {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story__stage {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(46, 50, 56, 0.18);
  background: #f6f3ee;
}

.story__caption {
  text-align: center;
  color: var(--color-muted);
  font-weight: 700;
  font-size: 13.5px;
}

.story__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.story__slide--active {
  opacity: 1;
}

/* ===== gallery.css ===== */
/* Фотогалерея */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
}

.gallery__item {
  display: block;
}

.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--big {
  grid-column: span 2;
  grid-row: span 2;
}

/* На телефонах галерея — лента в два ряда: один свайп листает сразу две фотографии.
   Селектор из двух классов специально: он должен переигрывать правила
   для .gallery из responsive.css, который собирается последним. */
@media (max-width: 560px) {
  .gallery.swipe-slider {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 150px);
    grid-auto-rows: auto;
    grid-auto-columns: 82%;
    gap: 12px;
  }

  .gallery.swipe-slider > * {
    grid-column: auto;
    grid-row: auto;
    scroll-snap-align: start;
  }
}

/* ===== lightbox.css ===== */
/* Просмотр фотографии на весь экран */
.gallery__img,
.story__stage {
  cursor: zoom-in;
}

/* Пока открыт просмотр, страница под ним не прокручивается */
.page--lightbox-open {
  overflow: hidden;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(46, 50, 56, 0.94);
  align-items: center;
  justify-content: center;
  padding: 64px 16px 84px;
}

.lightbox--open {
  display: flex;
  animation: lightbox-in 0.2s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  padding: 0;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
  opacity: 1;
}

.lightbox__close {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}

.lightbox__nav--prev {
  left: 14px;
}

.lightbox__nav--next {
  right: 14px;
}

.lightbox__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  text-align: center;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14.5px;
  line-height: 1.4;
}

.lightbox__counter {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .lightbox {
    padding: 56px 8px 76px;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__nav--prev {
    left: 6px;
  }

  .lightbox__nav--next {
    right: 6px;
  }

  .lightbox__caption {
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox--open {
    animation: none;
  }
}

/* ===== reviews.css ===== */
/* Отзывы родителей */
.review {
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review--yellow {
  background: var(--color-yellow-light);
}

.review--teal {
  background: var(--color-teal-light);
}

.review--orange {
  background: var(--color-orange-light);
}

.review__mark {
  font-family: var(--font-accent);
  font-size: 34px;
  font-weight: 900;
  line-height: 0.5;
}

.review--yellow .review__mark {
  color: var(--color-yellow);
}

.review--teal .review__mark {
  color: var(--color-teal);
}

.review--orange .review__mark {
  color: var(--color-orange);
}

.review__quote {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-ink-soft);
  flex: 1;
}

.review__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review__name {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--color-ink);
}

.review__role {
  font-size: 13px;
  color: var(--color-muted);
}

/* ===== accordion.css ===== */
/* Аккордеон на <details>/<summary>: раскрывается и без JavaScript.
   Скрипт нужен только чтобы соседние пункты закрывались автоматически. */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion__item {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion__item--shadow {
  box-shadow: 0 3px 10px rgba(46, 50, 56, 0.04);
}

.accordion__button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 800;
  font-size: 16.5px;
  color: var(--color-ink);
  cursor: pointer;
  /* Убираем стандартный треугольник — свой знак «+» рисуем сами */
  list-style: none;
}

.accordion__button::-webkit-details-marker {
  display: none;
}

.accordion__label {
  flex: 1;
}

.accordion__num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

.accordion__num--yellow {
  background: var(--color-yellow-pale);
  color: var(--color-yellow-dark);
}

.accordion__num--teal {
  background: var(--color-teal-pale);
  color: var(--color-teal-dark);
}

.accordion__num--orange {
  background: var(--color-orange-light);
  color: var(--color-orange-dark);
}

.accordion__mark {
  color: var(--color-orange);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.accordion__mark::before {
  content: '+';
}

.accordion__item[open] .accordion__mark::before {
  content: '−';
}

.accordion__panel {
  padding: 0 22px 20px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-ink-soft);
}

.accordion__panel--indent {
  padding-left: 76px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== contacts.css ===== */
/* Контакты и карта */
.contacts {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  align-items: stretch;
}

.contacts__content {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contacts__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-item__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item__icon--yellow {
  background: var(--color-yellow-pale);
  color: var(--color-yellow);
}

.contact-item__icon--teal {
  background: var(--color-teal-pale);
  color: var(--color-teal);
}

.contact-item__icon--orange {
  background: var(--color-orange-light);
  color: var(--color-orange);
}

.contact-item__text {
  font-weight: 700;
}

.contact-item__link {
  font-weight: 800;
  color: var(--color-ink);
}

.contacts__map {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(46, 50, 56, 0.12);
  min-height: 380px;
}

.contacts__map iframe {
  border: none;
  width: 100%;
  height: 100%;
  min-height: 380px;
}

/* ===== footer.css ===== */
/* Подвал */
.footer {
  background: var(--color-ink);
  color: var(--color-white);
}

.footer__inner {
  padding-top: 48px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer__cols {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 320px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__logo-img {
  height: 44px;
  width: auto;
}

.footer__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer__logo-name {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 2px;
}

.footer__logo-tagline {
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
}

.footer__about {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.footer__col,
.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer__col-title {
  font-weight: 800;
  font-size: 15px;
}

.footer__col-title--yellow {
  color: var(--color-yellow);
}

.footer__col-title--teal {
  color: var(--color-teal);
}

.footer__link,
.footer__text {
  color: rgba(255, 255, 255, 0.8);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Компактный подвал внутренних страниц */
.footer__inner--compact {
  padding-top: 36px;
  padding-bottom: 36px;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__contacts-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer__copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== legal.css ===== */
/* Страница «Сведения об образовательной организации» */
.page-head {
  background: linear-gradient(180deg, var(--color-teal-light) 0%, var(--color-white) 100%);
}

.page-head__inner {
  padding: 56px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-head__text {
  max-width: 640px;
}

.legal {
  background: var(--color-white);
}

.legal__inner {
  padding: 8px var(--gutter) 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Таблицы раздела «Сведения» по приказу № 1493 */
.sved-content .text {
  margin-bottom: 20px;
}

.sved-block__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px;
}

.sved-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
}

.sved-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sved-table th,
.sved-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.sved-table thead th {
  background: var(--color-teal-light);
  font-weight: 700;
}

.sved-table tbody tr:last-child th,
.sved-table tbody tr:last-child td {
  border-bottom: 0;
}

.sved-table--pairs th {
  width: 38%;
  font-weight: 600;
  background: var(--color-yellow-light);
}

.sved-table--staff {
  min-width: 1100px;
}

.sved-none {
  color: var(--color-muted);
}

.sved-file__meta {
  color: var(--color-muted);
  white-space: nowrap;
}

.sved-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ===== sved-nav.css ===== */
/* Меню раздела «Сведения об образовательной организации».

   Приказ Рособрнадзора № 1493 требует общий механизм навигации по разделу
   на каждой его странице, поэтому этот блок выводится на всех подстраницах. */
.legal__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 72px;
}

.legal__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.sved-nav {
  background: var(--color-teal-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 130px;
}

.sved-nav__title {
  font-weight: 800;
  font-size: 15px;
  color: var(--color-teal-dark);
  margin-bottom: 14px;
}

.sved-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: sved;
}

.sved-nav__link {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--color-ink-soft);
}

.sved-nav__link::before {
  counter-increment: sved;
  content: counter(sved) ".";
  flex-shrink: 0;
  font-weight: 800;
  color: var(--color-teal-dark);
  opacity: 0.6;
}

.sved-nav__link:hover {
  background: var(--color-white);
  opacity: 1;
}

/* Текущая страница раздела */
.sved-nav__link[aria-current="page"] {
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: 800;
}

.sved-nav__link[aria-current="page"]::before {
  color: var(--color-white);
  opacity: 0.75;
}

/* Содержимое подраздела.

   Стили заданы по тегам, а не по классам: в WordPress этот текст правят
   обычным редактором, и расставлять там служебные классы никто не будет. */
.legal__content h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.legal__content p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink-soft);
}

.legal__content ul,
.legal__content ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -8px;
}

.legal__content li {
  position: relative;
  padding-left: 28px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.legal__content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-teal);
  font-weight: 900;
}

/* Перечень подразделов на посадочной странице раздела */
.sved-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  counter-reset: card;
}

.sved-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--color-ink);
  box-shadow: var(--shadow-card-soft);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35;
}

.sved-card::before {
  counter-increment: card;
  content: counter(card, decimal-leading-zero);
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-teal-pale);
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .legal__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* На узком экране содержимое важнее списка — меню уходит под него,
     но остаётся на странице, как требует приказ. */
  .legal__content {
    order: 1;
  }

  .sved-nav {
    order: 2;
    position: static;
  }

  .sved-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== responsive.css ===== */
/* Адаптивность (подключается последним).
   Ступени: 1024 планшет-альбом · 900 планшет-портрет · 768 крупный телефон
            560 телефон · 400 узкий телефон (от 340px) */

/* Горизонтальное меню живёт только до появления бургера (см. burger.css) */
@media (min-width: 601px) and (max-width: 768px) {
  .nav__list {
    gap: 18px;
    font-size: 14px;
  }
}

/* ---------- Планшет, альбомная ориентация ---------- */
@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .story {
    grid-template-columns: 1fr 340px;
    gap: 36px;
  }

  .docs,
  .contacts {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .mission__grid {
    gap: 36px;
  }

  .direction {
    flex-basis: calc((100% - 20px) / 2);
  }

  .facts {
    gap: 20px;
  }
}

/* ---------- Планшет, книжная ориентация ---------- */
@media (max-width: 900px) {
  .docs,
  .story,
  .contacts,
  .mission__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* В одну колонку вертикальный снимок разумнее показать целиком,
     чем обрезать полосой: ограничиваем ширину, а не высоту. */
  .mission__photo {
    /* width: 100%, а не auto: при auto картинка встаёт в свою natural-ширину
       381 px и на узком экране вылезает за колонку — правые углы со
       скруглением срезал overflow: hidden у секции. */
    width: 100%;
    max-width: 380px;
    height: auto;
    align-self: center;
  }

  .grid--3,
  .prices {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .contacts__map,
  .contacts__map iframe {
    min-height: 320px;
  }

  /* width: 100% обязателен: auto-поля по краям отключают stretch флекс-контейнера
     .story__media, и кадр ужимается по содержимому. Слайды внутри абсолютные,
     содержимого нет — ширина 0, а с ней и высота из aspect-ratio. */
  .story__stage {
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- Крупный телефон ---------- */
@media (max-width: 768px) {
  .title--xl {
    font-size: 32px;
  }

  .title--lg {
    font-size: 28px;
  }

  .title--md,
  .mission__title {
    font-size: 26px;
  }

  .title--sm {
    font-size: 22px;
  }

  .text--lead {
    font-size: 17px;
  }

  .story__quote {
    font-size: 19px;
  }

  .section__inner,
  .section__inner--wide-gap {
    padding-top: 48px;
    padding-bottom: 48px;
    gap: 28px;
  }

  /* Модификаторы возвращаем после общего правила — иначе каскад их съедает */
  .section__inner--no-top {
    padding-top: 0;
  }

  .section__inner--tight-bottom {
    padding-bottom: 8px;
  }

  .docs,
  .story,
  .contacts {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero__inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero__bg {
    object-position: 28% center;
  }

  .life-grid {
    grid-template-columns: 1fr;
  }

  .a11y-toggle {
    top: 96px;
    padding: 9px 12px;
  }

  .a11y-toggle__label {
    display: none;
  }

  .mission__card {
    margin: -40px 12px 0;
  }

  .mission__banner {
    padding: 24px;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Телефон ---------- */
@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  .grid--3,
  .grid--4,
  .prices {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 12px;
  }

  .gallery__item--wide,
  .gallery__item--big {
    grid-column: span 1;
    grid-row: span 1;
  }

  .direction {
    flex-basis: 100%;
  }

  /* Преимущества под кнопками: иконка и подпись по центру колонки */
  .hero__features {
    justify-content: center;
  }

  .hero-feature {
    align-items: center;
    text-align: center;
  }

  .logo__img {
    height: 48px;
  }

  .logo__name {
    font-size: 20px;
  }

  .header__phone {
    font-size: 17px;
  }

  /* Подпись под логотипом не влезает рядом с телефоном и бургером,
     а шапка липкая — держим её в одну строку. Подпись осталась в подвале. */
  .logo__tagline {
    display: none;
  }

  .facts {
    gap: 8px 20px;
  }

  .life-card,
  .price-card {
    padding: 22px;
  }

  .direction,
  .review {
    padding: 20px;
  }

  .price-card__sum {
    font-size: 32px;
  }

  .accordion__panel--indent {
    padding-left: 22px;
  }

  .contacts__map,
  .contacts__map iframe {
    min-height: 260px;
  }

  .footer__inner--compact {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__cols {
    gap: 24px;
  }
}

/* ---------- Узкий телефон, от 340px ---------- */
@media (max-width: 400px) {
  :root {
    --gutter: 12px;
  }

  /* Длинные слова и e-mail не должны распирать колонку */
  body {
    overflow-wrap: break-word;
  }

  .title--xl {
    font-size: 26px;
  }

  .title--lg {
    font-size: 23px;
  }

  .title--md,
  .mission__title {
    font-size: 22px;
  }

  .title--sm {
    font-size: 19px;
  }

  .text--lead,
  .story__quote {
    font-size: 16px;
  }

  .text--lg {
    font-size: 15.5px;
  }

  .section__inner,
  .section__inner--wide-gap,
  .docs,
  .story,
  .contacts,
  .hero__inner {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .section__inner,
  .section__inner--wide-gap {
    gap: 22px;
  }

  .section__inner--no-top {
    padding-top: 0;
  }

  .section__inner--tight-bottom {
    padding-bottom: 8px;
  }

  .topbar {
    font-size: 12.5px;
    padding: 7px 12px;
  }

  .header__top {
    gap: 10px;
  }

  .logo {
    gap: 10px;
  }

  .logo__img {
    height: 40px;
  }

  .logo__name {
    font-size: 18px;
    letter-spacing: 1.5px;
  }

  .header__phone {
    font-size: 15px;
  }

  .header__actions {
    gap: 10px;
  }

  .burger {
    width: 40px;
    height: 40px;
  }

  .facts__value {
    font-size: 15px;
  }

  .facts__label {
    font-size: 12px;
  }

  .a11y-toggle {
    top: 88px;
    padding: 8px 10px;
  }

  /* Кнопки растягиваем на всю ширину — так проще попасть пальцем */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    padding: 13px 18px;
    font-size: 15px;
  }

  .btn--secondary {
    padding: 11px 18px;
  }

  .btn--self-start {
    align-self: stretch;
  }

  .cta .btn {
    width: 100%;
  }

  .hero__features {
    gap: 18px;
    margin-top: 22px;
  }

  .hero-feature {
    max-width: none;
    flex: 1 1 130px;
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 190px;
  }

  .mission__card {
    margin: -32px 8px 0;
    padding: 20px;
  }

  .mission__card-text {
    font-size: 16.5px;
  }

  .mission__banner {
    padding: 20px;
  }

  .method-card,
  .life-card,
  .price-card,
  .direction,
  .review {
    padding: 18px;
  }

  .life-card__title {
    font-size: 19px;
  }

  .program-card__img {
    height: 170px;
  }

  .price-card__sum {
    font-size: 30px;
  }

  .price-card__badge {
    left: 14px;
  }

  .teacher-card {
    padding: 16px;
  }

  .doc-link {
    padding: 14px;
    gap: 12px;
  }

  .doc-link__title {
    font-size: 15px;
  }

  /* Точки слайдеров переносятся, а не вылезают за экран */
  .slider__nav {
    gap: 10px;
  }

  .slider__dots {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .accordion__button {
    padding: 14px 16px;
    gap: 10px;
    font-size: 14.5px;
  }

  .accordion__num {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .accordion__panel {
    padding: 0 16px 16px;
  }

  .accordion__panel--indent {
    padding-left: 16px;
  }

  .page-head__inner {
    padding: 36px var(--gutter) 28px;
  }

  .contacts__list {
    font-size: 15px;
  }

  .contact-item__icon {
    width: 38px;
    height: 38px;
  }

  .contacts__map,
  .contacts__map iframe {
    min-height: 220px;
  }

  .footer__inner {
    padding-top: 36px;
    padding-bottom: 24px;
    gap: 24px;
  }

  .footer__contacts-row {
    flex-direction: column;
    gap: 8px;
  }
}
