/* === STICKY HEADER === */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--header-bg, rgba(10,10,20,.9));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.05);
  z-index: 1000;
  transition: top .3s;
}

/* === NAV CONTAINER === */
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* === LOGO === */
.logo-wrapper {
  width: 48px;
  height: 48px;
  padding: 6px;
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(59,130,246,.5), 0 0 20px rgba(139,92,246,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .4s transform, .4s box-shadow;
  opacity: 0;
  animation: logoFadeIn 1s forwards;
}
.logo-wrapper img {
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.2));
}
.logo-wrapper:hover {
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(59,130,246,.7), 0 0 32px rgba(139,92,246,.3);
}

/* === NAVIGATION === */
.nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--header-link, #ccc);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: .3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #3b82f6;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s;
}
.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav a:hover,
.nav a.active {
  color: #fff;
}

/* === HEADER ACTIONS === */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

/* === LANGUAGE SWITCHER === */
.lang-switcher {
  display: flex;
  gap: 10px;
}
.lang-switcher button {
  background: none;
  border: none;
  font-size: .95rem;
  line-height: 1;
  color: var(--header-link, #ccc);
  cursor: pointer;
  padding: 4px;
  transition: color .3s;
}
.lang-switcher button:hover {
  color: #fff;
}
.lang-switcher button.active {
  background: var(--primary-color, #3b82f6);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  padding: 4px 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}
body.light-theme .lang-switcher button.active {
  background: #2563eb;
  color: #fff;
}

/* === THEME SWITCHER === */
.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
}
.switch {
  position: relative;
  width: 58px;
  height: 32px;
  display: inline-block;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 50px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  transition: background .3s;
}
.slider::before {
  content: "🌙";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: .3s transform, .3s background, .3s color, .3s content;
}
.switch input:checked + .slider::before {
  transform: translateX(26px);
  content: "☀️";
  background: #000;
  color: #fff;
}
body.light-theme .slider {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.1);
}
body.light-theme .slider::before {
  background: #000;
  color: #fff;
}
body.light-theme .switch input:checked + .slider::before {
  background: #fff;
  color: #000;
}

/* === CTA BUTTON === */
.contact-btn {
  padding: 10px 20px;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background .3s;
}
.contact-btn:hover {
  background: #2563eb;
}

/* === BURGER MENU === */
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.burger span {
  width: 25px;
  height: 2px;
  background: #fff;
}
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: .6s opacity, .6s transform;
}
.mobile-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  margin: 0;
  padding: 0;
}
.mobile-menu a {
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  transition: color .3s;
}
.mobile-menu a:hover {
  color: #3b82f6;
}

/* === THEMES === */
body.light-theme {
  --header-bg: #ffffff;
  --header-link: #1f2937;
}

/* === ANIMATIONS === */
@keyframes logoFadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .header-actions {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  /* Скрываем логотип и бургер-меню */
  .logo-wrapper,
  .burger {
    display: none;
  }

  /* Показываем только языковой переключатель и переключатель темы */
  .header-actions {
    display: flex;
    justify-content: center; /* Центрируем элементы */
    gap: 16px;
    width: 100%; /* Растягиваем на всю ширину */
  }

  /* Центрируем языковой переключатель и переключатель темы */
  .lang-switcher,
  .theme-switcher {
    display: flex;
    align-items: center;
  }

  /* Убираем лишние отступы */
  .nav-container {
    justify-content: center; /* Центрируем содержимое */
    padding: 12px 16px; /* Уменьшаем отступы */
  }

  /* Скрываем навигацию */
  .nav {
    display: none;
  }
}
