
/* ---------- Сброс и базовые настройки ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-on-background);
  background-color: var(--color-surface);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; }
p { margin: 0; }

/* ---------- Дизайн-токены ---------- */
:root {
  /* Цвета */
  --color-surface: #f9f9f9;
  --color-white: #ffffff;
  --color-white-90: hsla(0, 0%, 100%, .9);
  --color-white-70: hsla(0, 0%, 100%, .7);
  --color-white-60: hsla(0, 0%, 100%, .6);
  --color-white-50: hsla(0, 0%, 100%, .5);
  --color-white-40: hsla(0, 0%, 100%, .4);

  --color-on-background: rgb(26, 28, 28);
  --color-secondary: rgb(95, 94, 94);
  --color-on-surface-variant: rgb(62, 72, 80);
  --color-outline: rgb(110, 120, 130);

  --color-azure: rgb(30, 175, 247);
  --color-azure-10: rgba(30, 175, 247, .1);
  --color-azure-20: rgba(30, 175, 247, .2);
  --color-azure-30: rgba(30, 175, 247, .3);
  --color-azure-40: rgba(30, 175, 247, .4);

  --color-deep-navy: rgb(10, 25, 47);
  --color-deep-navy-10: rgba(10, 25, 47, .1);
  --color-deep-navy-20: rgba(10, 25, 47, .2);

  --color-surface-container: rgb(238, 238, 238);
  --color-error: rgb(186, 26, 26);

  /* Типографика */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Сетка / отступы */
  --container-width: 1280px;
  --margin-desktop: 40px;
  --section-padding: 80px;
}

/* ---------- Утилитарные эффекты (было в Tailwind как кастомные классы) ---------- */
.glass-card {
  background: var(--color-white-60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-white-40);
  box-shadow: 0 8px 32px 0 rgba(0, 63, 93, .05);
}

.mesh-gradient {
  background-color: #f9f9f9;
  background-image:
    radial-gradient(at 0 0, #ccedff 0, transparent 50%),
    radial-gradient(at 50% 0, #e6f7ff 0, transparent 50%),
    radial-gradient(at 100% 0, #d6ffff 0, transparent 50%);
}

.soft-shadow { box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .08); }

.icon-multi-tone {
  background: linear-gradient(135deg, #1eaff7, #006491);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Material Symbols базовая настройка */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
/* Уменьшенная иконка — для бейджей и вторичных кнопок */
.icon-sm { font-size: 18px; }

/* Секция на белом фоне (используется, чтобы визуально отделить блок от mesh-gradient) */
.section--surface { background: var(--color-white); }

/* Компактная секция (для блока с карточками ролей: полноразмерный отступ выглядит слишком просторно) */
.section--compact { padding: 64px 0; }

/* ---------- Типографические стили ---------- */
.text-display-lg {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--color-deep-navy);
}
.text-headline-lg {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-deep-navy);
}
.text-headline-md {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--color-deep-navy);
}
.text-body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  color: var(--color-on-surface-variant);
}
.text-body-md {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: var(--color-on-surface-variant);
}
.text-label-md {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.text-label-sm {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--color-on-surface-variant);
}

@media (min-width: 768px) {
  .text-display-lg { font-size: 48px; line-height: 56px; }
  .text-headline-lg { font-size: 32px; line-height: 40px; }
  .text-headline-md { font-size: 24px; line-height: 32px; }
}

/* ---------- Общий контейнер и секции ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { padding: 0 var(--margin-desktop); }
}

.section { padding: 40px 0; }
.section--lg { padding: var(--section-padding) 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  padding: 10px 24px;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.95); }

.btn--primary {
  background: var(--color-azure);
  color: #fff;
}
.btn--primary:hover {
  box-shadow: 0 10px 25px -5px var(--color-azure-30);
}

.btn--navy {
  background: var(--color-deep-navy);
  color: #fff;
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}
.btn--navy:hover { background: var(--color-azure); box-shadow: 0 15px 30px -8px rgba(0,0,0,.2); }

.btn--glass {
  color: var(--color-deep-navy);
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}
.btn--glass:hover { background: #fff; }

.btn--program {
  background: var(--color-azure);
  color: #fff;
  padding: 10px 24px;
  border-radius: 12px;
}
.btn--program:hover { background: var(--color-deep-navy); }

.btn--block {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: var(--color-deep-navy);
  color: #fff;
  font-size: 14px;
}
.btn--block:hover { background: var(--color-azure); }

.btn--submit {
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  background: var(--color-azure);
  color: #fff;
  font-size: 18px;
}
.btn--submit:hover { box-shadow: 0 15px 30px -5px var(--color-azure-40); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-azure);
  font-weight: 600;
  font-size: 14px;
  transition: transform .2s ease;
  background: none;
}
.link-arrow:hover { transform: translateX(4px); }
.link-arrow .material-symbols-outlined { transition: transform .2s ease; }
.link-arrow:hover .material-symbols-outlined { transform: translateX(4px); }

/* =========================================================
   Header
   ========================================================= */
