/* --- ОСНОВНОЙ ХЕДЕР --- */
.ds-header {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  z-index: 2100;
  display: flex;
  justify-content: center;
}

.ds-nav-container {
  width: 95%;
  max-width: 1200px;
  background: rgba(15, 15, 15, 0.7); /* Темная подложка */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- ШРИФТ POLARIS ДЛЯ ПЕРЕКЛЮЧАТЕЛЯ --- */
.ds-lang-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Polaris", sans-serif; /* Твой шрифт */
  font-size: 13px;
  letter-spacing: 1px;
}

.lang-item { color: #666; text-decoration: none; transition: 0.3s; }
.lang-item.active { color: #fff; }
.lang-divider { color: #333; }
.lang-item:hover { color: #c01101; }

/* --- ДЕСКТОПНАЯ НАВИГАЦИЯ --- */
.ds-desktop-nav {
  display: flex;
  gap: 30px;
}

.ds-nav-link {
  font-family: "Polaris", sans-serif;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.ds-nav-link:hover { color: #c01101; }

/* Скрываем бургер на десктопе */
.ds-menu-toggle { display: none; }

.ds-nav-link.active {
  color: #c01101 !important;
}

.ds-menu-link.active {
  color: #c01101 !important;
}

/* --- МОБИЛЬНАЯ ЛОГИКА (max-width: 991px) --- */
@media screen and (max-width: 991px) {
  
  .ds-desktop-nav { display: none; } /* Прячем обычное меню */
  
  .ds-menu-toggle { 
    display: flex; /* Показываем бургер */
    background: none; border: none; cursor: pointer;
    width: 25px; height: 16px; flex-direction: column;
    justify-content: space-between; z-index: 2200;
  }

  .line { width: 100%; height: .5px; background: #ffffff30; transition: 0.4s; }
  
  /* Крестик при активации */
  .ds-menu-toggle.is-active .line-1 { transform: translateY(7px) rotate(45deg); }
  .ds-menu-toggle.is-active .line-2 { transform: translateY(-7px) rotate(-45deg); }

  /* Центрируем языки на мобилке */
  .ds-lang-switcher {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --- OVERLAY MENU (МОБИЛЬНОЕ) --- */
.ds-menu-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* ВАЖНО: чтобы не мешало кликать по сайту, когда закрыто */
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ds-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Возвращаем кликабельность */
}

.ds-menu-nav { display: flex; flex-direction: column; align-items: center; gap: 40px; width: 100%; padding: 0 20px; box-sizing: border-box; }

.ds-menu-link {
  font-family: "Polaris", sans-serif;
  /* 
     Немного уменьшаем минимальный размер до 20px и базовый до 6vw, 
     чтобы длинная фраза аккуратнее помещалась на узких экранах
  */
  font-size: clamp(20px, 6vw, 42px); 
  color: #fff;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  display: block;       
  text-align: center;   
  line-height: 1.2;     
  max-width: 320px; 
  width: 100%;
}

.ds-menu-overlay.is-open .ds-menu-link { opacity: 1; transform: translateY(0); }
/* Каскад (delay) остается тем же */
.ds-menu-link:nth-child(1) { transition-delay: 0.1s; }
.ds-menu-link:nth-child(2) { transition-delay: 0.15s; }
.ds-menu-link:nth-child(3) { transition-delay: 0.2s; }
.ds-menu-link:nth-child(4) { transition-delay: 0.25s; }
.ds-menu-link:nth-child(5) { transition-delay: 0.3s; }

