Lateral heat diffusion in layered structures: Theory and photothermal experiments