/* ============================================
   MOBILE NAVIGATION - KOMPLETT FINAL
   ============================================ */

/* WICHTIG: Toggle Buttons auf Desktop VERSTECKEN */
@media (min-width: 1025px) {
    .sub-nav-toggle {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Mobile Navigation Responsive */
@media (max-width: 1024px) {
    
    /* Mobile Toggle sichtbar machen */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }
    
    /* Navigation verstecken und als Overlay zeigen */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bg-secondary);
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        padding: 6rem 0 2rem;
    }
    
    /* Navigation offen */
    .main-navigation.mobile-open {
        right: 0;
    }
    
    /* Nav List vertikal */
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    /* Nav Items */
    .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Nav Links */
    .nav-link {
        padding: 1rem 1.5rem;
        width: 100%;
        display: block;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Sub-Navigation Mobile */
    .sub-nav {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--bg-tertiary);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }
    
    /* Sub-Nav offen */
    .nav-item.dropdown-open .sub-nav {
        max-height: 1000px;
        padding: 0.5rem 0;
    }
    
    /* Sub-Nav Links */
    .sub-nav-link {
        padding: 0.75rem 2rem;
    }
    
    /* Sub-Nav Toggle Button */
    .sub-nav-toggle {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s ease;
    }
    
    .sub-nav-toggle:hover {
        color: var(--accent-primary);
    }
    
    .toggle-icon {
        font-weight: 300;
        font-size: 1.75rem;
        line-height: 1;
    }
    
    /* Nav Item mit Dropdown */
    .nav-item:has(.sub-nav) {
        position: relative;
    }
    
    .nav-item:has(.sub-nav) .nav-link {
        padding-right: 4rem;
    }
    
    /* Body Scroll Lock wenn Menu offen */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Overlay hinter Menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 1000;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
    .main-navigation {
        width: 280px;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .sub-nav-link {
        padding: 0.625rem 1.75rem;
        font-size: 0.875rem;
    }
}
