/* =========================================================
   DED CUSTOM HEADER 1.1
   ========================================================= */

:root {
    --ded-width: 1340px;

    --ded-white: #ffffff;
    --ded-blue: #CD853F;
    --ded-green: #CD853F;

    --ded-text: #262626;
    --ded-muted: #7A7A7A;

    --ded-topbar: #CD853F;

    --ded-border: rgba(0, 0, 0, .075);

    --ded-panel-top: 92px;
}


/* Alten Header sicher ausblenden */
body.ded-custom-header-active .ekit-template-content-header,
body.ded-custom-header-active .elementor-389,
body.ded-custom-header-active #site-header {
    display: none !important;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.ded-topbar {
    width: 100%;
    height: 30px;

    background: var(--ded-topbar);
}

.ded-topbar-inner {
    width: calc(100% - 40px);
    max-width: var(--ded-width);
    height: 100%;

    margin: 0 auto;
}


/* =========================================================
   HAUPTHEADER
   ========================================================= */

.ded-site-header {
    position: sticky;
    top: 0;

    z-index: 99990;

    width: 100%;

    background: rgba(255, 255, 255, .985);

    border-bottom:
        1px solid var(--ded-border);

    transition:
        background-color .25s ease,
        box-shadow .25s ease;
}

body.admin-bar .ded-site-header {
    top: 32px;
}

.ded-site-header.is-scrolled {
    background: rgba(255, 255, 255, .98);

    box-shadow:
        0 8px 28px rgba(0, 0, 0, .075);
}


/* exakt gleiche Breite wie Elementor Website */
.ded-header-inner {
    width: calc(100% - 40px);
    max-width: var(--ded-width);

    height: 92px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(215px, 1fr)
        auto
        minmax(215px, 1fr);

    align-items: center;

    font-family:
        "Inter Tight",
        Arial,
        sans-serif;

    transition:
        height .25s ease;
}

.ded-site-header.is-scrolled
.ded-header-inner {
    height: 74px;
}


/* =========================================================
   LOGOS
   ========================================================= */

.ded-header-brand {
    justify-self: start;

    min-width: 0;
}

.ded-header-logo {
    display: inline-flex;

    align-items: center;

    text-decoration: none !important;
}

.ded-header-logo-img {
    display: block;

    width: auto;
    height: auto;

    object-fit: contain;

    transition:
        max-width .25s ease,
        max-height .25s ease;
}


/* Desktop eigenes Logo */
.ded-header-logo-desktop {
    display: inline-flex;
}

.ded-header-logo-mobile {
    display: none;
}

.ded-desktop-logo-img {
    max-width: 235px;
    max-height: 72px;
}

