#gallery h4 {
  font-weight: bold;
  font-size: 1.6rem;
  color: #c70000;
  text-align: center;
  margin: 20px 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  gap: 15px;
  padding: 20px; 
  width: 95%;
  margin: auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-in-out;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.3s ease-in-out;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img:hover {
  transform: scale(1.08);
}

.caption {
  position: absolute;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  width: 100%;
  text-align: center;
  padding: 8px;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}

.gallery-item:hover .caption {
  opacity: 1;
}
