header {
    z-index: 10;
    display: flex;
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    height: 4rem;
    padding: .5rem;
    margin: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: flex-end;
    align-items: center;
    background-color: white;
    box-shadow: var(--shadow);
    transition: var(--fast);
    color: var(--black-ish);
    fill: var(--black-ish);
}

@media screen and (min-width:1000px) {

    header {
        position: fixed;
        padding: .5rem 1rem;
    }

    header.scrolldown {
        top: -5rem;
        transition: var(--slow);
    }

    header.scrollup {
        top: 0;
        transition: var(--fast);
    }

    body.lock header {
        padding-right: calc(1rem + 17px); /* padding to replace scroll bar on scroll lock */
    }

}



/* SKIP TO MAIN */
#go-to-content {
    position: fixed;
    top: -10rem;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: auto;
    height: auto;
    padding: 1rem 2rem;
    margin: 0;
    border-radius: 0 0 var(--soft) var(--soft);
    font-size: 1.1rem;
    font-weight: 900;
    text-decoration: none;
    color: white;
    background: black;
    transition: var(--fast);
}

#go-to-content:focus {
    top: 0;
}



/* LOGO */
#home-logo {
    flex: 0 0 auto;
    height: 1.25rem;
    padding: 0;
    margin: 0;    
}

#home-logo svg {
    width: auto;
    height: 100%;
    fill: var(--drc-red);
    transition: var(--fast);
}

#home-logo:hover svg,
#home-logo:focus svg {
    fill: var(--drc-red-neon);
}



/* NAME */
#site-name
{
    flex: 1 0 auto;
    padding: 0 0 0 10px;
    margin: 0 0 0 11px;
    border-left: 1px solid;
    font-size: 1rem;
}

@media screen and (min-width:1000px) {
    #site-name {
        font-size: 1.2rem;
    }
}



/* BUTTON */
#actions {
    z-index: 10;
    position: fixed;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
}

#actions a {
    display: block;
    width: 100%;
    height: auto;
    padding: 2rem 0;
    margin: 0;
    text-align: center;
    box-shadow: var(--shadow);
    background: var(--drc-red);
}

#actions a svg {
    display: inline-block;
    width: auto;
    height: 1em;
    margin-right: 3px;
    fill: white;
    transform: translateY(2px);
    transition: var(--fast);
}

#actions a div {
    display: inline-block;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: .05em;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px white;
    color: white;
}

@media screen and (min-width:1000px) {

    #actions {
        position: relative;
        display: flex;
        width: auto;
        flex: 0 0 auto;
    }

    #actions a {
        width: auto;
        padding: .75rem 1.25rem;
        margin: 0 10px;
        border-radius: var(--soft);
        transition: var(--fast);
        cursor: pointer;
    }

    #actions a:hover,
    #actions a:focus {
        background: var(--drc-red-neon);
    }

    #actions a:hover svg,
    #actions a:focus svg {
        transform: scale(1.2) translateY(2px);
    }

}



/* TOOLS */
label[for="language"],
button#openMenu,
button#openSearch,
button#openSites {
    position: absolute;
    display: block;
    width: 1.6rem;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    cursor: pointer;
}

label[for="language"] {
    right: 7.6rem;
}

button#openSearch {
    right: 5.4rem;
}

button#openMenu {
    right: 3.2rem;
}

button#openSites {
    right: .5rem;
}

@media screen and (min-width:1000px) {

    label[for="language"],
    button#openSearch,
    button#openSites {
        position: relative;
        right: unset;
    }

    label[for="language"] {
        margin: 0 0 0 1rem;
    }
    
    button#openSearch {
        margin: 0 0 0 0.5rem;
    }
    
    button#openSites {
        margin: 0 0 0 0.4rem;
    }

    button#openMenu, 
    button#closeMenu {
        display: none !important;
    }

}



#language {
    display: none; /* hide the language checkbox */
}



/* SVG ICONS FOR TOOLS */
label[for="language"] svg,
button#openSearch svg,
button#openMenu svg,
button#openSites svg {
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    width: 100%;
    height: auto;
    transform: translate(-50%, -50%);
}

#menutool-globe .outer,
#menutool-globe .inner,
#menutool-search .glass,
#menutool-search .handle,
#menutool-lines .line,
#menutool-dots .dot {
    stroke: black;
    stroke-miterlimit: 10;
}

#menutool-globe .outer {
    stroke-width: 12px;
}

