Nifty 50 Gains 0.5% as Pharma and Realty Lead Market Recovery