/*Header Navigation*/
/* Nav General Styles */
.headerBottomContainer {
  font-size: 16px;
  line-height: 1em;
  margin-left: auto;
  margin-right: auto;
  height: var(--header-nav-height);
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(61, 3, 0, 0.9) 0%,
    rgba(61, 3, 0, 0.6) 100%
  );
  border-top: 1px solid rgba(216, 216, 216, 1);
  border-bottom: 1px solid rgba(216, 216, 216, 1);
}

.headerBottomContainer:has(.nestedLinkList--d1.headerNavList.useMobile) {
  border-bottom: none;
}

.headerNavigation {
  position: relative;
  height: 100%;
  z-index: 2; /* Make it over the seal so it is clickable */
  max-width: var(--page-max-width);
  margin-left: auto;
  margin-right: auto;
}

.headerNavigation :is(a, a:visited, a:active) {
  color: rgba(255, 255, 255, 0);
  background: rgba(0, 0, 0, 0.01);
  text-shadow: 0px 0px 0px white;
  display: inline-block;
  text-decoration: none;
  font-size: 18px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-right: 30px;
}

.headerNavList.nestedLinkList--d2 :is(a, a:visited, a:active) {
  font-size: 16px;
}

.headerNavigation a:hover {
  color: rgba(255, 255, 255, 0);
  text-shadow: 0px 0px 0px #ffb738;
}

.headerNavigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.headerNavList {
  display: flex;
  opacity: 1;
  flex-wrap: wrap;
  /* Have the items line up top to bottom by default */
  flex-direction: column;
}

.nestedLinkList--d1.headerNavList.useMobile {
  border-bottom: 1px solid rgba(216, 216, 216, 1);
}

.nestedLinkList__manualDropDown:not(:checked) ~ .headerNavList {
  /* Menus should be hidden by default if their toggle is not checked */
  height: 0;
  overflow: hidden;
}

/* Style the List Expander checkbox */
.headerNavList input:checked {
  transform: rotate(135deg);
}

.headerNavList input {
  all: unset;
  cursor: pointer;
  transition: transform 0.3s;

  width: 9px;
  height: 9px;
  border-top: 2px solid white;
  border-right: 2px solid white;
  transform: rotate(45deg);
  top: 10px;
  left: 5px;

  /* Make it a triangle pointing right */
  /* border-top: 0.5em solid transparent;
    border-bottom: 0.5em solid transparent;
    border-left: 1em solid white;
    height: 0;
    width: 0; */
}

/* Layout the nav nestings */
.headerNavList li {
  display: grid;
  opacity: 1;
  grid:
    "arrow . parent" min-content
    ". child child" 1fr
    / 0.6em 0.6em auto;
  align-items: center;
}
.headerNavList input {
  grid-area: arrow;
}
.headerNavList a {
  grid-area: parent;
}
.headerNavList {
  grid-area: child;
}

/********* Desktop Nav *****************/
.headerNavList.nestedLinkList--d1:not(.useMobile) {
  /* For desktop nav we want the initial menu to go left to right */
  flex-direction: row;
  /* Ensure the initial menu is always desplayed on desktop */
  height: inherit;
  display: flex;
  opacity: 1;
  /* Padding so we don't overlap with logo */
  margin-left: 118px; /* logo p-l (5px) + logo w (100px) + m-l jlogo (10px) + 3px to make it feel lines up */
  flex-wrap: wrap;
}
@media screen and (max-width: 570px) {
  .headerNavList.nestedLinkList--d1:not(.useMobile) {
    margin-left: 30px;
  }
}
@media screen and (max-width: 470px) {
  .headerNavList.nestedLinkList--d1:not(.useMobile) {
    margin-left: 118px;
  }
}
@media screen and (max-width: 300px) {
  .headerNavList.nestedLinkList--d1:not(.useMobile) {
    margin-left: 30px;
  }
}

/* This creates the container for overlaying the 2nd level+ of navs */
.headerNavList.nestedLinkList--d1:not(.useMobile)
  .headerNavList.nestedLinkList--d2 {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  background: linear-gradient(
    90deg,
    rgba(130, 21, 26, 0.9) 0%,
    rgb(206, 21, 26, 0.9) 100%
  );
  height: auto;
  margin-top: 1px;
  margin-left: -20px;
  width: 300px;
}
/*Fix some padding */
.headerNavList.nestedLinkList--d1:not(.useMobile)
  .headerNavList.nestedLinkList--d2
  > li
  a {
  padding-top: 5px;
  padding-bottom: 5px;
  margin: 0;
}
/* Ensures 2nd level container displays properly and main level nav appears */
.headerNavList.nestedLinkList--d1:not(.useMobile) > li {
  display: block;
  opacity: 1;
}
.headerNavigation
  .nestedLinkList__manualDropDown.nestedLinkList--d1:not(.useMobile),
