/* =====================================================================
   VITALITAS – Custom Navigation v2
   Fixe Glas-Leiste (volle Breite) + Mega-Menü + Mobile-Vollbild
   Palette & Look 1:1 aus der Startseite. KEINE Font-Ladung – Montserrat
   kommt aus deiner globalen style.css; hier nur als Fallback-Hinweis.
   ===================================================================== */

:root {
    /* --- Marken-Tokens (aus Startseite) --- */
    --vt: #69A58F;
    --vt-lt: #8FBCA9;
    --vt-dp: #2E5A4C;
    --vt-dk: #16261F;
    --brass: #C3A265;
    --brass-lt: #E0C99E;
    --cream: #EFEAE0;
    --paper: #F4EFE6;
    --ink: #22241F;
    --ink-soft: #5F6259;
    --ink-mute: #8A8C82;

    --vit-txt: rgba(244, 239, 230, .86);
    /* Bar-Text hell */
    --vit-txt-h: #fff;
    --vit-glass: linear-gradient(to bottom, rgba(24, 40, 33, .62), rgba(16, 28, 23, .46));
    --vit-mega-bg: rgba(248, 245, 239, .97);
    --vit-hair-l: rgba(34, 36, 31, .10);
    /* dunkle Haarlinie (heller Grund) */
    --vit-hair-d: rgba(255, 255, 255, .14);
    /* helle Haarlinie (dunkler Grund) */
    --glass-sdw: 0 24px 60px -20px rgba(46, 90, 76, .26), 0 2px 8px rgba(34, 36, 31, .05);

    --vit-sans: "Montserrat", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --vit-wrap: 1240px;
    --vit-gut: clamp(20px, 4vw, 48px);
    --vit-navh: 74px;
    /* Bar-Höhe (für Content-Offset) */
    --vit-ease: cubic-bezier(.22, .68, 0, 1);
}

/* Divi gibt seinen Header in header.php gar nicht mehr aus – kein display:none nötig.
   Nur den evtl. von Divi reservierten Fixed-Nav-Abstand neutralisieren: */
#page-container {
    padding-top: 0 !important;
}

/* Content-Offset: nur auf Unterseiten (Startseite hat Hero unter der Bar) */
body:not(.home):not(.front-page) #et-main-area {
    padding-top: var(--vit-navh);
}

body.vit-nav-open {
    overflow: hidden;
}

.vit-wrap {
    max-width: var(--vit-wrap);
    margin-inline: auto;
    padding-inline: var(--vit-gut);
}

.vit-nav a,
.vit-mobile a {
    text-decoration: none;
}

/* =====================================================================
   BAR
   ===================================================================== */
.vit-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding-block: 1.15rem;
    border-bottom: 1px solid transparent;
    transition: padding .45s var(--vit-ease), background .45s, box-shadow .45s, border-color .45s;
    -webkit-font-smoothing: antialiased;
}

.vit-nav-in {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

/* Glas-Zustand: gescrollt ODER Mega offen */
.vit-nav.is-stuck,
.vit-nav.mega-open {
    padding-block: .6rem;
    background: var(--vit-glass);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    border-bottom-color: var(--vit-hair-d);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 12px 40px -20px rgba(6, 14, 11, .55);
}

/* Feiner Brass-Lichtsaum unten */
.vit-nav.is-stuck::after,
.vit-nav.mega-open::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(195, 162, 101, .4) 22%, rgba(195, 162, 101, .4) 78%, transparent);
}

.vit-logo {
    display: inline-flex;
    align-items: center;
}

.vit-logo img {
    height: clamp(28px, 3vw, 38px);
    width: auto;
    display: block;
    transition: height .45s var(--vit-ease);
}

.vit-nav.is-stuck .vit-logo img {
    height: clamp(25px, 2.6vw, 32px);
}

/* Menü */
.vit-menu {
    display: flex;
    align-items: center;
    gap: 1.9rem;
    margin: 0 auto 0 1rem;
    padding: 0;
    list-style: none;
}

.vit-item {
    margin: 0;
}

.vit-has-drop {
    position: relative;
}

.vit-menu>.vit-item>a {
    font-family: var(--vit-sans);
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--vit-txt);
    position: relative;
    padding-block: .35rem;
    display: inline-block;
    transition: color .3s;
}

.vit-menu>.vit-item>a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0;
    background: var(--brass-lt);
    transition: width .4s var(--vit-ease);
}

.vit-menu>.vit-item>a:hover {
    color: var(--vit-txt-h);
}

.vit-menu>.vit-item>a:hover::after {
    width: 100%;
}

/* CTA-Gruppe */
.vit-cta-group {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-left: .5rem;
}

.vit-tel {
    font-family: var(--vit-sans);
    font-size: .9rem;
    font-weight: 600;
    color: var(--paper);
    white-space: nowrap;
}

.vit-btn {
    font-family: var(--vit-sans);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--paper);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 100px;
    padding: .62rem 1.25rem;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: background .3s var(--vit-ease), color .3s, border-color .3s;
}