.header {
  background: var(--color-white-70);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid var(--color-white-40);
  transition: all .3s ease;
}
.header.is-scrolled {
  background: var(--color-white-90);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.15);
}
.header__inner {
  display: grid;
  /* auto/1fr/auto вместо 1fr/auto/1fr: раньше левая и правая колонки были
     принудительно одинаковой ширины, из-за чего на узких экранах бренд-блок
     (логотипы КНИТУ+T1) сжимался и налезал сам на себя ещё до появления
     бургер-меню. Теперь брендблок и кнопка-гамбургер занимают только свою
     реальную ширину. */
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 80px;
  width: 100%;
  max-width: none;   /* было: max-width: var(--container-width); */
  margin: 0;
  padding: 0 20px;
  transition: height .3s ease;
}
.header__brand { justify-self: start; }

.header__inner > .btn--primary { justify-self: end; }
.header.is-scrolled .header__inner { height: 64px; }
@media (min-width: 768px) {
  .header__inner { padding: 0 var(--margin-desktop); }
}

.header__brand { display: flex; align-items: center; gap: 12px; }
.header__brand img { height: 40px; width: auto; }
.header__divider {
  color: var(--color-outline);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  user-select: none;
}
@media (min-width: 768px) { .header__brand img { height: 44px; } }
.header__brand-t1 {
  height: 22px;   /* было 40px по общему правилу — подберите нужное значение */
}
@media (min-width: 768px) {
  .header__brand-t1 { height: 36px; }  /* было 44px на десктопе */
}
/* Совсем узкие телефоны: логотипы и крестик между ними ещё немного уменьшаем */
@media (max-width: 380px) {
  .header__brand { gap: 8px; }
  .header__brand img { height: 30px; }
  .header__brand-t1 { height: 16px; }
  .header__divider { font-size: 15px; }
}
/* Мобильное меню: по умолчанию скрыто, разворачивается вниз от шапки при клике на .nav-toggle.
   От 1024px и шире — обычное горизонтальное меню, кнопка-гамбургер скрыта. */
.nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  position: absolute;
  top: calc(100% + 8px);
  right: 20px;
  left: auto;
  width: 240px;
  max-width: calc(100vw - 40px);
  padding: 12px 16px;
  background: var(--color-white-90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-white-40);
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(10, 25, 47, .25);
}
@media (min-width: 768px) { .nav { right: 40px; } }
.nav.is-open { display: flex; }
@media (min-width: 1024px) {
  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: auto;
    max-width: none;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}
.nav__link {
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 4px;
  transition: color .2s ease;
}
@media (min-width: 1024px) { .nav__link { padding: 0; } }
.nav__link:hover { color: var(--color-azure); }

.nav-toggle {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-navy);
  border-radius: 10px;
  transition: background .2s ease;
}
.nav-toggle:hover { background: var(--color-white-50); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }


/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 128px 0 80px;
  overflow: hidden;
}
@media (min-width: 768px) { .hero { padding: 192px 0 128px; } }

.hero__grid {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
}

