/* gallery.css — dual gallery: album COVER (click to open) + nanogallery2 image grid on expand */
#gallery-section { max-width: 100%; margin: 50px 20px 20px 20px; padding: 16px;
  border: 1px solid rgba(255,255,255,.3); border-radius: 12px;
  background: rgba(49,92,131,.06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); 
  background-image: url("gal.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
#gal-container { display: flex; gap: 8px; align-items: flex-start; }
#gal-container .gal-slot { width: 33%; position: relative; flex: 0 0 auto; }
#gal-container .gal-slot.expanded { flex: 1 1 100%; width: 100%; }
#gal-container .gal-slot.hidden { display: none; }
#gal-container .middle { flex: 1 1 auto; align-self: center; text-align: center; /* padding: 10px 10px; */
  color: #fff; font: 550 16px Arial, sans-serif; background: #315c8394; border-radius: 10px; /* min-height: 240px; */}

/* cover card (visible when collapsed) */
.gal-cover { display: block; position: relative; z-index: 5; width: 100%; aspect-ratio: 16/9;
  border: none; cursor: pointer; padding: 0; overflow: hidden; border-radius: 10px;
  background-size: cover; background-position: center; }
.gal-cover > span { position: absolute; left: 0; bottom: 0; width: 100%; background: rgba(0,0,0,.45);
  color: #fff; font: 600 20px Arial, sans-serif; padding: 12px; text-align: center; transition: background .2s; }
.gal-cover:hover > span { background: rgba(1,101,140,.75); }
.gal-slot.expanded .gal-cover { display: none; }

/* nanogallery2 grid: rendered (has layout via visibility:hidden) but hidden behind the cover until expanded */
.gal-thumbs { position: absolute; top: 0; left: 0; width: 100%; visibility: hidden; }
.gal-slot.expanded .gal-thumbs { position: static; visibility: visible; }

.gal-back { display: none; margin: 0 0 8px; background: #01658c; color: #fff; border: none;
  border-radius: 20px; padding: 6px 16px; cursor: pointer; font: 600 13px Arial; }
.gal-slot.expanded .gal-back { display: inline-block; }

.nGY2 .nGY2GallerySub { background-color: transparent; }
.nGY2 .nGY2GThumbnailImage { background: #315c8394; border-radius: 10px; aspect-ratio: 16 / 9 !important; }
@media (max-width: 991px) {
  #gal-container { flex-direction: column; }
  #gal-container .gal-slot, #gal-container .middle { width: 100%; }
}
