Target class and element within same animation

Hi,

I am looking for a way to target “class” and “selected element” for the same element within 1 animation. Is there a way to do it?

I have a gallery with images. When clicking on an image I want to display details to that item.
Currently my images stack on top of each other. With my animation I want to hide details for the class to make sure the area is empty when clicking on another element. Afterwards I only want to display the clicked detail div.

https://playground-f2831f.webflow.io/nu-casting

https://preview.webflow.com/preview/playground-f2831f?utm_medium=preview_link&utm_source=designer&utm_content=playground-f2831f&preview=7364fe577a8d5e37253ad241d5f1f83c&pageId=634583a2ab406a79f5e21038&workflow=preview


Here is my public share link: LINK
(how to access public share link)