/* HEIGHT VAR FOR GLOBAL NAV - MAY CHANGE, NEEDED FOR POSITIONING, MENU HEIGHTS */

:root {
    --submenu-height: 56px;
    --globalnavheight: 68px;
}

/* SET UP STRUCTURE & TOGGLES */

nav {
    height: auto;
    background: var(--greyscaleaccent10);
    display:block;
    /* position: relative; */
    z-index: 50;
}
nav input[type=checkbox] {
    display: none;
}

nav .container {
    margin: 0px;
    padding: 0px;
    width: 100%;
    max-width: 100%;
}

nav label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--submenu-height);
    position:relative;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    
   /* dropdown arrow toggle icon */
}
nav label::after {
    transform: rotate(90deg);
    content: "\e90d";
    font-family: 'armyicons';
    font-size: 0.85em;
    display: inline-block;
    margin: 2px 0 2px 10px;
}

/* Standard sticky behavior -- override on project level if needed */

.submenu, .submenudropdown {
    position: sticky;
    top: var(--globalnavheight);
}

/* STANDARD SUBMENU NAVIGATION */ 

.submenu label {
    display:none;
}

.submenu .subnav-container {
    text-transform: uppercase; 
    position: relative;
    top: 0px;
    left: 0px;
    min-height: var(--submenu-height);
}

/* hides menu when not in use */
.subnav-inner {
    height: var(--submenu-height);
    overflow-y: hidden;
}
.subnav-inner:hover {
    height:auto;
    overflow-y: auto;
}
.subnav-inner label::after {
    opacity:0;
    transition: opacity .5s linear;
}
.subnav-inner:hover label::after {
    opacity:1;
}
/* end hiding on mouseout */

.submenu .subnav-inner .container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-end;
    justify-content: center;
    align-items: flex-end;
    box-sizing: border-box;
    padding: 0vh;
    min-height: var(--submenu-height);
}
.submenu .subnav-inner .container li {
    height: var(--submenu-height);
}

.submenu .subnav-inner .container li a {
    color: var(--army-black);
    display: flex;
    padding: .8em 1em;
    height: 100%;
    line-height: 100%;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    margin: 0px .8em;
    position: relative;
    top: 0px;
    box-sizing: border-box;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: background-color 1s ease-in-out;
    background-color: rgba(255,255,255,0);
}
.submenu .subnav-inner .container li a:hover {
    background-color: rgba(255,255,255,.7);
}
.submenu .subnav-inner .container li a:after {
    display: block;
    content: "";
    height: 3px;
    position: absolute;
    left:0px;
    bottom: 0px;
    width:0%;
    background-color: var(--armygold);
    transition: width .3s ease-in-out;
}
.submenu .subnav-inner .container li a:hover::after, .submenu .subnav-inner .container li a.active::after {
    width:100%;
}

/* MENU SLIDE DOWN ON MOBILE */

@media screen and (max-width:1024px) {
    .submenu label {
        display:flex;
        border-bottom: 0px;
        position:relative;
    }
    .submenu label::before {
        content: "";
        position: absolute;
        display: none;
        height: 1px;
        width: 80%;
        bottom: -1px;
        background-color: #b3b3b3;
    }
    .submenu .subnav-inner .container {
        max-height: 0vh;
        overflow-y:hidden;
        padding: 0px 5vh;
        min-height: 0px;
        transition: max-height .5s linear;
    }
    .submenu .subnav-inner  .container > * { 
        display:block;
        width:100%;
        text-align: center;
    }
    .submenu input[type=checkbox]:checked ~ .container {
        max-height: 100vh;
        overflow-y: auto;
    }
    .submenu input[type=checkbox]:checked +label::after {
        transform: rotate(-90deg);
    }
    .submenu input[type=checkbox]:checked +label::before {
        display:block;
    }
}




/* DROP DOWN SUBMENU NAVIGATION */ 


.subnav-container {
    text-transform: uppercase; 
    position: relative;
    top: 0px;
    left: 0px;
    min-height: var(--submenu-height);
    border-bottom: 4px solid #b3b3b3;
}

.submenudropdown .subnav-container .container {
    overflow: hidden;
    max-height: 0vh;
    overflow-y:hidden;
    transition: max-height .5s ease-in-out;
    background: rgb(242, 242, 242);
    position: relative;
    bottom: -3px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* DROP DOWN SLIDE DOWN */ 

.submenudropdown input[type=checkbox]:checked ~ .container {
    max-height: 100vh;
    overflow-y: auto;
}

.submenudropdown input[type=checkbox]:checked + label:after {
    transform: rotate(-90deg);
}

/* OPTION STYLES */

.submenudropdown .subnav-container .container li a {
    color: var(--army-black);
    display:inline-block; 
    padding:1em;
    text-align: center;
    font-weight:bold;
    text-decoration: none;
    background-color: #FFF;
    border:1px solid #666;
    margin: .8em;
    transition: background-color .3s ease-in-out;
}

.submenudropdown .subnav-container .container li a:hover, .submenudropdown .subnav-container .container li a.active  {
    background-color: var(--armygold);
}



/* NOTES ON SUBNAV STRUCTURES:

STANDARD SUBMENU


DROPDOWN SUBMENU

 */

