/* ========== HEADER ========== */
.site-header {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ===== ЛОГОТИП (по центру на мобиле) ===== */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.logo-img {
  height: 42px;
  width: auto;
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}
.logo-text span {
  color: #e31e24;
}
.logo-text .blue {
  color: #0066b3;
}

/* ===== БУРГЕР ===== */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: #0066b3;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ===== ЯЗЫКИ ===== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  transition: background 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
  background: #e8f4fc;
  color: #0066b3;
}

.lang-btn img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ===== Кнопка «Войти» ===== */
.login-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  background: #0066b3;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  white-space: nowrap;
}

.login-btn:hover {
  background: #005299;
  color: #ffffff;
}

.desktop-login {
  display: none !important;
}

@media (min-width: 992px) {
  .desktop-login {
    display: inline-flex !important;
    margin-left: 32px;
  }
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  padding: 90px 24px 40px;
  overflow-y: auto;
}

.mobile-menu.open {
  left: 0;
}

.mobile-menu nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu nav a {
  display: block;
  padding: 14px 0;
  font-size: 17px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 500;
  transition: color 0.2s;
}

.mobile-menu nav a:hover {
  color: #0066b3;
}

.mobile-menu-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
}

.mobile-menu-logo img {
  height: 42px;
  width: auto;
}

.mobile-login-item {
  margin-top: 20px;
}

.mobile-login-item .login-btn {
  display: block;
  text-align: center;
  justify-content: center;
}

/* Затемнение фона */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===== ДЕСКТОП-МЕНЮ ===== */
.desktop-nav {
  display: none;
}

.desktop-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.desktop-nav a:hover {
  color: #0066b3;
}

/* ===== АДАПТИВ ШАПКИ ===== */
@media (min-width: 992px) {
  .burger {
    display: none;
  }

  .logo {
    position: static;
    transform: none;
    margin-right: 40px;
  }

  .header-inner {
    justify-content: flex-start;
  }

  .desktop-nav {
    display: block;
    flex: 1;
  }

  .lang-switcher {
    margin-left: auto;
  }

  .mobile-menu,
  .overlay {
    display: none !important;
  }
}

@media (max-width: 991px) {
  .lang-btn span {
    display: none;
  }
  .lang-btn {
    padding: 6px;
  }
}

/* Текст подписи к флагу — только в выпадающем списке */
.lang-dropdown .lang-btn span {
  display: inline !important;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* ===== Языки: десктоп / мобильный ===== */
.lang-desktop {
  display: none;
}

.lang-mobile {
  display: block;
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.lang-toggle:hover {
  background: #e8f4fc;
}

.lang-toggle .current-flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lang-toggle .arrow {
  font-size: 10px;
  color: #555;
  transition: transform 0.25s;
}

.lang-toggle.open .arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 110px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 100;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown .lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  width: 100%;
  border-radius: 5px;
  margin: 0;
}

.lang-dropdown .lang-btn:hover {
  background: #e8f4fc;
}

@media (min-width: 992px) {
  .lang-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .lang-mobile {
    display: none;
  }
}