/* Контент теперь один, по центру экрана — колонки с визуалом больше нет */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 820px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
}
.badge span:last-child {
  color: var(--color-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Обёртка нужна только для того, чтобы декоративные «блобы» позиционировались
   относительно карточки, а не всей секции */
.hero__card-wrap {
  position: relative;
  width: 100%;
}

.hero__card {
  position: relative;
  z-index: 1;
  padding: 32px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) { .hero__card { padding: 56px; } }

.hero__title .accent { color: var(--color-azure); }

.hero__text { max-width: 560px; }

.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.hero__blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  z-index: 0;
}
.hero__blob--1 {
  top: -24px; right: 5%; width: 140px; height: 140px;
  background: var(--color-azure-10);
  animation: pulse 3s ease-in-out infinite;
}
.hero__blob--2 {
  bottom: -40px; left: 5%; width: 160px; height: 160px;
  background: rgba(95, 94, 94, .1);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* =========================================================
   Логотипы проекта (Минцифры + Аналитический центр) — теперь в hero, над заголовком
   ========================================================= */
.hero__project-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* Карточка НЕ имеет фиксированной ширины/высоты — она просто оборачивает
   логотип отступами (padding), поэтому автоматически подстраивается под
   размер картинки внутри. Чтобы у Минцифры и Аналитического центра карточки
   получились одного масштаба, у обоих логотипов одна и та же высота
   картинки (img) — тогда и белый квадрат вокруг неё сам выйдет одинаковым. */
.project-logos__item {
  padding: 16px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-logos__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(0, 63, 93, .18);
}

.project-logos__item img {
  height: 40px;
  width: auto;
}
.project-logos__item--fixed {
  width: 200px;
  height: 72px;
}
.project-logos__item--fixed img {
  height: 50px;
}
/* =========================================================
   Roles
   ========================================================= */
.roles__title { text-align: center; margin-bottom: 40px; }

.roles__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.role-card {
  flex: 0 0 200px;  
  padding: 32px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .2s ease;
}

@media (max-width: 480px) {
  .role-card { flex: 0 0 100%; max-width: 280px; }
}

.role-card:hover { transform: translateY(-4px); }

.role-card__icon {
  width: 88px;
  height: 88px;
  background: var(--color-white-50);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform .2s ease;
}
.role-card:hover .role-card__icon { transform: scale(1.1); }
.role-card__icon .material-symbols-outlined { font-size: 44px; }

.role-card__label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-deep-navy);
}

/* =========================================================
   Programs
   ========================================================= */
.section-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 48px;
}
@media (min-width: 768px) {
  .section-header { flex-direction: row; align-items: flex-end; }
}
.section-header__text { max-width: 640px; }
.section-header__text .text-headline-lg { margin-bottom: 12px; }

.programs__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) { .programs__grid { grid-template-columns: repeat(2, 1fr); } }

.program-card {
  border-radius: 12px;
  overflow: hidden;
  transition: all .5s ease;
}

.program-card__media {
  height: 260px;
  position: relative;
  overflow: hidden;
}
.program-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}
.program-card:hover .program-card__media img { transform: scale(1.05); }
.program-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-deep-navy-20);
  transition: background .2s ease;
}
.program-card:hover .program-card__media::after { background: var(--color-deep-navy-10); }

.program-card__badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  color: var(--color-deep-navy);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.program-card__body { padding: 40px; }
.program-card__title {
  margin-bottom: 16px;
  transition: color .2s ease;
}
.program-card:hover .program-card__title { color: var(--color-azure); }
.program-card__code { margin-bottom: 32px; }

.program-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--color-surface-container);
}
.program-card__meta {
  font-size: 12px;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* =========================================================
   Advantages
   ========================================================= */
.advantages__title { text-align: center; margin-bottom: 64px; }
.advantages__grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  gap: 32px;
}
/* auto-fit вместо repeat(3, 1fr): колонки центрируются как группа,
   поэтому карточки не «прилипают» к левому краю, если их меньше трёх */
@media (min-width: 768px) {
  .advantages__grid { grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); }
}

.advantage-card {
  padding: 40px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .3s ease;
}
.advantage-card:hover { transform: translateY(-8px); }

.advantage-card__icon {
  width: 56px;
  height: 56px;
  background: var(--color-white-50);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.advantage-card__icon .material-symbols-outlined { font-size: 32px; }

.advantage-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-deep-navy);
  margin-bottom: 16px;
}

/* =========================================================
   Documents
   ========================================================= */
.documents__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--color-surface-container);
  border-bottom: 1px solid var(--color-surface-container);
}
.doc-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 12px;
  transition: background .2s ease;
}
.doc-btn:hover { background: rgba(238,238,238,.4); }
.doc-btn .material-symbols-outlined.text-error { color: var(--color-error); }
.doc-btn__label { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--color-deep-navy); }
.doc-btn__download { color: var(--color-on-surface-variant); transition: transform .2s ease; }
.doc-btn:hover .doc-btn__download { transform: translateY(2px); }

/* =========================================================
   Admission Stepper
   ========================================================= */
.stepper-title { text-align: center; margin-bottom: 64px; }

