/*!
 * ZZZ Fitness Club — Gallery Page Stylesheet
 *
 * Page-template-specific styles for template-gallery.php.
 * Depends on assets/css/main.css being loaded first.
 *
 * Sections:
 *   1.  Page Hero (gallery bg override)
 *   2.  Stats Strip
 *   3.  Gallery — Filter Chips
 *   4.  Gallery — Masonry Grid & Cards
 *   5.  Lightbox
 *   6.  Contact Highlights Bento
 *
 * @package ZZZ_Fitness_Theme
 * @version 1.0.0
 */

/* ============================================================================
   1. PAGE HERO — gallery background image override
   Base .page-hero styles live in about.css (loaded globally).
   This only overrides the background-image to use the gallery hero photo.
   ============================================================================ */

.page-hero--gallery::before {
  background-image:
    linear-gradient(110deg,
      rgba(26,26,26,0.95) 0%,
      rgba(26,26,26,0.78) 38%,
      rgba(26,26,26,0.55) 75%,
      rgba(26,26,26,0.45) 100%),
    url('https://zzzfitnessclub.com/wp-content/uploads/2026/04/82_11zon-scaled.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* H2 override — gallery hero uses h2 not h1 for the big title */
.page-hero--gallery .section-title {
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
  max-width: 900px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.page-hero--gallery .section-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  max-width: 660px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 36px;
}
.page-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.page-hero-ctas .btn { white-space: nowrap; }

/* Ghost variant for hero secondary CTA */
.btn-ghost {
  background: rgba(0,0,0,0.4);
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(211,47,47,0.12);
  transform: translateY(-3px);
  box-shadow: 0 14px 38px rgba(0,0,0,0.4);
}

@media (max-width: 600px) {
  .page-hero--gallery { padding: 80px 0 70px; }
  .page-hero--gallery .section-title { font-size: clamp(40px, 11vw, 56px); }
  .page-hero--gallery .section-sub   { font-size: 15px; margin-bottom: 28px; }
  .page-hero-ctas { width: 100%; gap: 10px; }
  .page-hero-ctas .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: 15px 18px; font-size: 13px; }
}
@media (max-width: 440px) {
  .page-hero--gallery .section-title { font-size: clamp(36px, 10vw, 48px); }
  .page-hero-ctas { flex-direction: column; gap: 10px; }
  .page-hero-ctas .btn { flex: 0 0 auto; width: 100%; padding: 16px 22px; font-size: 13.5px; }
}


/* ============================================================================
   2. STATS STRIP
   Quick numbers: Members · Programs · Trainers · Rating
   ============================================================================ */

.stats-strip {
  background: linear-gradient(180deg, #0e0e0e, var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 720px) { .stats-row { grid-template-columns: repeat(4, 1fr); gap: 30px; } }

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

.stat-n {
  font-family: 'Anton', sans-serif;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text);
}

.stat-l {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ============================================================================
   3. GALLERY — FILTER CHIPS
   Pill tabs above the masonry grid — filters by category.
   ============================================================================ */

.gallery-section { padding: 90px 0 110px; background: var(--bg); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.filter-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(211,47,47,0.4);
}

.filter-chip .count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.filter-chip.is-active .count { background: rgba(255,255,255,0.22); }


/* ============================================================================
   4. GALLERY — MASONRY GRID & CARDS
   CSS multi-column masonry; JS handles filtering + lightbox.
   ============================================================================ */

/* CSS multi-column masonry */
.g-grid {
  column-count: 1;
  column-gap: 16px;
}
@media (min-width: 560px)  { .g-grid { column-count: 2; } }
@media (min-width: 900px)  { .g-grid { column-count: 3; column-gap: 18px; } }
@media (min-width: 1280px) { .g-grid { column-count: 4; } }

/* Individual card */
.g-card {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transform: translateZ(0);
  transition:
    opacity .4s var(--ease),
    transform .4s var(--ease),
    border-color .4s var(--ease),
    box-shadow .4s var(--ease);
}
@media (min-width: 900px) { .g-card { margin-bottom: 18px; } }
.g-card[hidden] { display: none; }

.g-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}

/* Bottom gradient overlay (hidden until hover) */
.g-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity .4s var(--ease);
  z-index: 1;
  pointer-events: none;
}

/* Caption + tag bar */
.g-card .g-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px 18px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  pointer-events: none;
}
.g-card .g-cap {
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.g-card .g-tag {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(211,47,47,0.4);
}

/* Zoom icon — top-right corner */
.g-card .g-zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8) rotate(-12deg);
  transition: opacity .4s var(--ease), transform .4s var(--ease), background .3s var(--ease);
  pointer-events: none;
}
.g-card .g-zoom svg {
  width: 16px; height: 16px;
  fill: none; stroke: var(--text);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Hover state */
.g-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0,0,0,0.5); }
.g-card:hover img { transform: scale(1.06); }
.g-card:hover::before { opacity: 1; }
.g-card:hover .g-overlay { opacity: 1; transform: translateY(0); }
.g-card:hover .g-zoom { opacity: 1; transform: scale(1) rotate(0); background: var(--accent); }

