/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 36px;
  left: 0;
  width: 100%;
  /* height: 90px; */
  z-index: 1000;
  transition: background-color 0.6s ease, box-shadow 0.6s ease, backdrop-filter 0.6s ease;
}

.header.dark {
	background: var(--bg-darker);
}

.header--scrolled {
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  animation: headerDrop .28s cubic-bezier(.4,1.35,.6,1);
}

@keyframes headerDrop {
  0%   { transform: translateY(-100%); }
  80%  { transform: translateY(4px); }
  100% { transform: translateY(0); }
}


.header__container {
  /* max-width: 1250px; */
  /* margin: 0 auto; */
  /* padding: 0 15px; */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100vh;
  padding-top: 60px;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  transition: right 0.3s ease;
}

.main-nav.open {
  right: 0;
}

.main-nav ul {
  list-style: none;
  padding-left: 20px;
  margin: 0;
}

.main-nav ul li {
  margin: 20px 0;
}

.main-nav ul li a {
  display: block;
  position: relative;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 18px;
  line-height: 150%;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.main-nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--chinazes-color);
  transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
  width: 100%;
}

/* ===== BURGER MENU ===== */
.burger {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  z-index: 1100;
}

.burger span {
  height: 4px;
  background: var(--chinazes-color);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
  display: block;
}

.burger.open span:nth-child(1),
.burger.open span:nth-child(3) {
  position: absolute;
  top: 9px;
  left: 0;
  width: 30px;
}

.burger.open span:nth-child(1) {
  transform: rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: rotate(-45deg);
}

/* ===== SUBMENU ===== */
.submenu {
  display: none;
  list-style: none;
  margin: 0;
  padding-left: 0;
  flex-direction: column;
}

.submenu li {
  margin: 8px 0 0 20px;
}

.has-submenu {
  position: relative;
}

.arrow {
  display: inline-block;
  font-size: 14px;
  transition: transform 0.3s ease;
  margin-left: 5px;
}

.has-submenu:hover > .submenu {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0b0b0b;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
  max-width: 150px;
  flex-direction: column;
}

.has-submenu:hover > a > .arrow {
  transform: rotate(-90deg);
}

/* ===== MEDIA QUERIES ===== */

/* Desktop view (≥768px) */
@media (min-width: 768px) {
  .main-nav {
    position: static !important;
    width: auto;
    height: auto;
    padding-top: 0;
    background: transparent;
    transition: none;
    display: block !important;
  }

  .main-nav > ul {
    display: flex;
    gap: 25px;
  }

  .main-nav ul li {
    margin: 0;
  }

  .burger {
    display: none;
  }
}

/* Mobile view (≤767px) */
@media (max-width: 767px) {
  .main-nav {
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    backdrop-filter: blur(6px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
  }

  .submenu {
    display: none !important;
  }

  .submenu.open {
    display: block !important;
    position: relative !important;
    background: none !important;
    box-shadow: none !important;
  }

  .submenu-toggle .submenu.open {
    display: block;
    position: relative;
  }

  .top-bar {
    display: none;
  }

  .header {
    top: 0;
  }

  .nav-extra {
    padding-left: 20px;
    margin-top: 25px;
  }

  .nav-extra div {
    margin-top: 10px;
  }

  .nav-extra .top-bar__phone {
    margin-top: 10px;
  }

  .phones-container {
    display: flex;
    flex-direction: column;
  }

  .top-bar__socials {
    display: flex;
    justify-content: space-between;
    padding-right: 15px;
  }

  .top-bar__socials > a {
    margin-left: 0;
  }

  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 14px !important;
  }

  .section-title {
    font-size: 24px !important;
  }
}

/* LANG SWITCHER */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-switcher__link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  opacity: 0.7;
  transition: all 0.15s ease-in-out;
}

.lang-switcher__link:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.6);
}

.lang-switcher__link--active {
  opacity: 1;
  border-color: #d0ff33; /* var(--chinazes-color), якщо хочеш */
  font-weight: 600;
}

/* За замовчуванням десктоп-версія видима, мобільна схована */
.lang-switcher--desktop {
  display: flex;
}

.lang-switcher--mobile {
  display: none;
}

/* Mobile: ховаємо десктоп, показуємо мобільну всередині меню */
@media (max-width: 767px) {
  .lang-switcher--desktop {
    display: none;
  }

  .lang-switcher--mobile {
    display: flex;
    padding: 20px;
    gap: 12px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}
