change the active class like in screenshot and added transition