I need help with CMS Slider Gallery with Lightbox

Hello!!

I have a project about some buildings that have different modules, example photo 3 shows the 3 departments, when entering any department it shows photo 1 of the example and once I click on a photo from the gallery the lightbox opens with all the images of the other departments when I only want open the images of that department in which I am clicking

Could someone help me with this please!