/* =========================================================
   NEHVONEN HEADER / NAVIGATION
   Yhteinen header kaikille sivuille.
   Tämä tiedosto ladataan style.css:n jälkeen ja ennen sivukohtaista CSS:ää.
========================================================= */

.neh-site-header {
  --neh-dark: #071019;
  --neh-orange: #f28c00;
  --neh-container: 1320px;
  --neh-page-x: clamp(28px, 6vw, 168px);

  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  color: #ffffff;
  background: rgba(7, 16, 25, .96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.neh-site-header,
.neh-site-header * {
  box-sizing: border-box;
}

.neh-site-header img {
  display: block;
  max-width: 100%;
  height: auto;
}

.neh-site-header-inner {
  width: min(calc(100% - (var(--neh-page-x) * 2)), var(--neh-container));
  max-width: var(--neh-container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
}

.neh-header-logo {
  display: inline-flex;
  align-items: center;
  width: clamp(170px, 15vw, 180px);
  max-width: 56vw;
  color: inherit;
  text-decoration: none;
}

.neh-header-logo img {
  width: 100%;
  height: auto;
}

.neh-main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.neh-main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .86);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.neh-main-nav a:hover,
.neh-main-nav a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, .10);
}

.neh-nav-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.neh-nav-button {
  display: none;
  width: 46px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, .10);
}

.neh-nav-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #ffffff;
}

.neh-nav-button span:first-child {
  margin-top: 13px;
}

.neh-header-logo:focus-visible,
.neh-main-nav a:focus-visible,
.neh-nav-toggle:focus-visible + .neh-nav-button {
  outline: 3px solid var(--neh-orange);
  outline-offset: 4px;
}

@media (max-width: 759px) {
  .neh-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 3px 0;
  }

  .neh-site-header-inner {
    width: min(calc(100% - 2px), var(--neh-container));
    justify-content: space-between;
    padding-right: 10px;
    padding-left: 5px;
  }

  .neh-header-logo {
    width: min(137px, 58vw);
  }

  .neh-nav-button {
    display: block;
    flex: 0 0 auto;
  }

  .neh-main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(7, 16, 25, .96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
  }

  .neh-main-nav a {
    justify-content: center;
    min-height: 48px;
    border-radius: 10px;
  }

  .neh-nav-toggle:checked ~ .neh-main-nav {
    display: flex;
  }
}