#menutool-globe .inner {
    stroke-width: 8px;
}

#menutool-search .glass {
    stroke-width: 14px;
}

#menutool-search .handle {
    stroke-width: 14px;
    stroke-linecap: round;
}

#menutool-lines .line {
    stroke-width: 16px;
    stroke-linecap: butt;
}

#menutool-dots .dot {
    stroke-width: 0px;
}



/* DRAWERS */
#search-menu-form,
#sites-menu {
    z-index: 100;
    position: fixed;
    display: block;
    top: 0;
    right: -110%;
    width: 100%;
    max-width: 600px;
    height: 100%;
    padding: 2rem;
    margin: 0;
    overflow-y: auto;
    background: var(--matte-blue-40);
    box-shadow: var(--shadow);
    transition: var(--slow);
}

#search-menu-form.open,
#sites-menu.open {
    right: 0;
}



/* OVERLAYS */
form#search-menu-form + .overlay,
nav#sites-menu + .overlay {
    position: fixed;
    top: 0;
    left: 100vw;
    width: 100vw;
    height: 100vh;
    background: black;
    opacity: 0;
    transition-property: left, opacity;
    transition-delay: 1000ms, 1ms;
    transition-duration: 1ms, 1000ms;
}

#search-menu-form.open + .overlay,
#sites-menu.open + .overlay {
    left: 0;
    opacity: .75;
    transition-property: left, opacity;
    transition-delay: 1ms, 1ms;
    transition-duration: 1ms, 2000ms;
}



/* CLOSE DRAWER BUTTONS */
button#closeSearch,
button#closeMenu,
button#closeSites {
    position: relative;
    display: block;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    margin: 0 0 2rem 0;
    border: 0;
    outline: 0;
    border-radius: 50%;
    font-weight: 300;
    font-size: 1.2rem;
    background: black;
    color: white;
}



/* SITES MENU, CONTENT OF */
#sites-menu ul.groups,
#sites-menu ul.groups > li,
#sites-menu ul.sites,
#sites-menu ul.sites > li { 
    list-style-type: none;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* box heading */
#sites-menu > div {
    font-weight: 900;
    font-size: 1.5rem;
}

/* group names */
#sites-menu ul.groups > li > div {
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: .05em;
    padding: 2.25rem 0 .75rem 0;
}

/* site names */
#sites-menu ul.sites > li > div:first-of-type 
{
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: .05em;
    padding: .5rem 0 0 0;
}

/* site descriptions */
#sites-menu ul.sites > li > div:last-of-type 
{
    font-weight: 400;
    font-size: .95rem;
    line-height: 1.2;
    padding: .25rem 0 .75rem 0;
}

/* site items */
#sites-menu ul.sites > li
{
    position: relative;
    transition: var(--slow);

}
#sites-menu ul.sites > li:hover
{
    background: #00000011;
    transition: var(--fast);
}

#sites-menu ul.groups a,
#sites-menu ul.sites a {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}



/* SEARCH MENU, CONTENT OF */
label[for="search-menu-field"] {
    display: block;
    width: 100%;
    font-weight: 900;
    font-size: 2rem;
    margin-bottom: 2rem;
}

#search-menu-field {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    color: black;
    background: white;
    border-radius: var(--soft);
    border: 2px solid white;
    outline: 0;
    transition: var(--fast);
}

#search-menu-field:hover,
#search-menu-field:focus {
    border-color: black;
}

#search-menu-field::placeholder {
    color: var(--matte-blue-dark);
}

#search-menu-button {
    display: inline-block;
    width: auto;
    height: auto;
    padding: 1rem 2rem;
    margin: 1rem 0;
    border: 0;
    outline: 0;
    border-radius: var(--soft);
    background: var(--drc-red);
    font-weight: 900;
    font-size: 1rem;
    color: white;
    transition: var(--fast);
}

#search-menu-button:hover,
#search-menu-button:focus {
    background: var(--drc-red-neon);
}



/* LANGUAGE */
#language ~ ul {
    position: fixed;
    top: 4rem;
    right: 5rem;
    display: none;
    width: auto;
    height: 2.2rem;
    padding: 0 1.1rem;
    border-radius: 1.1rem;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    list-style: none;
    background: white;
    animation-name: fade-in;
    animation-duration: 500ms;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}

#language:checked ~ ul {
    display:flex;
}

