/**
 * Styling für die zentrale Navigation
 * Position Management System
 */

/* ============================================
   Navigation Container
   ============================================ */
#mainNavigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navbar Container - Prevent dropdown clipping */
.navbar {
    overflow: visible !important;
}

.navbar .container-fluid {
    overflow: visible !important;
}

/* ============================================
   Desktop Navigation
   ============================================ */
.nav-desktop {
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    overflow: visible !important;
}

.nav-desktop .btn {
    transition: all 0.2s ease;
    font-weight: 500;
    border: none;
}

.nav-desktop .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-desktop .btn.active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* ============================================
   Dropdown Menüs
   ============================================ */
.nav-desktop .dropdown {
    position: relative;
}

.nav-desktop .dropdown-toggle {
    transition: all 0.2s ease;
}

.nav-desktop .dropdown-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-desktop .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    min-width: 200px;
    position: absolute;
    z-index: 1050;
    overflow: visible !important;
}

.nav-desktop .dropdown-item {
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-desktop .dropdown-item i {
    width: 20px;
    text-align: center;
}

.nav-desktop .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.5rem;
}

.nav-desktop .dropdown-item.active {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.nav-desktop .dropdown-item.active:hover {
    background-color: #0b5ed7;
}

/* ============================================
   Mobile Navigation (Offcanvas)
   ============================================ */
.nav-mobile {
    display: flex;
    align-items: center;
}

.nav-mobile .btn {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
}

/* Offcanvas Customization */
.offcanvas {
    max-width: 300px;
}

.offcanvas-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.offcanvas-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offcanvas-body {
    padding: 0;
    background-color: #f8f9fa;
}

/* List Group Styling für Mobile Navigation */
.offcanvas-body .list-group {
    border-radius: 0;
}

.offcanvas-body .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
    transition: all 0.2s ease;
}

.offcanvas-body .list-group-item:first-child {
    border-top: none;
}

/* Kategorie-Header */
.offcanvas-body .list-group-item.bg-light {
    background-color: #e9ecef !important;
    color: #495057;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-top: 2px solid #dee2e6;
}

/* Navigations-Items */
.offcanvas-body .list-group-item-action {
    padding-left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.offcanvas-body .list-group-item-action i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.offcanvas-body .list-group-item-action:hover {
    background-color: #e7f1ff;
    padding-left: 2.5rem;
}

.offcanvas-body .list-group-item-action.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.offcanvas-body .list-group-item-action.active i {
    opacity: 1;
}

/* ============================================
   Button Color Schemes
   ============================================ */
/* Primary - Dashboard/Main */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Info - Portfolio */
.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

.btn-info:hover {
    background-color: #31d2f2;
    border-color: #25cff2;
    color: #000;
}

/* Success - Optionen */
.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* Warning - Analytics */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background-color: #ffca2c;
    border-color: #ffc720;
    color: #000;
}

/* Danger - Admin */
.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
/* Tablets */
@media (max-width: 991.98px) {
    #mainNavigation {
        justify-content: flex-end;
    }
}

/* Small Phones */
@media (max-width: 575.98px) {
    .nav-mobile .btn {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    .offcanvas {
        max-width: 280px;
    }
}

/* ============================================
   Accessibility & Print
   ============================================ */
/* Focus States */
.nav-desktop .btn:focus,
.nav-desktop .dropdown-toggle:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5);
    outline: none;
}

.nav-desktop .dropdown-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

/* Print Styles */
@media print {
    #mainNavigation,
    .nav-desktop,
    .nav-mobile {
        display: none !important;
    }
}

/* ============================================
   Animation & Transitions
   ============================================ */
@keyframes slideInFromTop {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dropdown-menu.show {
    animation: slideInFromTop 0.2s ease-out;
}

/* Smooth Offcanvas Transition */
.offcanvas {
    transition: transform 0.3s ease-in-out;
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .nav-desktop .dropdown-menu {
        background-color: #2b3035;
        border-color: #495057;
    }
    
    .nav-desktop .dropdown-item {
        color: #f8f9fa;
    }
    
    .nav-desktop .dropdown-item:hover {
        background-color: #495057;
    }
    
    .offcanvas-body {
        background-color: #212529;
    }
    
    .offcanvas-body .list-group-item {
        background-color: #212529;
        color: #f8f9fa;
        border-color: #495057;
    }
    
    .offcanvas-body .list-group-item.bg-light {
        background-color: #343a40 !important;
        color: #adb5bd;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.nav-divider {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 0.5rem;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    background-color: #dc3545;
    color: white;
}
