Assign a class to a loop item based on taxonomy

I have a custom post type (Homepage Features) with a custom taxonomy (Homepage Feature Categories), created with MetaBox. I am currently displaying the posts using the carousel element.

I would like to be able to automatically assign a class to items in one of the categories (Sponsored) so that I can add some CSS to change the background and text colour of the content wrapper for the items in that category:

SponsoredPosts

Is this possible? What is the best way to do this?

Solved thanks to this video by Kevin Geary: https://youtu.be/5VxQSuVdjrM?si=TrTWDHXqqsuFh2Z4.