label[for="language"] ~ ul > li {
    display: inline-block;
    padding: 0 .5rem;
}

label[for="language"] ~ ul > li > a {
    font-weight: 900;
    text-decoration: none;
    color: black;
}

@media screen and (min-width:1000px) {

    #language ~ ul {
        position: absolute;
        top: 3rem;
        right:4.5rem;
        width: 3rem;
        height: auto;
        padding: 1rem 0 0 0;
        margin: 0;
        flex-flow: column nowrap;
    }
    
    #language:checked ~ ul {
        animation-name: fade-in;
        animation-duration: 500ms;
        animation-iteration-count: 1;
        animation-fill-mode: both;
    }

    label[for="language"] ~ ul > li {
        padding: .25rem .5rem;
    }

}



/* MAIN MENU SMALL SCREEN */
@media screen and (max-width:1000px) {

    #main-menu {
        z-index: 100;
        position: fixed;
        display: block;
        top: 0;
        right: -110%;
        width: 100%;
        max-width: 600px;
        height: 100%;
        padding: 2rem;
        margin: 0;
        overflow-y: auto;
        color: white;
        background: var(--drc-red);
        box-shadow: var(--shadow);
        transition: var(--slow);
    }

    #menu-toggle.open {
        right: 0;
    }

    #main-menu ul,
    #main-menu li {
        padding: 0;
        margin: 0;
        list-style-type: none;
        font-size: 1.4rem;
    }

    #main-menu li > ul {
        font-size: 1.2rem;
        padding-left: 1.2rem;
    }

    #main-menu li {
        border-top: 1px dotted white;
    }

    #main-menu li > ul > li {
        border: none;
        font-size: 1rem;
    }

    #main-menu ul a {
        display: inline-block;
        width: calc(100% - 3rem);
        padding: .3em 0 .5em 0;
        font-weight: 300;
        letter-spacing: 0.05em;
        text-decoration: none;
        color: inherit;
    }

    #main-menu ul ul a {
        padding: 0 0 1em 0;
    }

    #main-menu input[type="checkbox"],
    #main-menu input[type="checkbox"] ~ ul {
        display: none;
    }

    #main-menu input[type="checkbox"]:checked ~ ul {
        display: block;
    }

    #main-menu input[type="checkbox"] ~ label {
        display: inline-block; 
        width: 1.8rem; 
        height: auto; 
        margin: 0 0 0 .8rem;
        transform: rotate(0deg); 
        transition: var(--fast);
    }

    #main-menu input[type="checkbox"]:checked ~ label {
        transform: rotate(180deg);
    }

    #main-menu input[type="checkbox"] ~ label svg {
        width: 100%;
        fill: white;
    }

}



/* MAIN MENU - LARGE SCREEN */
@media screen and (min-width:1000px) {

    #main-menu {
        margin-right: .5rem;
    }

    #main-menu ul,
    #main-menu li {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    #main-menu li.level-1 > input,
    #main-menu li.level-1 > label {
        display: none;
    }

    #main-menu > ul {
        height: 100%;
    }
    
    #main-menu li.level-1 {
        display: inline-block;
    }

    #main-menu li.level-1 a {
        display: block;
        padding: .5rem 1rem;
        margin: 0;
        font-weight: 900;
        font-size: 1.1rem;
        letter-spacing: .025em;
        text-decoration: none;
        color: black;
        transition: var(--fast);
    }

    #main-menu li.level-1 a:hover {
        color: var(--drc-red);
    }

    #main-menu li.level-1 > ul {
        position: absolute;
        display: none;
        flex-flow: column nowrap;
    }

    #main-menu li.level-1:hover > ul {
        display: flex;
        animation-name: fade-in;
        animation-duration: 500ms;
        animation-iteration-count: 1;
        animation-fill-mode: both;
    }

    #main-menu li.level-2 > a {
        position: relative;
        display: block;
        padding: 1em 1.5em 1em 1em;
        margin: 0;
        border-width: 0;
        border-radius: 0;
        font-weight: 400;
        font-size: .9rem;
        letter-spacing: .025em;
        text-decoration: none;
        color: black;
        background: #fafafa;
        transition: var(--fast);
    }

    #main-menu li.level-2 > a:hover {
        color: var(--drc-red);
        background: white;
    }

    #main-menu li.level-2:not(:last-child) > a {
        border-bottom: 1px solid var(--matte-blue-50);
    }

}


