:root {
    --wavecrest-navbar-height: 120px;
    --wavecrest-navbar-hidden-shift: 58px;
    --wavecrest-admin-bar-height: 0px;
}

body.admin-bar {
    --wavecrest-admin-bar-height: 32px;
}

#navbar {
    width: 100%;
    height: 120px;
    background-color: var(--pr-clr);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 110;

    position: fixed;

    /* bleibt IMMER 0 */
    top: 0 !important;
    left: 0;

    /* Safari stabiler */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);

    transition: transform .3s ease;
    -webkit-transition: -webkit-transform .3s ease;

    will-change: transform;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}


/* Desktop */
#navbar.nav-hidden {
    transform: translate3d(0, -58px, 0);
    -webkit-transform: translate3d(0, -58px, 0);
}

body.admin-bar #navbar {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar #navbar {
        top: 46px !important;
    }

    body.admin-bar {
        --wavecrest-admin-bar-height: 46px;
    }
}


/* Mobile / Tablet */
@media(max-width: 1250px) {
    :root {
        --wavecrest-navbar-height: 84px;
        --wavecrest-navbar-hidden-shift: 84px;
    }

    #navbar{
        height: 84px;
    }

    #navbar.nav-hidden {
        transform: translate3d(0, -84px, 0);
        -webkit-transform: translate3d(0, -84px, 0);
    }

}



.nav-content{
    display: flex;
    justify-content: space-between;
    gap: 3em;
    align-items: center;
    height: 100%;
    padding: var(--page-padding);
}

.logo-holder{
    cursor: pointer;
    height: 90px;
    transition: all .3s ease;
    z-index: 100;
}
.logo-holder img{
    height: 100%;
    width: auto;
}
.logo-holder.active{
    height: 60px;
    padding: 10px 0;
    width: auto;
    align-self: end;
}

.nav-right{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.nav-right .top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2em;
    width: 100%;
}

.nav-right .top .search{
    display: flex;
    height: 40px;
    width: 100%;
}

.nav-right .top .search label{
    flex: 1;
    min-width: 0;
}

.nav-right .top .search .icon-box{
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--ac-d-clr);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
}
.nav-right .top .search .icon-box:focus-visible{
    background-color: var(--txt-clr);
}

@media (hover: hover) and (pointer: fine) {
    .nav-right .top .search .icon-box:hover {
        background-color: var(--txt-clr);
    }
}

@media (hover: none), (pointer: coarse) {
    .nav-right .top .search .icon-box:active {
        background-color: var(--txt-clr);
    }
}

.nav-right .top .search .icon-box svg{
    width: 67%;
    height: auto;
}
.nav-right .top .search .icon-box svg path{
    fill: var(--pr-clr);
}

.nav-right .top .search input{
    height: 100%;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 0 10px;
    border: var(--border);
    transition: border .4s ease;
    width: 100%;
}
.nav-right .top .search input:focus{
    border: 1px solid var(--ac-d-clr);
}

.nav-right .top .search .icon-box:focus-visible,
.nav-right .top .search input:focus-visible{
    box-shadow: 0 0 0 3px rgb(7 65 98 / 22%);
}


