:root {
    --header-height-large: 120px;
    --header-height-small: 72px;
}

/* Header */
.site-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height-large);
    background: white;
    z-index: 1000;

    transition:
        height 0.35s ease,
        box-shadow 0.35s ease;
}

a[href="https://bauwerk-4.de/#ue"] {
    pointer-events: none;
}

/* Zustand nach Scroll */
.site-header.is-scrolled {
    height: var(--header-height-small);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Navigation */
.nav {
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2em !important;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo,
.logo img {
    height: 120px;
    transition: height 0.35s ease;
}

/* Logo schrumpft mit Header */
.site-header.is-scrolled .logo,
.site-header.is-scrolled .logo img {
    height: 72px;
}

/* Links */
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #222;
    font-weight: 500;
    text-transform: uppercase;
}

/* ========== SUBMENU BASIS ========== */

.menu__item {
    position: relative;
}

/* Der animierte Strich */
.menu__item>a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    /* Abstand unter Text */
    width: 100%;
    height: 2px;
    background-color: #e9df02;

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

/* Hover-Zustand */
.menu__item>a:hover::after {
    transform: scaleX(1);
}

.submenu {
    padding: 5px 0;
    position: absolute;
    top: 150%;
    left: 0;
    min-width: 220px;
    list-style-type: none;

    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    border-top-left-radius: 0;

    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* ========== SICHTBAR ========== */

.menu__item.is-open>.submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========== SUBMENU ITEMS ========== */

.submenu__item>a {
    display: block;
    padding: 5px 20px;
    text-decoration: none;
    color: #222;
    transition: background-color 0.2s ease;
}

/* Der animierte Strich */
.submenu__item>a::after {
    content: "";
    position: absolute;
    left: 20px;
    bottom: 0;
    /* Abstand unter Text */
    width: calc(100% - 40px);
    height: 2px;
    background-color: #e9df02;

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

/* Hover-Zustand */
.submenu__item>a:hover::after {
    transform: scaleX(1);
}

/* =========================
   MOBILE NAV OVERLAY
   ========================= */

nav .hamburger-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

nav .socialmedia {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

nav .imprint {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {

    .hamburger-wrapper {
        display: -webkit-box;
        display: flex;
        list-style: none;
        flex-flow: row nowrap;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        z-index: 999;
    }

    .hamburger-wrapper .hamburger {
        cursor: pointer;
        width: 48px;
        height: 38px;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        display: inline-block;
        background-color: #fff;
    }

    .hamburger-wrapper .hamburger span {
        position: absolute;
        width: 36px;
        height: 4px;
        background-color: #8e8e93;
        display: block;
        left: 6px;
        transition: all 0.3s ease;
        opacity: 1;
    }

    .hamburger-wrapper .hamburger span:first-of-type {
        top: 8px;
    }

    .hamburger-wrapper .hamburger span:nth-of-type(2) {
        top: 17px;
    }

    .hamburger-wrapper .hamburger span:nth-of-type(3) {
        top: 26px;
    }

    nav .hamburger-wrapper {
        display: block;
        opacity: 1;
    }

    nav .socialmedia {
        display: block;
        height: 0;
        opacity: 0;

        transition:
            height 0.35s ease,
            opacity 0.35s ease,
            transform 0.35s ease;
    }

    nav .socialmedia a i {
        font-size: 48px;
        color: #e9df02;
    }

    /* Header als Overlay */
    .site-header {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: #fff;
        overflow-y: auto;
        display: block;
        height: 120px;
        width: 100vw;
    }

    .site-header nav {
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        align-items: normal;
        height: 120px;
        transition:
            height 0.35s ease,
            transform 0.35s ease;
    }

    .site-header.is-open nav {
        height: 100vh;
        flex-direction: column;
    }

    .site-header nav .logo-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 72px;
    }

    .site-header nav .logo-wrapper .logo {
        height: 72px;
        margin: 0;
    }

    .site-header nav .logo-wrapper .logo img {
        width: 72px;
        height: auto;
    }

    .site-header:not(.is-open) nav .nav-links {
        height: 0;
        opacity: 0;

        transition:
            height 0.35s ease,
            opacity 0.35s ease,
            transform 0.35s ease;
    }

    .site-header nav .nav-links {
        flex-direction: column;
    }

    .site-header.is-open nav .nav-links {
        height: auto;
        flex-direction: column;
        margin-top: 24px;
    }

    /* Overlay aktiv (z. B. per JS) */
    .site-header.is-open {
        display: block;
        height: 100vh;
    }

    /* Navigation Layout */
    .nav {
        display: flex;
        flex-direction: row;
        overflow: hidden;
        height: 100%;
        padding: 2rem 1.5rem !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    /* Hauptnavigation */
    .site-header.is-open .nav .nav-links {
        list-style: none;
        margin: 0;
        padding: 0;
        padding-left: 24px;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .site-header.is-open .nav .socialmedia {
        opacity: 1;
        height: auto;
    }

    /* Hauptmenüpunkte */
    .menu__item>a {
        font-size: 1.4rem;
        font-weight: 600;
        text-decoration: none;
        color: #000;
        display: block;
    }

    /* Untermenüs IMMER sichtbar */
    .submenu {
        list-style: none;
        margin: 0 0 0 1rem;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        position: static;
        box-shadow: none;
        opacity: 1;
    }

    .submenu__item a {
        font-size: 1.1rem;
        font-weight: 400;
        text-decoration: none;
        color: #333;
        display: block;
        padding: 5px 0;
    }

    /* Entfernt Desktop-Logik */
    .has-submenu:hover .submenu {
        display: flex;
    }
}






/* ALT !!!! 

/* Mobile Menu 
nav.mobile .level1>li>a {
    padding: 20px 0 0 0 !important;
    font-size: 1.5rem;
    line-height: 1.5;
    color: rgb(60, 60, 60);
}

nav.mobile .submenu {
    padding-left: 10px;
}

header .mobile .wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
    height: 87px;
}

.hamburger-wrapper {
    display: -webkit-box;
    display: flex;
    list-style: none;
    flex-flow: row nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
}

.hamburger-wrapper .hamburger {
    cursor: pointer;
    width: 48px;
    height: 38px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    background-color: #fff;
}

.hamburger-wrapper .hamburger span {
    position: absolute;
    width: 36px;
    height: 4px;
    background-color: #8e8e93;
    display: block;
    left: 6px;
    transition: all 0.3s ease;
    opacity: 1;
}

.hamburger-wrapper .hamburger span:first-of-type {
    top: 8px;
}

.hamburger-wrapper .hamburger span:nth-of-type(2) {
    top: 17px;
}

.hamburger-wrapper .hamburger span:nth-of-type(3) {
    top: 26px;
}

header .mobile .logo {
    width: 192px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 999;
}

header .mobile .logo a {
    display: block;
    padding: 15px 0;
    margin-right: 20px;


}

header .mobile .logo a img {
    width: 100%;
    height: unset;
}

nav.mobile {
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 110px;
    padding-top: 25px;
    position: relative;
    z-index: 999;
    background: white;
    display: none;
}

nav.mobile .container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

nav.mobile .level1 {
    list-style: none;
}

nav.mobile .submenu {
    position: relative;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

nav.mobile .submenu li {
    border-top: 1px solid rgba(60, 60, 60, 0.1);
}

nav.mobile .socialmedia a {
    color: rgb(233, 223, 2);
    font-size: 40px;
}



/* Mobile Menu Display 

@media only screen and (min-width: 768px) {
    .site-header {
        display: inline-block;
    }

    header.mobile {
        display: none;
    }

    nav.mobile {
        display: none;
    }
}

@media (max-width: 767.98px) {
    header .mobile .logo {
        width: 100px;
    }

    main {
        position: absolute;
        top: 0;
        padding-top: 0 !important;
    }

    section.img .loading img {
        height: unset;
    }
}*/