/* Gallery thumbnails */
.gallery-thumb {
  width: 100%;
  height: 200px; /* default height */
  object-fit: cover;
  cursor: pointer;
  border-radius: 5px;
  transition: transform 0.3s;
}

.gallery-thumb:hover {
  transform: scale(1.05);
}

/* Modal */
#galleryModal .modal-dialog {
  margin: 0;
  max-width: 100%;
  height: 100%;
}

#galleryModal .modal-content {
  background: transparent;
  border: none;
  height: 100%;
}

#galleryModal .modal-body {
  display: flex;
  justify-content: center; /* horizontal centering */
  align-items: center; /* vertical centering */
  position: relative;
  padding: 0;
  height: 100%;
}

#galleryModalImg {
  max-width: 95vw; /* leave small padding from edges */
  max-height: 85vh; /* leave space for buttons */
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

/* Prev/Next buttons */
.prev-btn,
.next-btn {
  width: 50px;
  height: 50px;
  opacity: 0.7;
  font-size: 24px;
  border: none;
  z-index: 1050;
  transition: opacity 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
  opacity: 1;
}

/* Close button */
#galleryModal .btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1050;
  filter: invert(1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .prev-btn,
  .next-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .prev-btn,
  .next-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 576px) {
  #galleryModalImg {
    max-height: 75vh;
  }
}