/* Две колонки на десктопе: слева путь поступления, справа форма заявки */
.admission__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: start;
}
@media (min-width: 1024px) { .admission__grid { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 64px; } }

/* Вертикальная схема шагов: кружок слева, текст справа, соединяющая линия проходит через центры кружков */
.stepper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.stepper__line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 31px;
  width: 2px;
  background: var(--color-azure-20);
  z-index: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.step__circle {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 24px;
  color: var(--color-azure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: all .5s ease;
}
.step:hover .step__circle { background: var(--color-azure); color: #fff; }
.step__body { padding-top: 14px; }
.step__title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-deep-navy);
  margin-bottom: 4px;
}
.step__desc { font-size: 13px; color: var(--color-on-surface-variant); }

/* =========================================================
   Team
   ========================================================= */
.team__title { margin-bottom: 64px; }
.team__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
/* На совсем узких телефонах 2 колонки сжимают карточки до нечитаемой ширины — оставляем 1 колонку */
@media (min-width: 480px) { .team__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (min-width: 1024px) { .team__grid { grid-template-columns: repeat(4, 1fr); } }

.team-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease;
}
.team-card:hover { transform: translateY(-4px); }

.team-card__photo { aspect-ratio: 4 / 5; overflow: hidden; }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }

.team-card__body { padding: 32px; text-align: center; }
.team-card__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-deep-navy);
  margin-bottom: 4px;
}
.team-card__role {
  color: var(--color-azure);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.team-card__desc { font-size: 12px; color: var(--color-on-surface-variant); }

/* =========================================================
   Partners
   ========================================================= */
.partners { text-align: center; }
.partners__title { margin-bottom: 64px; }
.partners__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 768px) { .partners__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .partners__grid { grid-template-columns: repeat(6, 1fr); } }

/* Модификатор для небольшого числа партнёров: центрируем логотипы вместо растягивания на всю сетку.
   minmax(..., 1fr) вместо жёсткого minmax(160px, 220px) — на экранах уже 360px колонки сжимаются
   вместо того, чтобы вылезать за пределы экрана. */
.partners__grid--compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
.partners__grid--compact .partner-logo {
  flex: 0 1 200px; /* базовая ширина логотипа, может сжиматься */
}
@media (max-width: 479px) {
  .partners__grid--compact .partner-logo {
    flex: 0 1 160px;
  }
}

.partner-logo {
  height: 112px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.partner-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(0, 63, 93, .18);
}
.partner-logo img { max-height: 100%; }

/* =========================================================
   News
   ========================================================= */
.news__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Карусель: стрелки по бокам + дорожка карточек. Число колонок задаёт JS через --news-columns */
.news__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}
.news__track {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--news-columns, 1), 1fr);
  gap: 32px;
  align-items: stretch;
}
.news__nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--color-white-60);
  border: 1px solid var(--color-white-40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-navy);
  transition: background .2s ease, opacity .2s ease;
}
.news__nav:hover:not(:disabled) { background: var(--color-white); }
.news__nav:disabled { opacity: .35; cursor: not-allowed; }

.news__dots { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.news__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-azure-20);
  transition: background .2s ease, transform .2s ease;
}
.news__dot.is-active { background: var(--color-azure); transform: scale(1.25); }

/* Карточка одинакового размера независимо от длины заголовка: медиа — фиксированные пропорции,
   заголовок — обрезается по 3 строкам через line-clamp */
.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  transition: all .3s ease;
  cursor: pointer;
}
.news-card:focus-visible { outline: 2px solid var(--color-azure); outline-offset: 2px; }

.news-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-card:hover .news-card__media img { transform: scale(1.05); }

.news-card__body { padding: 32px; display: flex; flex-direction: column; flex: 1; }
.news-card__date {
  color: var(--color-azure);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.news-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-deep-navy);
  line-height: 1.3;
  transition: color .2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card:hover .news-card__title { color: var(--color-azure); }

.news-card__more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--color-azure);
  font-size: 13px;
  font-weight: 600;
}

/* =========================================================
   Полноэкранная панель новости (карусель обложки/медиа + полный текст)
   ========================================================= */
.news-overlay__media { margin-bottom: 24px; }
.news-overlay__frame { position: relative; }
.news-overlay__stage {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface-container);
}
.news-overlay__stage img,
.news-overlay__stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-overlay__stage iframe { width: 100%; height: 100%; border: 0; display: block; }

