/* Namespaced, self-hosted Roboto ensures the header font survives template changes. */
@font-face {
  font-family: "FasterGig Roboto";
  src: url("roboto-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

/* All rules are confined to this header, including the hidden-state override. */
.fg-header,
.fg-header *,
.fg-header *::before,
.fg-header *::after {
  box-sizing: border-box;
}

/* Keep HTML's hidden attribute effective against ordinary theme display rules. */
.fg-header[hidden],
.fg-header.fg-header [hidden] {
  display: none !important;
}

.fg-header {
  position: relative;
  z-index: 20;
  width: 100%;
  min-height: 80px;
  background: #182843;
  border: 0;
  color: #fff;
}

.fg-header .fg-header__wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(calc(100% - 64px), 1280px);
  min-height: 80px;
  margin: 0 auto;
}

/* The bundled logo includes its navy background, as in the subscriber app. */
.fg-header .fg-header__logo {
  position: relative;
  display: block;
  flex: 0 0 145px;
  width: 145px;
  height: 58px;
  overflow: hidden;
}

.fg-header .fg-header__logo img {
  position: absolute;
  top: 50%;
  left: -14px;
  display: block;
  width: 205px;
  max-width: none;
  height: auto;
  border: 0;
  transform: translateY(-50%);
}

.fg-header .fg-header__nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: 22px;
}

.fg-header .fg-header__links {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  min-width: 0;
  gap: clamp(15px, 2vw, 30px);
}

/* Preserve WordPress's semantic list tree; long menus wrap instead of clipping. */
.fg-header .fg-header__menu,
.fg-header .fg-header__menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fg-header .fg-header__menu {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: clamp(15px, 2vw, 30px);
}

.fg-header .fg-header__menu li {
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fg-header .fg-header__menu a {
  display: block;
}

/* Child links are always visible and indented, including for touch and no-JS. */
.fg-header .fg-header__menu ul {
  position: static;
  display: block;
  width: auto;
  padding-left: 16px;
  visibility: visible;
  opacity: 1;
}

.fg-header .fg-header__menu ul a {
  padding: 6px 0;
}

/* Override theme link/button states without affecting any other widget. */
.fg-header .fg-header__links a,
.fg-header .fg-header__links a:visited,
.fg-header .fg-header__links a:focus,
.fg-header .fg-header__links a:active {
  color: #fff !important;
  font-family: "FasterGig Roboto", Roboto, Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.fg-header .fg-header__account a,
.fg-header .fg-header__account a:visited,
.fg-header .fg-header__account a:focus,
.fg-header .fg-header__account a:active,
.fg-header .fg-header__account button,
.fg-header .fg-header__account button:focus,
.fg-header .fg-header__account button:active {
  color: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.fg-header .fg-header__links a {
  line-height: 1;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.fg-header .fg-header__menu a {
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.fg-header .fg-header__links a:hover,
.fg-header .fg-header__account a:hover,
.fg-header .fg-header__account button:hover {
  color: #ffb395 !important;
}

.fg-header .fg-header__subscribe,
.fg-header .fg-header__subscribe:visited {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #fff;
  border-radius: 0;
  background: #111;
  color: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.fg-header .fg-header__subscribe:hover,
.fg-header .fg-header__subscribe:focus,
.fg-header .fg-header__subscribe:active {
  background: #fff;
  color: #111 !important;
}

.fg-header .fg-header__account {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin-left: auto;
}

.fg-header .fg-header__account a,
.fg-header .fg-header__account button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.2;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.fg-header .fg-header__account button:hover,
.fg-header .fg-header__account button:focus,
.fg-header .fg-header__account button:active {
  background: transparent;
  box-shadow: none;
}

.fg-header .fg-header__account button:disabled {
  cursor: wait;
  opacity: 1;
}

/* Status remains visible and announced even if the mobile menu is closed. */
.fg-header .fg-header__status:not(:empty) {
  position: fixed;
  z-index: 21;
  right: 16px;
  bottom: 16px;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 12px;
  background: #182843;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font: 400 14px/1.4 "FasterGig Roboto", Roboto, Arial, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
}

.fg-header .fg-header__status:empty {
  display: none;
}

.fg-header .fg-header__toggle:not([hidden]) {
  display: none;
}

.fg-header .fg-header__toggle .fg-header__close-icon,
.fg-header .fg-header__toggle[aria-expanded="true"] .fg-header__menu-icon {
  display: none;
}
.fg-header .fg-header__toggle[aria-expanded="true"] .fg-header__close-icon {
  display: block;
}

.fg-header a:focus-visible,
.fg-header button:focus-visible {
  outline: 3px solid #e56b38 !important;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  /* Without JS the navigation stays in normal flow and remains fully usable. */
  .fg-header {
    height: auto;
    min-height: 68px;
  }

  .fg-header .fg-header__wrap {
    flex-wrap: wrap;
    gap: 0;
    width: min(calc(100% - 48px), 1280px);
    height: auto;
    min-height: 68px;
  }

  .fg-header .fg-header__nav {
    position: static;
    display: flex;
    flex: 0 0 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 0 0 24px;
    background: #182843;
  }

  .fg-header .fg-header__links {
    flex: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .fg-header .fg-header__menu {
    display: block;
    width: 100%;
  }

  .fg-header .fg-header__links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 13px 0;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .fg-header .fg-header__subscribe {
    align-self: flex-start;
  }

  .fg-header .fg-header__account {
    flex: none;
    flex-wrap: wrap;
    gap: 0 22px;
    margin-left: 0;
    padding-top: 0;
    border-top: 0;
  }

  .fg-header .fg-header__links:not([hidden]) ~ .fg-header__account {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .2);
  }

  /* The JS class is only added once the controller is ready. */
  .fg-header.fg-header--js {
    height: 68px;
  }

  .fg-header.fg-header--js .fg-header__wrap {
    height: 68px;
  }

  .fg-header.fg-header--js .fg-header__nav {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 14px 24px 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
  }

  .fg-header.fg-header--js .fg-header__nav.is-open {
    display: flex;
  }

  .fg-header.fg-header--js .fg-header__toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
  }

  .fg-header.fg-header--js .fg-header__toggle:not([hidden]):hover,
  .fg-header.fg-header--js .fg-header__toggle:not([hidden]):focus,
  .fg-header.fg-header--js .fg-header__toggle:not([hidden]):active {
    background: transparent;
    color: #fff;
  }
}

@media (max-width: 700px) {
  .fg-header .fg-header__wrap {
    width: calc(100% - 36px);
  }
}
