/*
==========
= HEADER =
==========
 */

/*Header stuff (Navigation, Logo etc.)*/

header {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    top: 0;
    z-index: 10;
    background: rgba(239, 236, 235, 0.6);
    -webkit-backdrop-filter: blur(8.5px);
    backdrop-filter: blur(8.5px);
    border-bottom: 1px solid var(--white);
}
header.dt-nav-open {
    background: rgba(239, 236, 235, 0.85);
}
@media (hover: hover) {
    header:hover {
        background: rgba(239, 236, 235, 0.85);
    }
}
@media screen and (min-width: 1000px) {
    :root {
        --header-height: 70px;
    }
    header {
        height: var(--header-height);
        transition: all 0.4s ease;
    }
    .header-main-content:before {
        content: "";
        width: 100%;
        height: 1px;
        background-color: #fff;
        position: absolute;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        display: block;
        top: 69px;
    }
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    height: 70px;
}

@media screen and (min-width: 1000px) {
    .header-main-content {
        flex-direction: row-reverse;
    }
}

.logo {
    position: relative;
    display: block;
    text-decoration: none;
    width: 133px;
    z-index: 10;
}

@media screen and (min-width: 768px) {
    .logo {
        top: 4px;
        width: 150px;
    }
}

/*Main-Nav*/

.main-nav-container {
    position: absolute;
    height: 0;
    z-index: 9;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    background-color: transparent;
    transition: opacity 0.25s ease-out;
    font-weight: 200;
    font-style: var(--light);
    font-size: 24px;
    line-height: 50px;
    letter-spacing: 0.07em;
    padding-left: 30px;
    padding-right: 30px;
}

.nav_is_open .main-nav-container {
    position: fixed;
    visibility: visible;
    height: 100vh;
    height: 100dvh;
    opacity: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #f0eded;
}

@media screen and (min-width: 1000px) {
    .main-nav-container {
        height: auto;
        max-height: none;
        visibility: visible;
        opacity: 1;
        overflow: visible;
        position: relative;
        padding-left: 0;
        padding-right: 0;
    }
}

.main-nav-container > .main-nav {
    padding: 0;
    position: relative;
    top: 184px;
}

@media screen and (min-width: 1000px) {
    .main-nav-container > .main-nav {
        padding: 0;
        position: relative;
        top: auto;
        transform: none;
    }

    .main-nav > ul {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 35px;
    }
}

.main-nav li {
    list-style: none;
}

.main-nav > ul > li {
    position: relative;
    text-transform: uppercase;
    border-bottom: 1px solid var(--white);
}
@media screen and (min-width: 1000px) {
    .main-nav > ul > li {
        position: static;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 20px;
        border-bottom: none;

        font-size: 17px;
        line-height: 30px;
        letter-spacing: 0.07em;
    }

    .main-nav-ul > li > a,
    .main-nav-ul > li > .toggle-btn {
        position: relative;
        display: inline-block;
    }

    .main-nav-ul > li > a::after,
    .main-nav-ul > li > .toggle-btn::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 59px;
        height: 1px;
        background: #000;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.22s ease-out, transform-origin 0s;
        will-change: transform;
    }

    /* Hover – Linie fährt von links nach rechts ein */
    .main-nav-ul > li > a:hover::after,
    .main-nav-ul > li > a:focus-visible::after,
    .main-nav-ul > li > .toggle-btn:hover::after,
    .main-nav-ul > li > .toggle-btn:focus-visible::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    /* Not Hover – Linie fährt von links nach rechts aus */
    .main-nav-ul > li > a:not(:hover):not(:focus-visible)::after,
    .main-nav-ul > li > .toggle-btn:not(:hover):not(:focus-visible)::after {
        transform: scaleX(0);
        transform-origin: right;
    }
    .main-nav-ul > li.current-menu-item > a::after,
    .main-nav-ul > li.current-menu-item > .toggle-btn::after,
    .main-nav-ul > li.current-menu-ancestor > a::after,
    .main-nav-ul > li.current-menu-ancestor > .toggle-btn::after {
        width: 100% !important;
        transform: scaleX(1) !important;
        transform-origin: left !important;
    }
}

