/**
 * Mobile Menu CSS - Modern & Responsive
 * Mobil menü için özel stiller
 */

/* ============================================
   MOBILE NAVBAR CONTAINER
   ============================================ */
@media (max-width: 991px) {
    .navbar-wrapper {
        position: relative;
        z-index: 1050;
    }

    .navbar {
        padding: 0.5rem 0 !important;
        min-height: 56px;
        background: #ffffff !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Navbar Brand - Mobile */
    .navbar-brand {
        font-size: 1.1rem !important;
        font-weight: 700;
        padding: 0.25rem 0;
        margin-right: auto;
        line-height: 1.2;
        flex-shrink: 0;
    }

    /* Navbar Toggler - Modern Style */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        cursor: pointer;
        position: relative;
        z-index: 1051;
        margin-left: 0.5rem;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }

    .navbar-toggler:hover {
        background: rgba(102, 126, 234, 0.08);
    }

    .navbar-toggler-icon {
        width: 24px;
        height: 20px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after,
    .navbar-toggler-icon span {
        content: '';
        display: block;
        width: 100%;
        height: 2.5px;
        background: #495057;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .navbar-toggler-icon span {
        display: block;
        height: 2.5px;
        background: #495057;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation - Active State */
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        transform: translateY(8px) rotate(45deg);
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span {
        opacity: 0;
        transform: scaleX(0);
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Navbar Collapse - Mobile Menu */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 1050;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0;
        margin-top: 0;
        transition: all 0.3s ease;
    }

    .navbar-collapse:not(.show) {
        display: none !important;
    }

    .navbar-collapse.show {
        display: block !important;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile Menu Content */
    .navbar-nav {
        padding: 0.5rem 0;
        flex-direction: column;
        width: 100%;
        margin: 0;
        gap: 0;
    }

    /* Nav Items - Mobile */
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    /* Nav Links - Mobile */
    .nav-link {
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
        font-weight: 500;
        color: #495057 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        transition: all 0.2s ease;
        border-radius: 0;
    }

    .nav-link:hover,
    .nav-link:focus {
        background: rgba(102, 126, 234, 0.08);
        color: #667eea !important;
    }

    .nav-link.active {
        background: rgba(102, 126, 234, 0.12);
        color: #667eea !important;
        font-weight: 600;
        border-left: 3px solid #667eea;
    }

    .nav-link i {
        font-size: 0.9rem;
        margin-right: 0.5rem;
        width: 18px;
        text-align: center;
    }

    /* Dropdown Toggle - Mobile */
    .dropdown-toggle::after {
        margin-left: auto;
        transition: transform 0.3s ease;
    }

    .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }

    /* Dropdown Menu - Mobile */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: rgba(102, 126, 234, 0.03) !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .dropdown-menu.show {
        display: block !important;
        max-height: 500px;
        padding: 0.5rem 0 !important;
        animation: slideDown 0.3s ease;
    }

    /* Dropdown Items - Mobile */
    .dropdown-item {
        padding: 0.75rem 1rem 0.75rem 2.5rem !important;
        font-size: 0.9rem !important;
        color: #495057;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 44px;
        transition: all 0.2s ease;
        border-radius: 0;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
        transform: translateX(4px);
    }

    .dropdown-item i {
        font-size: 0.85rem;
        width: 16px;
        text-align: center;
        flex-shrink: 0;
    }

    .dropdown-divider {
        margin: 0.5rem 0;
        border-color: rgba(0, 0, 0, 0.08);
    }

    /* User Actions Section - Mobile */
    .mobile-menu-actions {
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 0.5rem;
        padding-top: 1rem;
    }
    

    /* Theme Toggle - Mobile */
    #themeToggle {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.5rem;
        border-radius: 6px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    #themeToggle i {
        margin-right: 0.5rem;
    }

    /* Buttons - Mobile */
    .navbar .btn {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        font-weight: 500;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 6px;
        margin: 0;
    }

    .navbar .btn i {
        font-size: 0.9rem;
    }

    .navbar .btn span {
        display: inline !important;
    }

    /* User Dropdown - Mobile */
    .navbar .dropdown {
        width: 100%;
    }

    .navbar .dropdown > .btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem !important;
    }

    .navbar .dropdown-menu {
        position: static !important;
        width: 100% !important;
        margin: 0.5rem 0 0 0 !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        background: #ffffff !important;
        padding: 0.5rem !important;
    }

    .navbar .dropdown-item {
        padding: 0.75rem 1rem !important;
        border-radius: 6px;
        margin-bottom: 0.25rem;
    }

    /* Badge in Mobile Menu */
    .nav-link .badge {
        position: static !important;
        transform: none !important;
        margin-left: auto;
        margin-right: 0;
        display: inline-block;
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    /* Scrollbar for Mobile Menu */
    .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }

    .navbar-collapse::-webkit-scrollbar-track {
        background: transparent;
    }

    .navbar-collapse::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }

    .navbar-collapse::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* ============================================
   SMALL MOBILE (max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
    .navbar {
        padding: 0.4rem 0 !important;
        min-height: 52px;
    }

    .navbar-brand {
        font-size: 1rem !important;
    }

    .navbar-toggler {
        width: 40px;
        height: 40px;
        padding: 0.4rem;
    }

    .navbar-toggler-icon {
        width: 20px;
        height: 18px;
    }

    .nav-link {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.9rem !important;
    }

    .dropdown-item {
        padding: 0.7rem 0.85rem 0.7rem 2rem !important;
        font-size: 0.85rem !important;
    }

    .navbar .btn {
        padding: 0.7rem 0.85rem !important;
        font-size: 0.85rem !important;
    }

    .navbar .d-flex {
        padding: 0.5rem 0.85rem;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 0.95rem !important;
    }

    .nav-link {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.75rem !important;
    }

    .dropdown-item {
        font-size: 0.8rem !important;
        padding: 0.65rem 0.75rem 0.65rem 1.75rem !important;
    }

    .navbar .btn {
        font-size: 0.8rem !important;
        padding: 0.65rem 0.75rem !important;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
[data-theme="dark"] .navbar {
    background: #1a1a1a !important;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-collapse {
    background: #1a1a1a;
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-link {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus {
    background: rgba(102, 126, 234, 0.15);
    color: #8b9aff !important;
}

[data-theme="dark"] .nav-link.active {
    background: rgba(102, 126, 234, 0.2);
    color: #8b9aff !important;
    border-left-color: #8b9aff;
}

[data-theme="dark"] .dropdown-menu {
    background: rgba(102, 126, 234, 0.05) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #e0e0e0;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: rgba(102, 126, 234, 0.15);
    color: #8b9aff;
}

[data-theme="dark"] .navbar-toggler-icon::before,
[data-theme="dark"] .navbar-toggler-icon::after,
[data-theme="dark"] .navbar-toggler-icon span {
    background: #e0e0e0;
}

[data-theme="dark"] .navbar-toggler:hover {
    background: rgba(102, 126, 234, 0.15);
}

[data-theme="dark"] .navbar .d-flex {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar .dropdown-menu {
    background: #252525 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

