/* ====================================
   MOBILE MENU - KOMPLETT SYSTEM
   Modern, funktional, für alle Seiten
   ==================================== */

/* ===== ALTE MOBILE MENU STYLES DEAKTIVIEREN ===== */

/* Alten Toggle im Header IMMER verstecken */
header .mobile-menu-toggle {
    display: none !important;
}

/* Alte Mobile Nav deaktivieren */
header nav.active {
    left: auto !important;
    display: none !important;
}

/* Desktop Nav normal zeigen, Mobile verstecken */
@media (max-width: 968px) {
    header nav {
        display: none !important;
    }
}


/* ===== NEUES MOBILE MENU SYSTEM ===== */

/* Mobile Menu Button - Fixed Position */
body > .mobile-menu-toggle {
    display: none; /* Versteckt auf Desktop */
    position: fixed;
    top: 65px;
    right: 20px;
    z-index: 1002;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
    color: #1a1a1a; /* IMMER dunkel */
    transition: transform 0.3s ease;
}

body > .mobile-menu-toggle:hover {
    transform: scale(1.05);
}

body > .mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Zeige neuen Toggle auf Mobile */
@media (max-width: 968px) {
    body > .mobile-menu-toggle {
        display: block !important;
    }
}

/* Mobile Overlay - Dunkler Hintergrund */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Container */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Startet außerhalb rechts */
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 0 40px 0;
}

.mobile-nav.active {
    right: 0; /* Gleitet von rechts rein */
}

/* Mobile Menu Header */
.mobile-nav-header {
    padding: 0 30px 30px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.mobile-nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #2c5aa0;
    text-decoration: none;
    display: block;
}

/* Mobile Menu Links */
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a {
    display: block;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: #2c5aa0;
    transition: height 0.3s ease;
}

.mobile-nav a:active,
.mobile-nav a:focus {
    background: #f8f9fa;
    color: #2c5aa0;
}

.mobile-nav a:active::before,
.mobile-nav a:focus::before {
    height: 50%;
}

/* Close Button im Menu */
.mobile-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #1a1a1a;
    cursor: pointer;
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
    z-index: 1001;
    transition: transform 0.2s ease;
}

.mobile-close-btn:hover {
    transform: rotate(90deg);
}

/* Prevent body scroll when menu open */
body.menu-open {
    overflow: hidden;
}

/* Animation für Menu Items */
.mobile-nav.active li {
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.mobile-nav.active li:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav.active li:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav.active li:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav.active li:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav.active li:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Accessibility */
.mobile-menu-toggle:focus,
.mobile-close-btn:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}