.main-nav > ul > li > button {
    text-transform: uppercase;
}
.main-nav a {
    display: block;
    padding: 0;
    text-decoration: none;
}
.toggle-btn {
    font-weight: 200;
    width: 100%;
    text-align: left;
    background-color: transparent !important;
}
@media screen and (min-width: 1000px) {
    .toggle-btn {
        font-size: 17px;
        line-height: 30px;
        letter-spacing: 0.07em;
    }
}
.toggle-extra {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    background-color: transparent !important;
}
@media screen and (min-width: 1000px) {
    .toggle-extra {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
    }
}
.drop-icn {
    position: relative;
    display: block;
    transition: all 0.2s ease-out;
}
li.is_active .toggle-extra > .drop-icn {
    transform: rotate(180deg);
}
/* .main-nav .current-menu-ancestor > a {
    color: #f00;
}

.main-nav .current-menu-item > a {
    color: #0f0;
} */
.sub-menu {
    max-height: 0;
    transition: all 0.2s ease-out;
    overflow: hidden;
}
@media screen and (min-width: 1000px) {
    .sub-menu {
        position: absolute;
        left: 0;
        top: 100%;
        padding-top: 55px;
        opacity: 0;
        transition: all 0.2s ease-out 0s;
    }
}
li.is_active .sub-menu {
    max-height: 300px;
    z-index: 2;
    overflow: visible;
    opacity: 1;
}
@media screen and (min-width: 1000px) {
    li.is_active .sub-menu {
        max-height: 300px;
        z-index: 2;
        overflow: visible;
        opacity: 1;
        transition: all 0.2s ease-out 0.2s;
    }
}
.sub-menu li {
    margin-bottom: 10px;
}

.sub-menu li:first-child {
    padding-top: 17px;
}
.sub-menu li:last-child {
    padding-bottom: 20px;
}
.sub-menu a {
    font-family: var(--sans);
    position: relative;
    font-style: normal;
    font-weight: var(--extralight);
    font-size: 17px;
    line-height: 30px;
    letter-spacing: 0.07em;
    text-transform: none;
    padding: 0;
    /* transition: all 0.3s ease-out; */
}
.sub-menu a:before {
    content: "";
    display: block;
    position: absolute;
    background-color: var(--accent-color);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    left: -20px;
    top: 11px;
    opacity: 0;
    transition: all 0.3s ease-out;
}
@media (hover: hover) {
    .sub-menu a:hover {
        font-weight: 400;
    }
    .sub-menu a:hover:before {
        opacity: 1;
    }
    .sub-menu {
        pointer-events: none;
    }
    li.is_active > .sub-menu {
        pointer-events: auto;
    }

    /* Falls Animations/Fades: trotzdem sofort klickbar */
    li.is_active > .sub-menu {
        visibility: visible;
        opacity: 1;
    }
}
/* Animate Menu Button */

@-webkit-keyframes menutop {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(45deg);
    }
}

@keyframes menutop {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(45deg);
    }
}

@-webkit-keyframes menubottom {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-45deg);
    }
}

@keyframes menubottom {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-45deg);
    }
}

@-webkit-keyframes menutopstart {
    0% {
        transform: rotate(45deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes menutopstart {
    0% {
        transform: rotate(45deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@-webkit-keyframes menubottomstart {
    0% {
        transform: rotate(-45deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes menubottomstart {
    0% {
        transform: rotate(-45deg);
    }
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}
.menu-button {
    z-index: 10;
    display: block;
    position: relative;
    width: 50px;
    height: 50px;
    border: none;
    background-color: transparent !important;
}

.menu-button:focus {
    background-color: transparent;
}

@media screen and (min-width: 1000px) {
    .menu-button {
        display: none;
    }
}

.nav-line {
    width: 36px;
    height: 2px;
    background-color: #000;
    left: auto;
    right: 0;
    margin: 0 auto;
    transform-origin: center center;
    transition: all 0.5s ease-in-out;
}

.line-top {
    position: absolute;
    top: 15px;
    -webkit-animation: menutopstart 0.5s forwards;
    animation: menutopstart 0.5s forwards;
}

.nav_is_open .line-top {
    top: calc(50% - 1px);
    -webkit-animation: menutop 0.5s forwards;
    animation: menutop 0.5s forwards;
}

.line-center {
    position: absolute;
    top: calc(50% - 1px);
    transition: opacity 0.2s ease-in-out 0.2s;
}

.nav_is_open .line-center {
    opacity: 0;
}

.line-bottom {
    position: absolute;
    bottom: 15px;
    -webkit-animation: menubottomstart 0.5s forwards;
    animation: menubottomstart 0.5s forwards;
}

.nav_is_open .line-bottom {
    bottom: calc(50% - 1px);
    -webkit-animation: menubottom 0.5s forwards;
    animation: menubottom 0.5s forwards;
}

.nav-tel {
    display: none;
    position: absolute;
    opacity: 0;
    right: 0;
    top: 145px;
    font-weight: 200;
    font-size: 17px;
    line-height: 30px;
    letter-spacing: 0.07em;
    text-align: right;
    transition: opacity 0.2s ease-in-out 0.1s;
}
@media screen and (min-width: 1000px) {
    .nav-tel {
        display: block;
        pointer-events: none;
    }

    .dt-nav-open .nav-tel {
        opacity: 1;
        pointer-events: all;
    }
}
