/* ============================================================
   1. HEADER LOGIC & ANIMATION (STICKY)
============================================================ */

#CustomHeader {
    position: relative !important;
    width: 100%;
    z-index: 99999;
}

#CustomHeader.is-sticky {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
    transition: transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000), opacity 0.3s ease;
}

#CustomHeader.is-sticky.is-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

ul#menu-hauptmemue li > a {
    transition: color 0.2s ease !important;
}

/* ============================================================
   2. HEADER STYLING (GENERAL)
============================================================ */

#CustomHeader.is-sticky {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

#CustomHeader .et_pb_menu__menu > nav > ul > li > a,
#CustomHeader.is-sticky .et_pb_menu__menu > nav > ul > li > a {
    padding: 15px 5px !important;
    white-space: nowrap !important;
}

/* ============================================================
   3. CUSTOM BREAKPOINT 1149px (MOBILE MENU + DROPDOWN FIX)
============================================================ */

@media (max-width: 1149px) {
    
    #CustomHeader.is-sticky {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .customHeaderMod .et_pb_menu__menu {
        display: none !important;
    }

    .customHeaderMod .et_mobile_nav_menu {
        display: flex !important;
        align-items: center !important;
        float: none !important;
    }

    .customHeaderMod .et_mobile_menu {
        position: absolute !important;
        top: calc(100% + 20px) !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 9999 !important;

        background-color: #ffffff !important;
        box-shadow: 0 2px 5px rgba(0,0,0,.1) !important;
        padding: 5% !important;
        text-align: center !important;
        list-style: none !important;
    }
    
    #CustomHeader.is-sticky .customHeaderMod .et_mobile_menu {
        top: calc(100% + 8px) !important;
    }
    
    .customHeaderMod .et_mobile_menu li a {
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        font-size: 15px !important;
        color: #495F76 !important;
        border-bottom: 1px solid rgba(0,0,0,.03) !important;
        padding: 10px 5% !important;
        display: block !important;
    }

    .customHeaderMod .et_mobile_menu li a:hover {
        opacity: 0.7;
        background-color: rgba(0,0,0,0.02);
    }
}

/* ============================================================
   4. WORDPRESS ADMIN BAR FIXES
============================================================ */

body.admin-bar #CustomHeader.is-sticky {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar #CustomHeader.is-sticky {
        top: 46px !important;
    }
}

@media (max-width: 600px) {
    body.admin-bar #CustomHeader.is-sticky {
        top: 0 !important;
    }

    body.admin-bar .et_mobile_menu {
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
    }
}

/* ============================================================
   5. FOOTER STYLES (LEGAL MENU)
============================================================ */

.legal-menu {
    width: 100%;
}

.legal-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.legal-menu li + li::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 1);
    margin: 0 14px;
    vertical-align: middle;
    transform: translateY(-1px);
}

.legal-menu a {
    font-weight: 600 !important;
    font-size: 16px !important;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff !important;
    opacity: 1;
    transition: opacity 0.25s ease;
    display: inline-block;
}

.legal-menu a:hover {
    opacity: 0.8;
    color: #fff;
}

.legal-menu .current-menu-item a,
.legal-menu .current_page_item a {
    color: #fff !important;
    opacity: 1 !important;
    text-decoration: underline !important;
}

@media (max-width: 980px) {
    .legal-menu a {
        font-size: 15px !important;
    }
	.legal-menu {
		text-align: center;
}
}

@media (max-width: 767px) {
    .legal-menu a {
        font-size: 14px !important;
    }
}

@media (max-width: 300px) {
    .legal-menu ul {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .legal-menu li + li::before {
        display: none !important;
    }
}