/* МКУ «УНРИ» — основные стили. Mobile-first, БЭМ. Токены: tokens.css */

/* ---------- Шрифты ---------- */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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;
}

/* ---------- Сброс и база ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: hidden;
}
body.is-menu-open { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--c-accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-weight: var(--fw-semibold);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 16px; }

.container {
  width: min(100% - 2 * var(--gutter-x), var(--container));
  margin-inline: auto;
}
:root {
  --gutter-x: 16px;
  /* расстояние от края контейнера до края окна — для блоков «в край» */
  --bleed: calc((100vw - min(100vw - 2 * var(--gutter-x), var(--container))) / 2);
}
@media (min-width: 768px) { :root { --gutter-x: 24px; } }
@media (min-width: 1024px) { :root { --gutter-x: 32px; } }

.page { display: flex; flex-direction: column; min-height: 100vh; }
.page__main { flex: 1 0 auto; }

/* ---------- Типографика ---------- */
.eyebrow {
  display: block;
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  color: var(--c-accent-strong);
}

.section-title {
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  font-size: clamp(24px, 1.2rem + 1.4vw, var(--fs-h2));
  line-height: 1.25;
  color: var(--c-ink);
}
.section-title--sm {
  font-weight: var(--fw-bold);
  font-size: clamp(19px, 1rem + .6vw, var(--fs-h3));
  line-height: var(--lh-h3);
}

