/* ═══════════════════════════════════════════════════════════════════════════
   SUPERIOR ONE SERVICES — Our Work (Gallery) Page Stylesheet
   Inherits brand from style.css + about.css (tokens, page-hero, typography)
═══════════════════════════════════════════════════════════════════════════ */

/* ── GALLERY INTRO / FILTERS ────────────────────────────────────────────── */
.gallery-intro { padding-bottom: 8px; }

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.gallery-filter {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-body);
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-filter:hover { border-color: var(--blue); color: var(--blue); }
.gallery-filter.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ── GALLERY CATEGORY ────────────────────────────────────────────────────── */
.gallery-category { padding-top: 24px; }
.gallery-category-header { margin-bottom: 28px; max-width: 720px; }
.gallery-category-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.gallery-category-sub { color: var(--grey-text); font-size: 0.98rem; line-height: 1.6; }

/* ── GALLERY GRID (masonry-style via CSS grid spans) ────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--charcoal);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(14,20,32,.55) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover, .gallery-item:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; }

.gallery-item-tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(14,20,32,.65);
  border: 1px solid rgba(255,255,255,.2);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}
.gallery-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), background var(--transition);
}
.gallery-item:hover .gallery-play, .gallery-item:focus-visible .gallery-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--teal);
  color: var(--white);
}

/* ── LIGHTBOX ─────────────────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,22,.94);
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.open { display: flex; opacity: 1; }
.lightbox-media {
  max-width: min(90vw, 900px);
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media img, .lightbox-media video {
  max-width: 100%;
  max-height: 76vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #000;
}
.lightbox-caption {
  color: rgba(255,255,255,.75);
  font-size: 0.92rem;
  text-align: center;
  max-width: 640px;
  margin-top: 18px;
  padding: 0 12px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.16); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,.16); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--wide { grid-column: span 2; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item--wide { grid-column: span 2; aspect-ratio: 4/5; }
  .gallery-filters { gap: 8px; }
  .gallery-filter { padding: 8px 16px; font-size: 0.72rem; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; }
}

/* ── TEAM CTA BANNER FIX ─────────────────────────────────────────
   about.css's .team-cta-banner::before decorative overlay has no z-index,
   so it sits above the button in hit-testing on this page (markup here uses
   .team-cta-inner, not .inner, so about.css's ".team-cta-banner .inner"
   z-index rule never applies here). Lift the content wrapper above it. */
.team-cta-banner .team-cta-inner { position: relative; z-index: 1; }
