.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* space between items */
  justify-content: flex-start;
}

.gallery-item {
  flex: 0 0 200px; /* fixed width for each item */
  text-align: center;
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: auto;
  max-width: 200px; /* ensure thumbnail doesn't exceed container */
  border: 1px solid #ddd;
  border-radius: 4px;
}

.gallery-item .caption {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  /* single-line ellipsis for long titles */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  /* optional: multi-line ellipsis instead */
  /* display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical; */
}
