/**
 * Therm Mega Menu Frontend Styles
 * Modern Design 2025
 */


:root {
    --therm-primary: #2563eb; /* Blau */
    --therm-primary-hover: #1d4ed8;
    --therm-light: #f9fafb;
    --therm-dark: #111827;
    --therm-gray: #6b7280;
    --therm-border: #e5e7eb;
    --therm-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --therm-radius: 12px;
    --therm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --therm-font-family: 'Montserrat', sans-serif;
}

/* Horizontales Hauptmenü */
.therm-mega-menu-shortcode-container {
    width: 100%;
    background-color: transparent;
    padding: 0 20px;
    font-family: var(--therm-font-family);
}

.therm-mega-menu-shortcode {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.therm-mega-menu-shortcode > li {
    position: relative;
    margin: 0;
    padding: 0;
    /* Wichtig für die korrekte Positionierung des Mega-Menüs */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Unsichtbare Brücke für normale Submenüs */
.therm-mega-menu-shortcode > li:not(.therm-mega-menu-item)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 32px; /* Gleiche Höhe wie der Abstand zum Menü */
    bottom: -32px;
    left: 0;
    z-index: 9998;
    pointer-events: auto; /* Wichtig, damit Hover-Events erkannt werden */
}

.therm-mega-menu-shortcode > li > a {
    display: block;
    padding: 7px 24px;
    color: #333;
    text-decoration: none;
    margin-left: 15px;
    font-weight: 500;
    font-size: 17px;
    transition: background 0.3s ease;
    position: relative;
    font-family: var(--therm-font-family);
    border-radius: 8px;
}

/* Entfernen des Unterstrichs und Hinzufügen eines Hintergrunds */
.therm-mega-menu-shortcode > li > a:hover {
    color: white !important; /* !important hinzugefügt, um sicherzustellen, dass es nicht überschrieben wird */
    background: linear-gradient(90deg,rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    border-radius: 9999px;
}

.therm-mega-menu-shortcode > li.current-menu-item > a {
    color: white;
    background: linear-gradient(90deg,rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    border-radius: 9999px;
}

/* Normale Untermenüs standardmäßig ausblenden, aber erlauben, dass sie per JavaScript angezeigt werden */
.therm-mega-menu-shortcode li:not(.therm-mega-menu-item) > ul.sub-menu,
.therm-mega-menu-shortcode .therm-mega-menu-item > ul.sub-menu {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.78); /* Gleicher Hintergrund wie Mega-Menü */
    backdrop-filter: blur(10px); /* Blur-Effekt */
    -webkit-backdrop-filter: blur(10px); /* Für Safari */
    min-width: 200px;
    box-shadow: var(--therm-shadow);
    border-radius: var(--therm-radius);
    padding: 8px 0;
    color: #333;
    z-index: 9998;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    font-weight: 500;
    margin: 0;
    margin-top: 32px;
    border: 1px solid var(--therm-border); /* Gleicher Border wie Mega-Menü */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="white" fill-opacity="0.05"/><path d="M0 0L100 100M100 0L0 100" stroke="white" stroke-opacity="0.1" stroke-width="1"/></svg>'); /* Gleicher Hintergrund-Pattern wie Mega-Menü */
    background-size: 20px 20px;
}

/* Stile für Menüpunkte in normalen Dropdown-Menüs */
.therm-mega-menu-shortcode li > ul.sub-menu li {
    padding: 0;
    margin: 0;
}

.therm-mega-menu-shortcode li > ul.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease; /* Änderung zu all 0.3s ease für konsistente Übergänge */
    white-space: nowrap;
    font-weight: 500;
    font-family: var(--therm-font-family);
    margin: 5px 8px;
    border-radius: 6px;
    position: relative; /* Für Hover-Effekte */
    box-sizing: border-box; /* Wichtig für konsistente Breite */
}

.therm-mega-menu-shortcode li > ul.sub-menu li a:hover {
    color: #00251f;
    padding-left: 25px; /* Mehr Padding links beim Hover, damit der Text nach rechts rückt */
    padding-right: 15px; /* Weniger Padding rechts, um die Gesamtbreite zu erhalten */
}

/* Mega-Menü-Container Basisstile */
.therm-mega-menu-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    /* display wird durch JS gesteuert */
}

