header {
    position: fixed;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 5%;
    z-index: 1000;
}

header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(from var(--primary_color) r g b / 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo_main {
  display: block;
  height: 30px;
  width: auto;
  cursor: pointer;
}

.logo_main:first-child {
margin-right: 10px;
}

nav {
    list-style: none;
    display: inline-block;
    padding: 0px 20px;
    z-index: 100;
}

nav a {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: .5s;
    color: var(--fourthly_color);
    text-decoration: none;
    padding: 6px 20px;
}

nav a span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    border-bottom: 2px solid var(--fourthly_color);
    border-radius: 10px;
    transform: scale(0) translateY(50px);
    opacity: 0;
    transition: .5s;
}

nav a:not(:last-child):hover span {
    transform: scale(1) translateY(0px);
    opacity: 1;
}

nav a.active:not(:last-child) span {
    transform: scale(1) translateY(0px);
    opacity: 1;
    transition: all 0.3s ease;
}

nav a:last-child {
    margin-left: 50px;
    padding: 8px 23px;
    border: none;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
    background: rgb(from var(--fourthly_color) r g b / 1);
    text-align: center;
    color: #cfcfcf;
    transition: 0.3s;
}

nav a:last-child:hover {
    background: rgb(from var(--secondary_color) r g b / 0.8);
}

#check-menu {
    display: none;
}

.icons {
    position: absolute;
    font-size: 2.8rem;
    color: rgb(from var(--fourthly_color) r g b);
    cursor: pointer;
    display: none;
}


/* Footer */

.footer_body {
    display: flex;
    justify-content: center;
    gap: clamp(5rem, calc(7% + 1rem), 10rem);
    background-image: url(/images/header_footer/R3.webp);
    background-size: 1900px;
    background-position: top center;
    background-repeat: repeat-x;
    margin-top: -150px;
}

#footer_second h2, #footer_fourth h2 {
    color: var(--secondary_color);
    font-size: clamp(22px, 4vw, 28px);
    text-align: center;
    margin-bottom: 30px;
}

#footer_first, #footer_second, #footer_fourth {
    margin-top: 350px;
}

#footer_first {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#footer_first img {
    position: relative;
    z-index: 2;
}

#footer_first h2 {
    color: var(--secondary_color);
    font-size: clamp(14px, 2vw, 16px);
    margin-top: auto;
    margin-bottom: 0;    
}

#footer_first h3 {
    color: var(--secondary_color);
    margin-top: 10px;
    font-size: clamp(12px, 1.5vw, 14px);
}

.footer_body h3 {
    font-size: clamp(16px, 3vw, 20px);
    margin-bottom: 30px;
    line-height: 1.3;
    color: var(--fourthly_color);
    transition: 0.1s;
}

.footer_body h3:hover {
    color: var(--secondary_color);
}

.footer_body a {
    text-decoration: none;
    color: var(--fourthly_color);
    text-align: center;
    display: block;
    line-height: 1.2;
    margin-bottom: 10px;
    transition: 0.2s;
}

.footer_body a:hover {
    text-decoration: none;
    color: var(--secondary_color);
}

#footer_fourth {
    flex-direction: row;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links h3 {
    margin-bottom: 0;
}

.footer-links a {
    width: fit-content;
}


.footer-links a:hover h3 {
  color: var(--secondary_color);
}










/* Breakpoints */

@media only screen and (max-width: 1100px) and (min-width: 601px) {
    .icons {
        display: inline-flex;
        right: 5%;
    }

    #check-menu:checked~.icons #menu-icon{
        display: none;
    }

    .icons #close-icon {
        display: none;
    }

    #check-menu:checked~.icons #close-icon{
        display: block;
    }

    nav { /* oberen Header, immer ersichtlich */
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        top: 100%;
        left: 0;
        height: 0;
        width: 100%;
        background: rgba(0, 0, 0, .1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
        overflow: hidden;
        transition: .3s ease;
    }

    #check-menu:checked~nav{ /* pop up menü, nur ersichtlich beim klicken des menü icons */
        height: 26rem;
        background: rgba(0, 0, 0, .1);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    nav a {
        display: block;
        margin: 15px 0;
        text-align: center;
        transform: translateY(-50px);
        opacity: 0;
        transition: .3s ease;
    }

    #check-menu:checked~nav a {
        transform: translateY(0px);
        opacity: 1;
        transition-delay: calc(.10s * var(--i));
    }
    
    nav a:hover span {
    display: none;;
    }

    nav a:last-child {
        margin: 0 150px;
    }



}

@media only screen and (max-width: 860px) {
    .footer_body {
        flex-flow: column-reverse;
        gap: 50px;
        background-image: 
            url(/images/header_footer/R3.webp),
            linear-gradient(to bottom, transparent 0%, black 50%);
    }

    #footer_first img{
        padding-bottom: 100px;
    }

    #footer_first, #footer_second {
        margin: 0;
    }

    #footer_fourth {
        height: fit-content;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 350px;
    }

    #footer_fourth h2 {
        margin-bottom: 40px;
    }

    .footer-links {
        display: flex;
        justify-content: space-around;
        width: 70%;
    }

    #footer_fourth a {
        flex: 1 1 45%;
        text-align: center;
    }
}

@media only screen and (max-width: 600px) {
    header {
        padding: 15px 10%;
    }
    .icons {
        display: inline-flex;
        right: 10%;
    }

    #check-menu:checked~.icons #menu-icon{
        display: none;
    }

    .icons #close-icon {
        display: none;
    }

    #check-menu:checked~.icons #close-icon{
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        height: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.21);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
        overflow: hidden;
        transition: .3s ease;
    }
    
    #check-menu:checked~nav{
        height: 28rem;
        background: rgba(0, 0, 0, 0.51);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    nav a {
        display: block;
        margin: 25px 0;
        text-align: center;
        transform: translateY(-50px);
        opacity: 0;
        transition: .3s ease;
        font-size: 24px;
        font-weight: 600;
    }

    #check-menu:checked~nav a {
        transform: translateY(0px);
        opacity: 1;
        transition-delay: calc(.10s * var(--i));
    }
    
    nav a:hover span {
        display: none;
    }

    nav a:last-child {
        margin: 0 auto;
        width: fit-content;
    }

    .footer-links {
        flex-wrap: wrap;
    }

}