/* ==========================================================
   Riverport Business Club - Gallery
   hero > filters + masonry grid (white) > CTA (charcoal)
   > member circles > footer, plus a lightbox
   ========================================================== */

/* ---------- Heading ---------- */
.gl-head { margin-bottom: 1.75rem; }
.gl-head .rp-rule { margin-bottom: 1.25rem; }
.gl-lead { margin: 0; max-width: 62ch; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); font-weight: 500; color: #3a3a3a; line-height: 1.65; }

/* ---------- Filters ---------- */
.gl-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.gl-filters[hidden] { display: none; }
.gl-filter {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem; border: 1px solid var(--grey-line); border-radius: 999px; cursor: pointer;
  background: var(--white); color: #3a3a3a; font: inherit; font-size: 0.92rem; font-weight: 700;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.gl-filter:hover { border-color: var(--brand); }
.gl-filter__count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem; border-radius: 999px; background: var(--grey); color: var(--muted); font-size: 0.78rem; }
.gl-filter.is-active { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.gl-filter.is-active .gl-filter__count { background: var(--brand); color: var(--white); }

/* ---------- Masonry grid ---------- */
.gl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.gl-item { min-width: 0; }
.gl-item[hidden] { display: none; }
.gl-link { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--grey); box-shadow: var(--shadow-sm); }
.gl-link img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.5s var(--ease), filter 0.3s var(--ease); }
.gl-link__zoom {
  position: absolute; right: 0.75rem; bottom: 0.75rem; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--brand-deep);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.gl-link:hover img, .gl-link:focus-visible img { transform: scale(1.04); }
.gl-link:hover .gl-link__zoom, .gl-link:focus-visible .gl-link__zoom { opacity: 1; transform: none; }
.gl-link:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* ---------- CTA ---------- */
.gl-cta {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5rem); color: var(--white);
  background: radial-gradient(ellipse at 90% 10%, rgba(254, 104, 191, 0.22), transparent 55%), linear-gradient(135deg, #4d4d4d 0%, #3a3a3a 100%);
}
.gl-cta__circles { position: absolute; z-index: -1; pointer-events: none; aspect-ratio: 1; width: clamp(240px, 26vw, 400px); left: clamp(-150px, -7vw, -60px); bottom: clamp(-170px, -9vw, -80px); }
.gl-cta__circles span { position: absolute; border-radius: 50%; width: 52%; aspect-ratio: 1; }
.gl-cta__circles span:nth-child(1) { left: 22%; top: 4%; background: rgba(255, 255, 255, 0.07); }
.gl-cta__circles span:nth-child(2) { left: 6%; top: 40%; background: rgba(254, 104, 191, 0.38); }
.gl-cta__circles span:nth-child(3) { left: 40%; top: 38%; background: rgba(147, 147, 147, 0.26); }
.gl-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.gl-cta__title { color: var(--white); font-size: var(--fs-h2); font-weight: 800; margin: 0 0 0.5rem; }
.gl-cta p { margin: 0; color: #e6e6e6; font-size: 1.05rem; max-width: 52ch; }
.gl-cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; flex-shrink: 0; }
a.gl-cta__join { background: var(--brand); color: var(--white); }
a.gl-cta__join:hover { background: var(--brand-dark); color: var(--white); box-shadow: 0 10px 24px rgba(254, 104, 191, 0.35); }

/* ---------- Lightbox ---------- */
.gl-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 4vw, 3rem); background: #161616; }
.gl-lightbox[hidden] { display: none; }
.gl-lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; max-width: 100%; }
.gl-lightbox__img { display: block; max-width: min(1200px, 100%); max-height: calc(100vh - 9rem); width: auto; height: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.gl-lightbox__caption { max-width: 70ch; text-align: center; color: #e6e6e6; font-size: 0.95rem; line-height: 1.5; }
.gl-lightbox__caption span { display: block; margin-top: 0.25rem; color: #9a9a9a; font-size: 0.85rem; }
.gl-lightbox__btn {
  position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: var(--white); font-size: 1.15rem; transition: background-color 0.2s var(--ease);
}
.gl-lightbox__btn:hover { background: var(--brand); }
.gl-lightbox__btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.gl-lightbox__close { top: 1rem; right: 1rem; }
.gl-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.gl-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
body.gl-locked { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gl-cta__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .gl-grid { gap: 0.6rem; }
  .gl-link__zoom { display: none; }
  .gl-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.25rem; scrollbar-width: none; }
  .gl-filters::-webkit-scrollbar { display: none; }
  .gl-filter { flex-shrink: 0; }
  .gl-cta__actions { width: 100%; flex-direction: column; }
  .gl-cta__actions .rp-btn { width: 100%; justify-content: center; }
  .gl-lightbox__prev, .gl-lightbox__next { top: auto; bottom: 1rem; transform: none; }
  .gl-lightbox__prev { left: calc(50% - 60px); }
  .gl-lightbox__next { right: calc(50% - 60px); }
  .gl-lightbox__img { max-height: calc(100vh - 12rem); }
}
@media (prefers-reduced-motion: reduce) {
  .gl-link img, .gl-link__zoom { transition: none; }
}
