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

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

header {
    position: fixed;
    display: flex;

    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding-left: 15px;
    padding-right: 15px;
    height: 78px;
    background-color: var(--white);
}
.single-ehrensache header,
.page-template-page-ehrensacheloop header {
    background-color: var(--accent-dark-light);
}
.header-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}
@media screen and (min-width: 1290px) {
    .header-content {
        height: 76px;
        gap: 44px;
    }
}
.logo {
    display: block;
    text-decoration: none;
    width: 100%;
    max-width: 214px;
    flex: 0 0 214px;
}

@media screen and (min-width: 768px) {
    .logo {
        max-width: 298px;
        flex: 0 0 298px;
        height: 44px;
    }
}

/*Main-Nav*/

.main-nav-container {
    height: 0;
    z-index: 9;
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    background-color: var(--white);
    transition: opacity 0.25s ease-in-out;
    font-family: var(--sans);
    font-style: normal;
    font-weight: 800;
    font-size: 30px;
    line-height: 1;
    color: #000000;
}
.single-ehrensache .main-nav-container,
.page-template-page-ehrensacheloop .main-nav-container {
    background-color: var(--accent-dark-light);
}
@media screen and (min-width: 1290px) {
    .main-nav-container {
        font-size: 20px;
        line-height: 27px;
        padding-top: 10px;
    }
}
.nav_is_open .main-nav-container {
    position: fixed;
    visibility: visible;
    height: 100vh;
    height: 100dvh;
    opacity: 1;
    top: 78px;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

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

.main-nav-container > .main-nav {
    padding: 35px;
    position: relative;
}

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

@media screen and (min-width: 1290px) {
    .main-nav-ul {
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        gap: 44px;
    }
}

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

.main-nav a {
    display: inline-block;
    position: relative;
    text-align: left;
    text-decoration: none;
    margin-bottom: 35px;
}
@media screen and (min-width: 1290px) {
    .main-nav a {
        margin-bottom: 0;
    }
}
@media (hover: hover) {
    .main-nav a:hover {
        color: var(--black);
    }
    .main-nav a:hover:after {
        content: "";
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 4px;
        background-color: #000;
    }
    .main-nav .current-menu-item > a:hover:after,
    .main-nav .current-menu-ancestor > a:hover:after {
        background-color: var(--primary);
    }
}
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
    color: var(--primary);
}
.main-nav .sub-menu {
    margin-bottom: 19px;
    margin-left: 20px;
}
@media screen and (min-width: 1290px) {
    .main-nav .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
    }
}
@media screen and (min-width: 1290px) {
    .main-nav .sub-menu {
        visibility: hidden;
        pointer-events: none;
        padding-top: 30px;
        text-align: center;
        margin-left: 0;

        left: 50%;
        transform: translateX(-50%);
        background-color: #fff;
        padding-left: 10px;
        padding-right: 10px;
    }
}
@media screen and (min-width: 1290px) and (hover: hover) {
    .main-nav li:hover > .sub-menu {
        visibility: visible;
        pointer-events: all;
    }
}
.main-nav .sub-menu a {
    margin-bottom: 16px;
}

/* Search-icon */

.search-link {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-decoration: none;
    margin-left: auto;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
}
@media screen and (min-width: 1290px) {
    .search-link {
        margin-top: 10px;
        margin-left: 0;
    }
}
/* 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;
    top: 0;
    flex: 0 0 42px;
    width: 42px;
    height: 50px;
    border: none;
    background-color: transparent !important;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 24px 16px;
    outline: none;
}

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

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

.nav-line {
    width: 32px;
    height: 3px;
    background-color: #000;
    left: 0;
    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: 14px;
    -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;
}
