/* Burger + mobile drawer — показывается до 768px */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--tc-border-strong, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.nav-burger:hover {
  background: rgba(91, 141, 239, 0.12);
  border-color: rgba(91, 141, 239, 0.35);
}

.nav-burger__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(2) {
  opacity: 0;
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.3s;
}

.mobile-menu.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__backdrop {
  opacity: 1;
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 88vw);
  height: 100%;
  background: #0c0f14;
  border-left: 1px solid var(--tc-border, rgba(255, 255, 255, 0.08));
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--tc-border, rgba(255, 255, 255, 0.08));
}

.mobile-menu__brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.mobile-menu__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  padding: 12px 10px 24px;
  gap: 4px;
}

.mobile-menu__link {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #e4e4e7;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  background: rgba(91, 141, 239, 0.1);
  color: #fff;
}

.mobile-menu__link.nav-item--active {
  color: var(--tc-accent-bright, #7eb3ff);
  background: rgba(91, 141, 239, 0.12);
  border-color: rgba(91, 141, 239, 0.25);
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .header-main {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .logo-section {
    margin-bottom: 0 !important;
    flex: 1;
    min-width: 0;
  }

  .nav--desktop {
    display: none !important;
  }

  .nav-burger {
    display: flex;
  }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none !important;
  }
}