.news-overlay__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--color-white-90);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-navy);
  transition: background .2s ease;
  z-index: 2;
}
.news-overlay__nav:hover { background: var(--color-white); }
.news-overlay__nav--prev { left: 16px; }
.news-overlay__nav--next { right: 16px; }

.news-overlay__dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

.news-overlay__date {
  color: var(--color-azure);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.news-overlay__title { margin-bottom: 20px; }
.news-overlay__text p { margin-bottom: 16px; line-height: 1.7; }

/* =========================================================
   Contacts
   ========================================================= */
/* Компактный блок: без формы, только заголовок, краткое описание и способы связи в ряд */
.contacts__wrap {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.contacts__title { margin-bottom: 16px; }
.contacts__lead { margin-bottom: 32px; }

.contact-list { display: flex; flex-direction: column; gap: 32px; }
.contact-list--row {
  flex-direction: column;
  align-items: center;
}
@media (min-width: 640px) {
  .contact-list--row { flex-direction: row; justify-content: center; gap: 48px; }
}

.contact-item { display: flex; align-items: center; gap: 24px; text-align: left; }
.contact-item__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.contact-item:hover .contact-item__icon { transform: scale(1.1); }
.contact-item__icon .material-symbols-outlined { font-size: 28px; }
.contact-item__label {
  font-size: 12px;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 2px;
}
.contact-item__value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-deep-navy);
  white-space: nowrap;
}
.contact-item__note {
  font-size: 13px;
  color: var(--color-on-surface-variant);
  margin-top: 2px;
}
.contacts__socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.contacts__social-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-navy);
  transition: transform .2s ease, color .2s ease;
}
.contacts__social-btn:hover {
  color: var(--color-azure);
  transform: translateY(-2px);
}
/* ---------- Форма ---------- */
.form-card { padding: 24px; border-radius: 24px; }
@media (min-width: 640px) { .form-card { padding: 48px; border-radius: 40px; } }

/* Встройка Яндекс Форм — адаптивная ширина; высоту старается подгонять embed.js,
   но на случай, если он не сработает (или сработает не сразу), задаём запасную
   высоту по брейкпоинтам — на узких экранах поля формы становятся в один
   столбец и текст переносится, из-за чего форма становится выше и кнопка
   «Отправить» иначе уезжает за пределы фрейма. Высота без !important, чтобы
   инлайн-стиль от embed.js (если сработает) всё равно мог её переопределить. */
.yandex-form-embed { width: 100%; max-width: 650px; margin: 0 auto; }
.yandex-form-embed iframe {
  width: 100% !important;
  max-width: 100%;
  height: 820px;
  border: none;
  display: block;
}
@media (max-width: 767px) {
  .yandex-form-embed iframe { height: 1000px; }
}
@media (max-width: 420px) {
  .yandex-form-embed iframe { height: 1120px; }
}
.form-card__title { margin-bottom: 32px; text-align: center; }

.form-success {
  display: none;
  margin-bottom: 32px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 16px 24px;
  font-size: 16px;
}
.form-success.is-visible { display: block; }

.form-error {
  display: none;
  margin-bottom: 32px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 16px 24px;
  font-size: 16px;
}
.form-error.is-visible { display: block; }

/* Honeypot-поле — ловушка для спам-ботов: скрыта визуально, но остаётся
   доступной для автозаполняющих скриптов (в отличие от display:none оно
   не выпадает из DOM/accessibility-дерева по щелчку антибот-эвристик) */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-fields { display: flex; flex-direction: column; gap: 32px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .form-row { grid-template-columns: repeat(2, 1fr); } }

.form-label {
  font-size: 12px;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-input {
  width: 100%;
  background: var(--color-white-50);
  border: 1px solid var(--color-white-40);
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  color: var(--color-on-background);
  transition: border-color .2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-azure);
}
select.form-input { appearance: none; }

.form-consent { display: flex; align-items: center; gap: 16px; }
.form-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-azure);
}
.form-consent label { font-size: 12px; color: var(--color-on-surface-variant); }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-surface-container);
}
.footer__inner { padding: 80px 0 40px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  margin-bottom: 80px;
}
/* 3 колонки (бренд, Ресурсы, Контакты) — раньше их было 4 (с «Навигацией»),
   repeat(4, 1fr) оставлял пустую четвёртую колонку и сдвигал контент влево. */
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* На мобильном (одна колонка) центрируем содержимое каждого блока подвала —
   иначе логотипы, списки и контакты прижаты к левому краю. */
