/* Меню в шапке */

.header__actions { display: flex; flex: none; align-items: center; gap: 8px; }

/* Компьютер */
.nav { display: none; }

@media (min-width: 1024px) {
  .nav { display: block; margin-left: auto; }
  .header__actions { margin-left: 8px; }
}

.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__list > li { position: relative; }

.nav__list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #c9c5be;
  transition: color .25s, background-color .25s;
}

.nav__list > li > a:hover,
.nav__list > li:focus-within > a { color: var(--text); background: rgba(255, 255, 255, .05); }

.nav__list > .current-menu-item > a,
.nav__list > .current-menu-ancestor > a,
.nav__list > .current-page-ancestor > a { color: var(--accent); }

.nav__list > .menu-item-has-children > a::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}

.nav__list > .menu-item-has-children:hover > a::after,
.nav__list > .menu-item-has-children:focus-within > a::after { transform: translateY(3px) rotate(225deg); }

.nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(18, 19, 23, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .25s, transform .3s var(--ease), visibility .25s;
}

/* Мостик, чтобы меню не закрывалось при переводе курсора */
.nav .sub-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }

.nav .menu-item-has-children:hover > .sub-menu,
.nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 12px);
}

.nav .sub-menu a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #c9c5be;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}

.nav .sub-menu a:hover,
.nav .sub-menu a:focus-visible { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav .sub-menu .current-menu-item > a { color: var(--accent); }

/* Бургер */
.burger {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}

.burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .35s var(--ease);
}

.burger[aria-expanded='true'] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (min-width: 1024px) {
  .burger,
  .mobile-menu { display: none !important; }
}

@media (max-width: 560px) {
  .header__cta { display: none; }
}

/* Мобильное меню */
.mobile-menu {
  max-width: 1152px;
  margin: 8px auto 0;
}

.mobile-menu__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(18, 19, 23, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: menu-in .35s var(--ease);
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.mobile-menu__list { display: flex; flex-direction: column; }

.mobile-menu__list > li > a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.mobile-menu__list a:hover { background: rgba(255, 255, 255, .05); }
.mobile-menu__list .current-menu-item > a { color: var(--accent); }

.mobile-menu__list .sub-menu {
  display: flex;
  flex-direction: column;
  margin: 0 0 8px 14px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.mobile-menu__list .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 15px;
  color: #b4b0a8;
}

.mobile-menu__cta { width: 100%; }

@media (min-width: 561px) {
  .mobile-menu__cta { display: none; }
}

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

/* Строка регионов */
.footer__regions,
.about__regions { font-size: 14px; color: var(--muted); }

.footer__regions { width: 100%; }
.about__regions { margin-top: 20px; font-size: 15px; }

.footer__regions a,
.about__regions a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(240, 122, 95, .5);
  text-underline-offset: 3px;
  transition: color .25s, text-decoration-color .25s;
}

.footer__regions a:hover,
.about__regions a:hover { color: var(--accent-light); text-decoration-color: var(--accent-light); }