/* Fallback für Hover-Effekte, falls JavaScript nicht funktioniert */
.therm-mega-menu-item:hover .therm-mega-menu-container,
.therm-mega-menu-container:hover {
    opacity: 1;
    visibility: visible;
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Untermenüs innerhalb des Mega-Menüs anzeigen */
.therm-mega-menu-container .therm-mega-menu-left-column ul.sub-menu {
    display: block !important;
}

/* Main mega menu container */
.therm-mega-menu-item {
    position: relative;
}

/* Unsichtbarer Bereich, um die Lücke zwischen Menüpunkt und Dropdown zu überbrücken */
.therm-mega-menu-item::after {
    content: '';
    position: absolute;
    height: 20px;
    width: 100%;
    bottom: -20px;
    left: 0;
    z-index: 9998;
}

/* Hide submenu by default */
/* Base container styles - positioning handled separately */
.therm-mega-menu-item .therm-mega-menu-container {
    min-width: 600px;
    background-color: #ffffff;
    box-shadow: var(--therm-shadow);
    border-radius: var(--therm-radius);
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--therm-border);
    overflow: hidden;
}

/* Show mega menu on hover - pre-positioned for immediate display */
/* Mega menu container - Basispositionierung im CSS, Details durch JavaScript */
.therm-mega-menu-item {
    position: relative;
}

/* Unsichtbare Brücke zwischen Menüpunkt und Mega-Menü */
.therm-mega-menu-item::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 32px; /* Gleiche Höhe wie der Abstand zum Menü */
    bottom: -32px;
    left: 0;
    z-index: 9998;
    pointer-events: auto; /* Wichtig, damit Hover-Events erkannt werden */
}

.therm-mega-menu-item .therm-mega-menu-container {
    /* Basispositionierung, wird durch JS überschrieben */
    display: none; /* Standardmäßig ausgeblendet, wird durch JS gesteuert */
    width: 60%; /* Breite auf 60% der Elternbreite gesetzt */
    max-width: 800px; /* Maximale Breite begrenzen */
    min-width: 400px; /* Minimale Breite für kleine Bildschirme */
    z-index: 9999;
    /* Absolute Positionierung relativ zum Menüpunkt */
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    /* Positionierung unter dem Menüpunkt */
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 32px;
    background-color: transparent; /* Transparenter Hintergrund */
    overflow: hidden; /* Verhindert Überlauf von Inhalten */
    box-shadow: var(--therm-shadow);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="white" fill-opacity="0.05"/><path d="M0 0L100 100M100 0L0 100" stroke="white" stroke-opacity="0.1" stroke-width="1"/></svg>');
    background-size: 20px 20px;
    border-radius: var(--therm-radius);
}

/* Hover-Effekte werden jetzt durch JavaScript gesteuert */
/* .therm-mega-menu-item:hover .therm-mega-menu-container {
    display: flex;
    visibility: visible;
    opacity: 1;
} */

/* Mega menu columns layout */
.therm-mega-menu-left-column {
    flex: 0 0 60%; /* Erhöht auf 60% */
    padding: 25px; /* Etwas weniger Padding */
    box-sizing: border-box;
    border-right: 1px solid var(--therm-border);
    background-color: rgba(255, 255, 255, 0.78); /* Halbtransparentes Weiß */
    backdrop-filter: blur(10px); /* Blur-Effekt */
    -webkit-backdrop-filter: blur(10px); /* Für Safari */
    position: relative;
    z-index: 1;
}

/* Right column styles - reduced width */
.therm-mega-menu-right-column {
    flex: 0 0 40%; /* Reduziert auf 40% */
    padding: 0;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(8, 162, 87, 0.9) 0%, rgba(0, 66, 106, 0.9) 100%);
    color: white;
    position: relative;
    z-index: 0;
}

/* Left column submenu items */
.therm-mega-menu-left-column ul.sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.therm-mega-menu-left-column ul.sub-menu li {
    margin: 0 0 12px 0;
    padding: 0;
}

.therm-mega-menu-left-column ul.sub-menu li a {
    color: var(--therm-dark);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    display: block;
    border-radius: 6px;
    transition: var(--therm-transition);
    background-color: rgba(255, 255, 255, 0.3);
}

.therm-mega-menu-left-column ul.sub-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--therm-primary);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Right column styles */
.therm-mega-menu-right-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Änderung von flex-start zu center für mittige Ausrichtung */
    padding: 55px;
    border-radius: 0 var(--therm-radius) var(--therm-radius) 0;
    text-align: center; /* Text zentrieren */
}

/* Styling for content in right column */
.therm-mega-menu-right-column .therm-mega-content-wrapper {
    padding: 30px;
}

.therm-mega-menu-right-column h3 {
    margin-top: 0;
    font-size: 20px;
    color: white;
    margin-bottom: 15px;
}

.therm-mega-menu-right-column p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.therm-mega-menu-right-column .therm-mega-menu-button {
    display: inline-block;
    background-color: white;
    color: #202020;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--therm-transition);
    position: relative; /* Positionierung für bessere Sichtbarkeit */
    z-index: 5; /* Höherer z-index für Sichtbarkeit */
}

