Optical properties of spatially dispersive surfaces and thin films