/* === GALLERY GRID === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 👈 always two columns */
  gap: 10px; /* space between items */
  width: 100%;
}

/* === GALLERY ITEM === */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: #000;
  height: 220px; /* 👈 consistent thumbnail height */
}

/* === IMAGES AND VIDEO THUMBNAILS === */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the box neatly without distortion */
  display: block;
}

/* === VIDEO PLAY ICON === */
.gallery-item .video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: white;
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .video-icon {
  opacity: 1;
}


/* Lightbox */
/* Base hidden state */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;              /* 👈 hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Active (visible) state */
.lightbox.active {
  display: flex;              /* 👈 only show when active */
}

/* Content box */
.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 80vw;
  max-height: 80vh;
  background: transparent;
  border-radius: 8px;
}

.lightbox-content img,
.lightbox-content iframe {
  width: 100%;
  height: auto;
  max-height: 80vh;
  border-radius: 6px;
  display: block;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 2000; /* above everything */
}

/* Navigation buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  z-index: 2000;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.prev { left: 15px; }
.next { right: 15px; }

#lightbox {
  display: none !important; /* force hidden when not active */
}

#lightbox.active {
  display: flex !important; /* only show when active */
}

.lightbox-content iframe {
  width: 100%;
  height: 50vh; /* 👈 increase this value for taller videos */
  border: none;
  border-radius: 6px;
}
