/* gallery.css */

.gallery-container {
  padding: 20px;
  max-width: 1200px;
  margin: 20px auto;
}

.gallery-title {
  font-size: 2.5rem;
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}

.photo-collage {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(200px, 1fr)
  ); /* Flexible columns */
  grid-template-rows: repeat(auto, 200px); /* Adjust row height as needed */
  gap: 10px;
}

.photo-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Maintain aspect ratio, crop if needed */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
}

.photo-collage img:hover {
  transform: scale(1.03);
}

/* Modern and varied layout - adjust these grid-column/row spans */
.photo-collage img:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-collage img:nth-child(5) {
  grid-column: span 2;
}

.photo-collage img:nth-child(8) {
  grid-row: span 2;
}

/* Add more specific styling for other images as desired */

.back-button {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 20px;
  background-color: #f8f9fa;
  color: #343a40;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .photo-collage {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-template-rows: repeat(auto, 150px);
  }

  .photo-collage img:nth-child(1),
  .photo-collage img:nth-child(5),
  .photo-collage img:nth-child(8) {
    grid-column: span 1;
    grid-row: span 1;
  }
}
