/* ═══════════════════════════════════════════════
   GALLERY PAGE — STYLES
   Depends on styles.css design tokens
═══════════════════════════════════════════════ */

/* ── Active nav link ── */
.nav-link--active {
  color: #8CC63F !important;
  background: rgba(0, 152, 69, 0.15) !important;
}

/* ══════════════════════════════════════════════════════
   HERO — Dark full-width with centered content
   + scrolling image strip at bottom
   Distinct from: homepage (Three.js), about (split photo),
   services (icon grid panel)
══════════════════════════════════════════════════════ */
.gl-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 660px;
  height: 88vh;
  max-height: 900px;
  background: linear-gradient(152deg, #081B29 0%, #081B29 55%, #060F1A 100%);
  color: #FFFFFF;
  overflow: hidden;
}

/* Background layer */
.gl-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Gradient orbs */
.gl-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.gl-hero-orb-1 {
  width: 640px;
  height: 640px;
  top: -260px;
  left: -200px;
  background: radial-gradient(circle, rgba(0, 100, 130, 0.38) 0%, transparent 68%);
}

.gl-hero-orb-2 {
  width: 480px;
  height: 480px;
  top: -140px;
  right: -160px;
  background: radial-gradient(circle, rgba(0, 80, 120, 0.32) 0%, transparent 68%);
}

.gl-hero-orb-3 {
  width: 360px;
  height: 360px;
  bottom: 80px;
  right: 18%;
  background: radial-gradient(circle, rgba(0, 152, 69, 0.1) 0%, transparent 68%);
}

/* Grid lines texture */
.gl-hero-gridlines {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0px, transparent 1px, transparent 60px, rgba(255,255,255,0.025) 61px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0px, transparent 1px, transparent 60px, rgba(255,255,255,0.025) 61px);
  background-size: 61px 61px;
}

/* Floating CSS shapes */
.gl-hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: gl-shape-drift 10s ease-in-out infinite;
}

.gl-hero-shape-1 {
  width: 220px;
  height: 220px;
  top: 10%;
  left: 8%;
  background: radial-gradient(circle, var(--navy-2), transparent 70%);
  animation-duration: 11s;
  animation-delay: 0s;
}

.gl-hero-shape-2 {
  width: 140px;
  height: 140px;
  top: 30%;
  right: 12%;
  background: radial-gradient(circle, var(--gold), transparent 70%);
  animation-duration: 14s;
  animation-delay: -3s;
}

.gl-hero-shape-3 {
  width: 90px;
  height: 90px;
  bottom: 28%;
  left: 22%;
  background: radial-gradient(circle, var(--mint), transparent 70%);
  animation-duration: 9s;
  animation-delay: -5s;
}

@keyframes gl-shape-drift {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  33%       { transform: translateY(-18px) rotate(6deg) scale(1.06); }
  66%       { transform: translateY(10px) rotate(-4deg) scale(0.96); }
}

/* Centered content area */
.gl-hero-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 110px 0 180px;
  position: relative;
  z-index: 2;
}

.gl-hero-inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* Breadcrumb */
.sv-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.52);
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.sv-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

.sv-breadcrumb a:hover { color: var(--gold); }

/* H1 */
.gl-hero-h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin: 16px 0 22px;
}

.gl-hero-h1 span { display: block; }

/* Subtitle */
.gl-hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.64);
  max-width: 580px;
  margin: 0 auto 32px;
}

/* Hero action buttons */
.gl-hero-actions {
  justify-content: center;
  margin-bottom: 32px;
}

/* Stat chips row */
.gl-hero-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Scrolling image strip ── */
.gl-hero-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding-bottom: 24px;
  overflow: hidden;
  /* Fade edges */
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.gl-strip-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: gl-marquee 38s linear infinite;
}

@keyframes gl-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.gl-strip-item {
  flex-shrink: 0;
  width: 200px;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: transform 300ms ease, border-color 300ms ease;
}

.gl-strip-item:hover {
  transform: scale(1.04);
  border-color: rgba(0, 152, 69, 0.35);
}

.gl-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════
   FILTER BAR — Sticky centered segmented control
══════════════════════════════════════════════════════ */
.gl-filter-bar {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: rgba(8, 27, 41, 0.97);
  border-bottom: 1px solid rgba(0, 152, 69, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 0;
  box-shadow: 0 4px 28px rgba(0, 152, 69, 0.06);
}

/* Centered pill group — segmented control */
.gl-filter-inner {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  background: rgba(0, 152, 69, 0.07);
  border: 1px solid rgba(0, 152, 69, 0.11);
  border-radius: 100px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: calc(100vw - 48px);
}

.gl-filter-inner::-webkit-scrollbar { display: none; }

.gl-filter-btn {
  flex-shrink: 0;
  padding: 8px 22px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.005em;
}

.gl-filter-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
}

