/* Multilevel Menu Styles */

/* Header Wrapper */
.header-wrapper {
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Desktop Navigation */
.header-logo {
    margin-right: auto;
}

.main-navigation {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--main-color);
}

/* CTA Button (Termin vereinbaren) */
.nav-item-cta {
    margin-left: 1rem;
}

.nav-link-cta {
    background-color: var(--main-color);
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.nav-link-cta:hover {
    background-color: var(--main-color);
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.nav-item.has-children > .nav-link .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-item.has-children:hover > .nav-link .fa-chevron-down {
    transform: rotate(180deg);
}

/* Desktop Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    position: relative;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submenu-link:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--main-color);
    padding-left: 2rem;
}

.submenu-item.has-children > .submenu-link .fa-chevron-right {
    font-size: 0.75rem;
    margin-left: auto;
}

/* Level 3 & 4 Submenu */
.submenu.level-3,
.submenu.level-4 {
    top: 0;
    left: 100%;
    margin-left: 0.5rem;
}

.submenu-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Navigation */
.mobile-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.mobile-navigation.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background-color: rgba(0,0,0,0.05);
    color: var(--main-color);
}

.mobile-toggle {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.mobile-menu-item.active > .mobile-menu-link .mobile-toggle,
.mobile-submenu-item.active > .mobile-submenu-link .mobile-toggle {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    transition: max-height 0.3s ease;
}

.mobile-menu-item.active > .mobile-submenu,
.mobile-submenu-item.active > .mobile-submenu {
    max-height: 2000px;
}

.mobile-submenu-item {
    border-bottom: 1px solid #e8e8e8;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem 0.875rem 2.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.mobile-submenu-link:hover,
.mobile-submenu-link.active {
    background-color: rgba(0,0,0,0.05);
    color: var(--main-color);
}

.mobile-submenu.level-3 .mobile-submenu-link {
    padding-left: 3.5rem;
}

.mobile-submenu.level-4 .mobile-submenu-link {
    padding-left: 4.5rem;
}

/* Mobile CTA Button */
.mobile-menu-item-cta {
    border-top: 2px solid var(--main-color);
    margin-top: 0.5rem;
}

.mobile-menu-link-cta {
    background-color: var(--main-color);
    color: #fff !important;
    font-weight: 600;
    justify-content: center;
}

.mobile-menu-link-cta:hover,
.mobile-menu-link-cta.active {
    background-color: var(--main-color);
    opacity: 0.9;
    color: #fff !important;
}

/* Responsive */
@media (max-width: 767px) {
    .main-navigation {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle,
    .mobile-navigation,
    .mobile-menu-overlay {
        display: none !important;
    }
}