@media (max-width: 767px) {
  .footer__grid { text-align: center; }
  .footer__brand { justify-content: center; }
  .footer__links { align-items: center; }
  .footer__contacts { align-items: center; }
  .footer__contact-item { justify-content: center; }
}

.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
/* Высота подобрана под конкретный логотип (КНИТУ выше по пропорциям), а не под позицию */
.footer__brand img:first-child { height: 36px; width: auto; }
.footer__brand img:last-child { height: 28px; width: auto; }
.footer__divider { color: var(--color-outline); font-size: 20px; font-weight: 300; line-height: 1; }
.footer__desc { margin-bottom: 32px; line-height: 1.6; }

.footer__socials { display: flex; gap: 16px; }
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-surface-variant);
  transition: color .2s ease;
}
.social-btn:hover { color: var(--color-azure); }

.footer__heading {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-deep-navy);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 32px;
}
.footer__links { display: flex; flex-direction: column; gap: 16px; }
.footer__links a,
.footer__link-btn {
  color: var(--color-on-surface-variant);
  font-size: 16px;
  transition: color .2s ease;
}
.footer__links a:hover,
.footer__link-btn:hover { color: var(--color-azure); }
/* Кнопка «Политика конфиденциальности» выглядит как соседние ссылки, но открывает панель, а не переходит по адресу */
.footer__link-btn {
  display: inline;
  padding: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.footer__contacts { display: flex; flex-direction: column; gap: 24px; }
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-on-surface-variant);
  font-size: 16px;
}
.footer__contact-item .material-symbols-outlined { font-size: 20px; }
.footer__contact-phone { white-space: nowrap; }
.footer__contact-note {
  display: block;
  font-size: 12px;
  opacity: .75;
  margin-top: 2px;
  white-space: normal;
}
.footer__contact-cta { padding-top: 16px; }

.footer__bottom {
  border-top: 1px solid var(--color-surface-container);
  padding-top: 40px;
  text-align: center;
}
.footer__copy {
  font-size: 12px;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .6;
}

/* =========================================================
   Оверлей-панель (Политика конфиденциальности, полная новость):
   выезжает справа поверх сайта, закрывается крестиком/кликом по фону/Esc.
   ========================================================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
}
.overlay[hidden] { display: none; }
.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, .5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.overlay__panel {
  position: relative;
  width: min(720px, 100%);
  max-width: 100%;
  height: 100%;
  background: var(--color-white);
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, .2);
  animation: overlay-slide-in .25s ease;
}
@keyframes overlay-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.overlay__header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-surface-container);
  z-index: 2;
}
.overlay__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-deep-navy);
  background: var(--color-surface-container);
  transition: background .2s ease, color .2s ease;
}
.overlay__close:hover { background: var(--color-azure-20); color: var(--color-azure); }
.overlay__body { padding: 24px 32px 56px; }
.overlay__body p { margin-bottom: 16px; line-height: 1.6; }
.overlay__h3 { margin: 28px 0 8px; }
.overlay__body ul { margin: 0 0 16px; padding-left: 20px; }
.overlay__body ul li { margin-bottom: 8px; line-height: 1.6; }
.overlay__body .policy-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.overlay__body .policy-table th,
.overlay__body .policy-table td { text-align: left; padding: 10px 14px; border: 1px solid var(--color-white-40); vertical-align: top; }
.overlay__body .policy-table th { width: 220px; font-weight: 600; color: var(--color-deep-navy); background: var(--color-azure-10); }
.overlay__body .policy-table ul { margin: 0; padding-left: 18px; }
.overlay__body .policy-table li { margin-bottom: 4px; }
@media (max-width: 640px) {
  .overlay__body .policy-table, .overlay__body .policy-table tbody, .overlay__body .policy-table tr, .overlay__body .policy-table th, .overlay__body .policy-table td { display: block; width: 100%; }
  .overlay__body .policy-table th { border-bottom: none; }
  .overlay__body .policy-table td { border-top: none; margin-bottom: 8px; }
}
@media (max-width: 640px) {
  .overlay__header { padding: 20px; }
  .overlay__body { padding: 20px 20px 40px; }
}
body.overlay-open { overflow: hidden; }

/* ---------- Плавающая кнопка "Все варианты" ---------- */
.back-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #0A192F;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
