.logo-img {
  height: 50px;
  transition: opacity 0.3s ease;
}

.logo-dark {
  display: none;
}

/* При тёмной теме */
body.dark-theme .logo-light {
  display: none;
}
body.dark-theme .logo-dark {
  display: inline-block;
}


.wrap #header {
    margin-top: 10px;
    z-index: 1000;
    position: relative;
}

.theme-toggle, .lang-select {
    width: 65px;
    height: 40px;
}

.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 12px 20px;
}

.logo img { 
  height: 50px; 
  transition: filter .3s; 
}

.main-nav {
  display: flex; 
  gap: 10px;
  position: relative;
}

.main-nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}

body.light-theme .main-nav a:hover {
  background-color: rgba(16,185,129,0.2);
}

body.dark-theme .main-nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.05);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s;
}

body.dark-theme .main-nav a:hover::after {
  opacity: 1;
}

body.dark-theme .main-nav a:hover {
  color: #fff;
}

.controls { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.menu-toggle div {
  width: 22px; 
  height: 3px; 
  background: var(--text);
  margin: 4px 0; 
  border-radius: 2px; 
  transition: background .3s;
  display: none;
}

.lang-select { 
  position: relative; 
  display: flex; 
  align-items: center; 
  cursor: pointer;
  z-index: 1001;
}

#current-lang { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
}

.lang-options {
  display: none; 
  position: absolute;
  top: 110%; 
  left: 0;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  flex-direction: column;
  min-width: 80px;
  z-index: 1002;
}

.lang-options a {
  display: flex; 
  align-items: center; 
  gap: 6px;
  padding: 6px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

.lang-options img { 
  width: 18px; 
  height: auto; 
}

.lang-options a:hover {
  background-color: var(--accent);
  color: #fff;
}

/* Фон под меню */
.menu-overlay {
  position: fixed; 
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1003;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Само меню */
.mobile-menu {
  display: flex;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  height: auto;
  max-height: 80vh;
  width: 90%;
  max-width: 320px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px;
  border-radius: var(--radius);
  flex-direction: column;
  gap: 12px;
  transition: transform .3s ease, opacity .3s ease;
  z-index: 1020;
  pointer-events: none;
}

/* Активное меню */
.mobile-menu.active { 
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Ссылки внутри меню */
.mobile-menu a {
  color: var(--text); 
  text-decoration: none; 
  padding: 8px 0; 
  font-weight: 500;
  text-align: center;
}

/* Кнопка закрытия */
.mobile-menu .close-btn {
  margin-top: 16px;
  padding: 10px;
  background: red;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
  text-align: center;
}

.mobile-menu .close-btn:hover {
  background: darkred;
}

.callback-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.callback-btn:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

.callback-btn:active {
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .callback-btn {
      display: none;
  }

  .header-wrap {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 10px;
  }

  .main-nav {
    display: none;
  }

  .controls {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .menu-toggle div {
    display: block;
  }
}