.gl-filter-btn--active {
  background: var(--navy);
  color: #FFFFFF;
  box-shadow: 0 2px 14px rgba(0, 152, 69, 0.28);
}

.gl-filter-btn--active:hover {
  background: var(--navy);
  color: #FFFFFF;
}

/* ══════════════════════════════════════════════════════
   FEATURED SECTION — Asymmetric 3-photo highlight
══════════════════════════════════════════════════════ */
.gl-featured-section {
  background: var(--paper);
}

.section-head-centered {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.section-head-centered .section-title {
  margin: 12px 0 14px;
}

.section-body.centered { text-align: center; }

/* 3-photo asymmetric grid */
.gl-featured-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  grid-template-rows: 280px 220px;
  gap: 16px;
}

.gl-featured-main {
  grid-row: 1 / 3;
}

.gl-featured-stack {
  display: contents;
}

/* ══════════════════════════════════════════════════════
   GALLERY ITEM — Base styles (shared by featured + grid)
══════════════════════════════════════════════════════ */
.gl-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--cream);
  isolation: isolate;
}

.gl-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 540ms var(--ease-out);
  will-change: transform;
}

.gl-item:hover img {
  transform: scale(1.07);
}

/* Hover overlay */
.gl-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 27, 41, 0.88) 0%,
    rgba(8, 27, 41, 0.28) 45%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px;
  opacity: 0;
  transition: opacity 280ms ease;
}

.gl-item:hover .gl-item-overlay,
.gl-item:focus-visible .gl-item-overlay {
  opacity: 1;
}

.gl-item-meta {
  flex: 1;
  min-width: 0;
}

.gl-item-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0, 152, 69, 0.25);
  border: 1px solid rgba(0, 152, 69, 0.4);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gl-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-item-zoom {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: background 200ms ease, transform 200ms ease;
  margin-left: 10px;
}

.gl-item:hover .gl-item-zoom {
  background: var(--navy-2);
  border-color: var(--navy-2);
  transform: scale(1.1);
}

/* Featured badge */
.gl-featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Focus outline */
.gl-item:focus-visible {
  outline: 2.5px solid var(--navy-2);
  outline-offset: 3px;
}

/* ── Video badge (always visible) ── */
.gl-video-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 100px;
  background: rgba(8, 27, 41, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 280ms ease;
}

.gl-item:hover .gl-video-badge { opacity: 0; }

.gl-play-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
}

.gl-play-btn svg { margin-left: 2px; }

.gl-video-dur {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* ══════════════════════════════════════════════════════
   GALLERY GRID SECTION — Masonry-style 3-column
══════════════════════════════════════════════════════ */
.gl-grid-section {
  background: var(--cream);
  padding-top: 8px;
}

.gl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 256px;
  grid-auto-flow: dense;
  gap: 14px;
}

/* Tall items span 2 rows, placed in rotating columns */
.gl-item--tall-1 {
  grid-column: 1;
  grid-row: span 2;
}

.gl-item--tall-2 {
  grid-column: 2;
  grid-row: span 2;
}

.gl-item--tall-3 {
  grid-column: 3;
  grid-row: span 2;
}

/* Filter transition — items fade when hidden */
.gl-item {
  animation: gl-item-appear 320ms var(--ease-out) both;
}

@keyframes gl-item-appear {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Empty state */
.gl-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 72px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.gl-empty-state.visible { display: flex; }

.gl-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  background: var(--aqua);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

/* ══════════════════════════════════════════════════════
   LIGHTBOX — Full-screen image viewer
══════════════════════════════════════════════════════ */
.gl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
}

.gl-lightbox--open {
  opacity: 1;
  pointer-events: all;
}

/* Backdrop */
.gl-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 27, 41, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Window */
.gl-lightbox-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1000px);
  max-height: 90vh;
  width: 100%;
  transform: scale(0.92);
  transition: transform 300ms var(--ease-spring);
}

.gl-lightbox--open .gl-lightbox-window {
  transform: scale(1);
}

/* Close button */
.gl-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 160ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gl-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1);
}

/* Nav buttons */
.gl-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gl-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.1);
}

.gl-lightbox-prev { left: 20px; }
.gl-lightbox-next { right: 20px; }