.therm-mega-menu-right-column .therm-mega-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.therm-mega-menu-right-column img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Right aligned menu items */
.therm-menu-item-align-right {
    margin-left: auto !important;
}

/* Submenu list styles */
.therm-mega-menu-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.therm-mega-menu-submenu li {
    margin: 0;
    padding: 0;
}

.therm-mega-menu-submenu li a {
    display: block;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.therm-mega-menu-submenu li a:hover {
    color: #00251f;
    padding-left: 5px;
}

/* Content styles */
.therm-mega-menu-content {
    margin-bottom: 15px;
}

/* Button styles */
.therm-mega-menu-button {
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.therm-mega-menu-button:hover {
    background-color: #0056b3;
    color: #ffffff;
}

/* Image styles */
.therm-mega-menu-image-container {
    margin-top: 15px;
    max-width: 100%;
}

.therm-mega-menu-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Mobile Hamburger Menü Styles */
.therm-mobile-menu-container {
    display: none; /* Standardmäßig ausgeblendet */
}

/* Hamburger Icon - komplett ausgeblendet */
.therm-hamburger-icon {
    display: none !important; /* Komplett ausgeblendet */
    width: 0;
    height: 0;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* Wenn der Hamburger im Header ist */
.site-header .therm-hamburger-icon,
header .therm-hamburger-icon {
    margin-left: 20px;
    margin-right: 15px;
}

/* Fallback für den Fall, dass der Hamburger nicht im Header platziert werden kann */
body > .therm-hamburger-icon {
    position: fixed;
    top: 20px;
    right: 20px;
}

/* Seitlicher Abstand für das Hamburger-Icon */
@media screen and (max-width: 768px) {
    body.mobile-menu-open {
        overflow: hidden; /* Verhindert Scrollen bei geöffnetem Menü */
    }
    
    .therm-mega-menu-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 15px 0;
    }
    
    /* Header mit Hamburger-Icon */
    .has-therm-hamburger {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* Hamburger-Icon im Header anzeigen */
    .therm-hamburger-icon {
        display: block;
    }
    
    /* Menü-Container Styles */
    .therm-mobile-menu-container {
        overflow-y: auto;
        position: fixed;
    }
    
    .therm-mobile-menu {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        padding: 0 20px;
        margin-top: 100px;
        margin-bottom: 30px;
    }
}

.therm-hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg,rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: var(--therm-transition);
}

.therm-hamburger-icon span:nth-child(1) {
    top: 0px;
}

.therm-hamburger-icon span:nth-child(2) {
    top: 10px;
}

.therm-hamburger-icon span:nth-child(3) {
    top: 20px;
}

/* Hamburger Icon Animation */
.therm-hamburger-icon.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.therm-hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.therm-hamburger-icon.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Mobile Menü Container */
.therm-mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 245, 0.97) 100%);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="rgba(0,0,0,0.01)"/></svg>');
    background-size: 10px 10px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    padding: 80px 20px 20px;
    overflow-y: auto;
    box-shadow: 0 0 25px rgba(0,0,0,0.15);
}

.therm-mobile-menu-container.active {
    display: block;
}

