/* ─── GALLERY HERO ───────────────────────────── */
.gallery-hero {
  min-height: 52vh;
  background: var(--darker);
  display: flex; align-items: flex-end;
  padding: 130px 5% 60px;
  position: relative; overflow: hidden;
}

.gallery-hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,226,64,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,226,64,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.gallery-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 40%, rgba(200,226,64,0.06) 0%, transparent 65%);
}

.gallery-hero-content {
  position: relative; z-index: 1;
  max-width: 900px;
}

.gallery-hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: clamp(44px, 7vw, 84px);
  color: var(--white); line-height: 0.92;
  text-transform: uppercase;
  margin: 12px 0 18px;
  letter-spacing: -1px;
}

.gallery-hero-title em { font-style: normal; color: var(--green); }

.gallery-hero-sub {
  font-size: 16px; color: rgba(255,255,255,0.55);
  line-height: 1.7; max-width: 500px;
  margin-bottom: 32px;
}

/* ─── FILTER PILLS ───────────────────────────── */
.filter-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
}

.pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 9px 20px; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: transparent; color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill:hover {
  border-color: rgba(200,226,64,0.5);
  color: var(--green);
}

.pill.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--dark);
}

.hero-scroll-line {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, transparent 100%);
}

/* ─── GALLERY SECTION ────────────────────────── */
.gallery-section {
  background: #111111;
  padding: 56px 3% 80px;
  min-height: 60vh;
}

/* ─── MASONRY GRID ───────────────────────────── */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 14px;
  max-width: 1400px; margin: 0 auto;
}

/* ─── CARD VARIANTS ──────────────────────────── */
.g-card {
  position: relative; overflow: hidden;
  border-radius: 10px;
  background: #1e1e1e;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease;
}

/* Wide card spans 2 columns */
.g-wide { grid-column: span 2; }

/* Tall card spans 2 rows */
.g-tall { grid-row: span 2; }

.g-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.55),
    0 0 0 1.5px rgba(200,226,64,0.35);
  z-index: 2;
}

/* ─── PLACEHOLDER (no image) ─────────────────── */
.g-img-wrap {
  width: 100%; height: 100%;
  position: relative; overflow: hidden;
}

.g-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.5s ease;
  /* Placeholder gradient if image missing */
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.g-card:hover .g-img-wrap img {
  transform: scale(1.08);
  filter: brightness(0.75);
}

/* ─── OVERLAY ────────────────────────────────── */
.g-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.3) 50%,
    transparent 100%
  );
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 22px 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.g-card:hover .g-overlay { opacity: 1; }

.g-overlay-content { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }

.g-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--dark);
  background: var(--green);
  padding: 3px 10px; border-radius: 2px;
  width: fit-content;
  margin-bottom: 8px;
  transform: translateY(10px);
  transition: transform 0.35s ease 0.05s;
}

.g-card:hover .g-tag { transform: translateY(0); }

.g-overlay-content h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 20px;
  color: var(--white); line-height: 1.1;
  margin-bottom: 5px;
  transform: translateY(12px);
  transition: transform 0.35s ease 0.08s;
}

.g-card:hover .g-overlay-content h3 { transform: translateY(0); }

.g-overlay-content p {
  font-size: 12px; color: rgba(255,255,255,0.65);
  transform: translateY(14px);
  transition: transform 0.35s ease 0.12s;
}

.g-card:hover .g-overlay-content p { transform: translateY(0); }

/* Zoom button */
.g-zoom {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  background: rgba(200,226,64,0.9);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transform: scale(0) rotate(-45deg);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s,
              background 0.2s ease;
}

.g-zoom svg {
  width: 18px; height: 18px;
  stroke: var(--dark); stroke-width: 2;
}

.g-card:hover .g-zoom {
  transform: scale(1) rotate(0deg);
}

.g-zoom:hover {
  background: white !important;
  transform: scale(1.12) rotate(0deg) !important;
}

/* ─── CARD FILTER ANIMATION ──────────────────── */
.g-card.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.g-card.hiding {
  animation: cardHide 0.3s ease forwards;
}

.g-card.showing {
  animation: cardShow 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes cardHide {
  to { opacity: 0; transform: scale(0.92) translateY(16px); }
}

@keyframes cardShow {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── EMPTY STATE ────────────────────────────── */
.gallery-empty {
  text-align: center; padding: 80px 20px;
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
}

.gallery-empty svg { color: rgba(255,255,255,0.2); }

.gallery-empty h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 22px;
  color: rgba(255,255,255,0.4);
}

.gallery-empty p { font-size: 14px; color: rgba(255,255,255,0.25); }

/* ─── LIGHTBOX ───────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.lightbox-content {
  position: relative; z-index: 1;
  max-width: 900px; width: 100%;
  background: #1a1a1a;
  border-radius: 14px;
  border: 1px solid rgba(200,226,64,0.15);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.lightbox.open .lightbox-content {
  transform: scale(1) translateY(0);
}

.lightbox-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 38px; height: 38px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white;
  transition: all 0.25s ease;
}

.lightbox-close:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--dark);
}

.lightbox-close svg { width: 16px; height: 16px; }

.lightbox-img-wrap {
  width: 100%; height: 460px;
  background: #111;
  overflow: hidden;
}

.lightbox-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.lightbox-img-wrap img.transitioning { opacity: 0; }

.lightbox-info {
  padding: 22px 28px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.lightbox-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--dark);
  background: var(--green);
  padding: 3px 10px; border-radius: 2px;
  margin-bottom: 8px;
}

.lightbox-info h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 24px;
  color: var(--white);
  margin-bottom: 4px;
}

.lightbox-info p {
  font-size: 13px; color: rgba(255,255,255,0.5);
}

.lightbox-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 14px 28px 22px;
}

.lb-nav-btn {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: white;
  transition: all 0.25s ease;
}

.lb-nav-btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--dark);
}

.lb-nav-btn svg { width: 16px; height: 16px; }

.lb-counter {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
}

/* ─── CTA BAND ───────────────────────────────── */
.gallery-cta {
  background: var(--green);
  padding: 70px 5%;
  text-align: center;
}

.gallery-cta-inner h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: clamp(30px, 4vw, 48px);
  color: var(--dark); margin-bottom: 8px;
}

.gallery-cta-inner p {
  font-size: 16px; color: rgba(51,51,51,0.65);
  margin-bottom: 28px;
}

.gallery-cta .btn-primary {
  background: var(--dark); color: var(--white);
}

.gallery-cta .btn-primary:hover {
  background: #222;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }
  .g-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .masonry-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
    gap: 10px;
  }
  .g-wide, .g-tall { grid-column: span 1; grid-row: span 1; }
  .filter-pills { gap: 8px; }
  .pill { font-size: 12px; padding: 7px 14px; }
  .lightbox-img-wrap { height: 260px; }
  .lightbox-info { padding: 16px 18px 8px; }
  .lightbox-nav { padding: 10px 18px 16px; }
  .gallery-hero { padding: 120px 5% 48px; }
}