.ded-site-header.is-scrolled
.ded-desktop-logo-img {
    max-width: 205px;
    max-height: 58px;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.ded-desktop-nav {
    justify-self: center;
}

.ded-primary-nav,
.ded-primary-nav ul,
.ded-primary-nav li {
    margin: 0;
    padding: 0;
}

.ded-primary-nav ul {
    list-style: none;
}

.ded-primary-nav .ded-menu {
    display: flex;

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

    gap: 1px;
}

.ded-primary-nav .ded-menu > li {
    position: relative;
}

.ded-primary-nav
.ded-menu > li > a {

    display: flex;

    align-items: center;

    gap: 7px;

    min-height: 48px;

    padding: 10px 11px;

    border-radius: 8px;

    color: var(--ded-text) !important;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.15;

    white-space: nowrap;

    text-decoration: none !important;

    transition:
        color .18s ease,
        background-color .18s ease;
}

.ded-primary-nav
.ded-menu > li > a:hover,

.ded-primary-nav
.ded-menu > li.current-menu-item > a,

.ded-primary-nav
.ded-menu > li.current-menu-ancestor > a {

    color: var(--ded-blue) !important;

    background:
        rgba(205, 133, 63, .10);
}


/* kleiner Pfeil */
.ded-primary-nav
.ded-menu >
li.menu-item-has-children >
a::after {

    content: "";

    width: 6px;
    height: 6px;

    margin-top: -3px;

    border-right:
        1.5px solid currentColor;

    border-bottom:
        1.5px solid currentColor;

    transform:
        rotate(45deg);

    transition:
        transform .18s ease;
}

.ded-primary-nav
.ded-menu >
li.menu-item-has-children:hover >
a::after {

    transform:
        translateY(2px)
        rotate(225deg);
}


/* =========================================================
   DROPDOWNS
   WICHTIG:
   KEIN echter Abstand mehr zwischen Menü und Dropdown.
   Dadurch schließt es beim Bewegen der Maus nicht mehr.
   ========================================================= */

.ded-primary-nav .sub-menu {
    position: absolute;

    /*
     * Vorher:
     * top: calc(100% + 10px)
     *
     * Dadurch entstand die tote Hover-Zone.
     */
    top: calc(100% - 1px);
    left: 0;

    min-width: 285px;
    max-width: 360px;

    padding: 9px;

    background: #ffffff;

    border:
        1px solid rgba(0, 0, 0, .075);

    border-radius: 12px;

    box-shadow:
        0 18px 42px
        rgba(0, 0, 0, .12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform:
        translateY(5px);

    transition:
        opacity .17s ease,
        visibility .17s ease,
        transform .17s ease;

    z-index: 99999;
}


/* geöffnet */
.ded-primary-nav
li:hover > .sub-menu,

.ded-primary-nav
li:focus-within > .sub-menu {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0);
}


/* Dropdown Links */
.ded-primary-nav
.sub-menu li {

    position: relative;
}

.ded-primary-nav
.sub-menu li + li {

    margin-top: 2px;
}

.ded-primary-nav
.sub-menu a {

    position: relative;

    display: flex;

    align-items: center;

    min-height: 43px;

    padding:
        9px 12px;

    border-radius: 8px;

    color: var(--ded-text) !important;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;

    text-decoration: none !important;

    transition:
        color .17s ease,
        background-color .17s ease;
}

.ded-primary-nav
.sub-menu a:hover,

.ded-primary-nav
.sub-menu
li.current-menu-item > a,

.ded-primary-nav
.sub-menu
li.current-menu-ancestor > a {

    color: var(--ded-blue) !important;

    background:
        rgba(205, 133, 63, .12);
}


/* Unter-Untermenü */
.ded-primary-nav
.sub-menu
li.menu-item-has-children > a {

    padding-right: 36px;
}

.ded-primary-nav
.sub-menu
li.menu-item-has-children > a::after {

    content: "›";

    position: absolute;

    right: 14px;

    font-size: 20px;
    line-height: 1;

    color: var(--ded-blue);
}


/*
 * Auch hier KEIN 8px Loch mehr.
 * Submenu überlappt um 1px.
 */
.ded-primary-nav
.sub-menu .sub-menu {

    top: -9px;

    left: calc(100% - 1px);

    transform:
        translateX(5px);
}

.ded-primary-nav
.sub-menu
li:hover > .sub-menu,

.ded-primary-nav
.sub-menu
li:focus-within > .sub-menu {

    transform:
        translateX(0);
}


/* =========================================================
   RECHTER BEREICH
   ========================================================= */

.ded-header-actions {
    justify-self: end;

    display: flex;

    align-items: center;

    gap: 9px;
}


/* Mitgliederbereich = Website Grün */
.ded-member-btn {
    display: inline-flex;

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

    gap: 8px;

    min-height: 44px;

    padding:
        0 17px;

    border:
        1px solid var(--ded-green) !important;

    border-radius: 8px;

    background:
        var(--ded-green) !important;

    color:
        #ffffff !important;

    font-family:
        "Inter Tight",
        Arial,
        sans-serif;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none !important;

    box-shadow:
        0 5px 16px
        rgba(205, 133, 63, .18);

    transition:
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.ded-member-btn:hover,
.ded-member-btn:focus {

    background:
        #EE9A49 !important;

    border-color:
        #EE9A49 !important;

    color:
        #ffffff !important;

    transform:
        translateY(-1px);

    box-shadow:
        0 7px 20px
        rgba(205, 133, 63, .20);
}

.ded-member-btn svg {
    flex: 0 0 auto;
}

.ded-member-short {
    display: none;
}


/* Desktop kein Burger */
.ded-menu-toggle {
    display: none;
}


/* =========================================================
   MOBILE PANEL DEFAULT
   ========================================================= */

.ded-mobile-overlay,
.ded-mobile-panel {
    display: none;
}

.ded-menu-toggle,
.ded-mobile-close,
.ded-submenu-toggle {

    appearance: none !important;
    -webkit-appearance: none !important;

    border: 0 !important;
    outline: 0;

    background: transparent !important;

    box-shadow: none !important;
    text-shadow: none !important;

    padding: 0;

    cursor: pointer;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 1100px) {

    .ded-header-inner {
        width:
            calc(100% - 28px);

        height: 72px;

        grid-template-columns:
            minmax(0, 1fr)
            auto;
    }

    .ded-site-header.is-scrolled
    .ded-header-inner {

        height: 64px;
    }


    /* Desktop Logo weg */
    .ded-header-logo-desktop {
        display: none;
    }

    /* eigenes Mobile Logo */
    .ded-header-logo-mobile {
        display: inline-flex;
    }

    .ded-mobile-logo-img {
        max-width: 145px;
        max-height: 52px;
    }

    .ded-site-header.is-scrolled
    .ded-mobile-logo-img {

        max-width: 132px;
        max-height: 46px;
    }


    /* Desktop Menü weg */
    .ded-desktop-nav {
        display: none;
    }


    .ded-header-actions {
        gap: 7px;
    }


    .ded-member-btn {
        min-height: 40px;

        padding:
            0 12px;

        font-size: 13px;
    }

    .ded-member-full {
        display: none;
    }

    .ded-member-short {
        display: inline;
    }


    /* Hamburger */
    .ded-menu-toggle {
        width: 44px;
        height: 44px;

        display:
            inline-flex !important;

        flex-direction: column;

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

        gap: 5px;

        border-radius:
            8px !important;

        background:
            rgba(205, 133, 63, .10) !important;
    }

    .ded-menu-toggle:hover,
    .ded-menu-toggle:focus {

        background:
            rgba(205, 133, 63, .16) !important;
    }

    .ded-menu-toggle span {
        display: block;

        width: 20px;
        height: 2px;

        border-radius: 10px;

        background:
            var(--ded-blue);

        transition:
            transform .22s ease,
            opacity .22s ease;
    }

    .ded-menu-toggle[aria-expanded="true"]
    span:nth-child(1) {

        transform:
            translateY(7px)
            rotate(45deg);
    }

    .ded-menu-toggle[aria-expanded="true"]
    span:nth-child(2) {

        opacity: 0;
    }

    .ded-menu-toggle[aria-expanded="true"]
    span:nth-child(3) {

        transform:
            translateY(-7px)
            rotate(-45deg);
    }


    /* Overlay */
    .ded-mobile-overlay {
        display: block;

        position: fixed;

        top:
            var(--ded-panel-top);

        left: 0;
        right: 0;
        bottom: 0;

        z-index: 99980;

        background:
            rgba(80, 50, 20, .32);

        backdrop-filter:
            blur(2px);

        -webkit-backdrop-filter:
            blur(2px);

        opacity: 0;

        visibility: hidden;
        pointer-events: none;

        transition:
            opacity .22s ease,
            visibility .22s ease;
    }


    /* Panel */
    .ded-mobile-panel {
        display: block;

        position: fixed;

        top:
            var(--ded-panel-top);

        right: 0;
        bottom: 0;

        width:
            min(91vw, 430px);

        z-index: 99985;

        background:
            #ffffff;

        box-shadow:
            -15px 0 45px
            rgba(0, 0, 0, .14);

        transform:
            translateX(105%);

        visibility: hidden;

        transition:
            transform .26s ease,
            visibility .26s ease;

        overflow: hidden;
    }

    body.ded-menu-open
    .ded-mobile-overlay {

        opacity: 1;

        visibility: visible;

        pointer-events: auto;
    }

    body.ded-menu-open
    .ded-mobile-panel {

        transform:
            translateX(0);

        visibility: visible;
    }


    .ded-mobile-panel-inner {
        height: 100%;

        display: flex;
        flex-direction: column;

        overflow-y: auto;

        overscroll-behavior:
            contain;

        font-family:
            "Inter Tight",
            Arial,
            sans-serif;
    }


    /* Panel Kopf */
    .ded-mobile-panel-head {
        min-height: 65px;

        padding:
            0 18px;

        display: flex;

        align-items: center;
        justify-content: space-between;

        border-bottom:
            1px solid var(--ded-border);

        color:
            var(--ded-blue);

        font-size: 17px;
        font-weight: 600;
    }

    .ded-mobile-close {
        width: 42px;
        height: 42px;

        display:
            inline-flex !important;

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

        border-radius:
            8px !important;

        color:
            var(--ded-blue) !important;

        font-size: 28px;
        font-weight: 300;
        line-height: 1;
    }


    /* Navigation */
    .ded-mobile-nav {
        padding:
            9px 17px 20px;
    }

    .ded-mobile-nav ul,
    .ded-mobile-nav li {

        margin: 0;
        padding: 0;

        list-style: none;
    }

    .ded-mobile-nav
    .ded-menu > li {

        position: relative;

        border-bottom:
            1px solid var(--ded-border);
    }

    .ded-mobile-nav a {
        display: flex;

        align-items: center;

        min-height: 52px;

        padding:
            10px 46px
            10px 5px;

        color:
            var(--ded-text) !important;

        font-size: 15.5px;
        font-weight: 550;
        line-height: 1.3;

        text-decoration: none !important;
    }

    .ded-mobile-nav
    .current-menu-item > a,

    .ded-mobile-nav
    .current-menu-ancestor > a {

        color:
            var(--ded-blue) !important;
    }


    /* Mobile Untermenü */
    .ded-mobile-nav .sub-menu {
        display: none;

        padding:
            0 0 9px 14px;

        border-left:
            2px solid
            rgba(0, 157, 73, .25);
    }

    .ded-mobile-nav
    li.is-open > .sub-menu {

        display: block;
    }

    .ded-mobile-nav
    .sub-menu li {

        position: relative;
    }

    .ded-mobile-nav
    .sub-menu a {

        min-height: 44px;

        padding:
            8px 44px
            8px 10px;

        color:
            #4d4d4d !important;

        font-size: 14px;
        font-weight: 500;
    }

    .ded-mobile-nav
    .sub-menu
    .sub-menu {

        margin-left: 7px;

        padding-left: 11px;
    }


    /* Untermenü Pfeil */
    .ded-submenu-toggle {
        position: absolute;

        top: 5px;
        right: 0;

        width: 42px;
        height: 42px;

        z-index: 2;

        display:
            flex !important;

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

        border-radius:
            8px !important;
    }

    .ded-submenu-toggle:hover,
    .ded-submenu-toggle:focus {

        background:
            rgba(205, 133, 63, .10) !important;
    }

    .ded-submenu-toggle::before {
        content: "";

        width: 8px;
        height: 8px;

        border-right:
            1.7px solid
            var(--ded-blue);

        border-bottom:
            1.7px solid
            var(--ded-blue);

        transform:
            translateY(-2px)
            rotate(45deg);

        transition:
            transform .2s ease;
    }

    li.is-open >
    .ded-submenu-toggle::before {

        transform:
            translateY(2px)
            rotate(225deg);
    }


    /* Mitglieder Button unten */
    .ded-mobile-member-wrap {
        margin-top: auto;

        padding: 18px;

        border-top:
            1px solid var(--ded-border);

        background:
            #f7f8fb;
    }

    .ded-mobile-member-btn {
        width: 100%;

        min-height: 48px;

        font-size: 14px;
    }

    .ded-mobile-member-btn span {
        display: inline;
    }
}


/* WordPress Adminbar */
@media (max-width: 782px) {

    body.admin-bar
    .ded-site-header {

        top: 46px;
    }
}


/* kleinere Handys */
@media (max-width: 420px) {

    .ded-header-inner {
        width:
            calc(100% - 20px);
    }

    .ded-mobile-logo-img {
        max-width: 122px;
        max-height: 46px;
    }

    .ded-site-header.is-scrolled
    .ded-mobile-logo-img {

        max-width: 114px;
    }

    .ded-member-btn {
        padding:
            0 9px;

        gap: 5px;

        font-size: 12px;
    }

    .ded-member-btn svg {
        width: 15px;
        height: 15px;
    }

    .ded-menu-toggle {
        width: 41px;
        height: 41px;
    }
}


@media (max-width: 350px) {

    .ded-mobile-logo-img {
        max-width: 102px;
    }

    .ded-member-short {
        font-size: 11px;
    }

    .ded-header-actions {
        gap: 4px;
    }
}


body.ded-menu-open {
    overflow: hidden;
}
