/* ============================================================
   Moore Power — Gallery Page Styles
   ============================================================ */

/* ── Active nav link ──────────────────────────────────────── */
.nav-active {
  color: var(--gold) !important;
  background: rgba(245,192,53,.1) !important;
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  position: relative;
  padding: 140px 0 64px;
  overflow: hidden;
  background: var(--dark);
}
.page-header-bg {
  position: absolute;
  inset: 0;
  background: url('../images/iCloud%20Photos%20from%20David%20Moore/IMG_6323.JPEG') center/cover no-repeat;
  opacity: .14;
}
.page-header-content {
  position: relative;
  z-index: 1;
}
.page-header h1 { color: var(--white); margin: 10px 0 14px; }
.page-header p  { color: rgba(255,255,255,.65); font-size: 1.1rem; max-width: 480px; }

/* ── Gallery Section ──────────────────────────────────────── */
.gallery-section { padding: 64px 0 96px; background: var(--grey-light); }

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--grey);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(61,122,111,.3);
}

/* ── Masonry Grid ─────────────────────────────────────────── */
.masonry {
  columns: 3;
  column-gap: 14px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--border);
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}
.masonry-item:hover img { transform: scale(1.04); }

.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,35,50,.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  gap: 6px;
}
.masonry-item:hover .item-overlay { opacity: 1; }
.item-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  font-family: var(--font-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  width: fit-content;
}
.item-overlay p {
  color: var(--white);
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

/* Hidden/filtered items */
.masonry-item.hidden {
  display: none;
}
.masonry-item.fade-in {
  animation: fadeUp 0.35s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.no-results {
  text-align: center;
  padding: 64px 0;
  color: var(--grey);
  font-size: 1rem;
}

/* ── Gallery CTA ──────────────────────────────────────────── */
.gallery-cta {
  background: var(--dark);
  padding: 72px 0;
}
.gallery-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.gallery-cta h2 { color: var(--white); margin-bottom: 10px; }
.gallery-cta p  { color: rgba(255,255,255,.65); font-size: 1rem; max-width: 500px; }

/* ── Lightbox ─────────────────────────────────────────────── */
.glb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,14,20,.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.glb[hidden] { display: none; }

.glb-img-wrap {
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.glb-img-wrap img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
  transition: opacity 0.2s ease;
}

.glb-caption {
  margin-top: 18px;
  color: rgba(255,255,255,.7);
  font-family: var(--font-head);
  font-size: .85rem;
  text-align: center;
  max-width: 600px;
  padding: 0 20px;
}
.glb-counter {
  margin-top: 8px;
  color: rgba(255,255,255,.35);
  font-family: var(--font-head);
  font-size: .75rem;
  letter-spacing: .06em;
}

.glb-close,
.glb-prev,
.glb-next {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.glb-close:hover,
.glb-prev:hover,
.glb-next:hover {
  background: rgba(245,192,53,.15);
  border-color: rgba(245,192,53,.4);
  color: var(--gold);
}
.glb-close {
  top: 20px; right: 20px;
  width: 44px; height: 44px;
}
.glb-prev {
  left: 20px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 56px;
}
.glb-next {
  right: 20px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 56px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .masonry { columns: 2; }
}

@media (max-width: 768px) {
  .masonry { columns: 2; column-gap: 10px; }
  .masonry-item { margin-bottom: 10px; }
  .page-header { padding: 120px 0 48px; }
  .gallery-cta-inner { flex-direction: column; text-align: center; }
  .glb-prev { left: 8px; }
  .glb-next { right: 8px; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 7px 14px; font-size: .75rem; }
}
