Balanced Ranking with Diversity Constraints