/* ---------- Кнопки и ссылки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: var(--r-pill);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--fw-semibold);
  text-align: center;
  color: #fff;
  transition: transform var(--t-fast), box-shadow var(--t-base), background-color var(--t-base), color var(--t-base), filter var(--t-base);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--gradient { background: var(--g-brand); box-shadow: 0 10px 24px -10px rgba(255, 106, 91, .55); }
.btn--gradient:hover { filter: saturate(1.15) brightness(1.04); }
.btn--accent { background: var(--c-accent-strong); }
.btn--accent:hover { background: var(--c-accent-strong-hover); }
.btn--sm { min-height: 38px; padding: 8px 20px; }
.btn--outline-light { border: 1px solid rgba(255, 255, 255, .6); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--fw-semibold);
  color: var(--c-accent-strong);
  transition: gap var(--t-fast), color var(--t-fast);
}
.link-arrow:hover { gap: 8px; }

/* ---------- Шапка ---------- */
.header {
  position: relative;
  z-index: 20;
  background: var(--c-navy);
  color: #fff;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding-block: 10px;
}
.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.header__logo { flex: none; width: 34px; height: auto; }
.header__name {
  max-width: 240px;
  font-family: var(--ff-head);
  font-size: 11px;
  line-height: 14px;
  font-weight: var(--fw-bold);
}
.header__phone {
  display: none;
  font-size: 16px;
  line-height: 20px;
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.header__phone:hover { color: var(--c-accent); }

.burger {
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
}
.burger__line,
.burger__line::before,
.burger__line::after {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform var(--t-base), opacity var(--t-base);
}
.burger__line { top: 21px; }
.burger__line::before, .burger__line::after { content: ""; left: 0; }
.burger__line::before { top: -6px; }
.burger__line::after { top: 6px; }
.burger[aria-expanded="true"] .burger__line { background: transparent; }
.burger[aria-expanded="true"] .burger__line::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__line::after { transform: translateY(-6px) rotate(-45deg); }

.nav {
  position: fixed;
  inset: 72px 0 0;
  z-index: 19;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px var(--gutter-x) 40px;
  background: var(--c-navy);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--t-base), transform var(--t-base), visibility 0s linear .25s;
}
.nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.nav__list { display: flex; flex-direction: column; gap: 4px; }
.nav__link {
  display: block;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  font-size: 18px;
  line-height: 24px;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.nav__link:hover { background: var(--c-accent-strong); }
.nav__link.is-active { background: rgba(255, 255, 255, .12); }
.nav__phone {
  padding-inline: 16px;
  font-size: 20px;
  line-height: 28px;
  font-weight: var(--fw-bold);
}

@media (min-width: 768px) {
  .header__name { max-width: 360px; font-size: 13px; line-height: 18px; }
  .header__logo { width: 42px; }
}

@media (min-width: 1024px) {
  .header__inner { min-height: 96px; padding-block: 20px 16px; }
  .burger, .nav__phone { display: none; }
  .header__phone { display: block; }
  .nav {
    position: static;
    flex-direction: row;
    margin-left: auto;
    padding: 0;
    background: none;
    overflow: visible;
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .nav__list { flex-direction: row; gap: 4px; }
  .nav__link { padding: 8px 14px; font-size: 14px; line-height: 20px; }
  .nav__link.is-active { background: none; color: var(--c-accent); }
}
@media (min-width: 1440px) {
  .nav__list { gap: 12px; }
  .nav__link { padding-inline: 20px; }
  .header__inner { gap: 32px; }
}

/* ---------- Декоративная «33» ---------- */
.deco-33 {
  position: absolute;
  z-index: 0;
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--c-deco);
  pointer-events: none;
  user-select: none;
}
.deco-33::before { content: "33"; } /* псевдоэлемент: декор не считается текстом */

/* ---------- Первый экран (главная) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-navy);
  color: #fff;
  box-shadow: var(--sh-hero);
}
.hero__inner {
  position: relative;
  display: grid;
  gap: 32px;
  padding-block: 16px 0;
}
.hero__deco { right: -6%; bottom: -12%; font-size: 260px; }
.hero__content { position: relative; z-index: 1; }
.hero__title {
  font-family: var(--ff-head);
  font-weight: var(--fw-extrabold);
  font-size: clamp(26px, 1rem + 2.8vw, var(--fs-hero));
  line-height: 1.2;
}
.hero__text {
  max-width: 514px;
  margin-top: 16px;
  font-size: 14px;
  line-height: var(--lh-body);
  color: var(--c-on-dark-70);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 28px;
}
.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, .8);
  transition: color var(--t-fast);
}
.hero__link:hover { color: #fff; }
.hero__link::before { content: "▷"; }

.hero__media {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(100%, 440px);
  margin-left: 12px;
}
.hero__photo {
  width: 100%;
  aspect-ratio: 440 / 472;
  border-radius: var(--r-arch) var(--r-arch) 0 0;
  background: #1c2c4a;
  overflow: hidden;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%; }

.hero__badge {
  position: absolute;
  left: -12px; bottom: 26px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 202px;
  max-width: 210px;
  padding: 14px 20px 14px 8px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-float);
  font-family: var(--ff-head);
  font-size: 14px;
  line-height: 17px;
  font-weight: var(--fw-bold);
  color: var(--c-navy-deep);
  transition: transform var(--t-fast);
}
.hero__badge:hover { transform: translateY(-2px); }
.hero__badge::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #d9eff1 url("../img/badge-circle.svg") center / 36px 36px no-repeat;
  font-family: var(--ff-body);
  font-size: 16px;
  font-weight: var(--fw-regular);
  color: var(--c-accent);
}

@media (min-width: 768px) {
  .hero__deco { font-size: 400px; }
  .hero__media { margin-left: 24px; }
  .hero__badge { left: -24px; }
}
@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(340px, 440px) 1fr;
    align-items: center;
    column-gap: clamp(40px, 6vw, 85px);
    padding-top: 0;
  }
  .hero__media { order: -1; align-self: end; justify-self: start; margin-left: 0; }
  .hero__content { padding-block: 40px 56px; }
  .hero__deco { left: 66%; right: auto; top: 111px; bottom: auto; font-size: 544px; }
}

/* ---------- Коротко о нас ---------- */
.stats { padding-block: 37px 0; }
.stats__inner { display: grid; gap: 24px; }
.stats__title { margin-top: 8px; white-space: pre-line; }
.stats__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
}
.stats__item { text-align: center; }
.stats__value {
  display: block;
  font-family: var(--ff-head);
  font-size: clamp(24px, 1rem + 1.2vw, var(--fs-h2));
  line-height: 36px;
  font-weight: var(--fw-extrabold);
  color: var(--c-ink);
  white-space: nowrap;
}
.stats__label {
  display: block;
  margin-top: 12px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
@media (min-width: 1024px) {
  .stats__inner { grid-template-columns: 411px 1fr; align-items: start; gap: 40px; }
  .stats__list { grid-template-columns: repeat(4, 1fr); padding-top: 30px; }
}

/* ---------- Работаем для города ---------- */
.about { padding-top: 67px; }
.about__inner { display: grid; gap: 32px; }
.about__text { margin-top: 16px; max-width: 689px; }
.about__features {
  display: grid;
  gap: 20px 32px;
  margin-top: 28px;
}
.about__feature-title {
  display: flex;
  gap: 8px;
  font-family: var(--ff-head);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.about__feature-link,
.stats__link { display: block; color: inherit; }
a.about__feature-link:hover .about__feature-title,
a.stats__link:hover .stats__value { color: var(--c-accent-strong); }
.about__feature-title { transition: color var(--t-fast); }
.stats__value { transition: color var(--t-fast); }
.about__feature-title::before { content: "✓"; color: var(--c-accent); }
.about__feature-text {
  display: block;
  margin-top: 4px;
  padding-left: 18px;
  font-size: var(--fs-small);
  line-height: 19.5px;
}
.about__media {
  position: relative;
  margin-inline: calc(-1 * var(--gutter-x));
  overflow: hidden;
  aspect-ratio: 929 / 386;
  min-height: 260px;
  background: #fff;
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__caption {
  position: absolute;
  left: 24px; bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: var(--sh-float);
}
.about__caption-title {
  font-family: var(--ff-head);
  font-size: 18px;
  line-height: 28px;
  font-weight: var(--fw-extrabold);
  color: var(--c-navy);
}
.about__caption-text { font-size: var(--fs-micro); line-height: var(--lh-micro); }

@media (min-width: 768px) {
  .about__features { grid-template-columns: repeat(2, minmax(0, 256px)); padding-left: 35px; column-gap: 51px; }
  .about__media { margin-inline: 0 calc(-1 * var(--gutter-x)); border-radius: var(--r-xl) 0 0 var(--r-xl); }
  .about__caption { left: 43px; bottom: 32px; }
}
@media (min-width: 1024px) {
  .about__inner { grid-template-columns: minmax(0, 689px) 1fr; column-gap: 60px; align-items: start; }
  .about__media { aspect-ratio: auto; height: 386px; margin-right: calc(-1 * var(--bleed)); }
}

/* ---------- Отделы ---------- */
.departments { padding-top: 68px; }
.departments__list {
  display: grid;
  gap: 24px;
  max-width: 1225px;
  margin-inline: auto;
}
@media (min-width: 768px) {
  .departments__list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .departments__list { grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 75px); }
}

.dept-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 286px;
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--g-card);
  box-shadow: var(--sh-card);
  color: var(--c-text);
  isolation: isolate;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1), box-shadow .45s cubic-bezier(.4, 0, .2, 1), color .45s cubic-bezier(.4, 0, .2, 1);
}
.dept-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--c-navy);
  opacity: 0;
  transition: opacity .45s cubic-bezier(.4, 0, .2, 1);
}
.dept-card:hover { transform: translateY(-4px); }
.dept-card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: #fff;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .1);
  font-size: 18px;
  line-height: 28px;
  color: var(--c-accent);
  transition: background-color .45s cubic-bezier(.4, 0, .2, 1), box-shadow .45s cubic-bezier(.4, 0, .2, 1);
}
.dept-card__icon img { width: 24px; height: 24px; }
.dept-card__title {
  margin-top: 20px;
  font-family: var(--ff-head);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  transition: color .45s cubic-bezier(.4, 0, .2, 1);
}
.dept-card__text { margin-top: 8px; }
.dept-card__more {
  margin-top: auto;
  padding-top: 20px;
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  transition: color .45s cubic-bezier(.4, 0, .2, 1);
}
.dept-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.dept-card--highlight,
.dept-card:hover,
.dept-card:focus-within {
  box-shadow: var(--sh-card-dark);
  color: var(--c-on-dark-70);
}
.dept-card--highlight::before,
.dept-card:hover::before,
.dept-card:focus-within::before { opacity: 1; }
.dept-card--highlight .dept-card__icon,
.dept-card:hover .dept-card__icon,
.dept-card:focus-within .dept-card__icon { background: rgba(255, 255, 255, .15); box-shadow: none; }
.dept-card--highlight .dept-card__title,
.dept-card:hover .dept-card__title,
.dept-card:focus-within .dept-card__title { color: #fff; }
.dept-card--highlight .dept-card__more,
.dept-card:hover .dept-card__more,
.dept-card:focus-within .dept-card__more { color: var(--c-accent); }

/* ---------- Простые шаги / быстрые ссылки ---------- */
.steps { padding-block: 77px 78px; }
.steps__title { margin-top: 6px; max-width: 420px; white-space: pre-line; }
.steps__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 12px;
  margin-top: 32px;
}
@media (min-width: 1024px) {
  .steps__list { row-gap: 44px; margin-top: 44px; }
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 16px;
  border-radius: 31px;
  background: #fff;
  box-shadow: var(--sh-pill);
  font-family: var(--ff-head);
  font-size: var(--fs-nav);
  line-height: var(--lh-nav);
  font-weight: var(--fw-medium);
  text-align: center;
  color: var(--c-text-strong);
  transition: background-color .4s cubic-bezier(.4, 0, .2, 1), color .4s cubic-bezier(.4, 0, .2, 1), transform var(--t-fast);
}
.pill:hover,
.pill:focus-visible { background: var(--c-navy); color: #fff; }
.pill.is-active,
.pill--highlight { background: var(--c-navy); color: #fff; }
.steps__item { width: 100%; }
@media (min-width: 576px) {
  .steps__item { width: calc(50% - 6px); }
}
@media (min-width: 1024px) {
  .steps__item { width: 273px; }
}

/* ---------- Последние события ---------- */
.news-latest { padding-block: 33px 31px; background: #fff; }
.news-latest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.news-latest__title { margin-top: 8px; }
.news-latest__list {
  display: grid;
  gap: 32px 42px;
  margin-top: 30px;
}
@media (min-width: 576px) { .news-latest__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .news-latest__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.news-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.news-card__media {
  overflow: hidden;
  aspect-ratio: 330 / 227;
  border-radius: var(--r-lg);
  background: var(--c-border);
}
.news-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.news-card__tag {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(53, 198, 212, .15);
  font-weight: var(--fw-semibold);
  color: var(--c-accent-strong-hover);
}
.news-card__title {
  margin-top: 7px;
  font-family: var(--ff-head);
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.news-card__link::after { content: ""; position: absolute; inset: 0; }
.news-card__text { margin-top: 8px; }
.news-card__more { margin-top: 20px; }
.news-card--list .news-card__media { aspect-ratio: 290 / 200; }

/* ---------- Контакты (главная) ---------- */
.contacts-short {
  display: grid;
  gap: 24px;
  padding-top: 50px;
}
.contacts-short__panel {
  position: relative;
  padding: 28px var(--gutter-x) 40px;
  background: var(--c-navy);
  color: var(--c-footer-link);
}
.contacts-short__title {
  font-family: var(--ff-head);
  font-size: var(--fs-h2);
  line-height: 36px;
  font-weight: var(--fw-extrabold);
  color: #fff;
}
.contacts-short__phones { display: grid; gap: 12px; margin-top: 18px; }
.contacts-short__phone {
  font-family: var(--ff-head);
  font-size: var(--fs-h3);
  line-height: 24px;
  font-weight: var(--fw-bold);
  color: var(--c-accent);
}
.contacts-short__phone:hover { color: #fff; }
.contacts-short__address { margin-top: 20px; font-style: normal; font-family: var(--ff-head); font-size: 14px; line-height: 23px; }
.contacts-short__email {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--ff-head);
  text-decoration: underline;
  color: var(--c-accent);
}
.contacts-short__btn { margin-top: 16px; }
.contacts-short__map {
  display: block;
  overflow: hidden;
  min-height: 240px;
  background: var(--c-coral-soft);
}
.contacts-short__map img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.contacts-short__map:hover img { transform: scale(1.02); }

@media (min-width: 1024px) {
  .contacts-short { grid-template-columns: minmax(0, 945fr) minmax(0, 915fr); gap: 58px; }
  .contacts-short__panel {
    min-height: 328px;
    padding: 27px 40px 40px var(--bleed);
    border-radius: 0 var(--r-2xl) var(--r-2xl) 0;
  }
  .contacts-short__map { min-height: 328px; border-radius: var(--r-2xl) 0 0 var(--r-2xl); }
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 49px;
  padding-block: 37px 43px;
  background: linear-gradient(90deg, #35c6d4 0%, #a4adab 35.7%, #ff6a5b 100%);
  box-shadow: var(--sh-cta);
  text-align: center;
  color: #fff;
}
.cta__title {
  max-width: 1052px;
  margin-inline: auto;
  font-family: var(--ff-head);
  font-size: clamp(21px, 1rem + 1.2vw, var(--fs-cta));
  line-height: 1.43;
  font-weight: var(--fw-extrabold);
  white-space: pre-line;
}
.cta__text {
  max-width: 512px;
  margin: 26px auto 0;
  line-height: 20px;
  color: rgba(255, 255, 255, .85);
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  margin-top: 27px;
}
.cta .btn--accent { color: #f3f9fb; padding-inline: 32px; }

/* ---------- Баннер Госуслуг ---------- */
.gos-banner { padding-block: 49px 50px; }
.gos-banner__link {
  display: block;
  max-width: 1073px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--r-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.gos-banner__link:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -18px rgba(18, 32, 59, .45); }
.gos-banner__link img { width: 100%; height: auto; }
.page--inner .gos-banner { padding-top: 64px; }

/* ---------- Футер ---------- */
.footer {
  padding-block: 28px 20px;
  background: var(--c-navy);
  font-family: var(--ff-head);
  color: var(--c-footer-link);
}
.footer__grid { display: grid; gap: 32px; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.footer__logo { flex: none; width: 42px; height: auto; }
.footer__name { max-width: 300px; font-size: 14px; line-height: 19px; }
.footer__phones { display: grid; gap: 14px; margin-top: 24px; }
.footer__phone {
  font-size: var(--fs-h3);
  line-height: 34px;
  font-weight: var(--fw-bold);
  color: #fff;
}
.footer__phone:hover, .footer__email:hover { color: var(--c-accent); }
.footer__email {
  display: inline-block;
  margin-top: 14px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: underline;
}
.footer__legal { display: grid; gap: 4px; margin-top: 20px; font-size: 14px; line-height: 20px; }
.footer__legal a { display: inline-block; padding-block: 4px; }
.footer__legal a:hover { color: #fff; }
.footer__copy { margin-top: 18px; font-size: 12.5px; color: var(--c-footer-muted); }

.footer__menus { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px 32px; }
.footer__menu-title {
  font-size: var(--fs-small);
  line-height: 21.85px;
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  color: var(--c-footer-muted);
}
.footer__menu-list { margin-top: 12px; }
.footer__menu-link { display: inline-block; font-size: 14px; line-height: 26.6px; transition: color var(--t-fast); }
.footer__menu-link:hover { color: #fff; }

.footer__ext { display: grid; gap: 14px; align-content: start; }
.footer__ext-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-small);
  line-height: 16px;
  color: #fff;
  transition: color var(--t-fast);
}
.footer__ext-link:hover { color: var(--c-accent); }
.footer__ext-icon { flex: none; width: 24px; height: 24px; object-fit: contain; }

.footer__dev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--ff-body);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
  color: var(--c-footer-muted);
}
.footer__dev:hover { color: #fff; }
.footer__dev img { width: 29px; height: 30px; }

@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 354px 1fr 200px; gap: 40px; }
  .footer__menus { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .footer__bottom { display: flex; justify-content: flex-end; }
  .footer__dev { margin-top: 0; }
}
@media (min-width: 1440px) {
  .footer__grid { grid-template-columns: 450px 1fr 205px; gap: 64px; }
}

/* ---------- Шапка внутренней страницы ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--c-navy);
  color: #fff;
  box-shadow: var(--sh-hero);
}
.page-hero__inner { position: relative; padding-block: 12px 40px; }
.page-hero__deco { right: -20px; bottom: -40px; font-size: 220px; }
.page-hero__title {
  position: relative;
  margin-top: 16px;
  max-width: 1100px;
  font-family: var(--ff-head);
  font-size: clamp(26px, 1rem + 2.4vw, var(--fs-h1));
  line-height: 1.26;
  font-weight: var(--fw-extrabold);
}
.page-hero__text {
  position: relative;
  max-width: 833px;
  margin-top: 14px;
  line-height: 22px;
  color: var(--c-on-dark-72);
}
@media (min-width: 1024px) {
  .page-hero__inner { padding-block: 20px 53px; }
  .page-hero__deco { right: 18px; bottom: -150px; font-size: 400px; }
}

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.crumbs__item { display: inline-flex; gap: 9px; color: #fff; font-weight: var(--fw-semibold); }
.crumbs__item + .crumbs__item::before { content: "/"; font-weight: var(--fw-regular); color: var(--c-accent); }
.crumbs__link { font-weight: var(--fw-regular); color: var(--c-on-dark-72); transition: color var(--t-fast); }
.crumbs__link:hover { color: #fff; }

/* ---------- Сетка внутренних страниц ---------- */
.layout {
  display: grid;
  gap: 32px;
  padding-top: 32px;
}
.layout__main { min-width: 0; }
@media (min-width: 1024px) {
  .layout--3col { grid-template-columns: var(--col-aside-left) minmax(0, 1fr); column-gap: var(--col-gap); }
  .layout--3col .layout__right { grid-column: 1 / -1; }
  .layout--2col { grid-template-columns: minmax(0, 1fr) var(--col-aside-right); column-gap: 48px; }
}
@media (min-width: 1280px) {
  .layout--3col { grid-template-columns: var(--col-aside-left) minmax(0, 1fr) var(--col-aside-right); column-gap: var(--col-gap); }
  .layout--3col .layout__right { grid-column: auto; }
  .layout--2col { column-gap: 70px; }
}
.layout__left { display: grid; gap: 24px; align-content: start; }

/* Левое меню раздела */
.side-nav__list { display: grid; gap: 11px; }
.side-nav__row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-menu);
  transition: background-color var(--t-base), color var(--t-base);
}
.side-nav__link {
  flex: 1;
  padding: 13px 40px 13px 13px;
  font-family: var(--ff-head);
  font-size: var(--fs-nav);
  line-height: 22px;
  font-weight: var(--fw-medium);
  color: var(--c-ink);
}
.side-nav__row::after {
  content: "";
  position: absolute;
  right: 25px; top: 50%;
  width: 6px; height: 10px;
  margin-top: -5px;
  background: url("../img/icon-chevron.svg") center / contain no-repeat;
  pointer-events: none;
  transition: transform var(--t-base);
}
.side-nav__row:hover { border-color: var(--c-accent); }
.side-nav__item.is-active > .side-nav__row,
.side-nav__item.is-here > .side-nav__row:not(.side-nav__row--parent) { background: var(--c-navy); border-color: var(--c-navy); }
.side-nav__item.is-active > .side-nav__row .side-nav__link,
.side-nav__item.is-here > .side-nav__row:not(.side-nav__row--parent) .side-nav__link { color: #fff; }
.side-nav__item.is-active > .side-nav__row::after,
.side-nav__item.is-here > .side-nav__row:not(.side-nav__row--parent)::after { filter: brightness(0) invert(1); }

.side-nav__toggle {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 52px;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.side-nav__row--parent::after { transform: rotate(90deg); }
.side-nav__item.is-open > .side-nav__row--parent::after { transform: rotate(-90deg); }

.side-nav__sub { display: none; padding: 10px 0 4px 16px; }
.side-nav__item.is-open > .side-nav__sub { display: block; }
.side-nav__sub .side-nav__sub { display: block; padding: 2px 0 2px 21px; }
.side-nav__sublink {
  display: block;
  padding: 5px 6px;
  font-family: var(--ff-head);
  font-size: var(--fs-nav);
  line-height: 23px;
  font-weight: var(--fw-medium);
  color: var(--c-ink);
  transition: color var(--t-fast);
}
.side-nav__sublink:hover { color: var(--c-accent); }
.side-nav__sublink.is-active { color: var(--c-danger); }
.side-nav__sublink.is-here { font-weight: var(--fw-bold); }

/* Карточка «Нужна помощь?» */
.help-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--c-navy);
  color: var(--c-on-dark-72);
}
.help-card::before {
  content: "?";
  position: absolute;
  right: 8px; top: 8px;
  font-family: var(--ff-head);
  font-size: 100px;
  line-height: 72px;
  font-weight: var(--fw-extrabold);
  color: var(--c-deco);
}
.help-card__icon { width: 24px; height: 24px; }
.help-card__title {
  font-family: var(--ff-head);
  font-size: 18px;
  line-height: 22px;
  font-weight: var(--fw-bold);
  color: #fff;
}
.help-card__text { font-size: var(--fs-small); line-height: 18px; }
.help-card__phone { font-size: 13px; line-height: 20px; font-weight: var(--fw-bold); color: var(--c-accent); }
.help-card__phone:hover { color: #fff; }

/* Правые быстрые ссылки */
.quicklinks__list { display: grid; gap: 12px; }
@media (min-width: 576px) and (max-width: 1279px) {
  .quicklinks__list { grid-template-columns: repeat(2, 1fr); }
}
/* в правой колонке (новости) места на две колонки нет */
@media (min-width: 1024px) {
  .layout--2col .quicklinks__list { grid-template-columns: 1fr; }
}
@media (min-width: 1280px) {
  .quicklinks__list { gap: 19px; }
}

/* ---------- Текст страницы (richtext) ---------- */
.content { color: var(--c-text); }
.content > * + * { margin-top: 12px; }
.content h2,
.content h3 {
  font-family: var(--ff-head);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.content h2 { font-size: 20px; line-height: 30px; font-weight: var(--fw-extrabold); }
.content h3 { font-size: 18px; line-height: 26px; }
.content * + h2,
.content * + h3 { margin-top: 28px; }
.content ul { padding-left: 0; list-style: none; }
.content ul li { position: relative; padding-left: 12px; }
.content ul li::before { content: "-"; position: absolute; left: 3px; }
.content ol { padding-left: 20px; }
.content a { color: var(--c-link); text-decoration: underline; }
.content a:hover { text-decoration: none; }
.content img { border-radius: var(--r-sm); }
.content table { width: 100%; border-collapse: collapse; }
.content th, .content td { padding: 8px 12px; border: 1px solid var(--c-border); text-align: left; }
/* значки и фото в ячейках таблиц: узкая ячейка не должна сжимать картинку (108 = 84 под картинку + отступы); сама картинка остаётся натурального размера */
.content td:has(> img) { min-width: 108px; }
.content__title {
  font-family: var(--ff-head);
  font-size: 20px;
  line-height: 30px;
  font-weight: var(--fw-extrabold);
  color: var(--c-ink);
}

/* Блок-схема */
.flowchart__title {
  font-family: var(--ff-head);
  font-size: 18px;
  line-height: 30px;
  font-weight: var(--fw-extrabold);
  color: var(--c-ink);
  text-align: center;
}
.flowchart__figure { margin-top: 24px; }
.flowchart__stage { position: relative; max-width: 787px; margin-inline: auto; }
.flowchart__link { display: block; }
.flowchart__img { width: 100%; max-width: 787px; height: auto; margin-inline: auto; }
/* Кликабельные зоны поверх картинки: положение и размер задаются в процентах инлайном */
.flowchart__hot { position: absolute; display: block; border-radius: clamp(4px, 1.3vw, 10px); }
.flowchart__hot:hover { background: rgba(18, 99, 230, .08); box-shadow: inset 0 0 0 2px var(--c-link); }
@media (max-width: 767px) {
  /* мобильная схема другая — зоны от десктопной на ней не совпадут */
  .flowchart__stage--alt .flowchart__hot { display: none; }
}
.flowchart__notes { display: grid; gap: 4px; margin-top: 16px; }
.flowchart__note a { color: var(--c-link); text-decoration: underline; }
.flowchart__note a:hover { text-decoration: none; }

/* Документы */
.docs__list { display: grid; gap: 22px; margin-top: 12px; }
.docs__link {
  font-family: var(--ff-head);
  font-size: 14px;
  line-height: 22.75px;
  color: var(--c-link);
  text-decoration: underline;
}
.docs__link:hover { text-decoration: none; }
.docs__meta { margin-left: 6px; font-size: var(--fs-small); color: var(--c-text); white-space: nowrap; }

/* Галерея */
.gallery__text { margin-top: 12px; font-size: var(--fs-small); line-height: 20px; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 17px 25px; }
}
.gallery__item { display: block; overflow: hidden; aspect-ratio: 237 / 181; background: var(--c-border); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery__item:hover img { transform: scale(1.05); }

.albums { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 576px) { .albums { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .albums { grid-template-columns: repeat(3, 1fr); } }
.album-card { position: relative; }
.album-card__media { overflow: hidden; aspect-ratio: 237 / 181; border-radius: var(--r-sm); background: var(--c-border); }
.album-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.album-card:hover .album-card__media img { transform: scale(1.05); }
.album-card__title {
  margin-top: 12px;
  font-family: var(--ff-head);
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.album-card__link::after { content: ""; position: absolute; inset: 0; }
.album-card__count { margin-top: 4px; font-size: var(--fs-small); }

/* Список новостей */
.news-list { display: grid; gap: 40px 32px; }
.news-list > * { min-width: 0; }
@media (min-width: 576px) { .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1536px) { .news-list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(32px, 4vw, 98px); row-gap: 52px; } }

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination__link {
  display: grid;
  place-items: center;
  min-width: 44px; height: 44px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--sh-pill);
  font-family: var(--ff-head);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.pagination__link:hover { background: var(--c-accent-strong); color: #fff; }
.pagination__link.is-active { background: var(--c-navy); color: #fff; pointer-events: none; }
.pagination__link.is-disabled { opacity: .4; pointer-events: none; }

/* Новость */
.article__media { overflow: hidden; max-width: 823px; aspect-ratio: 823 / 494; background: var(--c-border); }
.article__media img { width: 100%; height: 100%; object-fit: cover; }
.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: var(--fs-small);
  line-height: 18px;
}
.article__body { max-width: 840px; margin-top: 18px; font-size: 14px; line-height: 23px; }
.article__body p + p { margin-top: 23px; }

.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.share__label { margin-right: 4px; font-size: var(--fs-small); }
.share__btn {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-pill);
  color: var(--c-navy);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.share__btn:hover { background: var(--c-accent-strong); color: #fff; }
.share__btn svg { width: 18px; height: 18px; }
.share__status { font-size: var(--fs-small); color: var(--c-accent); }

/* ---------- Контакты ---------- */
.cinfo {
  display: grid;
  gap: 20px;
  padding-top: 24px;
  font-family: var(--ff-head);
  color: #12161c;
}
@media (min-width: 768px) { .cinfo { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .cinfo { grid-template-columns: 447fr 317fr 295fr 316fr; gap: 40px; } }
.cinfo__label { font-size: 16px; line-height: 23px; color: var(--c-text); }
.cinfo__value { margin-top: 4px; font-style: normal; font-size: 17px; line-height: 27px; }
.cinfo__value--lg { font-size: 22px; line-height: 35px; }
.cinfo__value a:hover { color: var(--c-accent); }
.cinfo__note { font-family: var(--ff-body); font-size: 15px; line-height: 27px; white-space: pre-line; }

.staff { margin-top: 40px; }
.staff__group + .staff__group { margin-top: 40px; }
.staff__title {
  font-family: var(--ff-head);
  font-size: clamp(18px, 1rem + .6vw, 24px);
  line-height: 1.3;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  color: #2d2d2d;
}
.staff__list { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 768px) { .staff__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .staff__list { grid-template-columns: repeat(3, minmax(0, 444px)); gap: 21px 40px; } }

.person {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 133px;
  padding: 17px 16px 18px 11px;
  border: 1px solid #ddeaf0;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 14px 30px -10px rgba(18, 32, 59, .08);
  color: #12161c;
}
.person__photo { flex: none; width: 78px; height: 98px; overflow: hidden; border-radius: 6px; background: var(--c-border); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-family: var(--ff-head); font-size: 18px; line-height: 23.4px; font-weight: var(--fw-medium); }
.person__position { margin-top: 4px; font-family: var(--ff-head); font-size: 13.5px; line-height: 21px; color: #707070; }
.person__phone { display: inline-block; margin-top: 6px; font-family: var(--ff-head); font-size: 15px; }
.person__phone:hover { color: var(--c-accent); }

.map-block { margin-top: 40px; }
.map-block__link {
  display: block;
  max-width: 1063px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--r-sm);
}
.map-block__link img { width: 100%; height: auto; aspect-ratio: 1063 / 318; object-fit: cover; }

/* ---------- Реквизиты ---------- */
.req__list { display: grid; gap: 21px; }
.req-card {
  padding: 20px 20px 24px 27px;
  border: 1px solid #ddeaf0;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 14px 30px -10px rgba(18, 32, 59, .08);
  font-family: var(--ff-head);
  color: #12161c;
}
.req-card__title { font-size: 18px; line-height: 26px; font-weight: var(--fw-medium); }
.req-card__body { margin-top: 14px; font-size: 15px; line-height: 29px; overflow-wrap: anywhere; }
@media (max-width: 575px) {
  .req-card__title { font-size: 16px; line-height: 24px; }
  .req-card__body { font-size: 14px; line-height: 26px; }
}

/* Ручные переносы в заголовках — только с планшета */
@media (max-width: 767px) {
  .hero__title br { display: none; }
  .stats__title, .steps__title, .cta__title { white-space: normal; }
}

/* На узких экранах содержимое страницы идёт раньше меню раздела */
@media (max-width: 1023px) {
  .layout__main { order: -1; }
}

/* Фокус на тёмном фоне — яркий бирюзовый */
.header :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.footer :focus-visible,
.help-card :focus-visible,
.contacts-short__panel :focus-visible,
.dept-card--highlight :focus-visible,
.dept-card:focus-within :focus-visible,
.cta :focus-visible { outline-color: var(--c-accent); }
