/* ═══════════════════════════════════════════
   GALLERY.CSS — Shaq's Auto Spa
   Gallery: hero, filter bar, image grid, CTA
   ═══════════════════════════════════════════ */

/* ─────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0s !important;
  }
}

/* ─────────────────────────────────────
   PAGE HERO — 40vh, grain texture
   ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gal-hero {
  position: relative;
  height: 40vh;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0a0a0a;
  overflow: hidden;
  text-align: center;
}

.gal-hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
}

.gal-hero__content {
  position: relative;
  z-index: 2;
}

.gal-hero__reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.gal-hero__eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #84cc16;
  margin-bottom: 12px;
}

.gal-hero__headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  color: #e5e5e5;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gal-hero__accent {
  color: #84cc16;
}

.gal-hero__subtext {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  color: #888888;
  margin-top: 12px;
}

/* ─────────────────────────────────────
   FILTER BAR — sticky below nav
   ───────────────────────────────────── */
.gal-filter {
  position: sticky;
  top: var(--nav-height);
  z-index: 10;
  background-color: #0a0a0a;
  border-bottom: 1px solid #2a2a2a;
  padding: 14px 0;
}

.gal-filter__inner {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gal-filter__pill {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid #2a2a2a;
  color: #888888;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gal-filter__pill:hover {
  border-color: #84cc16;
  color: #e5e5e5;
}

.gal-filter__pill.active {
  background-color: #84cc16;
  color: #0a0a0a;
  border-color: #84cc16;
  font-weight: 600;
}

/* ─────────────────────────────────────
   GALLERY GRID
   Desktop: 3-col with wide cards
   Mobile: 1-col
   ───────────────────────────────────── */
.gal-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 260px;
  gap: 10px;
}

@media (min-width: 768px) {
  .gal-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 12px;
  }
}

/* Wide card — spans 2 columns on desktop */
@media (min-width: 768px) {
  .gal-card--wide {
    grid-column: span 2;
  }
}

/* ─────────────────────────────────────
   GALLERY CARD — single image
   ───────────────────────────────────── */
.gal-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: linear-gradient(135deg, #1a1a1a, #222);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle hover lift on desktop */
@media (min-width: 768px) {
  .gal-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
  }
  .gal-card:hover {
    transform: translateY(-3px);
    border-color: #84cc16;
  }
}

/* Filter animation — hide/show */
.gal-card.filtered-out {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.gal-card:not(.filtered-out) {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ── Card image ── */
.gal-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Service tag (bottom-left) ── */
.gal-card__tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background-color: rgba(132, 204, 22, 0.12);
  color: #84cc16;
  z-index: 1;
}

/* ── Placeholder text (until real photos) ── */
.gal-card__placeholder {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #333;
}

/* ── Scroll reveal ── */
.gal-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gal-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────
   BOTTOM CTA
   ───────────────────────────────────── */
.gal-cta {
  background-color: #111111;
  border-top: 1px solid #2a2a2a;
}

.gal-cta__inner {
  text-align: center;
}

.gal-cta__headline {
  font-family: var(--font-display);
  font-size: 48px;
  color: #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gal-cta__subtext {
  font-family: var(--font-ui);
  font-size: 15px;
  color: #888888;
  margin-top: 12px;
  margin-bottom: 28px;
}
