/* ============================================================
   LUMOS — Gallery page
   ============================================================ */

.gallery-masonry {
  columns: 4;
  column-gap: 16px;
}

/* ── Gallery tile ─────────────────────────────────────────── */

.gallery-tile {
  border-radius: 14px;
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 16px;
  cursor: pointer;
  position: relative;
}
.gallery-tile:nth-child(odd)  { height: 290px; }
.gallery-tile:nth-child(even) { height: 185px; }

.gallery-tile__inner {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}
.gallery-tile__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease;
}
.gallery-tile:hover .gallery-tile__inner img {
  transform: scale(1.04);
}

/* Caption ẩn đi — chỉ hiện trong lightbox */
.gallery-tile__caption { display: none; }

/* ── Filter tabs ─────────────────────────────────────────── */

.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: var(--border-champ);
  background: transparent;
  color: var(--ink);
  padding: 8px 18px;
  cursor: pointer;
  transition: background var(--duration-fast) ease,
              border-color var(--duration-fast) ease;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--champagne);
  border-color: var(--champagne);
}

/* ── Gallery section header row ─────────────────────────── */

.gallery-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* ── Lightbox ────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(18, 16, 13, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img-wrap {
  max-width: min(90vw, 900px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  transition: opacity 220ms ease;
}
.lightbox__img.is-loading { opacity: 0; }

.lightbox__caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  pointer-events: none;
}

/* Nav buttons */
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(200,169,106,0.12);
  border: 1px solid rgba(200,169,106,0.3);
  color: var(--champagne);
  font-size: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
  line-height: 1;
  padding: 0;
}
.lightbox__btn:hover {
  background: rgba(200,169,106,0.25);
  border-color: var(--champagne);
}
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

/* Close button */
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: color 200ms ease;
}
.lightbox__close:hover { color: #fff; }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .gallery-masonry { columns: 3; }
}
@media (max-width: 768px) {
  .gallery-masonry { columns: 2; column-gap: 12px; }
  .gallery-tile:nth-child(odd)  { height: 220px; }
  .gallery-tile:nth-child(even) { height: 150px; }
  .gallery-tile { margin-bottom: 12px; }
  .gallery-header-row { flex-direction: column; align-items: flex-start; }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
  .lightbox__btn  { width: 40px; height: 40px; font-size: 20px; }
}
@media (max-width: 480px) {
  .gallery-masonry { columns: 2; column-gap: 10px; }
  .gallery-tile:nth-child(odd)  { height: 180px; }
  .gallery-tile:nth-child(even) { height: 130px; }
  .gallery-tile { margin-bottom: 10px; }
}
