/* header and nav layout */
header .header.block {
  background-color: var(--background-color);
  width: 100%;
  z-index: 10;
  position: fixed;
}

header nav {
  box-sizing: border-box;
  display: grid;
  grid-template:
    'hamburger brand tools' var(--nav-height)
    'sections sections sections' 1fr / auto 1fr auto;
  align-items: center;
  gap: 0 2em;
  margin: auto;
  height: var(--nav-height);
  padding: 0 20px 0 15px;
  font-family: var(--header-font-family-regular);
  border-bottom: 1px solid #e3e3e3;
}

header nav[aria-expanded="true"] {
  grid-template:
    'hamburger brand tools' var(--nav-height)
    'sections sections sections' 1fr / auto 1fr auto;
  overflow-y: auto;
  min-height: 100vh;
  background-color: #0000008a;
  padding: 0;
  gap: 0;
}

header .nav-tools .search-icon {
  font-size: 25px;
}

header .nav-tools .search-icon::before {
  content: '';
  display: inline-block;
  font-family: var(--ionicons);
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  text-rendering: auto;
  line-height: 1;
  color: #000;
  -webkit-font-smoothing: antialiased;
}

header .nav-brand {
  grid-area: brand;
  font-size: var(--heading-font-size-s);
  font-weight: 700;
  line-height: 1;
  display: flex;
  justify-content: center;
}

header nav .nav-sections > ul > li.nav-drop {
  padding: 7px 15px;
  line-height: 40px;
  font-size: 1rem;
  font-family: var(--graphik-semibold);
  border-top: 0.063em solid #e3e3e3;
  border-bottom: 0.063em solid #e3e3e3;
  position: relative;
}

header nav .nav-sections ul  {
  list-style: none;
  padding-left: 0;
  font-size: var(--body-font-size-s);
  font-weight: 500;
  margin-top: 1px;
}

header nav .nav-sections ul > li {
  font-weight: 700;
}

header nav .nav-sections ul > li > ul {
  margin-top: 0;
}

header nav .nav-sections ul > li > ul > li {
  font-weight: 500;
}

