Nifty closes at highest level in 2025 aided by gains in mid- and small-cap stocks