/* ─────────────────────────────────────────────────────────────────────────
   NWP work gallery — shared styles for /, /zh/, /es/
   Loaded by all three language pages. Uses the same CSS variables the inline
   page styles define (--accent, --muted, --border, --card, --gold …), so the
   gallery inherits the site palette automatically.
   ───────────────────────────────────────────────────────────────────────── */

.gallery-filters {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 0 auto 32px; max-width: 900px;
}
.gallery-chip {
  background: var(--card); border: 1px solid var(--border); color: var(--ink);
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; line-height: 1;
}
.gallery-chip:hover { border-color: var(--accent); color: var(--accent); }
.gallery-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.gallery-card {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; aspect-ratio: 4 / 3;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(26, 77, 140, 0.18);
  border-color: var(--accent);
}
.gallery-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* Cover: real photo when present, gradient placeholder otherwise */
.gallery-card .cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.gallery-card .cover-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; color: rgba(255,255,255,0.92);
}
.gallery-card .overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 16px 14px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
}
.gallery-card .overlay .cat { font-size: 15px; font-weight: 700; line-height: 1.2; }
.gallery-card .overlay .meta { font-size: 12px; opacity: 0.9; margin-top: 3px; }
.gallery-card .count-pill {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.92); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 12px;
}

/* ── Lightbox ───────────────────────────────────────────────────────────── */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.gallery-lightbox.open { display: flex; }
.glb-inner {
  position: relative; max-width: 960px; width: 100%;
  max-height: 92vh; display: flex; flex-direction: column;
}
.glb-stage {
  position: relative; background: #000; border-radius: 12px; overflow: hidden;
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
}
.glb-stage img { max-width: 100%; max-height: 76vh; display: block; object-fit: contain; }
.glb-stage .glb-ph {
  color: #cbd5e1; text-align: center; padding: 56px 28px; max-width: 460px;
}
.glb-stage .glb-ph .big { font-size: 56px; margin-bottom: 12px; }
.glb-stage .glb-ph p { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
.glb-ph .glb-cta {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 11px 20px; border-radius: 6px; font-size: 14px; font-weight: 600;
}
.glb-ph .glb-cta:hover { background: var(--accent-dark); }
.glb-caption {
  color: #e2e8f0; font-size: 14px; text-align: center;
  padding: 12px 8px 0; min-height: 20px;
}
.glb-close, .glb-prev, .glb-next {
  position: absolute; z-index: 2; cursor: pointer; border: none;
  background: rgba(255,255,255,0.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.15s;
}
.glb-close:hover, .glb-prev:hover, .glb-next:hover { background: rgba(255,255,255,0.3); }
.glb-close { top: -6px; right: -6px; width: 40px; height: 40px; font-size: 24px; }
.glb-prev, .glb-next { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 26px; }
.glb-prev { left: 10px; } .glb-next { right: 10px; }
@media (max-width: 640px) {
  .glb-close { top: 4px; right: 4px; }
}