.nav-right .top .nav-phone{
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.nav-right .top .nav-phone svg{
    height: 30px;
    width: auto;
}

.nav-right .top .nav-phone svg path{
    fill: var(--ac-d-clr);
    transition: color .3s ease;
}

.nav-right .top .nav-phone p{
    font-size: 30px;
    font-weight: 900;
    min-width: max-content;
    transition: color .3s ease;
}

.nav-right .top .nav-phone:hover > p,
.nav-right .top .nav-phone:hover > svg path{
    color: var(--txt-clr);
    fill: var(--txt-clr);
}




.nav-list{
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-list li > a{
    padding: 5px 0 14px;
    transition: color .3s ease;
}

.nav-list li:hover > a{
    color: var(--txt-clr);
}

.dropdown-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 1px;
    transform: rotate(45deg);
    margin-left: 4px;
    margin-bottom: 3px;
    transition: transform .3s ease;
}

.dropdown-item {
    position: relative;
}

.dropdown-item:hover .dropdown-arrow{
    transform: rotate(225deg);
}

.dropdown-menu {
    position: absolute;
    top: 125%;
    left: 0;

    width: 100%;
    min-width: max-content;
    border: var(--border);
    border-radius: var(--radius-small);

    background: white;

    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;

    z-index: 100;
}

.dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu a{
    width: 100%;
    padding: 14px 20px;
    transition: all .2s ease;
}
.dropdown-menu a:hover{
    color: var(--txt-clr);
    background-color: var(--bg-clr);
}


.burger{
    display: none;
    width: 40px;
    min-width: 40px;
    height: 30px;
    position: relative;
    cursor: pointer;
    z-index: 102;
}
.burger .bar{
    width: 100%;
    height: 6px;
    border-radius: 2px;
    background-color: var(--ac-d-clr);
    transition: all .3s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.burger .bar:nth-of-type(1){
    top: 10%;
}
.burger .bar:nth-of-type(3){
    top: 90%;
}

.burger:focus-visible .bar{
    background-color: var(--txt-clr);
}

@media (hover: hover) and (pointer: fine) {
    .burger:hover .bar {
        background-color: var(--txt-clr);
    }
}

@media (hover: none), (pointer: coarse) {
    .burger:active .bar {
        background-color: var(--txt-clr);
    }
}

@media(max-width: 1250px) {
    .nav-content{
        gap: 0;
    }

    .logo-holder{
        height: 84px;
        padding: 10px 0;
    }

    .nav-phone p{
        display: none;
    }

    .burger{
        display: inherit;
    }
    .burger.active .bar:nth-of-type(1){
        top: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }
    .burger.active .bar:nth-of-type(2){
        transform: scale(0);
        transition: .2s;
    }
    .burger.active .bar:nth-of-type(3){
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
    }


    .nav-list_wrapper{
        height: 100dvh;
        width: 350px;
        max-width: 100%;
        position: fixed;
        top: 0;
        right: 0;
        background-color: var(--pr-clr);
        border-left: var(--border);
        transition: transform .4s ease;
        transform: translateX(100%);
    }
    .nav-list_wrapper.active{
        transform: translateX(0) !important;
    }
    .nav-list {
        display: block;
        margin-top: 90px;
        width: 100%;
        gap: 0;

        height: calc(100dvh - 90px);

        overflow-y: auto;
        overflow-x: hidden;

        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .nav-list li{
        width: 100%;
        height: max-content;
        border-top: var(--border);
    }
    .nav-list li:last-of-type{
        border-bottom: var(--border);
    }
    .nav-list li > a{
        width: 100%;
        display: flex;
        align-items: center;
        padding: 20px 14px;
    }
    .nav-list li:hover > a{
        background-color: var(--bg-clr);
    }


    /* MOBILE DROPDOWNS */

    .dropdown-arrow{
        margin-left: 10px;
    }

    .nav-list .dropdown-item {
        position: relative;
    }

    /* Desktop-Dropdown für Mobile überschreiben */
    .nav-list .dropdown-menu {
        position: static;

        width: 100%;
        min-width: 0;

        border: none;
        border-radius: 0;

        max-height: 0;
        overflow: hidden;

        opacity: 0;
        visibility: hidden;

        transform: none;

        transition:
                max-height .35s ease,
                opacity .25s ease,
                visibility .25s ease;
    }

    /* Desktop-Hover auf Mobile deaktivieren */
    .nav-list .dropdown-item:hover .dropdown-menu {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transform: none;
    }

    /* Desktop-Pfeil-Hover ebenfalls deaktivieren */
    .nav-list .dropdown-item:hover .dropdown-arrow {
        transform: rotate(45deg);
    }

    /* Geöffnetes Dropdown */
    .nav-list .dropdown-item.open .dropdown-menu {
        max-height: 400px;
        opacity: 1;
        visibility: visible;
    }

    /* Pfeil bei geöffnetem Dropdown */
    .nav-list .dropdown-item.open .dropdown-arrow {
        transform: rotate(225deg);
    }

    /* Unterpunkte */
    .nav-list .dropdown-menu a {
        padding: 12px 28px;
        width: 100%;
    }
}

@media(max-width: 950px) {
    .nav-right .search{
        justify-content: flex-end;
    }

    .nav-right .search label{
        display: none;
    }

    .nav-right .search .icon-box{
        border-radius: var(--radius-small);
    }

    .nav-right .top .search.is-open{
        position: fixed;
        top: 84px;
        left: 0;
        width: 100%;
        height: 64px;
        padding: 12px max(1em, calc((100vw - var(--mw)) / 2 + 2em));
        background-color: var(--pr-clr);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        z-index: 101;
    }

    body.admin-bar .nav-right .top .search.is-open{
        top: 130px;
    }

    .nav-right .top .search.is-open label{
        display: block;
        flex: 1;
    }

    .nav-right .top .search.is-open .icon-box{
        border-radius: var(--radius-small) 0 0 var(--radius-small);
    }

    .nav-right .top .search.is-open input{
        display: block;
        border-radius: 0 var(--radius-small) var(--radius-small) 0;
        border-left: 0;
    }
}


@media(max-width: 700px) {
    .nav-right .top{
        gap: 10px;
    }

    .nav-right .top .search.is-open{
        padding-right: 1em;
        padding-left: 1em;
    }
}

@media(max-width: 600px){
    .logo-holder{
        height: 60px;
    }

    .nav-list_wrapper{
        width: 100%;
    }
}



.nav-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100dvh;

    background-color: rgba(0, 0, 0, 0.55);

    opacity: 0;
    visibility: hidden;

    transition:
            opacity .4s ease,
            visibility .4s ease;

    z-index: 98;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}


body.menu-open {
    overflow: hidden;
}





/* footer */

footer{
    background-color: var(--txt-clr);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content{
    padding: var(--section-padding);
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    column-gap: 30px;
    row-gap: 60px;
}

.footer-list{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-list a{
    transition: all .3s;
}

.footer-list a:hover{
    text-decoration: underline;
}

.footer-list button{
    margin-top: 10px;
}


.footer-content img{
    width: 100%;
    height: auto;
}

footer .bottom{
    padding: var(--page-padding);
    display: flex;
    justify-content: center;
    border-top: 1px solid #202020;
    padding-top: 1em;
    padding-bottom: 1em;
}


@media(max-width: 1000px){
    .footer-content{
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width: 600px){
    .footer-content{
        grid-template-columns: 1fr;
    }
}
