/* ИПКСЗ — публичный сайт: КАРКАС (верхняя полоса, шапка, главное меню/подменю, мобильное меню). */

/* =========================================================
   Верхняя полоса
   ========================================================= */
.topbar {
  background: var(--c-blue);
  color: rgba(255,255,255,.92);
  font-size: 0.8125rem;
  position: relative;
  z-index: 51;   /* выше главного меню (main-nav: 50), чтобы подменю не перекрывалось */
}
.topbar a { color: rgba(255,255,255,.92); }
.topbar a:hover { color: #fff; text-decoration: none; }

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
  position: relative;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.topbar__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar__links .ic { width: 15px; height: 15px; }
.topbar__link--featured {
  font-weight: 700;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  padding: 4px 14px;
  margin-left: 4px;
  box-shadow: 0 0 0 1px rgba(13, 69, 115, .25);
}
.topbar__link--featured:hover {
  background: #fff;
  color: var(--c-blue) !important;
  border-color: #fff;
}

.topbar__drop { position: relative; display: inline-flex; align-items: center; }
.topbar__drop--featured { margin-left: 4px; }
.topbar__drop .topbar__link--featured { margin-left: 0; }
.topbar__caret { width: 14px; height: 14px; }
.topbar__links .topbar__dropdown {
  top: 100%;
  left: 0;
  right: auto;
  width: 100%;
  transform: none;
  min-width: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  border: 0;
  background: var(--c-blue-600);
  color: rgba(255,255,255,.92);
  box-shadow: 0 10px 24px rgba(10, 25, 45, .28);
}
.topbar__links .topbar__dropdown .dropdown__inner { padding: 6px 0; }
.topbar__links .topbar__dropdown .dropdown__inner ul { columns: 1; }
.topbar__links .topbar__dropdown .dropdown__inner li + li { border-top: 1px solid rgba(255,255,255,.14); }
.topbar__links .topbar__dropdown .dropdown__inner a {
  padding: 7px 14px;
  font-size: 0.78125rem;
  line-height: 1.25;
  color: rgba(255,255,255,.92);
}
.topbar__links .topbar__dropdown .dropdown__inner a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  text-decoration: none;
}
.topbar__drop:hover .topbar__dropdown { display: block; }
.topbar__drop:focus-within .topbar__dropdown { display: block; }

.topbar__side {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
/* СДО «Прометей» — в правой части верхней строки, тем же «выделенным» стилем,
   что и пункт «Сведения об образовательной организации» (topbar__link--featured). */
.topbar__side .topbar__link--featured {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  white-space: nowrap;
}
.topbar__side .topbar__link--featured .ic { width: 15px; height: 15px; }

.socials { display: flex; gap: 10px; align-items: center; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: background .15s ease;
}
.socials a:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.socials .ic { width: 15px; height: 15px; }

.search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: rgba(255,255,255,.92);
  font-family: var(--font-main);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 4px 0;
}
.search-toggle:hover { color: #fff; }
.search-toggle[aria-expanded="true"] { color: #fff; font-weight: 700; }

.search-form {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--c-surface);
  border-top: 2px solid var(--c-blue);
  box-shadow: 0 16px 32px rgba(9, 30, 45, .18);
  padding: 14px 0;
  transform: translateY(-120%);
  visibility: hidden;
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
.search-form.is-open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}
.search-form__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
/* Поле строки поиска — единый вид задаёт базовый слой (site-controls.css); здесь только раскладка. */
.search-form__inner input { flex: 1 1 auto; min-width: 0; max-width: 624px; }
.search-form__close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--c-muted);
  cursor: pointer;
  padding: 4px 6px;
}
.search-form__close:hover { color: var(--c-text); }

