/***** Sub Nav Styling *****/
/* Sub nav is not always visible below 1280px ****/

/* general subnav styles */
.subNavBackground {
    position: absolute;
    width: 320px;
    height: 100%;
    top: 0px;
    left: 0px;
    background: rgb(0 51 99 / 80%);
}
@media screen and (max-width:1280px) {
    .subNavBackground {
        display:none;
    }
}
.subNav {
    position:relative;
    grid-area: subNav;
    display: flex;
    --nav-color1: rgba(0, 0, 0, 0); /*Nothing*/
    --nav-color2: rgb(29 97 161); /*Blue*/
    --nav-color3: rgb(17 68 111); /*Dark Blue*/
    --nav-color4: rgb(11 42 68); /*Darkest Blue*/
    flex-direction: column;
    /*background-color: rgb(215, 215, 215);*/
    margin-top: -60px;
    font-family: proxima-nova, sans-serif;
    z-index: 2;
    background: linear-gradient(to left, transparent, #0001);
}
.subNav > .nestedLinkList {
    background-color: var(--nav-color1);
    width: 320px;
    height: auto;
}

NAV.subNav :is(a, a:visited, a:active) {
    color: #ffffff !important;
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    padding: 10px;
    min-width: 5px;
}

NAV.subNav LI:hover > :is(a) {
    text-decoration: underline;
}

.subNav :is(a.iconLinkList__item--Active, a.iconLinkList__item--Active:visited, a.iconLinkList__item--Active:active){
    /*color:#404040;
    text-shadow: -1px 1px rgba(0, 0, 0, 0.2);*/
    color: #FDCC61 !important;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.25);
}

.subNav .subNavList:not(.nestedLinkList--d1) :is(a, a:visited, a:active) {
    color: white;
    /* min-width: 5px; */
}

.subNav .subNavList:not(.nestedLinkList--d1) :is(a.iconLinkList__item--Active:visited, a.iconLinkList__item--Active:visited:visited, a.iconLinkList__item--Active:visited:active) {
    color: #FDCC61;
    text-shadow: none !important;
}

.subNav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

NAV.subNav LI:hover {
    background: linear-gradient(75deg, #00112280 10%, transparent);
}

.subNavList {
    display: flex;
    opacity: 1;
    flex-wrap: wrap;
    /* Have the items line up top to bottom by default */
    flex-direction: column;
}
.subNavList li {
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.subNavList:not(.nestedLinkList--d1) > li {
    /* Darken each layer's background iteratively */
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
}
.subNavList li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.subNavList li:has(> .nestedLinkList__manualDropDown:checked) + li, /* Prevent double border happening when dropdown occurs */
.subNav > .subNavList > li:first-child { /* Remove border from very top */
    border-top: 0; 
}
.nestedLinkList__manualDropDown:not(:checked) ~ .subNavList {
    /* Menus should be hidden by default if their toggle is not checked */
    height: 0;
    overflow: hidden;
}
/* This handles the slideout of the subnav on smaller screens */
@media screen and (max-width: 1280px) {
    .subNavList.nestedLinkList.nestedLinkList--d1.nestedLinkList--d1 {
        height: max-content;
        background: rgb(0 51 99 / 100%);
    }
    .subNavList.nestedLinkList--d1.nestedLinkList--d1.nestedLinkList__manualDropDown:not(:checked) ~ .subNavList {
        translate: -100%;
        position: absolute;
        animation: KeepRel 0.3s;
    }
    .subNavList.nestedLinkList--d1.nestedLinkList--d1.nestedLinkList__manualDropDown:checked ~ .subNavList {
        translate: 0;
        position: relative;
        box-shadow: 0px -1px 0px 0px #f1b122;
    }

    .subNavList.nestedLinkList--d1.nestedLinkList--d1.nestedLinkList__manualDropDown:not(:checked) {
        position: absolute;
    }
    .subNavList.nestedLinkList--d1.nestedLinkList--d1.nestedLinkList__manualDropDown:checked {
        position: relative;
        box-shadow: 0px -1px 0px 0px #f1b122;
        animation: slideOut 0.3s 1 ease-out;
    }
  @keyframes slideOut {
    from {left: calc(-100%);}
    to {left: 0;}
  }
  @keyframes KeepRel {
    from {position: relative;}
    to {position: relative;}
  }
}




/* Style the List Expander checkbox */
.subNav input {
    all: unset;
    cursor: pointer;
    transition: transform .3s;
    height: 100%;
    width: 2em;
    /*padding-left: 0.5em;*/
    display: flex;
    align-items: center;
    justify-content: center;
    /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 13.1l-8-8 2.1-2.2 5.9 5.9 5.9-5.9 2.1 2.2z'/%3E%3C/svg%3E"); */
}
/* Make it a chevron pointing right */
.subNav :is(input, input:checked):after {
    content: ' ';
    display: inline-block;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    height: 12px;
    width: 12px;
    transition: transform .3s;
}
.subNav input:after {
    transform: rotate(-45deg) translateX(-2px) translateY(-2px);
}
.subNav input:checked:after {
    transform: rotate(45deg) translateX(-2px) translateY(-2px);
}


.subNav input.arrow-active {
    background-color: var(--nav-color3);
    color: rgba(230, 172, 13, 1) !important;
}

/*Active Arrow*/
.subNav .iconLinkList__item--Active ~ .nestedLinkList__manualDropDown:after {
    border-color: white;
}
.subNav .iconLinkList__item--Active ~ .nestedLinkList__manualDropDown {
    /*background-color: var(--nav-color3);*/
    background: rgba(0, 0, 0, 0.25);
    border-color: #f1b122;
}

/* Layout the nav nestings */
.subNavList li {
    display: grid;
    opacity: 1;
    grid:
        "parent arrow" min-content
        "child child" 1fr
        / 1fr min-content;
    align-items: center;
}
.subNavList input {
    grid-area: arrow;
}
.subNavList a {
    grid-area: parent;
}
.subNavList {
    grid-area: child;
}


/********* Big Desktop Nav *****************/
@media screen and (min-width: 1280px) {
    .subNavList.nestedLinkList--d1.nestedLinkList--d1 {
        /* Ensure the initial menu is always displayed on big desktop */
        height: auto;
    }
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1 {
        /* Hide the checkbox for main nav on big desktop */
        display: none;
    }
}
/*SubNav Colors*/
.nestedLinkList.nestedLinkList--d2 {
    background-color: var(--nav-color2);
}
.subNav .nestedLinkList__manualDropDown:not(.nestedLinkList--d1, .nestedLinkList--d2):after {
    border-color: white;
}

.nestedLinkList.nestedLinkList--d3 {
    background-color: var(--nav-color3);
}
.subNav .nestedLinkList__manualDropDown.nestedLinkList--d3:after {
    border-color: white;
}
.nestedLinkList.nestedLinkList--d4 {
    background-color: var(--nav-color4);
}
.subNav .nestedLinkList__manualDropDown.nestedLinkList--d4:after {
    border-color: white;
}
.nestedLinkList.nestedLinkList--d5 {
    background-color: var(--nav-color4);
}
.nestedLinkList.nestedLinkList--d6 {
    background-color: var(--nav-color4);
}
.nestedLinkList.nestedLinkList--d7 {
    background-color: var(--nav-color4);
}
.nestedLinkList.nestedLinkList--d8 {
    background-color: var(--nav-color4);
}


/*** Mobile/Smaller Desktop ***/
@media screen and (max-width: 1280px) {
    .subNav {
        justify-content: flex-end;
        flex-direction: row-reverse;
        float: left;
        max-width: 100%;
        height: fit-content;
        
    }

    .subNav > .nestedLinkList {
        max-width: calc(100vw - 4em);
    }

    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1 {
        /* Show the checkbox for small desktop */
        display: flex;
        opacity: 1;
    }
    .subNav > input {
        /*background-color: var(--nav-color1);*/
        background-color: rgba(29, 66, 109, 0.9);
        width: 145px;
        height: 3em;
        flex-direction: row-reverse;
        flex-shrink: 0;
        padding: 0;
        justify-content: space-evenly;
    }
    .subNav > input:before {
        color: white;
        width: auto;
        content: 'Navigation';
        line-height:1em;
    }
    .subNav > :is(input, input:checked):after {
        content: ' ';
        display: inline-block;
        border-bottom: 2px solid #fff;
        border-right: 2px solid #fff;
        height: 12px;
        width: 12px;
        transition: transform .3s;
    }
    .subNav > input:after {
        transform: rotate(135deg) translateX(-2px) translateY(-2px);
    }

    /* Style as X when clicked */
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1:checked {
        width: 3em;
    }
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:before,
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:after {
        position: absolute;
        width: 36px;
        height: 4px;
        background-color: white;
        border-radius: 2px;
        transition: transform 0.6s;
        cursor: pointer;
        content: '';
    }
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:before {
        transform: rotate(45deg);
    }
    .subNav .nestedLinkList__manualDropDown.nestedLinkList--d1:checked:after {
        transform: rotate(-45deg);
    }

}