header {
  padding: 20px 0;
  transition: padding 0.4s ease-in-out;
  background: #000000CC;
  width: 100%;
  display: flex;
}


.header-wrapper {
  display: flex;
  align-items: center;
  max-width: 1128px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.header-sticky {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 100%;
}

.header-logo {
  margin-right: 40px;
}

.header-menu {
  margin-right: 100px;

  display: flex;
  align-items: center;

  gap: 24px;
}

.header-menu__item {
  display: flex;
  gap: 2px;

  color: var(--white-200);
  align-items: center;
}

.header-submenu {
  display: none;
  position: absolute; /* optional, for dropdown style */
  background: white;
  border: 1px solid #ddd;
}

.header-menu__item-wrapper {
  display: flex;
  gap: 2px;
  align-items: center;
  position: relative;
}

.header-menu__item-wrapper-click {
  display: flex;
  gap: 2px;
  align-items: center;
}

.header-menu__item-wrapper.active .header-submenu {
  display: flex;
  background: var(--black-300);
  border-radius: 8px;
  padding: 16px 12px;
  flex-direction: column;
  gap: 16px;

  border: none;
  bottom: 0;
  right: 0;

  transform: translateY(calc(100% + 6px));
  width: 100%;
  min-width: 200px;
}

.header-menu__item-chevron {
  transition: transform 200ms linear;
  cursor: pointer;
}

.header-menu__item-wrapper.active .header-menu__item-chevron {
  transform: rotateZ(180deg);
}

.header-menu__item-wrapper .header-submenu .header-submenu__item {
  color: var(--white-200);
}

.header-tools {
  display: flex;
  gap: 8px;

  align-items: center;
  margin-left: auto;
}

.header-tools__login {
  color: var(--white-200);

  padding: 10px 12px;
}

.header-tools__register {
  padding: 10px 12px;
  color: var(--white-100);
  border-radius: 6px;
  background: #4145E9;

  margin-right: 24px;
}

.header-tools__langs {
  display: flex;
  padding-top: 2px;
  padding-bottom: 2px;
  gap: 4px;

  align-items: center;
  color: var(--white-100);
}

.header-tools__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header-tools__burger:after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--green-100);
  right: -4px;
  top: -4px;
  z-index: 2;
  border-radius: 50%;
}

.header-tools__burger.active:after {
  display: none;
}

.header-tools__burger span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #FFFFFF;

  transition: transform 200ms linear;
}

.header-tools__mobile-menu {
  display: none;
}

.header_content.header_content--item.content--submenu {
  display: flex;
  flex-direction: column;

  position: fixed;
  left: 0;
  top: 80px;
  width: 100vw;
  background: var(--black-300);
  z-index: 2;
  padding-top: 32px;
  padding-bottom: 32px;
}

.header_content_items {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  max-width: 1128px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;

  gap: 8px;
}

.header_content_items--first {
  margin-bottom: 20px;
}

.header_content_item {
  border-radius: 8px;
  border: 1px solid var(--white-16p);

  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.header_content_item--first {
  display: block;
  padding: 8px 12px;
  border: none; /* синие пунктирные границы как на фото */
  border-radius: 6px;
  text-decoration: none;
}

.header_content_item--first .header_content-title {
  font-weight: 600;
  color: #fff;
}

.header_content_item--first .header_content-arrow {
  margin-left: 8px;
  color: #fff;
  margin-top: 4px;
}

.header_content_item--first .header_content-head {
  justify-content: flex-start;
}

.header_content_item--first .header_content-text {
  text-align: left;
}

.header_content-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header_content-title {
  color: var(--white-100);
}

.header_content-icon {
  max-width: 24px;
  max-height: 24px;
  min-width: 24px;
  min-height: 24px;
}

.header_content-text {
  color: var(--white-300);
  width: 100%;
}

.header-menu__item-wrapper:not(.active) .header_content.header_content--item.content--submenu {
  display: none;
}

@media (max-width: 1200px) {
  header {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header-menu {
    margin-right: 50px;
    gap: 16px;
  }
}

@media (max-width: 800px) {
  header {
    padding: 12px 16px;
  }

  .header-sticky {
    border-bottom: 1px solid #FAFAFA29;
  }

  .header-menu {
    display: none;
  }

  .header-tools .header-tools__login {
    display: none;
  }
  .header-tools .header-tools__register {
    display: none;
  }

  .header-tools__burger {
    display: flex;
  }

  .header-tools__burger.active span:first-of-type {
    transform: rotateZ(45deg) translateY(4.5px);
  }
  .header-tools__burger.active span:last-of-type {
    transform: rotateZ(-45deg) translateY(-4.5px);
  }

  .header-tools__mobile-menu {
    position: fixed;
    width: 100%;
    top: 64px;
    left: 0;
    background:
            radial-gradient(
                    131.8% 63.93% at 0% 100%,
                    rgba(159, 239, 67, 0.64) 0%,
                    rgba(52, 156, 87, 0) 100%
            ),
            linear-gradient(0deg, #000000, #000000);
    background-repeat: no-repeat;
    z-index: 5;
  }

  .header-tools__mobile-menu .primary-btn {
    margin-top: 54px;
    width: 100%;
    justify-content: center;
  }

  .header-tools__mobile-menu .transparent-btn {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
  }

  .header-tools__mobile-menu.show {
    display: flex;
    flex-direction: column;
    padding: 0 16px 24px;
  }

  .header-tools__mobile-menu-wrapper {
    padding: 20px 0;
    border-bottom: 1px solid var(--white-16p);

    display: flex;
    gap: 4px;
    color: #FFFFFF;
  }

  .header-tools__mobile-menu__item {
    color: inherit;
    margin-top: 0 !important;
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .header-tools__mobile-menu__item .header-tools__mobile-menu__item-chevron {
    width: 16px;
    height: 16px;
  }

  .header-tools__mobile-menu__item-chevron {
    transform: rotate(-90deg);
  }

  .header-tools__mobile-menu button:not(.header-tools__mobile-menu__item) {
    margin-top: 54px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .header-tools__mobile-menu button:last-of-type {
    margin-top: 12px;
  }

  .header-tools__mobile-menu-wrapper__main {
    display: flex;
    flex-direction: column;
  }

  .header-tools__mobile-menu-wrapper__sub {
    display: none;
    flex-direction: column;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .header-tools__mobile-menu-wrapper__sub .header-submenu__item {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .header-tools__mobile-menu-wrapper__sub .header-tools__mobile-menu-wrapper__headline .header-submenu__item {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    margin-top: 0;
  }

  .header-tools__mobile-menu-wrapper__sub .header-tools__mobile-menu-wrapper__headline .header-submenu__item {
    color: var(--green-100);
  }

  .header-tools__mobile-menu-wrapper__sub .header-tools__mobile-menu-wrapper__headline .header-submenu__item .header-tools__mobile-menu__item-chevron path {
    fill: var(--green-100) !important;
  }
}