.aa-toggle {
  border: 1px solid rgba(255,255,255,.35);
  background: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.75rem;
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.aa-toggle:hover { background: rgba(255,255,255,.12); }
/* Ссылка «Версия для слабовидящих» без JavaScript: показывается только в <noscript>
   (обычная кнопка в это время скрыта) — прогрессивное улучшение через ?aa=1. */
.aa-noscript-link { display: none; text-decoration: none; }
.aa-noscript-link:hover { text-decoration: none; }

/* =========================================================
   Шапка сайта
   ========================================================= */
/* Шапка белая между двумя синими полосами (сверху — верхняя полоса, снизу — главное меню).
   Чтобы белый блок не «резал» их рубцом, у шапки лёгкий градиент-переход:
   мягкий тон верхней полосы → белый в середине → мягкий тон главного меню.
   Только токены, поэтому темы «Версии для слабовидящих» подстраиваются сами. */
.site-header {
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg,
    var(--c-blue-100) 0%,
    var(--c-surface) 32%,
    var(--c-surface) 68%,
    var(--c-blue-100) 100%);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand { display: flex; align-items: center; gap: 16px; color: var(--c-dark); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__emblem {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1875rem;
  color: var(--c-dark);
  letter-spacing: .2px;
}
.brand__tag {
  font-size: 0.78125rem;
  color: var(--c-muted);
  line-height: 1.35;
  max-width: 400px;
}

.header__contacts { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: flex-end; row-gap: 10px; }

/* Текст контактов не рвётся по словам: при нехватке места сжимается/переносится подпись бренда
   (`.brand__tag`), а контакты остаются целыми строками (в крайнем случае переносятся целиком). */
.h-contact { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.h-contact .ic { width: 20px; height: 20px; color: var(--c-link); }
.h-contact__text { display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; }
.h-contact__text b { font-size: 0.90625rem; color: var(--c-dark); }
.h-contact__text small { font-size: 0.75rem; color: var(--c-muted); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--c-link);
}
.btn-text:hover { color: var(--c-link-hover); text-decoration: none; }
.btn-text .ic { width: 16px; height: 16px; }

/* «Электронная приёмная» в шапке — акцентная пилюля между телефоном приёмной и «Все контакты».
   Подпись — в две строки одинаковым начертанием (`b` + `b`): «Электронная» / «приёмная». */
.h-reception {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--c-blue-100);
  border-radius: 999px;
  background: var(--c-blue-50);
  color: var(--c-link);
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.h-reception:hover {
  background: var(--c-blue-100);
  border-color: var(--c-blue);
  color: var(--c-link-hover);
  text-decoration: none;
  transform: translateY(-1px);
}
/* Обе строки подписи — одной строки вида: `b` (жирная, 0.90625rem, тёмная) — «Электронная» и
   «приёмная» выглядят одинаково (заказчик). */
.h-reception .ic { width: 18px; height: 18px; color: currentColor; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--c-dark);
}
.burger.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================
   Главное меню
   ========================================================= */
.main-nav {
  background: var(--c-nav-bg);
  border-bottom: 1px solid rgba(6, 30, 51, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 20px -14px rgba(6, 30, 51, .8);
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
}

/* Мягкое свечение от курсора (цвета сайта: бирюзовый → фиолетовый → синий).
   Координаты задаёт site-main.js (--nav-x/--nav-y); без JS подсветки просто нет —
   прогрессивное ухудшение, вид меню не меняется. */
.main-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(240px circle at var(--nav-x, 50%) var(--nav-y, 50%),
      var(--c-nav-glow) 0%, var(--c-nav-glow-2) 44%, var(--c-nav-glow-3) 70%, transparent 82%);
}
.main-nav.is-hover::before { opacity: 1; }
/* Ссылки — над свечением (сама полоса подсвечивается, текст не «закрашивается») */
.main-nav > .container { position: relative; z-index: 1; }

.nav-list { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; justify-content: center; flex-wrap: wrap; }

.nav-item { position: relative; }

/* Пункт меню — ссылка ИЛИ «заголовок группы» без ссылки (`<span class="nav-link">`):
   вид должен быть одинаковым (раньше стилизовался только <a>, и пункт без ссылки «рассыпался»). */
.nav-item > a,
.nav-item > .nav-link {
  display: block;
  padding: 14px 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.90625rem;
  color: var(--c-nav-fg);
  border-bottom: 3px solid transparent;
  transition: color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.nav-item > a:hover,
.nav-item > .nav-link:hover { color: var(--c-nav-fg-hover); text-decoration: none; border-bottom-color: var(--c-nav-accent); }
/* Пункт без ссылки нужен и для клавиатуры: фокус внутри .nav-item раскрывает подменю (см. ниже) */
.nav-item > span.nav-link:focus-visible { outline: 2px solid var(--c-focus); outline-offset: -2px; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-item:hover .dropdown { display: block; }
/* Клавиатура: подменю раскрывается при фокусе внутри пункта (только десктоп —
   на мобильных подменю управляется классом .is-open) */
@media (min-width: 769px) {
  .nav-item:focus-within .dropdown { display: block; }
}

.dropdown__inner { padding: 14px 0; }
.dropdown__inner ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.dropdown__inner li + li { border-top: 1px solid var(--c-surface-alt); }
.dropdown__inner a {
  display: block;
  padding: 9px 20px;
  color: var(--c-text);
  font-size: 0.875rem;
}
.dropdown__inner a:hover { background: var(--c-blue-50); color: var(--c-link); text-decoration: none; }

