/* ==========================================================================
   Mega Menu – Styles
   - Desktop: Enfold-Overlays neutralisieren, eigenes Overlay-Panel
   - Mobile: Dynamische Toggles/Submenüs
   - Fokus-/Hover-States, Animationen und Responsive-Regeln
   ========================================================================= */

/* =========================
   DESKTOP: Enfold deaktivieren
   ========================= */
@media (min-width: 769px) {
    /* Enfold/Avia Mega-Menu-Container vollständig verstecken */
    .avia_mega_div,
    .avia_mega_menu,
    .avia-menu-overlay,
    .av-main-nav-wrap .avia_mega_div,
    .av-main-nav-wrap .avia_mega_menu,
    .av-main-nav-wrap .avia-menu-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
        pointer-events: none !important;
    }

    /* Native Submenu-Ausgabe der Theme-Navigation abschalten */
    .av-main-nav .menu-item-has-children:hover > .sub-menu,
    .av-main-nav .menu-item-has-children:focus-within > .sub-menu,
    .av-main-nav .sub-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Sicherheit: Submenu absolut nach außen verschieben */
    .av-main-nav .sub-menu,
    .av-main-nav .dropdown_available,
    .av-main-nav .avia-menu-fx,
    .av-main-nav .avia-arrow,
    .av-main-nav .menu-item-has-children .sub-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

/* =========================
   DESKTOP OVERLAY – Basis
   ========================= */
.mega-menu-overlay {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 80px);
    background: #ffffff;
    z-index: 0;
    padding: 30px 0;
    pointer-events: auto;
    max-height: calc(100vh - 400px) !important;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Scrollbar-Optik (WebKit) */
.mega-menu-overlay::-webkit-scrollbar { width: 8px; }
.mega-menu-overlay::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.mega-menu-overlay::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.mega-menu-overlay::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* Scrollbar-Optik (Firefox) */
.mega-menu-overlay {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Fokus-/A11y-Styling auf Links */
.mega-menu-overlay a:focus-visible,
.menu-item.level-0 a:focus-visible {
    outline: 2px solid #9CA91D;
    outline-offset: 2px;
    background-color: rgba(156, 169, 29, 0.1);
}

/* Aktiver Top-Level Menüpunkt, solange Overlay sichtbar ist */
.menu-item.level-0.mega-menu-active > a,
.menu-item.level-0.mega-menu-active > a:hover {
    color: #9CA91D !important;
}

/* Fokus-Outline bei Maus-Klicks entfernen (nur wenn nicht :focus-visible) */
a:focus:not(:focus-visible) {
    outline: none;
    background: none;
}

/* =========================
   DESKTOP OVERLAY – Level 2
   ========================= */
.level-2-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #555;
    text-decoration: none;
}

.level-2-item a:hover,
.level-2-item.level-2-active > a,
.level-2-item:has(.level-3-menu.is-visible) > a,
.level-2-item.has-open-submenu > a {
    color: #9CA91D !important;
    background-color: rgba(156, 169, 29, 0.08) !important;
    font-weight: 600;
}

/* Toggle-Button (Plus) im aktiven Zustand */
.level-2-item.level-2-active .plus-toggle,
.level-2-item.has-open-submenu .plus-toggle {
    background: #9ca91d !important;
    color: white !important;
    transform: rotate(45deg);
}

/* Enfold-spezifische Textfarbe beim aktiven Top-Level-Item */
.menu-item.level-0.mega-menu-active > a .avia-menu-text {
    color: #9CA91D !important;
}

/* =========================
   DESKTOP OVERLAY – Grid/Karten
   ========================= */
