/* SITE HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: flex-end;
    align-items: center;
    width: 100%;
    height: auto;
    padding: .5rem 1rem;
    margin: 0;
    background-color: white;
    z-index: 88;
    transition: var(--fast);
    box-shadow: var(--shadow);
    color: var(--black-ish);
    fill: var(--black-ish);
}
header:hover {
    color: black;
    fill: black;
}
body.lock header {
    width: calc(100% - 17px);
}
header svg {
    height: 100%;
    width: auto;
}
#home-logo,
#site-name,
#main-menu,
#actions,
#search-form,
#sites-toggle,
#local-toggle {
    flex:0 0 auto;
    height:20px;
    padding:0;
    margin:0;
}
#site-name {
    flex-grow:1;
    display:flex;
    align-items:center;
    font-size:18px;
    padding-left:10px;
    margin-left:12px;
    border-left:2px solid;
}
#home-logo svg {
    fill: var(--drc-red);
}

@media screen and (max-width:1199px)
{
    header { 
        position:static;
        padding:.6rem;
    }
    #home-logo {
        height:1.2rem;
    }
    #site-name {
        font-size:1rem;
    }
}




/* MENU - desktop */
#main-menu {
    display: flex;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    list-style-type: none;
}
#main-menu li ul {
    position: absolute;
    display: none;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border-radius: var(--soft);
    color: black;
    background: white;
    list-style-type: none;
    flex-flow: column nowrap;
}
#main-menu li:hover ul {
    display: flex;
    animation-name: fade-in;
    animation-duration: 500ms;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}
#main-menu a {
    position: relative;
    display: block;
    padding: 5px 10px;
    margin: 0;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
    border-radius: var(--soft);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: .3px;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: var(--fast);
    text-shadow: 1px white;
}
#main-menu li ul a {
    font-weight: 400;
    font-size: .9rem;
}
#main-menu a.current,
#main-menu a:hover {
    background: var(--white-ish);
    transition: var(--fast);
}
@media screen and (max-width:1199px)
{
    #main-menu {
        display: none;
    }
}




/* MENU - mobile */
#local-toggle {
    display: none;
}
#local-toggle + label {
    position: fixed;
    display: block;
    right: .8rem;
    top: .8rem;
    z-index: 99;
    width: 2.2rem;
    height: 2.2rem;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
#local-toggle + label div {
    display: block;
    width: 1.1rem;
    height: 4px;
    position: absolute;
    left: 50%;
    top: calc(50% - 2px);
    background: var(--black-ish);
    transition: var(--slow);
}
@keyframes toggle1
{
    0%   {transform: translateX(-50%) translateY(-6px) rotate(0deg);}
    50%  {transform: translateX(-50%) translateY(0) rotate(0deg);}
    100% {transform: translateX(-50%) translateY(0) rotate(-45deg);}
}
@keyframes toggle2
{
    0%   {transform: translateX(-50%) scale(1);}
    100% {transform: translateX(-50%) scale(0);}
}
@keyframes toggle3
{
    0%   {transform: translateX(-50%) translateY(6px) rotate(0deg);}
    50%  {transform: translateX(-50%) translateY(0) rotate(0deg);}
    100% {transform: translateX(-50%) translateY(0) rotate(45deg);}
}
#local-toggle + label div:nth-child(1) {
    transform: translateX(-50%) translateY(-6px) rotate(0deg);
}
#local-toggle:checked + label div:nth-child(1) {
    transform: translateX(-50%) translateY(0) rotate(-45deg);
    animation-name: toggle1;
    animation-duration: 1s;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}
#local-toggle + label div:nth-child(2) {
    transform: translateX(-50%) scale(1);
}
#local-toggle:checked + label div:nth-child(2) {
    transform: translateX(-50%) scale(0);
    animation-name: toggle2;
    animation-duration: 500ms;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}
#local-toggle + label div:nth-child(3) {
    transform: translateX(-50%) translateY(6px) rotate(0deg);
}
#local-toggle:checked + label div:nth-child(3) {
    transform: translateX(-50%) translateY(0) rotate(45deg);
    animation-name: toggle3;
    animation-duration: 1s;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}