/* Styling für das Bild mit Button im unteren Bereich */
.therm-mobile-menu-image-container {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.therm-mobile-menu-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.therm-mobile-menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.therm-mobile-menu-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.therm-mobile-menu-button:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.therm-mobile-menu-back {
    display: flex;
    position: absolute;
    top: 30px;
    left: 20px;
    background: var(--therm-primary, #08a257);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
}

.therm-mobile-menu-back:hover {
    background: var(--therm-secondary, #00426a);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.therm-mobile-menu-back.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.therm-mobile-menu-title {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: var(--therm-dark, #222);
    z-index: 10000;
    padding: 10px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, rgba(8, 162, 87, 0.1) 0%, rgba(0, 66, 106, 0.1) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Mobile Menü Navigation */
.therm-mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 500px;
}

.therm-mobile-menu li {
    padding: 0;
    margin: 0;
    position: relative;
}

.therm-mobile-menu > li {
    border-bottom: 1px solid var(--therm-border);
}

.therm-mobile-menu li a {
    display: block;
    padding: 18px 20px;
    color: var(--therm-dark);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    font-family: var(--therm-font-family);
    transition: var(--therm-transition);
    text-align: center;
    letter-spacing: 0.5px;
}

.therm-mobile-menu li a:hover {
    color: white;
    background: linear-gradient(90deg, rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%);
    border-radius: 9999px;
    transform: translateX(5px);
}

/* Verbesserung des Kontrasts für Menüpunkte */
.therm-mobile-menu li {
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.therm-mobile-menu li:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Untermenü-Titel styling - nicht mehr verwendet, da wir nur den Haupttitel verwenden */
.therm-mobile-submenu-title {
    display: none;
}

/* Vollbild-Menü-System für mobiles Menü */
.therm-mobile-menu {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.therm-mobile-menu.menu-hidden {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
}

.therm-mobile-menu .therm-mobile-submenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 100px 20px 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 245, 0.97) 100%);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="rgba(0,0,0,0.01)"/></svg>');
    background-size: 10px 10px;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
    display: block;
    overflow-y: auto;
    list-style-type: none;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.therm-mobile-menu .therm-mobile-submenu li {
    display: block !important;
    width: 100% !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    visibility: visible !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
}

.therm-mobile-menu .therm-mobile-submenu li:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
}

.therm-mobile-menu .therm-mobile-submenu a {
    display: block !important;
    padding: 12px 15px !important;
    color: var(--therm-dark) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    letter-spacing: 0.5px !important;
    font-size: 16px !important;
    font-weight: normal !important;
    position: relative !important;
}

.therm-mobile-menu .therm-mobile-submenu a:hover {
    color: white !important;
    background: linear-gradient(90deg, rgba(8, 162, 87, 1) 0%, rgba(0, 66, 106, 1) 100%) !important;
    border-radius: 9999px !important;
    transform: translateX(5px) !important;
}

.therm-mobile-menu .therm-mobile-submenu.submenu-active {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    z-index: 10050 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menü Titel */
.therm-mobile-menu-title {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--therm-dark);
    padding: 10px;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Zurück-Button für Hauptnavigation */
.therm-mobile-menu-back {
    position: absolute;
    top: 60px;
    left: 20px;
    font-size: 16px;
    color: var(--therm-dark);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10001;
}

.therm-mobile-menu-back.visible {
    opacity: 1;
    visibility: visible;
}

.therm-mobile-menu-back:before {
    content: '←';
    margin-right: 8px;
    font-size: 18px;
}

/* Untermenü Titel */
.therm-mobile-submenu-title {
    padding: 10px 20px;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.therm-mobile-submenu-title h4 {
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.therm-mobile-submenu-back {
    background: none;
    border: none;
    color: var(--therm-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    position: absolute;
    left: 0;
}

.therm-mobile-submenu-back:before {
    content: '\2190';
    margin-right: 5px;
    font-size: 16px;
}

/* Menüpunkt mit aktivem Untermenü */
li.has-active-submenu > a {
    color: var(--therm-primary);
    font-weight: 600;
}

.therm-mobile-menu .dropdown-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    z-index: 2;
    border: none;
    background: linear-gradient(90deg, rgba(8, 162, 87, 0.15) 0%, rgba(0, 66, 106, 0.15) 100%);
    font-size: 20px;
    color: var(--therm-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--therm-transition);
}

.therm-mobile-menu .dropdown-toggle.active {
    background: linear-gradient(90deg, rgba(8, 162, 87, 0.8) 0%, rgba(0, 66, 106, 0.8) 100%);
    color: white;
}

.therm-mobile-menu .dropdown-toggle::after {
    content: '+';
    transition: transform 0.3s ease;
}

.therm-mobile-menu .dropdown-toggle.active::after {
    content: '−'; /* Unicode minus sign */
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    /* Verstecke das normale Desktop-Menü */
    .therm-mega-menu-shortcode {
        display: none;
    }

    /* Zeige das Hamburger-Icon an */
    .therm-hamburger-icon {
        display: block;
    }

    /* Mobile Mega Menü Styles, unabhängig vom Desktop */
    .therm-mega-menu-item .therm-mega-menu-container {
        position: static;
        width: 100%;
        min-width: auto;
        display: none;
        flex-direction: column;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
    }
    
    .therm-mega-menu-item:hover .therm-mega-menu-container {
        display: none; /* Nicht bei Hover anzeigen auf Mobilgeräten */
    }
    
    /* Toggle Untermenü beim Klicken via JavaScript */
    .therm-mega-menu-item.submenu-open .therm-mega-menu-container {
        display: flex;
    }
    
    .therm-mega-menu-left-column,
    .therm-mega-menu-right-column {
        width: 100%;
        border: none;
        padding: 15px;
    }
    
    .therm-mega-menu-left-column {
        border-bottom: 1px solid var(--therm-border);
        border-right: none;
        background-color: rgba(255, 255, 255, 0.8);
    }

    /* Entferne die unsichtbare Brücke auf Mobilgeräten */
    .therm-mega-menu-item::after,
    .therm-mega-menu-shortcode > li:not(.therm-mega-menu-item)::after {
        display: none;
    }
}