.overlay-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.level-1-grid {
    display: grid;
    gap: 30px;
    padding-bottom: 20px;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.level-1-grid > * {
    width: 100%; /* Grid-Zelle vollständig ausfüllen */
    box-sizing: border-box; /* Padding/Margin korrekt berücksichtigen */
}

.level-1-grid > *:only-child {
    max-width: 400px;
    justify-self: center;
}

/* =======================================================
   SONDERREGEL FÜR 5 ODER MEHR KARTEN
   ======================================================= */

/* 1. Deine Regel: Ab dem 5ten Item dürfen alle etwas schmaler werden */
.level-1-grid > :nth-child(n+5) {
    min-width: 150px;
}

/* 2. Der Trigger: Wenn es ein 5tes Item gibt, wird das Overlay breiter! */
.mega-menu-overlay:has(.level-1-grid > :nth-child(5)) {
    width: calc(100vw - 80px);
    max-width: 96vw !important;
}

/* 3. Der innere Inhaltsbereich muss den neuen Platz dann auch nutzen dürfen */
.mega-menu-overlay:has(.level-1-grid > :nth-child(5)) .overlay-content {
    max-width: 100% !important;
}

.mega-menu-overlay:has(.level-1-grid > :nth-child(5)) .level-1-image-wrap {
    aspect-ratio: 672 / 360;
    height: auto !important;
    max-height: none !important;
}


.mega-menu-overlay:has(.level-1-grid > :nth-child(5)) .level-1-item {
    max-width: 330px;
    margin: 0 auto;
}

/* Level-1-Content: alles auf 100% der Grid-Zelle */
.level-1-item,
.level-1-clickable,
.level-1-title,
.level-1-image {
    width: 100%;
    box-sizing: border-box;
}

/* Karten-Design für Level-1 Spalten */
.level-1-item {
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

.level-1-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.level-1-clickable {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Titel-Animationen und Farben */
.level-1-clickable .level-1-title {
    transition: transform 0.18s ease, color 0.18s ease;
    transform-origin: center;
}

/* 1. Titel wird grün, sobald man IRGENDWO in der Karte (Bild, Titel, Liste) ist */
.level-1-item:hover .level-1-title {
    color: #9CA91D !important;
}

/* 2. Titel skaliert NUR, wenn man direkt auf das Bild oder den Titel hovert */
.level-1-clickable:hover .level-1-title {
    transform: scale(1.04);
}

/* 3. Kein Skalieren beim List-Hover, um „Zittern” zu vermeiden */
.level-1-item.list-hover .level-1-title {
    transform: none !important;
}

/* Bild/Typografie der Karten (Purer, flüssiger Crossfade) */
.level-1-image-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.level-1-image,
.level-1-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Etwas schnellerer Fade (0.3s), wirkt responsiver */
    transition: opacity 0.3s ease-in-out;
    /* Zwingt die Grafikkarte (GPU) das Rendering zu übernehmen = 0 Ruckeln */
    will-change: opacity;
}

/* Das Hover-Bild ist anfangs unsichtbar - KEIN ZOOM MEHR */
.level-1-image-hover {
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* Beim Hovern: Nur noch butterweich die Deckkraft (Opacity) auf 100% ziehen */
.level-1-image-hover.is-visible {
    opacity: 1;
}

.level-1-title {
    /* clamp(MIN, WACHSTUM, MAX) -> Startet bei 14px, wächst leicht mit, stoppt bei 17px */
    font-size: clamp(14px, 1vw + 0.3rem, 17px) !important;
    padding: 12px 10px;
    text-align: center;
    color: #222;
    background: #fafafa;
    margin: 0;
}

/* =========================
   DESKTOP OVERLAY – Listen
   ========================= */
.level-2-list { list-style: none; padding: 15px; margin: 0; background: #ffffff; max-height: none; }
.level-2-item { /* spacing optional */ }
.level-2-item a { color: #555; text-decoration: none; font-size: 0.95em; transition: color 0.2s; }
.level-2-item a:hover { color: #9CA91D; }

/* Plus-Toggle (animiertes Icon) */
.plus-toggle {
    float: right;
    cursor: pointer;
    font-weight: bold;
    color: #9ca91d;
    user-select: none;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    background: rgba(156, 169, 29, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plus-toggle:hover {
    background: #9ca91d;
    color: white;
    transform: scale(1.1);
    animation: pulse 0.6s ease-in-out;
}

/* Zustand, wenn Level-3 sichtbar ist */
.level-2-item:has(.level-3-menu.is-visible) .plus-toggle {
    transform: rotate(45deg);
    background: #9ca91d;
    color: white;
}

/* Puls-Animation */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(156, 169, 29, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(156, 169, 29, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(156, 169, 29, 0); }
}

/* Level-3 Liste (eingeklappt/ausgeklappt) */
.level-3-menu {
    margin-left: 20px;
    border-left: 2px solid #9CA91D !important;
    padding-left: 15px;
    margin-top: 10px;
}

.level-3-menu li { margin-bottom: 5px; }
.level-3-menu a { color: #777; font-size: 0.9em; }

/* Anfangszustand (eingeklappt) */
.level-1-grid .level-3-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 5px;
}

/* Sichtbarer Zustand */
.level-1-grid .level-3-menu.is-visible {
    max-height: 800px !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Link-Styling innerhalb Level-3 */
.level-1-grid .level-3-menu li a {
    padding: 5px 10px;
    display: block;
    color: #333;
}
.level-1-grid .level-3-menu li a:hover { background-color: #f0f0f0; }

/* =========================
   MOBILE NAVIGATION
   ========================= */

/* Toggle-Button auf Level-0 */
.mobile-toggle {
    display: inline-block !important;
    position: absolute !important;
    right: 35px !important;
    top: 12px !important;
    transform: none !important;
    width: 30px !important;
    height: 30px !important;
    background: #9ca91d !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    font-size: 16px !important;
    line-height: 30px !important;
    text-align: center !important;
}
.mobile-toggle:hover { background: #7a8517 !important; transform: scale(1.1) !important; }

/* Eltern-Element für absolute Positionierung des Toggles */
li.level-0 { position: relative !important; }

/* Container des mobilen Submenüs */
.mobile-submenu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f8f9fa !important;
    border-top: 1px solid #ddd !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== Mobile Level 1 ===== */
.mobile-level-1-item {
    position: relative !important;
    background: #fff !important;
    min-height: 45px !important;
}
.mobile-level-1-item:last-child { border-bottom: none !important; }

.mobile-level-1-item > a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 15px !important;
    padding-right: 50px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: none !important;
    background: none !important;
    min-height: 45px !important;
    box-sizing: border-box !important;
}
.mobile-level-1-item > a:hover { background: #e9ecef !important; color: #9ca91d !important; }

/* Toggle auf Level 1 */
.mobile-level1-toggle {
    position: absolute !important;
    right: 38px !important;
    top: 12px !important;
    width: 25px !important;
    height: 25px !important;
    background: #9ca91d !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    line-height: 25px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}
.mobile-level1-toggle:hover { background: #7a8517 !important; }

/* ===== Mobile Level 2 ===== */
.mobile-level-2-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.mobile-level-2-item { position: relative !important; min-height: 45px !important; }
.mobile-level-2-item:last-child { border-bottom: none !important; }

.mobile-level-2-item > a {
    display: flex !important;
    align-items: center !important;
    padding: 10px 15px 10px 25px !important;
    padding-right: 50px !important;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    background: none !important;
    border: none !important;
    min-height: 45px !important;
    box-sizing: border-box !important;
}
.mobile-level-2-item > a::before {
    content: '–';
    margin-right: 8px;
    color: #9ca91d;
    font-weight: bold;
}
.mobile-level-2-item > a:hover { background: #e9ecef !important; color: #9ca91d !important; }

/* Toggle auf Level 2 */
.mobile-level2-toggle {
    position: absolute !important;
    right: 39px !important;
    top: 12px !important;
    width: 22px !important;
    height: 22px !important;
    background: #9ca91d !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    line-height: 22px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}
.mobile-level2-toggle:hover { background: #7a8517 !important; }

/* ===== Mobile Level 3 ===== */
.mobile-level-3-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-left: 2px solid #9ca91d !important;
    margin-left: 90px !important;
}
.mobile-level-3-item { position: relative !important; min-height: 40px !important; }
.mobile-level-3-item:last-child { border-bottom: none !important; }

.mobile-level-3-item > a {
    display: flex !important;
    align-items: center !important;
    padding: 8px 15px 8px 35px !important;
    padding-right: 45px !important;
    color: #666 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    background: none !important;
    border: none !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    margin-left:-45px !important;
}
.mobile-level-3-item > a:hover { background: #e0e0e0 !important; color: #9ca91d !important; }

/* Toggle auf Level 3 */
.mobile-level3-toggle {
    position: absolute !important;
    right: 15px !important;
    top: 10px !important;
    width: 20px !important;
    height: 20px !important;
    background: #9ca91d !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    line-height: 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}
.mobile-level3-toggle:hover { background: #7a8517 !important; }

/* ===== Mobile Level 4 ===== */
.mobile-level-4-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #e8e8e8 !important;
    border-left: 2px solid #bbb !important;
}
.mobile-level-4-list li { border-bottom: 1px solid #ddd !important; min-height: 35px !important; }
.mobile-level-4-list li:last-child { border-bottom: none !important; }

.mobile-level-4-list a {
    display: flex !important;
    align-items: center !important;
    padding: 6px 15px 6px 45px !important;
    color: #777 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    background: none !important;
    border: none !important;
    min-height: 35px !important;
    box-sizing: border-box !important;
}
.mobile-level-4-list a:hover { background: #ddd !important; color: #9ca91d !important; }

/* =========================
   RESPONSIVE & SICHERHEIT
   ========================= */
@media (max-width: 768px) {
    /* Desktop-Overlay auf Mobile vollständig ausblenden */
    .mega-menu-overlay { display: none !important; }

    /* Top-Level Toggle sichtbar */
    .mobile-toggle { display: inline-block !important; }

    /* Positionierung für Menüeinträge mit Kindern */
    .menu-item.level-0.menu-item-has-children { position: relative !important; }

    /* Mobile Submenüs im Flow */
    .mobile-submenu { position: static !important; width: 100% !important; box-shadow: none !important; }
}

/* Click-Sicherheit/Usability der Toggle-Buttons */
.mobile-level1-toggle,
.mobile-level2-toggle,
.mobile-level3-toggle {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
}

/* Textauswahl bei Buttons vermeiden */
.mobile-level1-toggle::selection,
.mobile-level2-toggle::selection,
.mobile-level3-toggle::selection { background: transparent !important; }

/* (Doppelter Block – bewusst gleichlautend zur Absicherung bestimmter Build-Ketten) */
@media (max-width: 768px) {
    .mega-menu-overlay { display: none !important; }
    .mobile-toggle { display: inline-block; }
    .menu-item.level-0.menu-item-has-children { position: relative; }
    .mobile-submenu { position: static; width: 100%; box-shadow: none; }
}

/* =========================
   FEINSCHLIFF
   ========================= */
/* Kleinere Screens: Overlay-Höhe anpassen */
@media (max-height: 600px) {
    .mega-menu-overlay {
        top: 150px;
        max-height: calc(100vh - 150px - 20px);
    }
}

/* Sanftes Scrollen im Overlay */
.mega-menu-overlay { scroll-behavior: smooth; }

/* Hover-/Interaktion im Overlay sichern (keine globalen Pointer-Blockaden) */
.mega-menu-overlay * { pointer-events: auto; }

/* --- SCROLL LOCK FIX --- */

/* Wenn diese Klasse auf body/html liegt, wird Scrollen verboten */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important; /* Wichtig für iOS */
    touch-action: none; /* Verhindert Touch-Scroll Versuche */
}

/* Sicherstellen, dass der Header/Hamburger über dem Overlay bleibt */
#header {
    z-index: 999999 !important; /* Muss höher sein als das Overlay */
}

.av-burger-menu-main {
    z-index: 1000000 !important; /* Das X muss immer klickbar bleiben */
    position: relative;
}

/* =======================================================
   UMFASSENDE RESPONSIVE OPTIMIERUNG (DESKTOP)
   ======================================================= */

/* Genereller Text-Fix für alle Auflösungen (Silbentrennung) */
.mega-menu-overlay .level-1-title,
.mega-menu-overlay .level-2-item a,
.mega-menu-overlay .level-3-menu li a {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    min-width: 0;
}

.mega-menu-overlay .plus-toggle {
    flex-shrink: 0;
}

/* MITTLERE LAPTOPS & DESKTOPS (<= 1600px) */
@media screen and (max-width: 1600px) {
    .level-1-image { height: 160px; }
    .level-1-title { font-size: 1.1em; padding: 12px; }
}

/* KLEINE LAPTOPS (<= 1400px) */
@media screen and (max-width: 1400px) {
    .level-1-grid { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .level-1-image { height: 140px; }
    .level-1-title { font-size: 1.05em; padding: 10px; }
    .level-2-item a { padding: 6px 10px; font-size: 0.9em; }
    .level-3-menu li a { font-size: 0.85em; padding: 5px 10px; }
}

/* TABLET LANDSCAPE / SEHR KLEINE DESKTOPS (<= 1200px) */
@media screen and (max-width: 1200px) {
    .overlay-content { padding: 0 15px; }
    .level-1-grid { gap: 15px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .level-1-image { height: 120px; }
    .level-1-title { font-size: 1em; padding: 8px; }
    .level-2-item a { padding: 5px 8px; font-size: 0.85em; }
    .level-3-menu { margin-left: 10px; padding-left: 10px; }
    .plus-toggle { width: 18px; height: 18px; line-height: 18px; font-size: 12px; }
}

/* 1. Die Ausnahme für die Menü-Seiten */
/* Wir setzen die Richtung auf den Standard 'row' zurück, wenn wir auf /menue/ sind */
[class*="menue"] form,
.is-menu-overview form {
    flex-direction: row !important;
}

/* =======================================================
   LEVEL 0 FIX: FLUID
   ======================================================= */

@media screen and (min-width: 990px) and (max-width: 1650px) {

    #top .av-main-nav > li > a {
        padding: 0 clamp(4px, 0.8vw, 13px) !important;
    }

    #top .av-main-nav > li > a .avia-menu-text,
    #top .av-main-nav > li > a {
        font-size: clamp(12px, 1vw, 15px) !important;
        letter-spacing: -0.2px !important;
    }
}

/* =======================================================
    GRID & KARTEN
======================================================= */
.menu-overview-grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}
.mo-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr));
}
.mo-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.menu-overview-card {
    display: flex;
    flex-direction: column;
    background: #f8f8f8;
    overflow: hidden;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.menu-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    background: #fff;
}
.mo-image-wrap {
    height: 200px;
    overflow: hidden;
    background: #eaeaea;
    display: block;
}
.mo-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.menu-overview-card:hover .mo-image-wrap img {
    transform: scale(1.05);
}
.mo-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.mo-content h3 {
    margin: 0 0 15px 0;
    font-size: clamp(16px, 1.2vw + 0.5rem, 18px) !important;
    line-height: 1.3 !important;
    color: #333;
    text-align: center;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}
.mo-btn {
    margin-top: auto;
    font-size: 0.9rem;
    color: #9ca91d;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

/* =======================================================
   LISTENSTRUKTUR (Level 2)
   ======================================================= */
.mo-page-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}
.mo-page-list > li {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 2px;
}
.mo-page-list > li::before {
    display: none !important;
}
.mo-content .level-2-item a {
    background-color: transparent !important;
    padding: 8px 12px !important;
}
.mo-content .level-2-item a:hover {
    background-color: transparent !important;
}
.mo-link-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    margin-left: -12px;
    margin-right: -12px;
    transition: background-color 0.2s ease;
}
.mo-link-title:hover {
    background-color: rgba(156, 169, 29, 0.08) !important;
}
.mo-link-title a {
    flex-grow: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s ease;
}
.mo-link-title:hover a {
    color: #9CA91D !important;
}
.mo-content .plus-toggle {
    display: inline-flex !important;
    margin-right: 12px;
    flex-shrink: 0;
}

/* =======================================================
   LEVEL 3 MENÜ (aufklappbar via .is-visible)
   ======================================================= */
.mo-content .level-3-menu,
.mo-content .level-3-menu li {
    list-style: none !important;
    padding-left: 0 !important;
}
.mo-content .level-3-menu li::before {
    display: none !important;
}
.mo-content .level-3-menu li {
    margin-bottom: 2px !important;
}
.mo-content .level-3-menu li a {
    display: block;
    color: #777;
    text-decoration: none;
    padding: 8px 12px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}
.mo-content .level-3-menu li a:hover {
    color: #9ca91d;
    background-color: rgba(156, 169, 29, 0.08);
}
.mo-content .level-3-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
}
.mo-content .level-3-menu.is-visible {
    max-height: 1200px !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 10px;
    padding-top: 5px;
}

/* =======================================================
   MOBILE (max-width: 768px)
   ======================================================= */
@media (max-width: 768px) {
    .menu-overview-grid {
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 40px;
    }
    .mo-image-wrap {
        height: 160px;
    }
    .mo-content {
        padding: 15px;
    }
    .mo-content .level-2-item a,
    .mo-content .level-3-menu li a {
        padding: 10px 12px !important;
        font-size: 1em;
    }
    .mo-link-title:active {
        background-color: rgba(156, 169, 29, 0.15) !important;
    }
}

/* =======================================================
   STICKY BILD & TITEL (Aktiviert ab 9 Artikeln)
   ======================================================= */
.mega-menu-overlay .level-1-item {
    overflow: visible !important;
    position: relative;
}

.mega-menu-overlay .level-1-item.is-sticky-enabled:hover .level-1-clickable {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
    padding-bottom: 12px;
    box-shadow: 0 15px 25px -15px rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.mega-menu-overlay .level-1-item.is-sticky-enabled:hover .level-1-clickable::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -2px;
    right: -2px;
    height: 40px;
    background: #ffffff;
    z-index: -1;
}

.mega-menu-overlay .level-2-list {
    position: relative;
    z-index: 1;
}

/* =======================================================
   SCROLL-INDIKATOR – Premium UI/UX Update
   ======================================================= */
.mega-menu-scroll-indicator {
    position: sticky;

    /* FIX: Zwingt den Gradienten über das Container-Padding hinaus an den echten Rand */
    bottom: -30px;
    margin-bottom: -10px;

    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;

    /* Erhöhtes padding-bottom, damit der Button nicht abgeschnitten wird */
    padding: 40px 0 25px 0;

    background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 0.95) 75%,
    rgba(255, 255, 255, 1) 100%
    );

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 100;
}

.mega-menu-scroll-indicator.is-visible {
    opacity: 1;
    visibility: visible;
}

.mega-menu-scroll-indicator svg {
    /* Variable für nahtloses Skalieren, ohne die Bounce-Animation zu stören */
    --mm-scale: 1;

    pointer-events: auto; /* Nur der Button selbst ist klickbar */
    box-sizing: border-box;
    width: 44px; /* Etwas größer für eine bessere Klickfläche */
    height: 44px;
    padding: 10px;

    background-color: #9ca91d;
    border-radius: 50%;
    cursor: pointer;

    /* Edler Multi-Layer-Schatten für mehr Tiefe */
    box-shadow: 0 4px 12px rgba(156, 169, 29, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1);

    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    animation: mmScrollBounce 2.5s ease-in-out infinite;
}

/* Hover-Status: Leuchten & Wachsen */
.mega-menu-scroll-indicator svg:hover {
    --mm-scale: 1.12; /* Skaliert sanft über die CSS-Variable */
    background-color: #a8b620; /* Wird minimal heller */

    /* Fügt einen eleganten weichen Glow-Ring außen hinzu */
    box-shadow: 0 6px 16px rgba(156, 169, 29, 0.45),
    0 0 0 5px rgba(156, 169, 29, 0.15);
}

/* Aktiver Klick-Status: Taktiles Feedback */
.mega-menu-scroll-indicator svg:active {
    --mm-scale: 0.95; /* Button drückt sich optisch ein */
    box-shadow: 0 2px 6px rgba(156, 169, 29, 0.4);
}

/* Verbesserte Bounce-Animation, die "transform" variabel lässt */
@keyframes mmScrollBounce {
    0%, 100% {
        transform: translateY(0) scale(var(--mm-scale));
    }
    50% {
        transform: translateY(6px) scale(var(--mm-scale));
    }
}

/* Auf Mobile komplett ausblenden */
@media (max-width: 768px) {
    .mega-menu-scroll-indicator {
        display: none !important;
    }
}

/* =========================
   MOBILE ACTIVE STATE (CURRENT PAGE)
   ========================= */
/* Der aktuell aktive Link */
.is-current-page {
    color: #9ca91d !important;
    font-weight: 700 !important;
    background-color: rgba(156, 169, 29, 0.05) !important;
    position: relative;
}

/* Die übergeordneten Menüpunkte (Elternelemente) des aktiven Links */
.is-current-parent > a {
    color: #9ca91d !important;
    font-weight: 600 !important;
}