#local-menu {
    position: fixed;
    display: block;
    overflow-y: auto;
    right: calc(-100% - 10px);
    top: 0;
    z-index: 88;
    width: 600px;
    min-width: 50%;
    max-width: 100%;
    height: 100%;
    padding: 8rem 2rem 2rem 2rem;
    margin: 0;
    box-shadow: var(--shadow);
    transition: var(--slow);
    background: var(--drc-red);
    color: white;
}
#local-toggle:checked ~ #local-menu {
    right: 0;
}
#local-menu ul,
#local-menu li {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
#local-menu ul {
    font-size: 1.4rem;
}
#local-menu li > ul {
    font-size: 1.2rem;
    padding-left: 1.2rem;
}
#local-menu li {
    border-top: 1px dotted white;
}
#local-menu li > ul > li {
    border: none;
}
#local-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;
}
#local-menu ul ul a {
    padding: 0 0 1em 0;
}
#local-menu input[type="checkbox"],
#local-menu input[type="checkbox"] ~ ul {
    display: none;
}
#local-menu input[type="checkbox"]:checked ~ ul {
    display: block;
}
#local-menu input[type="checkbox"] ~ label {
    display: inline-block; 
    width: 1.8rem; 
    height: auto; 
    margin: 0 0 0 .8rem;
    transform: rotate(0deg); 
    transition: var(--fast);
}
#local-menu input[type="checkbox"]:checked ~ label {
    transform: rotate(180deg);
}
#local-menu input[type="checkbox"] ~ label svg {
    width: 100%;
    fill: white;
}
@media screen and (min-width:1000px)
{
    #local-toggle,
    #local-toggle + label,
    #local-menu {
        display: none;
    }
}



/* SEARCH - desktop */
#search-form,
#search-menu-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0 0 0 8px;
    border: 0;
}
#search-form label,
#search-menu-form label {
    display: none;
}
#search-form input[type=search],
#search-menu-form input[type=search] {
    flex-grow: 1;
    flex-shrink: 1;
    display: block;
    width: 0;
    height: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid black;
    transition: var(--fast);
}
#search-form:hover input[type=search],
#search-form input[type=search]:focus,
#search-menu-form:hover input[type=search],
#search-menu-form input[type=search]:focus {
    width: 120px;
    outline: none;
    transition: var(--fast);
    transition-delay: 200ms;
}
#search-form button,
#search-menu-form button {
    flex-grow: 0;
    flex-shrink: 0;
    display: block;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 0;
    outline: 0;
}
@media screen and (max-width:1199px)
{
    #search-form,
    #search-menu-form {
        display: none;
    }
}



/* SEARCH - mobile */
#mobile-search {
    position: absolute;
    display: block;
    right: .8rem;
    top: 3.8rem;
    z-index: 98;
    width: 2.2rem;
    height: 2.2rem;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
#mobile-search svg {
    position: absolute;
    display: block;
    left: 50%;
    top: 50%;
    width: 1.2rem;
    height: auto;
    transform: translateX(-55%) translateY(-50%);
}
@media screen and (min-width:1000px)
{
    #mobile-search {
        display: none;
    }
}




/* BUTTONS */
#actions {
    display: flex;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
}

#actions a {
    display: block;
    padding: 5px 10px;
    margin: 0 10px ;
    border-width: 2px;
    border-style: solid;
    border-color: var(--drc-red);
    border-radius: var(--soft);
    box-shadow: var(--shadow);
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .3px;
    text-decoration: none;
    text-shadow: 1px white;
    color: var(--drc-red);
    background: transparent;
    cursor: pointer;
    transition: var(--fast);
}

#actions a:hover {
    color: white;
    background: var(--drc-red);
}

#actions a svg {
    height: 1em;
    width: auto;
    margin-right: 3px;
    display: inline-block;
    transform: translateY(2px);
    fill: var(--drc-red);
}

#actions a:hover svg {
    fill: white;
}

#actions a div {
    display: inline-block;
}

@media screen and (max-width: 1000px)
{
    #actions {
        display: none;
    }
}




/* SITE SWITCH toggle */
#sites-toggle {
    display: none;
}

#sites-toggle + label {
    position: relative;
    display: block;
    z-index: 99;
    height: 20px;
    margin: 0 16px;
}

#sites-toggle + label svg {
    position: absolute;
    top: 0;
    left: 0;
    fill: black;
}

#sites-toggle + label svg:nth-of-type(1) {
    opacity: 1;
}

#sites-toggle + label svg:nth-of-type(2) {
    opacity: 0;
}

#sites-toggle:checked + label svg:nth-of-type(1) {
    opacity: 0;
}

#sites-toggle:checked + label svg:nth-of-type(2) {
    opacity: 1;
}

