/* public/assets/css/components/_gallery.css */

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

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

@media (max-width: 575px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
}

.gallery-item:nth-child(3n) {
  grid-row: span 2;
}

@media (max-width: 575px) {
  .gallery-item:nth-child(3n) {
    grid-row: span 1; /* Disable masonry spans on small mobile screens */
  }
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--bb-transition);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(48, 10, 92, 0.6); /* Elegant brand purple tint overlay */
  opacity: 0;
  transition: opacity 250ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* Lightbox Modal styles */
.lightbox-modal .modal-content {
  background: transparent;
  border: none;
}

.lightbox-modal .modal-body {
  position: relative;
  padding: 0;
}

.lightbox-modal .btn-close {
  position: absolute;
  top: -40px;
  right: 0;
  filter: invert(1);
  opacity: 0.8;
  z-index: 1055;
}

.lightbox-modal .lightbox-img {
  max-height: 80vh;
  object-fit: contain;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-modal .lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 15px;
  font-weight: 500;
  font-family: var(--bb-font-heading);
}
