Environmental effects on the spectroscopic properties of gallic acid: a combined classical and quantum mechanical study