/* Общий хидер сайта (лендинг, афиша без авторизации, квиз, наука) —
   единый источник стиля, чтобы не расходиться при правках. */

:root {
  --bg: #f5f8fe;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #0d1b3d;
  --muted: #5e6f91;
  --line: rgba(14, 33, 74, 0.12);
  --blue: #2F62DA;
  --blue-deep: #254EAE;
  --sky: #82A5FD;
  --ice: #F2F7FF;
  --shadow: 0 18px 60px rgba(10, 34, 84, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content: 1180px;
}

.shell { width: min(var(--content), calc(100% - 32px)); margin: 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h-lg, 48px);
  padding: 0 24px;
  border-radius: var(--btn-radius, 999px);
  border: 1px solid transparent;
  font-size: var(--btn-fs-lg, 0.9375rem);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }
.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 78, 174, 0.2), 0 8px 24px rgba(47, 98, 218, 0.22);
}
.btn--primary:hover { background: #2A58C4; box-shadow: 0 1px 2px rgba(37, 78, 174, 0.2), 0 12px 32px rgba(47, 98, 218, 0.3); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  border-color: rgba(14, 33, 74, 0.08);
}
.btn--ghost:hover { background: #fff; border-color: rgba(14, 33, 74, 0.16); }

/* Меню разделов (Афиша, Наука, Квиз, Музей) — текстовые кнопки без заливки */
.btn.nav__science,
.landing-page .site-header .btn.nav__science {
  min-height: var(--btn-h, 40px);
  padding: 0 12px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
  font-weight: 700;
}
.btn.nav__science:hover,
.btn.nav__science[aria-current="page"] {
  background: transparent;
  border-color: transparent;
  color: var(--blue);
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 248, 254, 0.5);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(245, 248, 254, 0.72);
  border-bottom-color: rgba(14, 33, 74, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 24px rgba(14, 33, 74, 0.06);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__left { display: flex; align-items: center; gap: 18px; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
a.nav__actions-compact { display: none; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .ka-mark { --ka-mark-h: 48px; }

/* ---------- Соцсети в хидере ---------- */
.social-links { display: flex; align-items: center; gap: 10px; }
.social-links__link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  color: var(--blue-deep); background: #E5EFFF;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social-links__link:hover { background: var(--blue-deep); color: #fff; transform: translateY(-2px); }
.social-links__link svg { width: 18px; height: 18px; }
.nav__social { display: flex; }
/* Горизонтальный логотип шире знака — освобождаем место в шапке заранее */
@media (max-width: 1100px) {
  .nav__social { display: none; }
}
@media (max-width: 900px) {
  .brand .ka-mark { --ka-mark-h: 40px; }
  .nav__actions-full { display: none; }
  a.nav__actions-compact { display: inline-flex; }
}

/* ---------- Бургер-меню (мобильное боковое меню) ---------- */
.nav__burger {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(14, 33, 74, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  cursor: pointer;
}
.nav__burger svg { width: 22px; height: 22px; }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 30, 0.5);
}
.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 84vw);
  background: var(--surface-strong);
  box-shadow: -18px 0 50px rgba(10, 34, 84, 0.22);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.mobile-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(14, 33, 74, 0.12);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.mobile-menu__close svg { width: 18px; height: 18px; }
.mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: var(--btn-h-lg, 48px);
  padding: 0 16px;
  border-radius: var(--btn-radius, 999px);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.mobile-menu__link:not(.btn--primary):hover,
.mobile-menu__link[aria-current="page"] { color: var(--blue); }
.mobile-menu__link.btn--primary { justify-content: center; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%); color: #fff; }
.mobile-menu__social { margin-top: 10px; justify-content: center; }

@media (max-width: 640px) {
  .nav { min-height: 70px; flex-wrap: nowrap; }
  .nav__science { display: none; }
  .nav__social { display: none; }
  .nav__actions { margin-left: auto; gap: 8px; }
  .nav__actions-full { display: none; }
  a.nav__actions-compact { display: inline-flex; }
  .nav__burger { display: inline-flex; }
  .brand { min-width: 0; flex-shrink: 1; }
  .brand .ka-mark { --ka-mark-h: 38px; }
}
