/* Prevent horizontal shifts between long and short pages. */
html {
  overflow-y: scroll;
}

.stangl-header {
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: 980px;
  height: 88px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  font-family: "Montserrat", sans-serif;
}

/* Sub-pages: divider across the whole header. */
.stangl-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5e5e5;
}

.stangl-brand {
  display: block;
  flex: 0 0 220px;
}

.stangl-brand img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.stangl-menu {
  align-self: stretch;
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 8px;
}

.stangl-menu a {
  color: #111;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.stangl-menu a[aria-current="page"],
.stangl-menu a:hover {
  color: #b30815;
}

.stangl-header a:focus-visible {
  outline: 2px solid #b30815;
  outline-offset: 5px;
}

/* Homepage: same menu position, without the small logo. */
.stangl-header-home {
  justify-content: flex-end;
}

.stangl-header-home::after {
  display: none;
}

/* Homepage: divider only beneath the menu. */
.stangl-header-home .stangl-menu::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5e5e5;
}

@media (max-width: 800px) {
  .stangl-header {
    height: auto;
    flex-direction: column;
    gap: 20px;
    padding: 18px 0 0;
  }

  .stangl-brand {
    flex: 0 0 auto;
  }

  .stangl-menu {
    align-self: stretch;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    padding: 0 0 18px;
  }

  .stangl-menu a {
    font-size: 13px;
  }
}
