.header {
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 0;
  z-index: 9999;
  box-sizing: border-box;
}

.header_container {
  background: #151515;
}

.header_logo_link {
  display: flex;
  height: 50px;
  width: 100px;
}

.menu_btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 50px;
  height: 45px;
  background: rgba(48, 49, 50, 0.8);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.burger_line {
  position: absolute;
  width: 26px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.line1 {
  top: 10px;
}

.line2 {
  top: 50%;
  transform: translateY(-50%);
}

.line3 {
  bottom: 10px;
}

.menu_btn.active .line1 {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu_btn.active .line2 {
  opacity: 0;
}

.menu_btn.active .line3 {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.header_menu_list {
  /* background: rgba(21, 21, 21, 0.8); */
}
.bg_color_black {
  background: #000000;
}

/* .menu_btn .close_menu {
  display: none;
}
.menu_btn.active .open_menu {
  display: none;
}
.menu_btn.active .close_menu {
  display: block;
} */
.header_menu_list {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 600px;
  top: 0;
  overflow: hidden;
  max-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(21, 21, 21, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition:
    max-height 0.45s ease,
    padding 0.25s ease,
    opacity 0.25s ease;
  z-index: 9900;
  box-sizing: border-box;
}

.header_menu_list.active {
  overflow-y: auto;
}

.header_menu_link {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgb(255, 255, 255);
  display: inline-block;
  background: linear-gradient(to bottom, red, #e21e22);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0 100%;
  padding: 8px;
  transition: 0.5s all ease;
}

.header_menu_link:hover {
  background-size: 100% 100%;
}

.header_menu_link_active {
  background-size: 100% 100%;
}

@media screen and (min-width: 1200px) {
  .header {
    padding: 16px;
  }

  .header_navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .menu_btn {
    display: none;
  }

  .header_menu_list {
    position: static;
    left: auto;
    transform: none;
    width: auto;
    max-width: none;
    padding: 0;
    max-height: none;
    overflow: visible;
    /* background: none !important; */
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: stretch; /* ключ для розтягування дітей по висоті */
    box-shadow: none;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    background: rgba(48, 49, 50, 0.8);
    /* padding: 0 8px; */
  }

  .header_menu_list.active {
    max-height: none;
    padding: 0;
  }

  .header_menu_link {
    font-size: 12px;

    display: flex; /* робимо посилання flex-елементом */
    align-items: center; /* вертикальне центрування тексту */

    height: 100%; /* займає всю висоту батька */
    padding: 16px 8px;
  }
}

@media screen and (min-width: 1440px) {
  .header_menu_link {
    font-size: 14px;
  }
}
