/* ================= HEADER ================= */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--color-header-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #D6DADD;
}

body.nav-open {
  overflow: hidden;
}

.siteheader__container {
  position: static;
  width: 100%;
  max-width: var(--container-max-width);
  height: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.siteheader__logo img {
  width: 180px;
  max-height: 52px;
  height: auto;
}

.siteheader__toggle {
  display: block;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.siteheader__toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #000000;
  margin: 4px 0;
}

.siteheader__nav {
  position: absolute;
  top: 100%;
  left: 50%;
  width: calc(100% - 8px);
  max-width: 620px;
  padding: 0;
  background: #E7ECED;
  border-radius: 4px;
  transform: translateX(-50%) scaleY(0.8);
  transform-origin: top;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    transform 0.9s ease,
    max-height 0.6s ease;
  z-index: 999;
}

body.nav-open .siteheader__nav {
  pointer-events: auto;
  transform: translateX(-50%) scaleY(1);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  border-top: 2px solid #000000;
}

.siteheader__nav-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.siteheader__nav-list li {
  width: 100%;
}

.siteheader__nav-link {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 12px 24px;
  background: none;
  border: 0;
  border-bottom: 1px solid #E2E5E6;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #1C1C1C;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.siteheader__nav-link--has-submenu {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.siteheader__arrow {
  display: none;
  width: 6px;
  height: 6px;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  transform: rotate(45deg);
}

.has-submenu {
  position: relative;
}

.siteheader__submenu {
  display: none;
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 1px solid #D6DADD;
}

.has-submenu.is-open .siteheader__submenu {
  display: block;
}

body.nav-open .has-submenu .siteheader__submenu {
  display: block;
}

.siteheader__submenu-link {
  display: block;
  padding: 14px 24px 14px 40px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #1C1C1C;
  text-decoration: none;
  border-bottom: 1px solid #E2E5E6;
}

@media (max-width: 480px) {
  .siteheader__nav {
    width: calc(100% - 48px);
  }
}

@media (min-width: 1025px) {
  .siteheader__logo {
    margin-left: 0;
  }

  .siteheader__container {
    padding-left: var(--container-padding-x);
    padding-right: var(--container-padding-x);
  }

  .siteheader__logo img {
    width: auto;
    height: auto;
    max-height: 52px;
  }

  .siteheader__toggle {
    display: none;
  }

  .siteheader__nav {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    background: none;
    border: 0;
    border-radius: 0;
    transform: none;
    pointer-events: auto;
    transition: none;
    z-index: auto;
  }

  .siteheader__nav-list {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    width: auto;
  }

  .siteheader__nav-list > li {
    width: auto;
    border-bottom: 0;
  }

  .siteheader__nav-link {
    display: inline-flex;
    width: auto;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-main);
    border-bottom: 0;
  }

  .siteheader__arrow {
    display: inline-block;
    margin-left: 6px;
    vertical-align: 3px;
    transform: rotate(45deg);
  }

  .siteheader__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    width: auto;
    min-width: 220px;
    margin-top: 20px;
    padding: 12px 0;
    background-color: #E7ECED;
    border-top: 2px solid #000000;
  }

  .has-submenu.is-open > .siteheader__submenu {
    display: block;
  }

  .siteheader__submenu-link {
    padding: 8px 24px;
    font-size: 16px;
    color: var(--color-text-main);
    border-bottom: 0;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .siteheader__container {
    position: static;
    padding-left: 24px;
    padding-right: 24px;
  }

  .siteheader__logo {
    margin-left: 0;
  }

  .siteheader__logo img {
    width: 180px;
    max-height: 52px;
  }

  .siteheader__toggle {
    display: block;
  }

  .siteheader__nav {
    position: absolute;
    top: 100%;
    left: 50%;
    width: calc(100% - 48px);
    max-width: 620px;
    padding: 0;
    background: #E7ECED;
    border-radius: 4px;
    transform: translateX(-50%) scaleY(0.8);
    transform-origin: top;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
      transform 0.9s ease,
      max-height 0.6s ease;
    z-index: 999;
  }

  body.nav-open .siteheader__nav {
    pointer-events: auto;
    transform: translateX(-50%) scaleY(1);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    border-top: 2px solid #000000;
  }

  .siteheader__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .siteheader__nav-list > li {
    width: 100%;
  }

  .siteheader__nav-link {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #E2E5E6;
  }

  .siteheader__nav-link--has-submenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .siteheader__arrow {
    display: none;
  }

  .siteheader__submenu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid #D6DADD;
  }

  body.nav-open .has-submenu .siteheader__submenu {
    display: block;
  }

  .siteheader__submenu-link {
    display: block;
    padding: 14px 24px 14px 40px;
    font-size: 14px;
    border-bottom: 1px solid #E2E5E6;
  }
}