/* Fade-in on enter */
@keyframes g-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.g-card { animation: g-fade-in .6s var(--ease) both; }

/* Empty state */
.g-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  display: none;
}
.g-empty.is-visible { display: block; }


/* ============================================================================
   5. LIGHTBOX
   Full-screen overlay with prev/next navigation.
   ============================================================================ */

.lightbox {
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-stage {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 86vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform: scale(0.96);
  opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.lightbox.is-open .lightbox-img { opacity: 1; transform: scale(1); }

.lightbox-caption {
  position: absolute;
  left: 0; right: 0; bottom: -52px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lightbox-caption .lb-tag { color: var(--accent); font-weight: 800; margin-right: 10px; }

.lightbox-counter {
  position: absolute;
  top: -40px; left: 0;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease);
  z-index: 2;
}
.lightbox-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-btn:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }

.lb-close { top: -56px; right: 0; }
.lb-prev  { left: -64px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: -64px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 900px) {
  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }
  .lb-close { top: 4px; right: 4px; }
  .lightbox-counter { top: 14px; left: 20px; }
  .lightbox-caption { font-size: 11.5px; bottom: -38px; padding: 0 12px; }
}


/* ============================================================================
   6. CONTACT HIGHLIGHTS BENTO
   Address card with map + phone/email/hours stack.
   ============================================================================ */

.contact-highlights {
  padding: 90px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 900px) { .bento-grid { grid-template-columns: 1.7fr 1fr; gap: 18px; } }

/* Large address card */
.bento-main {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex; flex-direction: column; gap: 22px;
  color: var(--text);
  text-decoration: none;
  transition: all .35s var(--ease);
}
.bento-main:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.5); }

/* Animated top-bar on hover */
.bento-main::after {
  content: ''; position: absolute; top: 0; left: 0;
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s var(--ease);
}
.bento-main:hover::after { width: 100%; }

.bento-main-head { display: flex; gap: 18px; align-items: flex-start; }

.bento-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(211,47,47,0.12);
  border-radius: 14px;
  transition: all .35s var(--ease);
}
.bento-main:hover .bento-icon { background: var(--accent); }
.bento-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s var(--ease); }
.bento-main:hover .bento-icon svg { stroke: var(--text); }

.bento-main h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-body); margin-bottom: 10px; }
.bento-address { font-family: 'Inter', sans-serif; font-weight: 700; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.45; color: var(--text); margin: 0; }

/* Embedded mini-map */
.bento-map {
  position: relative; height: 140px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid #2A2A2A;
  overflow: hidden;
}
.bento-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.88) contrast(0.85); pointer-events: none; transition: filter .35s var(--ease); }
.bento-main:hover .bento-map iframe { filter: grayscale(0.6) invert(0.88) contrast(0.95); }

.bento-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.bento-foot .label { color: var(--text-muted); }
.bento-foot .cta   { color: var(--accent); transition: color .3s var(--ease); }
.bento-main:hover .bento-foot .cta { color: var(--accent-hover); }

/* Right column: stack of small cards */
.bento-stack { display: flex; flex-direction: column; gap: 16px; }

.bento-small {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: center;
  flex: 1;
  color: var(--text);
  text-decoration: none;
  transition: all .35s var(--ease);
}
.bento-small::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s var(--ease); }
.bento-small:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.4); }
.bento-small:hover::after { width: 100%; }

.bento-small-icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(211,47,47,0.12); border-radius: 12px; transition: all .35s var(--ease); }
.bento-small:hover .bento-small-icon { background: var(--accent); }
.bento-small-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s var(--ease); }
.bento-small:hover .bento-small-icon svg { stroke: var(--text); }

.bento-small-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.bento-small-text .label { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-body); }
.bento-small-text .value { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.35; }
.bento-small-text .meta  { font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.12em; margin-top: 4px; }
.bento-small-text .meta strong { color: var(--accent); font-weight: 700; }

@media (max-width: 500px) {
  .bento-main  { padding: 24px; }
  .bento-small { padding: 16px 18px; }
  .bento-small-icon { width: 40px; height: 40px; }
  .bento-small-text .value { font-size: 14px; }
}