.vit-btn:hover {
    background: var(--paper);
    color: var(--vt-dp);
    border-color: var(--paper);
}

/* =====================================================================
   MEGA-MENÜ (Desktop, vollbreit, helles Glas)
   ===================================================================== */
.vit-mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--vit-mega-bg);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    backdrop-filter: blur(20px) saturate(1.2);
    border-top: 1px solid rgba(255, 255, 255, .5);
    box-shadow: var(--glass-sdw);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s var(--vit-ease), transform .3s var(--vit-ease), visibility .3s;
}

.vit-nav.mega-open .vit-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.vit-mega-inner {
    padding-block: 2.1rem 1.8rem;
}

.vit-mega-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--vit-hair-l);
}

.vit-mega-title {
    font-family: var(--vit-sans);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--vt-dp);
    letter-spacing: .01em;
}

/* Switch */
.vit-switch {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--vit-hair-l);
    border-radius: 100px;
    background: rgba(255, 255, 255, .5);
}

.vit-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    cursor: pointer;
    border: 0;
    background: transparent;
    font-family: var(--vit-sans);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ink-soft);
    padding: .5rem 1.05rem;
    border-radius: 100px;
    transition: color .25s, background .25s;
}

.vit-switch-btn svg {
    opacity: .7;
    transition: opacity .25s;
}

.vit-switch-btn.is-active {
    background: var(--vt);
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(46, 90, 76, .5);
}

.vit-switch-btn.is-active svg {
    opacity: 1;
}

.vit-switch-btn:not(.is-active):hover {
    color: var(--ink);
}

/* Spalten */
.vit-mega-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.vit-mega-cols[hidden] {
    display: none;
}

.vit-col-title {
    display: block;
    font-family: var(--vit-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: .9rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--vit-hair-l);
}

.vit-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vit-col li a {
    display: block;
    font-family: var(--vit-sans);
    font-size: .94rem;
    font-weight: 400;
    color: var(--ink-soft);
    padding: .42rem 0;
    transition: color .2s, transform .2s;
}

.vit-col li a:hover {
    color: var(--vt-dp);
    transform: translateX(3px);
}

.vit-mega-foot {
    margin-top: 1.6rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--vit-hair-l);
}

.vit-mega-all {
    font-family: var(--vit-sans);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--vt);
    transition: color .25s;
}

.vit-mega-all:hover {
    color: var(--vt-dp);
}

