/* ===============================
   GALLERY (PHP SAFE)
   =============================== */

#genx9-gallery {
  isolation: isolate;
}

#genx9-gallery * {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ===== Section ===== */
#genx9-gallery .gallery-section {
  padding: 80px 20px;
  background:
    linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
    url("https://images.unsplash.com/photo-1518972559570-7cc1309f3229?w=1600&auto=format&fit=crop&q=60");
  background-size: cover;
  background-position: center;
}

/* ===== Header ===== */
#genx9-gallery .gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

#genx9-gallery .tag {
  font-size: 26px;
  letter-spacing: 5px;
  font-weight: 700;
  display: inline-block;
  background: linear-gradient(90deg, #b85cff, #4f8cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#genx9-gallery h2 {
  font-size: 46px;
  color: #222;
}

#genx9-gallery p {
  color: #555;
}

/* ===== Grid ===== */
.gallery-grid {
  max-width: 1300px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.gallery-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.35s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* ===============================
   LIGHTBOX (GLOBAL – DO NOT SCOPE)
   =============================== */

.genx9-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 2147483647; /* MAX SAFE */
}

.genx9-lightbox.show {
  opacity: 1;
  visibility: visible;
}

.genx9-lightbox img {
  max-width: 90%;
  max-height: 90%;
}

/* ❌ CLOSE */
.genx9-close {
  position: fixed;
  top: 20px;
  right: 28px;
  font-size: 42px;
  color: #fff;
  cursor: pointer;
}

/* ◀ ▶ ARROWS */
.genx9-prev,
.genx9-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  padding: 10px;
}

.genx9-prev { left: 20px; }
.genx9-next { right: 20px; }

.genx9-close:hover,
.genx9-prev:hover,
.genx9-next:hover {
  opacity: 0.7;
}
