High-resolution Mn K -edge x-ray emission and absorption spectroscopy study of the electronic and local structure of the three different phases in N d 0.5 S r 0.5 Mn O 3