/* Über-uns Dropdown */
.vit-drop {
    position: absolute;
    top: calc(100% + .4rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 250px;
    list-style: none;
    margin: 0;
    padding: .6rem 0;
    background: var(--vit-mega-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 14px;
    box-shadow: var(--glass-sdw);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--vit-ease), transform .25s var(--vit-ease), visibility .25s;
}

.vit-has-drop:hover>.vit-drop,
.vit-has-drop:focus-within>.vit-drop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.vit-drop li a {
    display: block;
    font-family: var(--vit-sans);
    font-size: .92rem;
    color: var(--ink-soft);
    padding: .6rem 1.4rem;
    transition: color .2s, background .2s;
}

.vit-drop li a:hover {
    color: var(--vt-dp);
    background: rgba(105, 165, 143, .10);
}

/* =====================================================================
   MOBILE
   ===================================================================== */
.vit-burger {
    display: none;
}

.vit-mobile {
    display: none;
}

@media (max-width:900px) {

    .vit-menu,
    .vit-cta-group,
    .vit-mega {
        display: none !important;
    }

    .vit-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 0 10px;
        background: transparent;
        border: 0;
        cursor: pointer;
        z-index: 100001;
    }

    .vit-burger span {
        display: block;
        width: 24px;
        height: 1.5px;
        background: var(--paper);
        border-radius: 2px;
        transition: opacity .2s;
    }

    body.vit-nav-open .vit-burger {
        opacity: 0;
        pointer-events: none;
    }

    /* Vollflächiges Panel – dunkelgrünes Glas */
    .vit-mobile {
        display: flex;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        background: linear-gradient(165deg, #1a2e26 0%, #101c17 100%);
        -webkit-backdrop-filter: blur(28px) saturate(180%);
        backdrop-filter: blur(28px) saturate(180%);
        transform: translateX(100%);
        transition: transform .4s var(--vit-ease);
        z-index: 100000;
        visibility: hidden;
    }

    .vit-mobile.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .vit-mobile-head {
        display: flex;
        justify-content: flex-end;
        padding: 16px 20px 4px calc(16px + env(safe-area-inset-top, 0px));
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
        flex: 0 0 auto;
    }

    .vit-mobile-close {
        background: transparent;
        border: 0;
        cursor: pointer;
        color: var(--paper);
        padding: 8px;
    }

    .vit-mobile-nav {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 16px;
    }

    .vit-mobile-nav>ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .vit-mobile-nav>ul>li {
        border-bottom: 1px solid var(--vit-hair-d);
    }

    .vit-m-link {
        display: block;
        text-align: center;
        font-family: var(--vit-sans);
        font-size: 1.32rem;
        font-weight: 500;
        color: var(--paper);
        padding: 1.15rem 1.4rem;
        letter-spacing: .01em;
    }

    /* Top-Akkordeon (Behandlungen / Über uns) */
    .vit-m-accbtn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .9rem;
        position: relative;
        background: transparent;
        border: 0;
        cursor: pointer;
        font-family: var(--vit-sans);
        font-size: 1.32rem;
        font-weight: 500;
        color: var(--paper);
        padding: 1.15rem 3rem;
    }

    .vit-m-plus {
        position: absolute;
        right: 1.6rem;
        top: 50%;
        transform: translateY(-50%);
        width: 17px;
        height: 17px;
    }

    .vit-m-plus--sm {
        width: 14px;
        height: 14px;
        right: 1.4rem;
    }

    .vit-m-plus::before,
    .vit-m-plus::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        background: rgba(244, 239, 230, .6);
        transition: transform .3s var(--vit-ease), opacity .3s;
    }

    .vit-m-plus::before {
        width: 100%;
        height: 1.5px;
        transform: translate(-50%, -50%);
    }

    .vit-m-plus::after {
        width: 1.5px;
        height: 100%;
        transform: translate(-50%, -50%);
    }

    .vit-m-acc.is-open>.vit-m-accbtn .vit-m-plus::after {
        transform: translate(-50%, -50%) rotate(90deg);
        opacity: 0;
    }

    .vit-m-acc.is-open>.vit-m-accbtn {
        color: var(--vt-lt);
    }

    .vit-m-panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height .45s var(--vit-ease);
    }

    .vit-m-acc.is-open>.vit-m-panel {
        max-height: 3000px;
    }

    /* Switch mobil */
    .vit-switch--mobile {
        align-self: center;
        margin: 1rem auto .4rem;
        background: rgba(255, 255, 255, .06);
        border-color: var(--vit-hair-d);
    }

    .vit-switch--mobile .vit-switch-btn {
        color: rgba(244, 239, 230, .7);
    }

    .vit-switch--mobile .vit-switch-btn.is-active {
        background: var(--vt);
        color: #fff;
    }

    .vit-m-set {
        padding: .2rem 0 .6rem;
    }

    .vit-m-set[hidden] {
        display: none;
    }

    .vit-m-set--flat {
        display: flex;
        flex-direction: column;
        padding: .2rem 0 1rem;
    }

    .vit-m-set--flat>a {
        font-family: var(--vit-sans);
        font-size: 1rem;
        color: rgba(244, 239, 230, .72);
        text-align: center;
        padding: .7rem 1.4rem;
    }

    .vit-m-set--flat>a:active {
        color: var(--paper);
    }

    /* Kategorie-Unterakkordeon (Gesicht/Brust/…) – standardmäßig zu */
    .vit-m-cat {
        border-top: 1px solid rgba(255, 255, 255, .07);
    }

    .vit-m-cat:first-child {
        border-top: 0;
    }

    .vit-m-catbtn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        position: relative;
        background: transparent;
        border: 0;
        cursor: pointer;
        font-family: var(--vit-sans);
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--brass-lt);
        padding: .95rem 3rem;
    }

    .vit-m-cat.is-open .vit-m-catbtn {
        color: #fff;
    }

    .vit-m-cat.is-open .vit-m-plus--sm::after {
        transform: translate(-50%, -50%) rotate(90deg);
        opacity: 0;
    }

    .vit-m-catpanel {
        max-height: 0;
        overflow: hidden;
        transition: max-height .4s var(--vit-ease);
    }

    .vit-m-cat.is-open .vit-m-catpanel {
        max-height: 1200px;
    }

    .vit-m-catpanel>a {
        display: block;
        text-align: center;
        font-family: var(--vit-sans);
        font-size: 1rem;
        color: rgba(244, 239, 230, .72);
        padding: .62rem 1.4rem;
    }

    .vit-m-catpanel>a:active {
        color: var(--paper);
    }

    .vit-m-all {
        display: block;
        text-align: center;
        font-family: var(--vit-sans);
        font-size: .78rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--vt-lt);
        padding: 1.1rem 1.4rem .4rem;
    }

    /* Fuß */
    .vit-mobile-foot {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .8rem;
        padding: 1.1rem 1.4rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--vit-hair-d);
    }

    .vit-m-tel {
        font-family: var(--vit-sans);
        font-size: .95rem;
        font-weight: 600;
        color: var(--vt-lt);
    }

    .vit-btn--block {
        display: block;
        width: 100%;
        max-width: 340px;
        text-align: center;
        padding: .95rem 1.25rem;
    }
}

/* Tablet-Feinschliff */
@media (min-width:901px) and (max-width:1140px) {
    .vit-menu {
        gap: 1.4rem;
    }

    .vit-tel {
        display: none;
    }
}