/*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;
/*     
    clip-path: polygon(
        calc(50% - min(50%, var(--page-max-width)/2) + 30px) 0%,
        100% 0%,
        100% 100%,
        calc(50% - min(50%, var(--page-max-width)/2) + 80px) 100%
    ); */
}
.headerBottomContainer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: linear-gradient(90deg, rgba(44, 44, 44, 1) 0%, rgba(44, 44, 44, 0.8) 50% , rgba(40, 40, 40, 0.3) 100%);

    clip-path: polygon(
        calc(50% - min(50%, var(--page-max-width)/2) + 31px) 0%,
        100% 0%,
        100% 100%,
        calc(50% - min(50%, var(--page-max-width)/2) + 80px) 100%
    );

    z-index: -1; /* Place the background behind the content */
}
.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: white;
    background: rgba(0, 0, 0, .01);
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-right: 30px;
}
.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__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 .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;
    }
    /* Remove clip paths */
    .headerBottomContainer::after,
    .headerContainer::before,
    .headerTopContainer::before {
        clip-path: none;
    }
    .headerContainer::after {
        display: none;
    }
}
@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, .5);
    padding: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    background: linear-gradient(90deg, rgba(40, 40, 40, .9) 0%, rgba(40, 40, 40, .7) 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(44, 44, 44, 1) 0%, rgba(44, 44, 44, 0.8) 80%, rgba(40, 40, 40, 0.7) 100%);
    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;

    /* 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: 570px) {
    .nestedLinkList__manualDropDown.nestedLinkList--d1:has(~ .headerNavList.useMobile) {
        margin-left: 0;
        padding-left: 1rem;
        
        background-position: 1rem;
        justify-content: flex-start;
    }
}
@media screen and (max-width: 470px) {
    .nestedLinkList__manualDropDown.nestedLinkList--d1:has(~ .headerNavList.useMobile) {
        background-position: center;
        justify-content: center;

        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;
    grid-template-columns: repeat(3, 1fr); /* Defines 3 equal columns */
}

/* .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
    column-count: 3;
    column-gap: 0;
    display: block;
} */
@media screen and (max-width: 600px) {
    .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
        grid-template-columns: repeat(2, 1fr); /* Defines 2 equal columns */
    }
    /* .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
        column-count: 2;
    } */
}
@media screen and (max-width: 440px) {
    .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
        grid-template-columns: 1fr;
    }
    /* .headerNavList.useMobile .nestedLinkList.nestedLinkList--d2.headerNavList {
        column-count: 1;
    } */
}