@media screen and (max-width: 1000px)
{
    #sites-toggle + label {
        position: absolute;
        right: .8rem;
        top: .8rem;
        z-index: 100;
        width: 2.2rem;
        height: 2.2rem;
        padding: 1rem;
        margin: 0;
        background: white;
        border-radius: 50%;
        box-shadow: var(--shadow);
    }

    #sites-toggle + label svg {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        display: block;
        width: 1.2rem;
        height: auto;
        fill: black !important;
    }
}




/* SITE SWITCH content */
#sites-menu {
    position: fixed;
    display: block;
    overflow-y: auto;
    right: calc(-100% - 10px);
    top: 0;
    z-index: 88;
    width: 300px;
    max-width: 100%;
    height: 100%;
    padding: 32px;
    margin: 0;
    box-shadow: var(--shadow);
    background: var(--bright-green-20);
    color: black;
    transition: var(--slow);
}

#sites-toggle:checked ~ #sites-menu {
    right: 0;
}

#sites-menu .menu-heading {
    margin: 16px 0;
    font-size: 24px;
    font-weight: 300;
}

#sites-menu ul,
#sites-menu li {
    list-style-type: none;
}

#sites-menu ul {
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
}

#sites-menu li {
    display: block;
    padding: 0;
    margin: 16px 0;
    transition: var(--fast);
}

#sites-menu a,
#sites-menu a:hover {
    color: inherit;
    text-decoration: none;
}

#sites-menu .site-name {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .5px;
}

#sites-menu .site-call {
    font-weight: 400;
    font-size: 13px;
}

#sites-list {
    list-style: none;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
}

#sites-list > li {
    list-style: none;
    display: block;
    width: 100%;
    height: auto;
    padding: .5rem 0;
    margin: 0;
    position: relative;
    transition: var(--fast);
    opacity: .9;
}

#sites-list > li:hover {
    opacity: 1;
}

#sites-list .site-title {
    font-weight: 900;
    font-size: 1rem;
    margin-bottom: -.25em;
    text-transform: uppercase;
}

#sites-list .site-descr {
    font-weight: 400;
    font-size: .8rem;
    margin-bottom: -.25em;
}

.sites-head {
    font-weight: 300;
    font-size: 1.6rem;
    margin-bottom: 1.6rem;
}




/* DRAWER CLOSE BUTTON */
#local-menu .close {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 0 40px 0;
    transition: var(--slow);
}

#local-menu .close:hover {
    transform: rotate(90deg);
    transition: var(--slow);
}

#local-menu .close svg {
    fill: black;
}




/* MOBILE LANGUAGE */
@media screen and (max-width:999px)
{

    #language 
    {
        display: none;
    }
    
    label[for="language"] 
    {
        position: fixed;
        padding: 0;
        text-transform: uppercase;
        font-weight: 900;
        text-align: center;
        display: block;
        width: 2.2rem;
        height: 2.3rem;
        top: 9.8rem;
        right: .8rem;
        background: white;
        z-index: 100;
        border-radius: 50%;
        box-shadow: var(--box-shadow);
    }
    
    label[for="language"] svg 
    {
        display: block;
        width: 70%;
        height: 70%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    #language ~ ul 
    {
        list-style: none;
        display: none;
        height: 2.2rem;
        width: auto;
        position: fixed;
        top: 9.8rem;
        right: 3.8rem;
        background: white;
        flex-flow: row nowrap;
        justify-content: center;
        align-items: center;
        padding: 0 1.1rem;
        border-radius: 1.1rem;
        z-index: 101;
        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;
    }

}


/* DESKTOP LANGUAGE */
@media screen and (min-width: 800px)
{
    
    #language 
    {
        display: none;
    }
    
    label[for="language"]
    {
        position: relative;
        padding: 0 0 0 1rem;
        text-transform: uppercase;
        font-weight: 900;
        text-align: center;
    }
    
    label[for="language"] > svg
    {
        display: block;
        width: 20px;
        height: 20px;
    }
    
    label[for="language"] ~ ul 
    {
        display: none;
        position: absolute;
        flex-flow: column nowrap;
        list-style: none;
        top: 3rem;
        right: 24px;
        width: 3rem;
        height: auto;
        padding: 1rem 0 0 0;
        margin: 0;
        background: white;
        text-align: center;
        transform: translateX(-25%);
        z-index:100;
    }
    
    #language:checked ~ ul 
    {
        display: flex;
        animation-name: fade-in;
        animation-duration: 500ms;
        animation-iteration-count: 1;
        animation-fill-mode: both;
    }
    
    label[for="language"] ~ ul > li 
    {
        padding: .25rem .5rem;
    }
    
    label[for="language"] ~ ul > li > a 
    {
        font-weight: 900;
        text-decoration: none;
        color: black;
    }

}
