body {
  margin: 0;
  padding: 0;
  background: #efeded;
}

/* GALLERY GRID */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  max-width: 1200px;
  margin: 30px auto;
  padding: 10px;
}

/* IMAGE BOX */
.gallery-item {
  width: 100%;
  aspect-ratio: 7 / 5; /* 700x500 ratio */
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

/* IMAGE */
.gallery-item img {
  width: 110%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
  border-radius: 10px;
}

/* HOVER ZOOM EFFECT */
.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(80%);
}

/* TEXT OVERLAY */
.caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  font-size: 16px;
  padding: 10px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* SHOW TEXT ON HOVER */
.gallery-item:hover .caption {
  opacity: 1;
}

/* MOBILE SUPPORT */
@media (hover: none) {
  .gallery-item img {
    transform: none !important;
    filter: brightness(100%);
  }
  .caption {
    opacity: 1;
    font-size: 14px;
  }
}
