.header-5 {
  position: relative;
  z-index: 400;
  padding: 12px 0 0;
  background: var(--color-white);
}

.header-5__shell {
  position: relative;
  z-index: 410;
  width: min(100%, calc(var(--content-width) + (var(--page-gutter) * 2) - 8px));
  background: var(--color-background-dark);
  border-radius: 24px;
  box-shadow: 0 8px 18px rgba(var(--color-text-dark-rgb), 0.13);
  overflow: visible;
}

.header-5__top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-height: 86px;
  padding: 0 18px 0 16px;
  border-radius: 24px 24px 0 0;
}

.header-5__brand {
  display: inline-flex;
  align-items: center;
}

.header-5__brand img {
  width: 78px;
  display: block;
}

.header-5__location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-light);
  font-family: var(--font-family-display);
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.header-5__location-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.header-5__location-icon svg {
  width: 100%;
  height: 100%;
}

.header-5__nav-bar {
  position: relative;
  z-index: 420;
  background: var(--color-background-dark);
  border-top: 1px solid rgba(var(--color-white-rgb), 0.4);
  border-radius: 0 0 24px 24px;
  overflow: visible;
  transition: padding-bottom 0.2s ease;
}

.header-5__nav-bar.has-open-submenu {
  padding-bottom: 164px;
}

.header-5__nav {
  position: relative;
  z-index: 430;
  overflow: visible;
}

.header-5__menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 11px 16px 10px;
  list-style: none;
  overflow: visible;
}

.header-5__item {
  position: relative;
}

.header-5__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--color-text-light);
  font-family: var(--font-family-display);
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.header-5__item.is-active > .header-5__link {
  border-bottom-color: currentColor;
}

.header-5__caret {
  display: inline-flex;
  width: 10px;
  height: 10px;
}

.header-5__caret svg {
  width: 100%;
  height: 100%;
}

.header-5__submenu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
  margin: 0;
  padding: 12px;
  background: var(--color-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.22);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(var(--color-text-dark-rgb), 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-5__item--services.is-open > .header-5__submenu,
.header-5__item--services:focus-within > .header-5__submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.header-5__submenu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text-dark);
  font-family: var(--font-family);
  font-size: var(--font-size-small);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.header-5__submenu-link:hover {
  background: var(--color-primary-light);
}

.header-5__item--services.is-open > .header-5__link .header-5__caret {
  transform: rotate(180deg);
}

.header-5__toggle {
  display: none;
  margin: 0 24px 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
}

.header-5__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--color-text-light);
}

@media (max-width: 1200px) {
  .header-5__nav-bar {
    padding-bottom: 0 !important;
  }

  .header-5__item--services {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .header-5__submenu {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 8px;
    padding: 8px;
    border-radius: 10px;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: none;
    align-self: stretch;
  }

  .header-5__item--services.is-open > .header-5__submenu {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (max-width: 1200px) {
  .header-5 {
    padding: 10px 0 0;
  }

  .header-5__top {
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 14px 14px;
  }

  .header-5__location {
    justify-content: center;
    text-align: center;
    font-size: var(--font-size-small);
  }

  .header-5__nav-bar {
    padding: 6px 0;
  }

  .header-5__toggle {
    display: block;
  }

  .header-5__menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 14px 10px;
  }

  .header-5__menu.is-open {
    display: flex;
  }

  .header-5__link {
    width: 100%;
    justify-content: center;
    padding: 10px 0;
    font-size: var(--font-size-body);
  }

  .header-5__submenu {
    margin-top: 4px;
  }
}

@media (max-width: 640px) {
  .header-5__shell {
    width: min(100%, calc(var(--content-width) + (var(--page-gutter-mobile) * 2) - 8px));
  }

  .header-5__brand img {
    width: 72px;
  }

  .header-5__location {
    gap: 8px;
    font-size: 13px;
  }
}
