/* Mobile Menu Styles */
.nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background) !important;
    z-index: 100000;
    padding: 2rem;
    overflow-y: auto;
}

/* Overlay für mobile Version */
.content-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

.content-overlay.active {
    display: block;
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.nav-menu li {
    margin: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation Styles */
.mobile-nav {
    display: none;
}

.mobile-nav-toggle {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Mobile Navigation Container */
    .mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--background);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    /* Mobile Navigation List */
    .mobile-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;
    }

    .mobile-nav li {
        width: 100%;
    }

    /* Mobile Navigation Links */
    .mobile-nav a {
        display: block;
        padding: 1rem;
        color: white;
        text-decoration: none;
        background: var(--primary);
        border-radius: var(--border-radius);
        text-align: center;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .mobile-nav a:hover {
        background: #003d8c;
        transform: translateY(-2px);
    }

    .mobile-nav a.active {
        background: #003380;
    }

    /* Mobile Navigation Toggle Button */
    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: transparent;
        border: 2px solid var(--primary);
        border-radius: var(--border-radius);
        padding: 0.75rem;
        z-index: 1001;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-nav-toggle:hover {
        background: rgba(0, 74, 173, 0.1);
    }

    .mobile-nav-toggle .menu-icon {
        color: var(--primary);
        font-size: 1.25rem;
        display: block;
    }

    /* Overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

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

    /* Hide Desktop Navigation */
    .nav-menu {
        display: none !important;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .mobile-nav,
    .mobile-nav-toggle,
    .mobile-nav-overlay {
        display: none !important;
    }

    .nav-menu {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .nav-menu ul {
        display: flex;
        background: none;
        box-shadow: none;
        gap: 1rem;
    }

    .nav-menu li {
        margin: 0;
        width: auto;
        border-bottom: none;
    }

    /* Keep desktop defaults neutral; detailed styles live in menu.css/hero.css */
    .nav-menu a,
    .nav-link {
        background: transparent !important;
        margin: 0 !important;
        box-shadow: none !important;
        color: inherit !important;
        padding: 0.5rem 1rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        border-radius: var(--border-radius) !important;
        transition: all 0.3s ease !important;
        font-weight: 600 !important;
        text-shadow: none !important;
        opacity: 1 !important;
    }

    .nav-menu a:hover,
    .nav-link:hover {
        background: rgba(10, 80, 194, 0.06) !important;
        color: #0A50C2 !important;
        transform: none !important;
        box-shadow: none !important;
        opacity: 1 !important;
        text-decoration: underline !important;
        text-underline-offset: 4px !important;
    }

    .nav-menu a.active,
    .nav-link.active {
        background: rgba(10, 80, 194, 0.08) !important;
        color: #0A50C2 !important;
        box-shadow: none !important;
        opacity: 1 !important;
    }
}

/* Landing-specific hard overrides to defeat legacy !important rules */
@media (min-width: 769px) {
    body.landing-page .nav-menu a,
    body.landing-page .nav-link {
        background: transparent !important;
        color: #0f172a !important;
    }
}

/* Overlay für mobile Version */
@media (min-width: 769px) {
    .content-overlay {
        display: none !important;
    }
}

body.menu-open .dashboard-container,
body.menu-open .form-container,
body.menu-open .content-wrapper {
    opacity: 0 !important;
    pointer-events: none !important;
}
