:root {
  --h-bg: #ffffff;
  --h-mob-bg: #ffffff;
  --h-ov-bg: rgba(255, 255, 255, 1);
  --h-text: #111315;
  --h-sub: #1b68c5;
}

.header {
  background: var(--h-bg);
  height: 112px;
  z-index: 999;
  width: 100%;
  position: relative;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  width: 100%;
}

.header-center {
  display: flex;
  align-items: center;
  margin-left: 2.5vw;
  justify-content: flex-end;
  width: 100%;
}

.header-right {
  display: none;
}

.header a:not(.icon):not(.submenu-inner a):not(.logo) {
  color: var(--h-text);
  text-align: right;
  text-decoration: none;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.768px;
  transition: all 0.2s ease-out;
  z-index: 2;
  white-space: nowrap;
}

.header-center nav > ul > li:not(:first-child) > a {
  margin-left: 58px;
}

.header a.logo {
  padding: 0;
  font-size: 0px;
  line-height: 100%;
  flex-shrink: 0;
}

.header .logo img {
  width: 155px;
  height: 83px;
}

.header .icon {
  position: relative;
  width: 35px;
  height: 35px;
  padding: 0;
  display: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.header .icon:not(.open) {
  transform: scaleX(-1);
  opacity: 0.5;
}

.header .icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--h-sub);
  transition: all 0.2s ease-out;
  border-radius: 2px;
}

.header .icon span:nth-child(1) {
  top: 33%;
}

.header .icon span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
  display: none;
}

.header .icon span:nth-child(3) {
  bottom: 33%;
}

.header .icon.open span {
  background-color: var(--h-text);
}


.header .icon.open span:nth-child(1) {
  transform: rotate(45deg) translateY(calc(-50% + 1.5px));
  top: 50%;
}

.header .icon.open span:nth-child(2) {
  opacity: 0;
}

.header .icon.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(calc(50% - 1.5px));
  top: 50%;
  width: 100%;
}

nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding-inline-start: 0;
}

.has-submenu {
  position: relative;
}

.submenu {
  background-color: var(--h-bg);
  border-radius: 25px;
  max-width: 280px;
  padding: 15px;
  right: 0 !important;
  left: 0 !important;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: auto;
  padding: 0.5em 1em;
  text-align: left;
  min-width: 230px;
  z-index: 10;
}

.submenu-inner {
  margin: 0 auto;
  transition: all 0.2s ease-out;
  display: flex;
  flex-direction: column;
}

.submenu-inner a {
  color: var(--h-text);
  text-decoration: none;
  border-bottom: 1px solid var(--h-text);
  padding: 10px;
  text-align: left;
  white-space: normal;
  font-size: 19.2px;
  font-weight: 400;
  line-height: 1.3em;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
}

.submenu-inner a:last-child {
  border-bottom: none;
}

.has-submenu.open .submenu,
.has-submenu:hover .submenu {
  opacity: 1;
  pointer-events: auto;
}

.has-submenu svg {
  margin-left: 2px;
  transition: all 0.2s ease-out;
  vertical-align: middle;
}

.has-submenu svg path {
  stroke-width: 1;
}

.has-submenu-m {
  position: relative;
}

.has-submenu-m svg {
  transform: rotate(-90deg);
  transition: all 0.2s ease-out;
  width: 4vmin;
  height: 4vmin;
  vertical-align: middle;
}

.has-submenu-m svg path {
  stroke-width: 0.7;
}

.has-submenu.open svg {
  transform: rotate(180deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 83px;
  height: calc(100vh - 83px);
  height: calc(100dvh - 83px);
  width: 100%;
  background: var(--h-mob-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  box-sizing: border-box;
  transition: opacity 0.4s ease-out;
  opacity: 0;
  z-index: -999;
  overflow: auto;
}

.mobile-menu nav {
  width: 100%;
  margin: 0 auto;
}

.mobile-menu nav ul {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mobile-menu li {
  width: 100%;
  text-align: center;
}

.mobile-menu a,
.mobile-menu .submenu-m a {
  font-size: 6vmin;
  padding: 1vmin 2vmin;
  font-weight: 400;
  letter-spacing: 0.045em;
  color: var(--h-text);
  text-decoration: none;
  display: block;
}

.mobile-menu .submenu-m {
  position: fixed;
  top: 83px;
  left: 0;
  width: 100%;
  height: calc(100vh - 83px);
  height: calc(100dvh - 83px);
  background: var(--h-mob-bg);
  z-index: 1000;
  padding: 36px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.6s ease-out;
  opacity: 1;
}

.mobile-menu .submenu-m nav {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.mobile-menu .submenu-m ul {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.mobile-menu .submenu-m li {
  width: 100%;
  border-bottom: none;
  text-align: center;
}

.has-submenu-m.open .submenu-m {
  transform: translateX(0);
}

.back-button {
  display: flex;
  align-items: center;
  color: var(--h-text);
  opacity: 0.5;
  font-size: 6vmin;
  padding: 3vw 5vw;
  font-weight: 400;
  letter-spacing: 0.045em;
  cursor: pointer;
  border: none;
  background: none;
}

.back-button svg {
  transform: rotate(90deg);
}

.has-submenu-m ul {
  margin-left: 0;
  transition: all 0.2s ease-out;
  width: 100%;
}

.has-submenu-m li:last-child {
  border-bottom: none;
}

@media (hover: hover) {
  .header a:hover:not(.icon):not(.submenu-inner a):not(.logo),
  .header a:focus:not(.icon):not(.submenu-inner a):not(.logo),
  .submenu-inner a:hover,
  .header-center nav > ul > li > a:hover {
    color: var(--h-sub);
  }

  .has-submenu:hover svg {
    transform: rotate(180deg);
  }
}

@media only screen and (max-width: 1100px) {
  .header-center nav > ul > li:not(:first-child) > a {
    margin-left: 52px;
  }
}

@media only screen and (max-width: 1024px) {
  .header {
    height: 83px;
    padding: 0 6vw;
  }

  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .header .logo img {
    width: 93px;
    height: 50px;
  }

  .header-center a:not(.icon) {
    display: none;
  }

  .header a.icon,
  .mobile-menu {
    display: flex;
  }

  .overlay {
    content: "";
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 998;
    background: var(--h-ov-bg);
    transition: all 0.2s ease-out;
  }

  .has-submenu .submenu {
    display: none;
  }
}

@media only screen and (max-width: 500px) {
  .header {
    padding: 0 4vw;
  }

  .mobile-menu a,
  .mobile-menu .submenu-m a {
    font-size: 5.5vmin;
    padding: 0.8vmin 1vmin;
  }
}
