/* ===== 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--scrolled {
  top: 0;
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
}

.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;
}

.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;
}

.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: 50px;
  }

  .nav-extra div {
    margin-top: 20px;
  }

  .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;
  }
}
