.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  display: block;
  break-inside: avoid;
}

.gallery img {
  width: 100%;
  height: 200px; 
  object-fit: cover; 
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
}

@media (max-width: 576px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
  }
}