.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

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

/* Small tablets */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 576px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
  z-index: 2;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

.left {
  left: 20px;
}

.right {
  right: 20px;
}

.caption {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 10px;
  text-align: center;
}