.header {
  position: fixed;
  top: 20px;
  left: 0;
  z-index: 9999;
  width: 100%;
}

.header-section .header__wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #cfcfcf;
  border-radius: 99px;
  padding: 15px;
  backdrop-filter: blur(16px);
  box-shadow:
    0 4px 4px 0 rgba(45, 96, 226, 0.05),
    inset 0 4px 4px 0 rgba(226, 226, 226, 0.1);
  background: rgba(254, 254, 254, 1);
  gap: 8px;
  transition: all 0.3s ease;
}

.header-section.scrolling .header__wrapper {
  background: rgba(254, 254, 254, 0.8);
}

.header__logo img {
  display: flex;
  width: 100%;
  max-width: 146px;
  height: auto;
}

.header__center-content {
  flex: 1 1 auto;
}

.header-menus {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.header-menus > li > a {
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: #0d1118;
  text-decoration: none;
  display: flex;
  transition: all 0.3s ease;
}

.header-menus > li.aizen > a {
  font-weight: 500;
  font-size: 20px;
  line-height: 130%;
  padding-left: 26px;
  position: relative;
  background: linear-gradient(270deg, #06063c, #1629d6, #06063c);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: aizenGradient 4s ease-in-out infinite;
}

.header-menus > li.aizen > a::before {
  display: block;
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: linear-gradient(270deg, #06063c, #1629d6, #06063c);
  background-size: 200% 200%;
  animation: aizenGradient 4s ease-in-out infinite;
  -webkit-mask-image: url("/wp-content/uploads/2025/10/mic.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("/wp-content/uploads/2025/10/mic.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

@keyframes aizenGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.header-menus li.menu-item-has-children > a {
  position: relative;
}

.header-menus li.menu-item-has-children > a::after {
  display: none;
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  background-color: #0d1118;
  mask: url(/wp-content/uploads/2025/01/header-arrow.svg) no-repeat center;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.header__burder-menu {
  display: none;
  cursor: pointer;
}

.header-menus li.menu-item-has-children .sub-menu {
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.header__mobile-wrap {
  display: none;
}

.header-menus .sub-menu li {
  flex: 0 0 calc(100% / 3 - 11px);
}

.header-menus .sub-menu li a {
  position: relative;
  display: flex;
  color: #4f4f4f;
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: transparent;
}

.header-menus .sub-menu {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  list-style: none;
  z-index: 30;
}

@media screen and (min-width: 1201px) {
  .header__left-content,
  .header__right-content {
    display: flex;
    min-width: 200px;
  }

  .header__right-content {
    justify-content: flex-end;
  }

  .header-menus .sub-menu li a:hover {
    background-color: #1629d6;
    color: #fefefe;
  }

  .header-menus li.menu-item-has-children > a:hover::after {
    background-color: #1629d6;
    transform: translateY(-50%) rotate(180deg);
  }

  .header-menus .sub-menu li a:hover img {
    filter: brightness(0) invert(1);
  }

  .header-menus .sub-menu li a {
    border-radius: 16px;
  }

  .header-menus > li > a:hover {
    color: #1629d6;
  }

  .header-menus li.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    pointer-events: unset;
  }

  .header-menus li.menu-item-has-children.sub-menu-hovered > a::after,
  .header-menus li.menu-item-has-children.header-menus-hovered > a::after {
    transform: translateY(-50%) rotate(180deg);
    background-color: #1629d6;
  }

  .header-menus li.menu-item-has-children > a {
    padding-right: 20px;
  }

  .header-menus .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    gap: 16px;
    border-radius: 16px;
    padding: 16px;
    background: #fefefe;
    list-style: none;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 120px);
    width: 100%;
    border: 1px solid #cfcfcf;
    box-shadow:
      0 4px 4px 0 rgba(45, 96, 226, 0.05),
      0 4px 4px 0 rgba(226, 226, 226, 0.1) inset;
  }

  .header-menus .sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    top: -44px;
    width: 100%;
    height: 44px;
    background: transparent;
  }

  .header-menus .sub-menu li a img {
    position: absolute;
    top: 16px;
    left: 16px;
    transition: all 0.3s ease;
  }

  .header-menus .sub-menu li a span {
    padding-left: 48px;
  }

  .header-menus .sub-menu li a {
    flex-direction: column;
    gap: 4px;
    padding: 16px 8px 16px 16px;
  }

  .header-menus .sub-menu li a span:first-of-type {
    font-size: 20px;
    font-weight: 500;
    line-height: 130%;
  }

  .header-menus .sub-menu li a span:not(:first-of-type) {
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
  }

  .header-menus {
    align-items: center;
    gap: 32px;
  }

  .header-menus .sub-menu img.menu-image {
    width: 28px;
    height: 28px;
  }

  .header__logo-mobile {
    display: none !important;
  }
}

@media (max-width: 1200px) {
  .header-section .header__wrapper {
    padding-right: 19px;
  }

  .header__center-content .header-menus {
    align-items: center;
  }

  .header__center-content .header-menus li:not(.aizen) {
    display: none;
  }

  .header__logo-desktop {
    display: none !important;
  }

  .header__logo img {
    max-width: 32px;
  }

  .header__mobile-wrap {
    display: flex;
    flex-direction: column;
    top: calc(100% + 16px);
    left: 0;
    width: 100%;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s;
    padding-bottom: 8px;
  }

  .header__mobile-menu {
    display: flex;
    border-radius: 16px;
    flex-direction: column;
    border: 1px solid #cfcfcf;
    padding: 16px;
    background: #fefefe;
    box-sizing: border-box;
    transform-origin: top;
    transform: scaleY(0);
    transition: all 0.4s;
    box-shadow:
      0 4px 4px 0 rgba(45, 96, 226, 0.05),
      0 4px 4px 0 rgba(226, 226, 226, 0.1) inset;
  }

  .mobile-menu-open .header__mobile-wrap {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-open .header__mobile-menu {
    transform: scaleY(1);
  }

  .header-menus li.menu-item-has-children.open > a::after {
    background-color: #1629d6;
    transform: translateY(-50%) rotate(180deg);
  }

  .header-menus .sub-menu li a {
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
  }

  .header-menus .sub-menu li a span {
    padding-left: 0;
  }

  .header-menus .sub-menu li a img {
    padding-right: 0;
  }

  .header__mobile-menu li.aizen {
    display: none;
  }

  .header__mobile-menu .header-menus > li > a {
    padding: 10px 0px;
  }

  .header__burder-menu svg {
    position: relative;
  }

  .header__burder-menu svg * {
    transition: all 0.3s;
    transform-origin: center;
  }

  .mobile-menu-open .header__burder-menu svg path:nth-child(1) {
    transform: translate(-5px, 7px) rotate(45deg);
  }

  .mobile-menu-open .header__burder-menu svg path:nth-child(2) {
    transform: scaleX(0);
  }

  .mobile-menu-open .header__burder-menu svg path:nth-child(3) {
    transform: translate(-5px, -4px) rotate(-45deg);
  }

  .header__burder-menu {
    display: flex;
  }

  .header-menus {
    flex-direction: column;
    gap: 16px;
  }

  .header__mobile-menu .primary-header-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* Mobile accordion styles */
  .header-menus li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    padding: 10px 0px;
  }

  .header-menus .sub-menu {
    position: static;
    background: transparent;
    width: auto;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    gap: 4px;
  }

  .header-menus li.menu-item-has-children.open .sub-menu {
    opacity: 1;
    pointer-events: auto;
    max-height: 170px;
    padding-top: 6px;
    padding-right: 16px;
    overflow-y: auto;
  }

  .header-menus .sub-menu::-webkit-scrollbar {
    display: none;
  }

  .header-menus .sub-menu {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .custom-scrollbar-thumb,
  .custom-scrollbar-thumb-header {
    background: #e0e0e0;
    width: 8px;
    border-radius: 99px;
  }

  .custom-scrollbar-container-header {
    margin-top: 48px;
    height: calc(100% - 48px);
    background: 0;
  }

  .header-menus .sub-menu .custom-scrollbar-container {
    top: 0;
  }

  .custom-scrollbar-container {
    position: absolute !important;
    top: 0;
    right: 5px;
    height: 100%;
    width: 8px;
    background: 0;
  }

  .header-menus .sub-menu li {
    flex: none;
    width: 100%;
  }

  .header__button {
    display: none;
  }
}

@media (max-width: 768px) {
  .header {
    top: 48px;
  }
}

@media screen and (min-width: 401px) and (max-width: 1200px) {
  .header-menus .sub-menu img.menu-image {
    width: 24px;
    height: 24px;
  }
}

@media screen and (max-width: 400px) {
  .header-menus .sub-menu img.menu-image {
    display: none;
  }
}
