/* ============================================
   НАВИГАЦИЯ И ШАПКА
   ============================================ */

.nav {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav__brand {
  flex: 1;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--font-highlight-color, #4de1cd);
  transition: all 0.3s ease;
}

.nav__logo:hover {
  transform: scale(1.05);
}

.nav__logo svg {
  width: 32px;
  height: 39px;
}

.nav__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  justify-content: center;
  flex: 2;
  flex-wrap: nowrap;
}

.nav__link {
  color: var(--font-main-color, #ddd);
  text-decoration: none;
  font-variation-settings: "wght" var(--main-font-wght, 400);
  transition: color 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--font-highlight-color, #4de1cd);
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--font-highlight-color, #4de1cd);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

.nav-btn-wrapper {
  display: inline-flex;
  align-self: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.nav__actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  min-width: 0; /* Предотвращает переполнение флекс-контейнера */
}

.nav__cta-button {
  display: inline-flex;
  background: var(--font-highlight-color, #4de1cd);
  color: var(--bg-color, #121116);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 2px solid var(--font-highlight-color,#4de1cd);
  font-variation-settings: "wght" var(--main-font-wght, 500);
  text-decoration: none;
  transition: all 0.3s ease;
  will-change: transform;
  white-space: nowrap;
  min-height: max-content;
  line-height: 1.2;
}

.nav-btn-wrapper:hover .nav__cta-button {
  background-color: transparent;
  color: var(--font-highlight-color, #ddd);
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(77, 225, 205, 0.3);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--font-main-color, #ddd);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: absolute;
  transform-origin: center;
}

.nav__toggle span:nth-child(1) {
  top: 8px;
}

.nav__toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.nav__toggle span:nth-child(3) {
  bottom: 8px;
}

/* Анимация превращения в крестик */
.nav__toggle.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scale(0);
}

.nav__toggle.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Скрываем мобильную кнопку на десктопе */
.nav__item--mobile-cta {
  display: none;
}








/* Стили для планшетов */
@media (min-width: 901px) and (max-width: 1024px) {
  .nav__menu {
    gap: 1.5rem !important;
    flex-wrap: nowrap !important;
  }
  
  .nav__link {
    white-space: nowrap !important;
    font-size: 0.9rem !important;
  }
  
  .nav__actions {
    flex-shrink: 0 !important;
  }
  
  .nav__cta-button {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 900px) {
  .nav {
    padding: 1rem 1.5rem;
  }
  
  .nav__actions .nav__cta-button {
    display: none; /* Скрываем десктопную кнопку на мобильных */
  }
  
  .nav__item--mobile-cta {
    display: block; /* Показываем мобильную кнопку */
  }
  
  .nav__cta-button--mobile {
    margin-top: 1rem;
  }
  
  .nav__menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100vw;
    height: calc(100vh - 70px);
    background: rgba(18, 17, 22, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }
  
  .nav__menu.active {
    left: 0;
  }
  
  /* Блокируем прокрутку при открытом мобильном меню */
  body.mobile-menu-open {
    overflow: hidden;
    /* position: fixed; */
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }
  
  .nav__toggle {
    display: flex;
  }
  
  .nav__item {
    margin: 1rem 0;
  }
  
  .nav__link {
    font-size: 1.2rem;
  }
}

/* Отключаем hover эффекты на сенсорных устройствах */
@media (hover: none) and (pointer: coarse) {
  .nav__link:hover,
  .nav__cta-button:hover,
  .nav__logo:hover {
    transform: none;
    color: inherit;
  }
  
  .nav__link:hover::after {
    width: 0;
  }
  
  .nav__cta-button:hover {
    background: var(--font-highlight-color, #4de1cd);
    box-shadow: none;
  }
}