.headerNavList.nestedLinkList--d1:not(.useMobile)
  .nestedLinkList__manualDropDown.nestedLinkList--d2 {
  /* Hide the checkbox for main nav and 1st level on desktop */
  display: none;
  opacity: 0;
}
/***** Open the 1st level menus on hover ****/
.headerNavList.nestedLinkList--d1:not(.useMobile)
  .headerNavList.nestedLinkList--d2 {
  opacity: 0;
  display: none;
  translate: 0 -1em;
  transition:
    opacity 0.4s,
    display 0.4s allow-discrete,
    translate 0.4s;
  animation: NavTopSlideDown 0.4s 1;
  /* position: absolute; */
}
.headerNavList.nestedLinkList--d1:not(.useMobile)
  > li:hover
  > .nestedLinkList.headerNavList {
  opacity: 1;
  display: grid;
  translate: 0;
}
@starting-style {
  .headerNavList.nestedLinkList--d1:not(.useMobile) > li:hover > .headerNavList,
  .headerNavList.nestedLinkList--d1:not(.useMobile)
    > li
    > .headerNavList:hover {
    opacity: 0;
    translate: 0 -1em;
  }
}
@keyframes NavTopSlideDown {
  from {
    opacity: 0;
    translate: 0 -1em;
  }
  to {
    opacity: 1;
    translate: 0;
  }
}

/******** Mobile Nav *****************/
.headerNavList.nestedLinkList--d1.useMobile {
  background: linear-gradient(
    90deg,
    rgba(61, 3, 0, 0.9) 0%,
    rgba(61, 3, 0, 0.6) 100%
  );
  border-bottom: 1px solid rgba(216, 216, 216, 1);
  padding: 0 10px;
  padding-top: 0;
  display: inherit;
  opacity: 1;
}
.headerNavList.nestedLinkList--d1.useMobile li:last-of-type {
  margin-bottom: 10px;
}

/* Hamburger styling */
/* Make the checkbox for the main nav take up
    the whole area to then be covered by the hamburger */
.nestedLinkList__manualDropDown.nestedLinkList--d1:has(
    ~ .headerNavList.useMobile
  ) {
  all: unset;
  width: 100%;
  align-items: center;
  height: 100%;
  justify-content: space-evenly;
  cursor: pointer;
  display: flex;
  /* box-sizing: border-box; */

  /* Create middle element */
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNGRkYiIHZpZXdCb3g9IjAgMCAzNiA0Ij48cmVjdCB3aWR0aD0iMzYiIGhlaWdodD0iNCIgcnk9IjIiIHJ4PSIyIj48L3JlY3Q+PC9zdmc+);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-size: 36px;

  margin-left: calc(2 * (-50% + 135px));
  padding-left: calc((50% - 135px));
  margin-right: calc(-50% + 135px);
  padding-right: calc(50% - 135px);
}
@media screen and (max-width: 470px) {
  .nestedLinkList__manualDropDown.nestedLinkList--d1:has(
      ~ .headerNavList.useMobile
    ) {
    background-position: center;
    justify-content: center;
    width: 100%;

    margin-left: 0;
    padding-left: 0;
    margin-right: 0;
    padding-right: 0;
  }
}
/* Create top and bottom elements */
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:before,
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:after {
  content: "";
}
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:before {
  transform: translateY(-10px);
}
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:after {
  transform: translateY(10px);
}
/* Style the hamburger parts */
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:before,
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:after {
  position: absolute;
  width: 36px;
  height: 4px;
  background-color: white;
  border-radius: 2px;
  transition: transform 0.6s;
  cursor: pointer;
}
.headerNavigation .nestedLinkList__manualDropDown.nestedLinkList--d1:checked {
  background: none;
}
.headerNavigation
  .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:before {
  transform: rotate(45deg);
}
.headerNavigation
  .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:after {
  transform: rotate(-45deg);
}

.headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
  display: grid;
}

/* .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
    column-count: 3;
    column-gap: 0;
    display: block;
} */