.gl-lightbox-nav:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* Image container */
.gl-lightbox-media {
  position: relative;
  width: 100%;
  max-height: calc(90vh - 100px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.gl-lightbox-media img {
  width: 100%;
  height: auto;
  max-height: calc(90vh - 100px);
  object-fit: contain;
  display: block;
  transition: opacity 220ms ease;
}

.gl-lightbox-media img.loading { opacity: 0; }

/* Loader */
.gl-lightbox-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gl-lightbox-loader.hidden { display: none; }

.gl-loader-ring {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: gl-spin 700ms linear infinite;
}

@keyframes gl-spin {
  to { transform: rotate(360deg); }
}

/* Caption */
.gl-lightbox-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 0;
  width: 100%;
}

.gl-lightbox-cat {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0, 152, 69, 0.18);
  border: 1px solid rgba(0, 152, 69, 0.35);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gl-lightbox-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-lightbox-counter {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — 1080px breakpoint
══════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .gl-hero-h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }

  .gl-featured-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 260px 200px;
  }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — 860px breakpoint
══════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .gl-hero {
    min-height: 560px;
    height: auto;
    max-height: none;
  }

  .gl-hero-content {
    padding: 100px 0 32px;
  }

  .gl-hero-h1 { font-size: 2.2rem; }

  .gl-featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 280px 200px 200px;
    gap: 12px;
  }

  .gl-featured-main { grid-row: 1; }

  .gl-featured-stack { display: contents; }

  .gl-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  .gl-item--tall-1,
  .gl-item--tall-2,
  .gl-item--tall-3 {
    grid-column: auto;
    grid-row: span 2;
  }

  .gl-lightbox-prev { left: 8px; }
  .gl-lightbox-next { right: 8px; }

  /* Tighten filter pills at tablet */
  .gl-filter-btn { padding: 7px 16px; font-size: 0.83rem; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — 640px breakpoint
══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .gl-hero { min-height: 520px; }

  .gl-hero-content { padding: 90px 0 24px; }

  .gl-hero-h1 { font-size: 1.9rem; }

  .gl-hero-subtitle { font-size: 0.92rem; }

  .gl-hero-actions { flex-direction: column; align-items: center; gap: 10px; }

  .gl-hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }

  .gl-strip-item { width: 150px; height: 100px; }

  /* Filter — switch to full-width scrollable row on mobile */
  .gl-filter-bar {
    padding: 12px 0;
    /* Fade the right edge to hint at more pills */
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  }

  .gl-filter-bar .container {
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gl-filter-bar .container::-webkit-scrollbar { display: none; }

  /* Reset the segmented-control look — use individual pills instead */
  .gl-filter-inner {
    width: max-content;
    margin: 0;
    justify-content: flex-start;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    gap: 8px;
    max-width: none;
    overflow: visible;
  }

  .gl-filter-btn {
    border: 1.5px solid rgba(0, 152, 69, 0.18);
    padding: 7px 15px;
    font-size: 0.82rem;
    background: var(--paper);
    color: var(--ink);
    box-shadow: none;
  }

  .gl-filter-btn:hover {
    background: var(--aqua);
    border-color: var(--aqua);
    color: var(--navy);
  }

  .gl-filter-btn--active {
    background: var(--navy);
    border-color: var(--navy);
    color: #FFFFFF;
    box-shadow: none;
  }

  .gl-featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 180px 180px;
  }

  .gl-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
    gap: 10px;
  }

  .gl-item--tall-1,
  .gl-item--tall-2,
  .gl-item--tall-3 {
    grid-column: auto;
    grid-row: span 2;
  }

  .gl-item-title { font-size: 0.82rem; }

  .gl-lightbox-window { max-width: 95vw; }

  .gl-lightbox-prev,
  .gl-lightbox-next { display: none; }

  .gl-lightbox-caption { flex-wrap: wrap; gap: 8px; }

  .gl-lightbox-title { white-space: normal; }
}


/* ══════════════════════════════════════════════════════
   ALTERNATING LIGHT / DARK SECTIONS
   gl-hero → always dark
   gl-featured → LIGHT (off-white)
   gl-grid → DARK (explicit)
   cta → always dark
══════════════════════════════════════════════════════ */
.gl-featured-section {
  --ink:       #081B29;
  --ink-2:     #243B53;
  --muted:     #4A6480;
  --paper:     #FFFFFF;
  --cream:     #F4F7FA;
  --aqua:      #E8F5F0;
  --border:    rgba(36, 59, 83, 0.1);
  --border-mid: rgba(36, 59, 83, 0.2);
  background: #F0F5FA;
}

.gl-grid-section { background: #081B29; }

/* Kicker pill in featured section */
.gl-featured-section .kicker-pill {
  background:   rgba(0, 152, 69, 0.09);
  border-color: rgba(0, 152, 69, 0.25);
  color:        #007835;
}
.gl-featured-section .kicker-pill::before { background: #009845; }
