/* Event Gallery Frontend */
.gallery-page {
  margin-top: 80px;
  min-height: 60vh;
}

.gallery-tabs .nav-link {
  color: #333;
  font-weight: 600;
}

.gallery-tabs .nav-link.active {
  color: #0d6efd;
  border-bottom: 3px solid #0d6efd;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f5f5f5;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption-preview {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox overrides for Bootstrap coexistence */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 40px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.92);
}

.gallery-modal-content {
  position: relative;
  background-color: transparent;
  margin: auto;
  padding: 0;
  width: 92%;
  max-width: 1000px;
}

.gallery-modal .close {
  color: #fff;
  position: absolute;
  top: 15px;
  right: 30px;
  font-size: 40px;
  font-weight: bold;
  z-index: 2010;
}

.gallery-modal .prev,
.gallery-modal .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: #fff;
  font-weight: bold;
  font-size: 28px;
  user-select: none;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.35);
}

.gallery-modal .next {
  right: 0;
}

.gallery-modal .prev {
  left: 0;
}

.gallery-modal .numbertext {
  color: #f2f2f2;
  font-size: 14px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
}

.gallery-modal .caption-container {
  text-align: center;
  background-color: rgba(0, 0, 0, 0.75);
  padding: 10px 16px;
  color: white;
  margin-top: 0;
}

.gallery-modal #galleryModalImg {
  max-height: 75vh;
  object-fit: contain;
  background: #111;
}

@media (max-width: 576px) {
  .gallery-item img {
    height: 140px;
  }
}
