/* Хедер */
.topbar {
  position: relative;
}

.topbar .wrap {
  max-width: 1024px;
  margin: 0 auto 0 auto;
  padding: 30px 0;
  display: flex;
  align-items: start;
  position: relative;
}

/* Логотип */
.logo {
  position: absolute;
  left: 0;
  bottom: -80px;
  z-index: 3;
  line-height: 0;
}

.logo img {
  width: 160px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12));
}

/* Горизонтальне меню (десктоп) */
.menu {
  flex: 1 1 auto;
  margin-left: 200px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 45px;
}

.menu .item {
  font-size: 20px;
  font-weight: 600;
  color: #0e0e0e;
  text-decoration: none;
  padding: 10px 0;
}

/* Кнопка бургер */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: #fff;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
  z-index: 1002;
}

.menu-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle__line {
  width: 20px;
  height: 2px;
  background: #222;
  display: block;
}

.menu-toggle__label {
  font-size: 16px;
  font-weight: 500;
  color: #0e0e0e;
}

@media (max-width: 991px) {

  /* Логотип */
  .logo {
    position: relative;
    left: 0;
    bottom: 0px;
    z-index: 3;
    line-height: 0;
  }

  .logo img {
    width: 120px;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12));
  }
}

/* Off-canvas меню */
@media (max-width: 992px) {
  .menu {
    position: fixed;
    top: 20px;
    right: -100%;
    width: 360px;
    height: 100vh;
    flex-direction: column;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
    padding: 80px 20px;
    gap: 0;
    transition: right 0.3s ease;
    z-index: 1001;
  }

  .menu .item {
    padding: 16px 0;
    border-bottom: 1px solid #f4f4f4;
    font-size: 18px;
    text-align: left;
  }

  .menu.is-open {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
  }

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

  body.no-scroll {
    overflow: hidden;
  }

  .topbar .menu {
    justify-content: flex-start;
  }
}

/* Анімація бургер → хрестик */
.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Плавна прокрутка */
html {
  scroll-behavior: smooth;
}