/* ========================================
   MOBILE NAVIGATION - HAMBURGER MENÜ
   ======================================== */

@media (max-width: 768px) {
    /* Header Anpassungen */
    .header-top {
        padding: 0.75rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    /* Verhindern, dass die Seite über den Viewport hinausgeht */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    html {
        overflow-x: hidden;
    }

    /* Original Navigation ausblenden */
    header nav {
        display: none !important;
    }
    
    /* Logo nicht zu groß werden lassen */
    .logo {
        max-width: calc(100% - 60px);
        overflow: hidden;
    }
    
    .logo-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    /* Hamburger Button */
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.1);
        border: none;
        border-radius: 8px;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.2s;
        order: 2; /* Rechts vom Logo */
    }

    .mobile-nav-toggle:active {
        background: rgba(255,255,255,0.2);
        transform: scale(0.95);
    }

    /* Navigation Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-content {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        background: var(--card-bg);
        display: flex;
        flex-direction: column;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }

    .mobile-nav-overlay.active .mobile-nav-content {
        transform: translateX(0);
    }

    /* Overlay Header */
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.25rem;
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-nav-title {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .mobile-nav-logo {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: white;
        padding: 2px;
    }

    .mobile-nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.1);
        border: none;
        border-radius: 8px;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .mobile-nav-close:active {
        background: rgba(255,255,255,0.2);
    }

    /* Navigation Menu */
    .mobile-nav-menu {
        flex: 1;
        padding: 1rem 0;
        overflow-y: auto;
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        color: var(--text);
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        transition: all 0.2s;
        border-left: 4px solid transparent;
    }

    .mobile-nav-link i {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--accent);
        color: var(--primary);
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:active {
        background: var(--accent);
        border-left-color: var(--primary-light);
    }

    .mobile-nav-link.active {
        background: var(--accent);
        border-left-color: var(--primary);
        color: var(--primary-dark);
        font-weight: 600;
    }

    .mobile-nav-link.active i {
        background: var(--primary);
        color: white;
    }

    /* Modell fehlt? - Call to Action */
    .mobile-nav-action {
        margin-top: 0.5rem;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        color: white !important;
        border-radius: 0 8px 8px 0;
        margin-right: 1rem;
    }

    .mobile-nav-action i {
        background: rgba(255,255,255,0.2) !important;
        color: white !important;
    }

    .mobile-nav-action:hover,
    .mobile-nav-action:active {
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
        border-left-color: var(--primary-dark);
    }

    /* Footer Links */
    .mobile-nav-footer {
        padding: 1rem 1.25rem;
        background: var(--background);
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: center;
        gap: 1.5rem;
    }

    .mobile-nav-footer-link {
        color: var(--text-light);
        text-decoration: none;
        font-size: 0.85rem;
        transition: color 0.2s;
    }

    .mobile-nav-footer-link:hover {
        color: var(--primary);
    }
}

/* Desktop: Mobile Navigation verstecken */
@media (min-width: 769px) {
    .mobile-nav-toggle,
    .mobile-nav-overlay {
        display: none !important;
    }
    
    /* Original Navigation wieder anzeigen */
    header nav {
        display: block !important;
    }
}
