/*
 * GRIDTEK
 * Header, Navigation, and Search
 */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */

.site-header {
  --header-logo-size: 32px;
  --header-logo-gap: 32px;
  --header-panel-start:
    calc(var(--header-logo-size) + var(--header-logo-gap));

  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

/* Gridtek logo */

.site-header .brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-right: calc(var(--header-logo-gap) - 12px);
}

.site-header .brand svg {
  display: block;
  flex: none;
  width: var(--header-logo-size);
  height: var(--header-logo-size);
}

/* Header logo matches navigation link colors */

.site-header > .brand {
  color: var(--muted, #a9b7c5);
  transition: color .15s ease;
}

.site-header > .brand:hover,
.site-header > .brand:focus-visible,
.site-header > .brand[aria-current="page"] {
  color: var(--text, #f2f4f6);
}

/* Navigation */

.site-header .main-navigation {
  flex: 0 1 auto;
  margin: 0 auto 0 0;
  gap: clamp(13px, 1.7vw, 26px);
}

.site-header .main-navigation > a {
  white-space: nowrap;
}

/* Header search and hamburger buttons */

.site-header .header-search-menu {
  position: static;
  display: block;
  flex: 0 0 44px;
  width: 44px;
  margin: 0 0 0 auto;
}

.site-header .header-search-trigger,
.site-header .menu-toggle {
  position: static;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 11px;
  border: 1px solid #33516c;
  border-radius: 0;
  background: transparent;
  color: #f2f4f6;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  cursor: pointer;
  transform: none;
}

.site-header .header-search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header .header-search-trigger:hover,
.site-header .menu-toggle:hover {
  border-color: #70afe9;
  background: rgba(63, 113, 157, .1);
}

.site-header .header-search-trigger:focus-visible,
.site-header .menu-toggle:focus-visible {
  outline: 2px solid #70afe9;
  outline-offset: 5px;
}

.site-header .menu-toggle > span {
  display: block;
  position: static;
  width: 20px;
  height: 1px;
  margin: 5px auto;
  padding: 0;
  background: #f2f4f6;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Search and close icons */

.site-header .header-search-trigger svg,
.site-header .header-search button svg,
.site-header .header-search-close svg {
  display: block;
  position: static;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  opacity: 1;
  visibility: visible;
  fill: none;
  stroke: #f2f4f6;
  stroke-width: 1.7;
  transform: none;
}

.site-header .header-search-trigger svg *,
.site-header .header-search button svg *,
.site-header .header-search-close svg * {
  fill: none;
  stroke: #f2f4f6;
  stroke-width: 1.7;
  stroke-linecap: round;
}

/* Centered desktop search */

html.gridtek-search-open,
html.gridtek-search-open body {
  overflow: hidden;
}

.site-header .header-search-dialog {
  position: fixed;
  inset: 0;
  width: min(800px, calc(100% - 40px));
  max-width: none;
  height: min(560px, calc(100vh - 48px));
  height: min(560px, calc(100dvh - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #456580;
  border-radius: 0;
  background: #0a2341;
  color: #f2f4f6;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .45);
  box-sizing: border-box;
  text-align: left;
  transform: none;
}

.site-header .header-search-dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.site-header .header-search-dialog:not([open]) {
  display: none;
}

.header-search-dialog::backdrop {
  background: rgba(2, 10, 20, .78);
}

/* Search logo and close button row */

.site-header .header-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 100%;
  gap: 16px;
  margin: 0 0 18px;
}

.site-header .header-search-close {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 0 0 0 auto;
  padding: 11px;
  border: 1px solid #33516c;
  border-radius: 0;
  background: transparent;
  color: #f2f4f6;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transform: none;
}

.site-header .header-search-close:hover {
  border-color: #70afe9;
  background: rgba(63, 113, 157, .15);
}

/* Search field */

.site-header .header-search {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  gap: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 56px;
  min-height: 56px;
  margin: 0;
  padding: 0;
  border: 1px solid #537594;
  border-radius: 0;
  background: #071b30;
  box-sizing: border-box;
}

.site-header .header-search:focus-within {
  border-color: #70afe9;
}

.site-header .header-search input {
  position: static;
  display: block;
  flex: 1 1 0%;
  align-self: stretch;
  width: 0;
  max-width: none;
  min-width: 0;
  height: 54px;
  margin: 0;
  padding: 14px 8px 14px 16px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #f2f4f6;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transform: none;
}

.site-header .header-search input:focus-visible {
  outline: 0;
}

.site-header .header-search input::placeholder {
  color: #a9b7c5;
  opacity: 1;
}

.site-header .header-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.site-header .header-search button {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  align-self: stretch;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 54px;
  margin: 0;
  padding: 16px;
  border: 0;
  border-left: 1px solid #33516c;
  border-radius: 0;
  background: #0a2341;
  color: #f2f4f6;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  cursor: pointer;
  transform: none;
}

.site-header .header-search button:hover {
  background: #123653;
}

/* Status and results */

.site-header .header-search-status {
  flex: 0 0 auto;
  margin: 16px 0 12px;
  color: #a9b7c5;
  font-size: 13px;
  line-height: 1.5;
}

.site-header .header-search-results {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header .header-search-results li {
  margin: 0;
  padding: 0;
  border-top: 1px solid #29445d;
}

.site-header .header-search-results a {
  display: block;
  padding: 18px 12px;
  color: #f2f4f6;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-header .header-search-results a:hover,
.site-header .header-search-results a:focus-visible {
  background: rgba(63, 113, 157, .15);
}

.site-header .header-search-results a:focus-visible {
  outline: 2px solid #70afe9;
  outline-offset: -2px;
}

.site-header .header-search-results strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.site-header .header-search-results span {
  display: block;
  position: static;
  margin-top: 6px;
  color: #a9b7c5;
  font-size: 13px;
  line-height: 1.6;
  transform: none;
}

/* Desktop navigation */

@media (min-width: 1021px) {
  .site-header .main-navigation {
    display: flex;
  }

  .site-header .menu-toggle {
    display: none;
  }
}

/* Tablet and mobile navigation */

@media (max-width: 1020px) {
  .site-header {
    --header-logo-gap: 24px;
  }

  .site-header .menu-toggle {
    display: block;
  }

  .site-header .main-navigation {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% - 5px);
    left: var(--header-panel-start);
    right: auto;
    width: min(
      280px,
      calc(100% - var(--header-panel-start))
    );
    min-width: 0;
    margin: 0;
    padding: 14px 22px;
    border: 1px solid #33516c;
    background: #0a2341;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
  }

  .site-header .main-navigation.is-open {
    display: flex;
  }

  .site-header .main-navigation > a {
    padding: 14px 0;
  }
}

/* Full-screen mobile search */

@media (max-width: 700px) {
  .site-header {
    --header-logo-size: 26px;
    --header-logo-gap: 20px;
    gap: 10px;
  }

  .site-header .brand {
    margin-right: calc(var(--header-logo-gap) - 10px);
  }

  .site-header .header-search-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .site-header .header-search-heading {
    margin-bottom: 16px;
  }

  .site-header .header-search {
    width: 100%;
    max-width: none;
  }

  .site-header .header-search-results a {
    padding: 18px 8px;
  }
}

@media (max-width: 420px) {
  .site-header {
    --header-logo-size: 23px;
  }
}

@media (max-width: 320px) {
  .site-header {
    --header-logo-size: 21px;
    --header-logo-gap: 16px;
    gap: 8px;
  }

  .site-header .brand {
    margin-right: calc(var(--header-logo-gap) - 8px);
  }
}