/* ═══════════════════════════════════════════════════════════
   KENKO GALLERY — Editorial Adventure Layout
═══════════════════════════════════════════════════════════ */

/* ── Section wrapper ──────────────────────────────────────── */
.kenko-gallery,
.newgal {
  margin: 3.5rem 0 2rem;
  position: relative;
  padding: 0 1rem;
}

@media (min-width: 992px) {
  .kenko-gallery,
  .newgal {
    padding: 0 5rem;
  }
}

/* ── Heading ──────────────────────────────────────────────── */
.kenko-gallery h2,
.newgal h2 {
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kenko-gallery h2::before,
.newgal h2::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.kenko-gallery h2 span,
.newgal h2 span {
  display: contents;
}

/* ── Bento Grid ───────────────────────────────────────────── */
.kenko-gallery-grid,
.gallery-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 80px;
  gap: 5px;
}

/* Hero — first image dominates */
.kenko-gallery-item:nth-child(1),
.gallery-slide:nth-child(1) {
  grid-column: 1 / 8;
  grid-row: 1 / 7;
}

/* Right column — stacked pair */
.kenko-gallery-item:nth-child(2),
.gallery-slide:nth-child(2) {
  grid-column: 8 / 13;
  grid-row: 1 / 4;
}

.kenko-gallery-item:nth-child(3),
.gallery-slide:nth-child(3) {
  grid-column: 8 / 13;
  grid-row: 4 / 7;
}

/* Bottom row — three equal */
.kenko-gallery-item:nth-child(4),
.gallery-slide:nth-child(4) {
  grid-column: 1 / 5;
  grid-row: 7 / 11;
}

.kenko-gallery-item:nth-child(5),
.gallery-slide:nth-child(5) {
  grid-column: 5 / 9;
  grid-row: 7 / 11;
}

.kenko-gallery-item:nth-child(6),
.gallery-slide:nth-child(6) {
  grid-column: 9 / 13;
  grid-row: 7 / 11;
}

/* Extra images — wider strip */
.kenko-gallery-item:nth-child(7),
.gallery-slide:nth-child(7) {
  grid-column: 1 / 7;
  grid-row: 11 / 14;
}

.kenko-gallery-item:nth-child(8),
.gallery-slide:nth-child(8) {
  grid-column: 7 / 13;
  grid-row: 11 / 14;
}

.kenko-gallery-item:nth-child(9),
.gallery-slide:nth-child(9) {
  grid-column: 1 / 13;
  grid-row: 14 / 17;
}

/* ── Cell styles ──────────────────────────────────────────── */
.kenko-gallery-item,
.gallery-slide {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  cursor: zoom-in;
  will-change: transform;
  background: #1a1a1a;
}

.kenko-gallery-item img,
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.kenko-gallery-item:hover img,
.gallery-slide:hover img {
  transform: scale(1.07);
}

/* Caption overlay on hover */
.kenko-gallery-item::after,
.gallery-slide::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: rgba(255,255,255,0.9);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  pointer-events: none;
}

.kenko-gallery-item:hover::after,
.gallery-slide:hover::after {
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .kenko-gallery-grid,
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  .kenko-gallery-item,
  .gallery-slide {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .kenko-gallery-item:nth-child(1),
  .gallery-slide:nth-child(1) {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════════════ */
.kenko-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.kenko-lightbox.is-open { pointer-events: all; }

.kenko-lightbox__img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

.kenko-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: rgba(255,255,255,0.6);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
  font-weight: 300;
}
.kenko-lightbox__close:hover { color: #fff; }

.kenko-lightbox__prev,
.kenko-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 2.4rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 22px;
  font-weight: 200;
  transition: color 0.2s;
  line-height: 1;
}
.kenko-lightbox__prev:hover,
.kenko-lightbox__next:hover { color: #fff; }
.kenko-lightbox__prev { left: 0; }
.kenko-lightbox__next { right: 0; }

.kenko-lightbox__counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