header nav .nav-sections > ul > li.nav-drop > ul {
  font-family: var(--body-font-family);
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop > ul {
  display: none;
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop[aria-expanded='true'] > ul {
  display: flex;
  flex-direction: column;
  position: relative;
}

header nav .nav-sections > ul > li.nav-drop:first-child {
  padding: 5px 15px;
}

header nav .nav-sections > ul > li.nav-drop li.level-two,
header nav .nav-sections > ul > li.nav-drop li.level-two.sub-menu[aria-expanded='true'] li.level-three {
  font-size: 14px;
  border-bottom: 1px solid #e3e3e3;
  min-height: 3.25em;
  margin-left: -20px;
  margin-bottom: 0;
  padding: 1.07em 1.07em 1.07em 2.5em;
  vertical-align: middle;
  line-height: 1.563em;
  height: 44px;
  box-sizing: border-box;
}

header nav .nav-sections > ul > li.nav-drop li.level-two:first-child {
  border-top: 1px solid #e3e3e3;
}

header nav a:any-link {
  color: currentcolor;
}

header nav .nav-sections > ul > li.nav-drop li.level-two a {
  line-height: 20px;
  font-size: 16px;
  display: block;
  font-family: var(--header-font-family);
  color: #4a4a4a;
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two ul {
  display: none;
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu {
  margin-right: -14px;
  position: relative;
  font-size: 16px;
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu[aria-expanded='true'] {
  position: fixed;
  left: 0;
  top: 50px;
  background: white;
  height: 100vh;
  z-index: 100;
  margin: 0;
  width: 100vw;
  padding: 0;
  border-top: 1px solid #e3e3e3;
  font-size: 1.125rem;
  line-height: 40px;
  font-family: var(--graphik-semibold);
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu[aria-expanded='true'] ul {
  display: block;
  border-top: 1px solid #e3e3e3;
}

header nav p {
  margin: 0;
  line-height: 1;
}

/* hamburger */
header nav .nav-hamburger {
  grid-area: hamburger;
  height: 18px;
  display: flex;
  align-items: center;
}

header nav[aria-expanded='true'] .nav-hamburger {
  padding-left: 1rem;
  background: #fff;
  height: var(--nav-height);
}

header nav .nav-hamburger button {
  height: 18px;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background-color: var(--background-color);
  color: inherit;
  overflow: initial;
  text-overflow: initial;
  white-space: initial;
}

header nav .nav-hamburger-icon,
header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
  box-sizing: border-box;
  display: block;
  position: relative;
  width: 20px;
}

header nav .nav-hamburger-icon::before,
header nav .nav-hamburger-icon::after {
  content: '';
  position: absolute;
  background: currentcolor;
}

header nav[aria-expanded="false"] .nav-hamburger-icon,
header nav[aria-expanded="false"] .nav-hamburger-icon::before,
header nav[aria-expanded="false"] .nav-hamburger-icon::after {
  height: 2px;
  border-radius: 2px;
  background: currentcolor;
}

header nav[aria-expanded="false"] .nav-hamburger-icon::before {
  top: -6px;
}

header nav[aria-expanded="false"] .nav-hamburger-icon::after {
  top: 6px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon {
  height: 22px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon::before,
header nav[aria-expanded="true"] .nav-hamburger-icon::after {
  top: 3px;
  left: 1px;
  transform: rotate(45deg);
  transform-origin: 2px 1px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
}

header nav[aria-expanded="true"] .nav-hamburger-icon::after {
  top: unset;
  bottom: 3px;
  transform: rotate(-45deg);
}

header nav .nav-brand img {
  width: 96px;
  height: auto;
}

/* sections */
header nav .nav-sections {
  grid-area: sections;
  flex: 1 1 auto;
  display: none;
  visibility: hidden;
  background-color: var(--background-color);
  transition: 1s all ease;
}

header nav[aria-expanded="true"] .nav-brand {
  line-height: 40px;
  background-color: #fff;
  padding-top: 10px;
}

header nav[aria-expanded="true"] .nav-sections {
  display: flex;
  visibility: visible;
  align-self: start;
  position: fixed;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 320px;
  height: calc(100% - 50px);
  animation: slideIn 1s cubic-bezier(0.87, 0.01, 0, 0.99);
  flex-direction: column;
  justify-content: space-between;
  margin-top: 50px;
}

header nav .nav-sections .nav-drop::after, 
header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu::after,
header nav li.level-two.sub-menu[aria-expanded='true'] .menu-back-button::before {
  content: '';
  display: inline-block;
  position: absolute;
  right: 19px;
  top: 18px;
  transform: rotate(135deg);
  width: 9px;
  height: 9px;
  border: 2px solid currentcolor;
  border-radius: 0 1px 0 0;
  border-width: 2px 2px 0 0;
  line-height: 16px;
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu::after {
  transform: rotate(45deg);
}

header nav[aria-expanded='true'] .nav-sections > ul > li.nav-drop li.level-two.sub-menu[aria-expanded='true']::after {
  display: none;
}

header nav li.level-two.sub-menu[aria-expanded='true'] .menu-back-button::before {
  left: 0;
  top: 15px;
  right: 0;
  margin-left: 22px;
  transform: rotate(225deg);
}

header nav li.level-two.sub-menu[aria-expanded='true'] .menu-back-button {
  padding: 0 17px 0 27px;
  border-right: 0.063em solid #e3e3e3;
  margin-right: 26px;
  font-size: 17px;
  vertical-align: middle;
  height: 40px;
  display: inline-block;
}

[show-header-nav-footer="hidden"]{
  visibility: hidden;
  display: none;
}

[show-header-nav-footer="show"] {
  margin: 0 auto;
  width: fit-content;
}

/* tools */
header nav .nav-tools {
  grid-area: tools;
}

header nav[aria-expanded="true"] .nav-tools {
  padding-right: 20px;
  line-height: var(--nav-height);
  background: #fff;
}

.header-nav-footer {
  margin: 0 auto;
  width: fit-content;
}

.header-nav-footer div:nth-child(2) ul {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.header-nav-footer div:nth-child(1){
  text-align: center;
  margin-bottom: 30px;
  display: block;
}

.header-nav-footer div:nth-child(1) ul li{
  margin-bottom: 20px;
  display: block;
}

.header-nav-footer div:nth-child(2) ul li span picture img {
  width: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  height: 100%;
}

.header-nav-footer div:nth-child(1) ul li a {
  font-weight: 400;
  font-size: 1rem;
}

.header-nav-footer picture {
  width: 24px;
  display: block;
}

.header-nav-footer picture img {
  width: 100%;
  object-fit: contain;
}

.is-desktop .nav-sections {
  transition: none;
}

@media (max-width: 430px) {
  header nav[aria-expanded="true"] .nav-sections {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  header nav[aria-expanded="true"] .nav-sections {
    max-width: 100%;
  }
}

@media (min-width: 1000px) {
  header nav {
    display: flex;
    gap:0;
  }

  header nav[aria-expanded="true"] {
    min-height: 0;
    overflow: visible;
  }

  header nav .nav-brand img {
    width: 100px;
    height: 28px;
  }

  header nav .nav-hamburger {
    display: none;
    visibility: hidden;
  }

  header nav .nav-sections {
    display: block;
    visibility: visible;
    white-space: nowrap;
    margin-left: 50px;
  }

  header nav[aria-expanded="true"] .nav-sections {
    align-self: unset;
  }

  header nav .nav-sections .nav-drop:hover {
    border-bottom: 4px solid #000;
    cursor: pointer;
  }

  header nav .nav-sections ul {
    display: flex;
    margin: 0;
    font-size: var(--body-font-size-xs);
  }

  header nav .nav-sections > ul > li.nav-drop {
    flex: 0 1 auto;
    position: static;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--header-font-family-regular);
    height: 68px;
    padding: 20px 20px 0;
    border: none;
    box-sizing: border-box;
  }

  header nav .nav-sections > ul > li.nav-drop.active {
    font-family: var(--graphik-semibold);
  }

  header nav .nav-sections > ul > li.nav-drop:first-child {
    padding: 20px 20px 0;
  }

  header nav .nav-sections > ul > li > ul {
    display: none;
    position: relative;
  }

  header nav .nav-sections > ul > li[aria-expanded="true"] > ul {
    cursor: default;
    display: flex;
    gap: unset;
    flex-flow: wrap;
    padding: 1.53em 11% 4.755em;
    position: absolute;
    left: 0;
    top: var(--nav-height);
    background-color: var(--background-color);

    /* stylelint-disable-next-line property-no-vendor-prefix */
    -webkit-box-shadow: 0 10px 10px -10px #000;
    box-shadow: 0 10px 10px -10px #000;
    border-top: .5px solid #ccc;
    border-left: .5px solid #ccc;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul.sub-menu-container > li.sub-menu {
    width: 100%;
  }

  header nav .nav-sections > ul > li[aria-expanded="true"] > ul.sub-menu-container > li.sub-menu > ul {
    display: flex;
    flex-flow: wrap;
    gap: unset;
    padding: 0 15px 20px 0;
    margin: 0;
    position: relative;
    width: 100%;
    background-color: var(--background-color);
  }

  header nav .nav-sections > ul > li[aria-expanded="true"] > ul.sub-menu-container {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.level-two {
    border: none;
    padding: 2em 2em 0 0;
    width: 24.68%;
    font-size: 16px;
    line-height: normal;
    height: auto;
    margin: 0;
    text-wrap: wrap;
  }

  header nav .nav-sections > ul > li[aria-expanded="true"] > ul.sub-menu-container > li.sub-menu > ul > li.level-three {
    white-space: normal;
    padding-right: 3em;
    padding-top: 1.45em;
    padding-bottom: 0;
    text-transform: none;
    line-height: 1.25em;
    word-wrap: break-word;
    width: 25%;
    box-sizing: border-box;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.level-two a {
    color: #004dff;
    display: inline-block;
    margin-top: -0.15em;
    font-size: 16px;
    font-family: var(--body-font-family);
    line-height: 20px;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul.sub-menu-container li.sub-menu {
    border-bottom: 0.06em solid #e3e3e3;
    padding: 20px 0 0;
    font-family: var(--graphik-semibold);
    font-size: 1rem;
    color: #000;
    text-decoration: none;
    line-height: 1.6em;
    text-transform: uppercase;
    height: auto;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul.sub-menu-container li.sub-menu:last-child {
    border: none;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul.sub-menu-container li.sub-menu:last-child ul {
    padding: 0 15px 0 0;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container a {
    display: inline;
    font-size: 24px;
    font-weight: 400;
    font-family: var(--header-font-family-regular);
    padding-left: 0;
    line-height: 38px;
    text-decoration: none; /* Remove the default underline */
    position: relative; /* Create a context for the pseudo-element */
    transition: 0.3s;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.level-two a:hover {
    text-decoration: underline;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container {
    border-bottom: .063em solid #e3e3e3;
    width: 100%;
    padding: 2px 0 48px;
    margin-bottom: 10px;
    height: 4.38em;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container a:hover {
    text-decoration: none;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 70%;
    height: 2px;
    background-color: #004dff;
    transform: scaleX(0);
    transform-origin: bottom left;
    transition: transform 0.3s;
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container a:hover::before {
    transform: scaleX(1);
  }

  header nav .nav-sections > ul > li.nav-drop[aria-expanded="true"] > ul li.nav-heading-container a::after {
    font-family: var(--ionicons);
    content: '';
    padding-left: 10px;
  }

  header nav .nav-sections .nav-drop::after {
    display: none;
  } 
  
  .header-nav-footer {
    display: none;
  }
 
  .header-nav-footer {
    display: none;
    visibility: hidden;
  }
}

.skip-link {
  display: flex;
  position: absolute;
  font-size: 16px;
  top: -3em;
  z-index: 10;
  height: auto;
  margin: 0 auto;
  padding: 8px;
  opacity: 0;
  background-color: transparent;
  transition: top 0.2s, background-color 0.2s, color 0.4s ease-in-out; /* Transition for color */
  text-decoration: none;
  font-style: normal;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  border: none;
  color: #fff; /* Default color is white */
}

.skip-link:hover,
.skip-link:focus-visible {
  color: #fff; /* Keep text color white on hover or focus */
  background-color: #4a4a4a; /* Optional background color */
  text-decoration: underline; /* Optional underline */
  top: 0; /* Bring link into view */
  opacity: 1; /* Make it visible */
}

.skip-link:active,
.skip-link:focus {
  background-color: #4a4a4a;
  text-decoration: underline;
  outline-offset: -2px;
  outline: 1px solid #fff;
  -webkit-box-shadow: 0 0 0 1px #008;
  box-shadow: 0 0 0 1px #008;
  top: 0; /* Ensure the link stays in view */
  opacity: 1; /* Make it visible */
  transition: color 0.4s ease-in-out; /* Smooth color transition on click or Enter */
}

.skip-link:focus:not(:focus-visible) {
  color: #004dff; /* Color after focus is lost */
  opacity: 0; /* Fade out when focus is lost */
  top: -3em; /* Move link out of view */
  transition: top 0.2s, opacity 0.4s ease-in-out, color 0.4s ease-in-out; /* Transition properties on focus loss */
}

@keyframes slideIn {
  from{
    transform: translateX(-100%);
  }
  to{
    transform: translateX(0);
  }
  
}

@keyframes slideOut {
  from{
    transform: translateX(0);
  }
  to{
    transform: translateX(-100%);
  }
}
