/*****************************************************************************************
Datei:  navigation.css
*****************************************************************************************/

@charset "UTF-8";

/*****************************************************************************************
Navigation mit "nav-toggle" ein- und ausklappen
*****************************************************************************************/
html {
    /* Hinweis: --nav-toggle--height und --nav-toggle--bar sollten gerade (Zahl) sein */
    --nav-toggle-width: 22px;
    --nav-toggle-height: 16px;
    --nav-toggle-bar: 2px;
}

.nav-toggle__button {
    display: none;
}

.nav-toggle__icon {
    /* Position des 'Hamburgers' */
    margin-top: auto;
    margin-bottom: auto;

    width: var(--nav-toggle-width);
    height: var(--nav-toggle-height);
    position: relative;
    display: block;
    cursor: pointer;
}

.nav-toggle__style,
.nav-toggle__style:before,
.nav-toggle__style:after {
    width: 100%;
    height: var(--nav-toggle-bar);
    left: 0;
    position: absolute;
    background-color: currentColor;
    border-radius: 1px;
}

.nav-toggle__style {
    top: calc(var(--nav-toggle-height) / 2 - var(--nav-toggle-bar) / 2);
    transition: background .05s ease-out;
}

.nav-toggle__style:before {
    top: calc((var(--nav-toggle-height) / 2 - var(--nav-toggle-bar) / 2) *-1);
    content: "";        
    transition: all .2s ease-out;
}

.nav-toggle__style:after {
    top: calc(var(--nav-toggle-height) / 2 - var(--nav-toggle-bar) / 2);
    content: "";        
    transition: all .2s ease-out;
}

.nav-toggle__button:checked ~ .nav {
    height: 100vh;
}

.nav-toggle__button:checked ~ .nav-toggle__icon .nav-toggle__style {
    background: transparent;
}

.nav-toggle__button:checked ~ .nav-toggle__icon .nav-toggle__style:before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle__button:checked ~ .nav-toggle__icon .nav-toggle__style:after {
    top: 0;
    transform: rotate(-45deg);
}

/*  LG :: ab 1024px = 64em */
/*  nav-toggle verstecken  */
@media screen and (min-width: 1024px) {
    .nav-toggle__icon {
        display: none;
    }
}

/*****************************************************************************************
Navigation gestalten
*****************************************************************************************/
.nav ul {
    margin: 0;
    padding: 0;
    display: flex;

    color: inherit;
    cursor: default;
}

nav li {
    list-style-type: none;
}

.nav a,
.nav strong {
    display: block;
    font-weight:inherit;
    font-weight: 600;
    color: var(--NAV-text-color);
    text-decoration: none;
    outline: 0;
}

.nav .active,
.nav .trail {
    color: var(--NAV-text-color-active);
}

.nav a:hover,
.nav a:focus {
    color: var(--NAV-text-color-hover);
}

/*  LG :: bis 1024px = 64em >> 1023px = 63,9375em */
@media screen and (max-width: 1023px) {
    .nav {
        height: 0;
        transition: height .5s ease-out;
    }

    .nav ul {
        margin-top: 1em;
        flex-direction: column;
    }

    .nav li {
        border-top: 0.0625em solid var(--NAV-border-color-active);
    }
 
    .nav li:first-of-type {
        border-top: none;
    }
    .nav a,
    .nav strong {
        padding: 1em 1em 0.25em 0;
        text-align: left;
    }
}

/*  LG :: ab 1024px = 64em */
@media screen and (min-width: 1024px) {
    .nav,
    .nav-toggle__button:checked ~ .nav {
        height: auto;
    }

    .nav ul {
        margin-top: 1.625em;
        flex-direction: row;
        /* wrap - so läuft die Navigation nicht in das Logo! */
        flex-wrap: wrap;
    }

    .nav li {
        margin: 0 0.75em;
    }

    .nav li:first-of-type {
        margin-left: 0;
    }
    
    .nav li:last-of-type {
        margin-right: 0;
    }

    .nav a,
    .nav strong {
        padding: 0.5em 0;
        border-bottom: 0.125em solid var(--NAV-border-color);
        text-align: center;
    }

    .nav li.active,
    .nav li.trail {
        border-bottom: 0.125em solid var(--NAV-border-color-active);
    }

    .nav a:hover{
        border-bottom: 0.125em solid var(--NAV-border-color-hover);

    }

}
