/* ================================
   GALLERY — tab + grid
================================ */
.gallery {
  background: var(--cream-bg);
  padding: 3rem 1.5rem 4rem;
}

.gallery__container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Dipakai di section gallery halaman paket-*.html (1 pulau, gak ada tab) */
.gallery__section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  color: var(--navy-primary);
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Tabs */
.gallery__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid rgba(11, 57, 84, 0.12);
  padding-bottom: 0.75rem;
}

.gallery__tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gallery__tab:hover {
  color: var(--navy-primary);
}

.gallery__tab--active {
  color: var(--teal-accent);
  border-bottom-color: var(--teal-accent);
}

/* Grid foto */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 32, 47, 0.1);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

/* ================================
   RESPONSIVE — GALLERY GRID
================================ */
@media (max-width: 1000px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .gallery__tabs {
    gap: 1rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .gallery__tab {
    white-space: nowrap;
  }
}

/* ================================
   LIGHTBOX
================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 32, 47, 0.94);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox--open {
  display: flex;
}

.lightbox__img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 1.1rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

.lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 640px) {
  .lightbox__nav {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
}