.navbar {
  z-index: 1001;
  display: block;
}
.navbar__wrap .menu {
  display: none;
}
.hamb {
  display: flex;
  align-items: center;
}
.hamb__field {
  padding: 10px 0 10px 20px;
  cursor: pointer;
}
.bar {
  display: block;
  width: 33px;
  border-radius: 20px;
  height: 3px;
  margin: 6px 0;
  background-color: #007bff;
  transition: 0.2s;
  position: relative;
  z-index: 1000;
  align-items: flex-start;
}
.bar:nth-child(2) {
  width: 24px;
}
.popup-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100%;
  background-color: #f8f9fa;
  z-index: 1000;
  display: flex;
  transition: 0.3s;
}
.popup-menu.open {
  right: 0;
}
.popup-menu .menu {
  color: #212529;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 113px 0 40px;
  overflow: hidden;
  gap: 24px;
}
.popup-menu .offer__nav_wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  gap: 24px;
}
.popup-menu .menu li {
  list-style: none;
  width: 100%;
}
.popup-menu .menu li img {
  max-width: 220px;
}
.popup-menu .menu li a {
  color: #212529;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding: 6px 24px 6px 24px;
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
  line-height: 150%;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
@media (hover: hover) {
  .popup-menu .menu li a:hover {
    background-color: #007bff;
    color: #fff;
  }
}
.hamb__field.active .bar:nth-child(2) {
  opacity: 0;
}
.hamb__field.active .bar:first-child {
  transform: translateY(8px) rotate(42deg);
}
.hamb__field.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-42deg);
}
body.noscroll {
  overflow: hidden;
}
@media screen and (max-width: 768px) {
  .offer__nav_menu {
    display: none;
  }
  .offer__nav_menu_item_social {
    display: flex;
    gap: 16px;
  }
  .offer__nav_menu_item_social svg {
    width: 28px;
    height: 28px;
  }
  .offer__nav_menu_item_social img {
    width: 28px;
    height: 28px;
  }
  .offer__nav_social {
    display: none;
  }
  .navbar {
    display: block;
    right: 0;
  }
  .offer__nav_logo_burger {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .popup-menu {
    width: 360px;
  }
}
@media screen and (max-width: 480px) {
  .popup-menu {
    width: 100%;
  }
}
@media screen and (max-height: 600px) {
  .popup-menu .menu {
    padding: 16px 0;
    gap: 8px;
  }
  .popup-menu .offer__nav_wrap {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Бургер-меню на всех экранах (вкл. ПК) — стили содержимого выезжающей панели */
.popup-menu .offer__nav_menu_item_social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.popup-menu .offer__nav_menu_item_social img,
.popup-menu .offer__nav_menu_item_social svg {
  width: 28px;
  height: 28px;
}
/* Логотип в бургере: скрыт на ПК, виден на мобильной версии */
.popup-menu .offer__nav_logo_burger {
  display: none;
}
@media screen and (max-width: 768px) {
  .popup-menu .offer__nav_logo_burger {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
  }
  
  .popup-menu .menu {
    padding: 0 0 40px;
    gap: 24px;
  }
  
  .popup-menu .offer__nav_wrap {
    gap: 12px;
  }
  
  .popup-menu .menu li a {
    justify-content: center
  }
}

/* Телефон внутри бургер-меню: виден на ПК, скрыт на мобильной версии */
.popup-menu .menu__phone {
  width: 100%;
}
.popup-menu .menu__phone a {
  justify-content: center;
  padding: 8px 24px;
  font-size: 20px;
  font-weight: 700;
  color: #007bff;
  text-transform: none;
  letter-spacing: 0.5px;
}
@media screen and (max-width: 768px) {
  .popup-menu .menu__phone {
    display: none;
  }
}

/* При открытом бургере блок контактов в шапке плавно исчезает */
.header__contacts {
  transition: opacity 0.3s ease;
}
body.noscroll .header__contacts {
  opacity: 0;
  pointer-events: none;
}

/* Кнопка-бургер: плавное появление/исчезновение */
.navbar {
  transition: opacity 0.3s ease;
}
/* На ПК при открытом меню скрываем саму кнопку-бургер (закрытие — через крестик в панели) */
@media screen and (min-width: 769px) {
  body.noscroll .navbar {
    opacity: 0;
    pointer-events: none;
  }
}

/* Кнопка закрытия внутри панели (только ПК): крестик как у трансформированного бургера */
.popup-menu .menu__close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 33px;
  height: 33px;
  cursor: pointer;
  z-index: 2;
}
.popup-menu .menu__close span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 33px;
  height: 3px;
  border-radius: 20px;
  background-color: #007bff;
  transition: background-color 0.2s ease;
}
.popup-menu .menu__close span:nth-child(1) {
  transform: translateY(-50%) rotate(45deg);
}
.popup-menu .menu__close span:nth-child(2) {
  transform: translateY(-50%) rotate(-45deg);
}
.popup-menu .menu__close:hover span {
  background-color: #0056b3;
}
@media screen and (max-width: 768px) {
  .popup-menu .menu__close {
    display: none;
  }
}
