/* Sticky Navbar Styles */
.navbar {
    background-color: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 0.5rem 0;
    position: sticky !important;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.5rem;
    color: #1F2937 !important;
    margin-left: 0;
    padding-left: 2rem;
}

.navbar-brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.nav-link {
    color: #6B7280 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #374151 !important;
}

.navbar-nav .nav-link.active {
    color: #374151 !important;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 0;
    padding-right: 2rem;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.profile-section:hover {
    background-color: #F9FAFB;
}

.user-name {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #F9FAFB;
}

.dropdown-item.logout,
.dropdown-item.delete {
    color: #DC2626;
}

.login-section {
    display: flex;
    align-items: center;
}

.login-btn {
    background-color: #3B82F6;
    border-color: #3B82F6;
    color: white;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.login-btn:hover {
    background-color: #2563EB;
    border-color: #2563EB;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    margin-right: 2rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(55, 65, 81, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Custom responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.75rem 1.5rem !important;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .profile-section {
        margin-top: 1rem;
        padding: 0.75rem 1.5rem;
        border-top: 1px solid #F3F4F6;
    }

    .login-section {
        margin-top: 1rem;
        padding: 0.75rem 1.5rem;
        border-top: 1px solid #F3F4F6;
    }
    
    .user-name {
        display: none;
    }

    .right-section {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding-right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        margin-right: 0;
        width: 100%;
    }

    .navbar-brand {
        padding-left: 1rem;
    }

    .navbar-toggler {
        margin-right: 1rem;
    }
    
    /* Ensure mobile menu closes properly */
    .navbar-collapse {
        transition: all 0.3s ease;
    }
    
    .navbar-collapse.collapsing {
        height: auto;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    /* Force hide when not showing */
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    
    /* Prevent body scroll when mobile menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Ensure proper z-index for mobile menu */
    .navbar-collapse.show {
        z-index: 1020;
        position: relative;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
        padding-left: 0.5rem;
    }
    
    .navbar-brand img {
        width: 35px;
        height: 35px;
    }

    .navbar-toggler {
        margin-right: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .profile-section {
        padding: 0.75rem 1rem;
    }

    .login-section {
        padding: 0.75rem 1rem;
    }
}
