/* ================= MOSAIC GALLERY ================= */
.mosaic-gallery {
  padding: 100px 6%;
  background: #ffffff;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
}

/* TILE BASE */
.tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* SIZE VARIANTS */
.tile.tall {
  grid-row: span 2;
}

.tile.wide {
  grid-column: span 2;
}

/* OVERLAY */
.tile .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* HOVER */
.tile:hover img {
  transform: scale(1.08);
}
.tile img{
  object-position:right;
}
.tile:hover .overlay {
  opacity: 1;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .mosaic-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

  .tile.wide {
    grid-column: span 2;
  }
}

@media (max-width: 450px) {
  .mosaic-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .tile.wide,
  .tile.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}
/* ===== ENHANCED SIZE FOR LARGE SCREENS ===== */
@media (min-width: 1200px) {
  .mosaic-grid {
    grid-auto-rows: 200px;   
    gap: 18px;              /* more breathing space */
  }
}

@media (min-width: 1200px) {
  .mosaic-grid {
    grid-auto-rows: 200px;  /* even bigger for ultra-wide */
    gap: 22px;
  }
}

/* light box */
/* ================= LIGHTBOX ================= */
/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 40px;
  color: #000;
  cursor: pointer;
  line-height: 1;
}
.mosaic-gallery img {
  cursor: zoom-in;
}
.tile .overlay {
  pointer-events: none;
}
/* ===== LIGHTBOX EXTRAS ===== */
body.lightbox-open {
  overflow: hidden;
}

.lightbox-content {
  text-align: center;
}

#lightboxCaption {
  color: #e5e7eb;
  margin-top: 14px;
  font-size: 0.95rem;
}

/* arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* mobile */
@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 40px;
  }
}
/* ===== LIGHTBOX ADVANCED ===== */
.lightbox-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightboxImg {
  max-width: 90vw;
  max-height: 75vh;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

#lightboxImg.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

#lightboxCaption {
  color: #e5e7eb;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* PLAY BUTTON */
.lightbox-play {
  position: absolute;
  bottom: 120px;
  right: 30px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 18px;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
}

/* THUMBNAILS */
.lightbox-thumbs {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 20px;
}

.lightbox-thumbs img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  opacity: 0.6;
  cursor: pointer;
}

.lightbox-thumbs img.active {
  opacity: 1;
  outline: 2px solid #fff;
}

/* MOBILE */
@media (max-width: 600px) {
  .lightbox-thumbs img {
    width: 50px;
    height: 36px;
  }
}
