/* Gallery styles */

/* Default gallery - images display at full width stacked vertically */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery a {
  display: block;
}

.gallery img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Compact gallery - smaller thumbnails in a tight grid */
.gallery-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.gallery-compact a {
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid gallery - medium-sized tiles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-grid a {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Masonry gallery - Pinterest-style layout */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  grid-auto-rows: auto;
}

.gallery-masonry a {
  display: block;
}

.gallery-masonry img {
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.4rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
  }

  .gallery-masonry {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .gallery-compact {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}
