Refactor figure image classes and add hover effects