#gallery-container {
  max-width: 1280px;
  margin: 0 auto;
}

.gallery-grid {
  display: block !important;
  padding: 20px 0;
  align-items: start;
}

/* Each image container = 1 grid cell */
.gallery-grid > div {
  width: 100%;
  break-inside: avoid;  /* Removes column behavior */
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* Nested wrappers don't interfere */
.gallery-grid > div > div {
  width: 100%;
}

/* GLightbox fills the grid cell perfectly */
.gallery-grid a.glightbox {
  display: block;
  width: 100%;
  height: 300px;  /* Fixed height = uniform rows */
  overflow: hidden;
  border-radius: 12px;
}

/* Images crop to fill (Instagram style) */
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.gallery-grid a.glightbox:hover img {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid a.glightbox {
    height: 250px;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
  }
  .gallery-grid a.glightbox {
  }
  .gallery-grid > div {
    grid-template-columns: repeat(2, 1fr) !important; /* Always 3 columns */
    gap: 1px;
    aspect-ratio: 3 / 3; /* Perfect square container */
  }
  .gallery-grid > div > div {
    
  }
}
