/* Gallery Page Styles */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cover-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.cover-container img {
  width: 100%;
  height: 300px; /* Fixed height */
  object-fit: cover; /* Maintain aspect ratio and crop excess */
  border-radius: 0.5rem; /* Optional: Rounded corners */
  transition: transform 0.3s ease-in-out;
}

.cover-container img:hover {
  transform: scale(1.05); /* Optional: Zoom effect on hover */
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cover-container:hover .overlay {
  opacity: 1;
}

/* Dynamic Group Page (Pinterest-like Masonry Layout) */
.masonry {
  column-count: 3;
  column-gap: 1rem;
  padding: 0;
  margin: 0;
}

.masonry img {
  width: 100%;
  margin-bottom: 1rem;
  display: block;
  break-inside: avoid;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .masonry {
    column-count: 1;
  }
}