/* ═══════════════════════════════════════════════════════════
   BE WEISZ — Gallery Page Styles
   Event cards · Horizontal scroll · Lightbox · Animations
   ═══════════════════════════════════════════════════════════ */

/* ── PAGE HERO ────────────────────────────────────────── */
.page-hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
  text-align: center;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgb(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgb(201, 168, 76, 0.05) 0%, transparent 50%), var(--black);
  z-index: 0;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-hero-sub {
  font-size: 1.1rem;
  color: var(--grey);
  font-weight: 300;
}

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 12px 4px rgb(201, 168, 76, 0.6),
    0 0 30px 8px rgb(201, 168, 76, 0.25);
  animation: floatUp ease-in-out infinite;
}

.particle:nth-child(1) {
  left: 5%;
  width: 8px;
  height: 8px;
  animation-delay: 0s;
  animation-duration: 12s;
}

.particle:nth-child(2) {
  left: 12%;
  width: 11px;
  height: 11px;
  animation-delay: 1.5s;
  animation-duration: 14s;
}

.particle:nth-child(3) {
  left: 22%;
  width: 7px;
  height: 7px;
  animation-delay: 4s;
  animation-duration: 11s;
}

.particle:nth-child(4) {
  left: 30%;
  width: 10px;
  height: 10px;
  animation-delay: 2s;
  animation-duration: 15s;
}

.particle:nth-child(5) {
  left: 38%;
  width: 12px;
  height: 12px;
  animation-delay: 0.5s;
  animation-duration: 13s;
}

.particle:nth-child(6) {
  left: 46%;
  width: 7px;
  height: 7px;
  animation-delay: 5.5s;
  animation-duration: 14.5s;
}

.particle:nth-child(7) {
  left: 54%;
  width: 9px;
  height: 9px;
  animation-delay: 3s;
  animation-duration: 11.5s;
}

.particle:nth-child(8) {
  left: 62%;
  width: 13px;
  height: 13px;
  animation-delay: 1s;
  animation-duration: 16s;
}

.particle:nth-child(9) {
  left: 70%;
  width: 8px;
  height: 8px;
  animation-delay: 4.5s;
  animation-duration: 12s;
}

.particle:nth-child(10) {
  left: 78%;
  width: 11px;
  height: 11px;
  animation-delay: 2.5s;
  animation-duration: 14s;
}

.particle:nth-child(11) {
  left: 85%;
  width: 7px;
  height: 7px;
  animation-delay: 1.2s;
  animation-duration: 11s;
}

.particle:nth-child(12) {
  left: 92%;
  width: 10px;
  height: 10px;
  animation-delay: 3.5s;
  animation-duration: 13s;
}

.particle:nth-child(13) {
  left: 17%;
  width: 9px;
  height: 9px;
  animation-delay: 6s;
  animation-duration: 15s;
}

.particle:nth-child(14) {
  left: 50%;
  width: 11px;
  height: 11px;
  animation-delay: 7s;
  animation-duration: 12.5s;
}

.particle:nth-child(15) {
  left: 35%;
  width: 8px;
  height: 8px;
  animation-delay: 3.5s;
  animation-duration: 16s;
}

.particle:nth-child(16) {
  left: 75%;
  width: 12px;
  height: 12px;
  animation-delay: 0.5s;
  animation-duration: 14s;
}

@keyframes floatUp {
  0% {
    bottom: -5%;
    opacity: 0;
    transform: translateX(0) scale(0.3);
  }

  8% {
    opacity: 1;
    transform: scale(1);
  }

  25% {
    opacity: 1;
    transform: translateX(12px);
  }

  50% {
    opacity: 0.9;
    transform: translateX(-8px);
  }

  75% {
    opacity: 0.7;
    transform: translateX(15px);
  }

  92% {
    opacity: 0.3;
  }

  100% {
    bottom: 105%;
    opacity: 0;
    transform: translateX(-5px) scale(0.5);
  }
}

/* ── NAV ACTIVE STATE ─────────────────────────────────── */
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after {
  width: 100%;
}

/* ── UPCOMING EVENTS ──────────────────────────────────── */
.upcoming-events {
  background: var(--black);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  max-width: 960px;
  margin: 0 auto;
  justify-items: center;
}

/* Event Card */
.event-card {
  background: var(--black-soft);
  border: 1px solid var(--charcoal);
  overflow: hidden;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.5s,
    box-shadow 0.5s;
}

.event-card:hover {
  transform: translateY(-6px);
  border-color: rgb(201, 168, 76, 0.3);
  box-shadow:
    0 20px 60px rgb(0, 0, 0, 0.4),
    0 0 40px var(--gold-glow);
}

.event-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition:
    transform 0.6s var(--ease-out),
    filter 0.6s;
}

.event-card:hover .event-card-image img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Shimmer sweep on hover */
.event-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgb(255, 255, 255, 0.08) 40%,
    rgb(255, 255, 255, 0.15) 50%,
    rgb(255, 255, 255, 0.08) 60%,
    transparent 80%
  );
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
}

.event-card:hover .event-shimmer {
  animation: shimmerSweep 0.8s ease-out forwards;
}

@keyframes shimmerSweep {
  to {
    transform: translateX(100%);
  }
}

/* Badge */
.event-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
}

/* Card body */
.event-card-body {
  padding: 28px 30px 32px;
}

.event-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.event-cal-icon {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

.event-date-row span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-card-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 8px;
}

.event-card-body p {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 12px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  padding: 10px 8px;
  background: rgb(201, 168, 76, 0.06);
  border: 1px solid rgb(201, 168, 76, 0.15);
}

.cd-num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--gold-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 4px;
}

/* ── PAST EVENT ───────────────────────────────────────── */
.past-event {
  padding: 60px 0;
}

.past-event-card {
  display: flex;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
  max-width: 860px;
  margin: 0 auto;
  padding: 30px;
  background: var(--black-soft);
  border: 1px solid var(--charcoal);
  position: relative;
}

.past-event-img {
  flex-shrink: 0;
  width: 220px;
  position: relative;
  overflow: hidden;
}

.past-event-img img {
  width: 100%;
  display: block;
  filter: saturate(0.7) brightness(0.85);
  transition: filter 0.4s;
}

.past-event-card:hover .past-event-img img {
  filter: saturate(1) brightness(1);
}

.past-stamp {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgb(10, 10, 10, 0.85);
  border: 1px solid var(--grey-dark);
  color: var(--grey-light);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 12px;
}

.past-event-text h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 4px;
}

.past-event-date {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px !important;
}

.past-event-text p {
  font-size: 0.95rem;
  color: var(--grey);
  line-height: 1.7;
}

/* ── GOLD DIVIDER ─────────────────────────────────────── */
.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px 0 40px;
}

.div-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.div-diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── PHOTO GALLERY — SCROLL-DRIVEN HORIZONTAL ─────────── */
.photo-gallery {
  background: var(--black-rich);
  padding-bottom: 0;
}

/* Pinned wrapper — height creates the scroll runway */
.gallery-pin {
  position: relative;

  /* JS sets height dynamically: trackScrollWidth + viewportHeight */
}

.gallery-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.gallery-sticky .gallery-header-inner {
  text-align: center;
  padding: 0 20px;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

/* Track wrapper */
.gallery-track-wrap {
  overflow: hidden;
  position: relative;
  user-select: none;
}

.gallery-track {
  display: flex;
  gap: 16px;
  padding: 0 5vw;
  will-change: transform;
}

/* Gallery items */
.g-item {
  flex-shrink: 0;
  width: 320px;
  height: 380px;
  overflow: hidden;
  position: relative;
  border-radius: 2px;
}

.g-item.g-tall {
  height: 440px;
}

.g-item.g-wide {
  width: 450px;
  height: 320px;
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s var(--ease-out),
    filter 0.3s;
  filter: brightness(0.85) saturate(0.9);
}

.g-item:hover img {
  transform: scale(1.08);
  filter: brightness(1) saturate(1);
}

/* Gold border that draws in on hover */
.g-item::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid transparent;
  transition: border-color 0.4s;
  pointer-events: none;
}

.g-item:hover::after {
  border-color: rgb(201, 168, 76, 0.4);
}

/* Staggered reveal animation when scrolled into view */
.g-item {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.g-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Progress bar — inside sticky */
.gallery-progress-wrap {
  width: 200px;
  height: 2px;
  background: var(--charcoal);
  margin: 2rem auto 0;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.gallery-progress {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.05s linear;
}

/* ── LIGHTBOX ─────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgb(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

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

.lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.4s,
    transform 0.4s var(--ease-out);
}

.lightbox.open .lb-img {
  opacity: 1;
  transform: scale(1);
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid rgb(255, 255, 255, 0.15);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.lb-close svg {
  width: 20px;
  height: 20px;
}

.lb-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgb(0, 0, 0, 0.5);
  border: 1px solid rgb(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

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

.lb-nav:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgb(0, 0, 0, 0.8);
}

.lb-prev {
  left: 20px;
}

.lb-next {
  right: 20px;
}

.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--grey);
}

/* ── CTA BANNER ───────────────────────────────────────── */
.cta-banner {
  background: radial-gradient(ellipse at 50% 0%, rgb(201, 168, 76, 0.08) 0%, transparent 60%), var(--black);
}

.cta-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-inner p {
  font-size: 1.1rem;
  color: var(--grey);
  margin-bottom: 2rem;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (width <= 768px) {
  .events-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .past-event-card {
    flex-direction: column;
    text-align: center;
  }

  .past-event-img {
    width: 100%;
    max-width: 300px;
  }

  .countdown {
    justify-content: center;
  }

  .g-item {
    width: 260px;
    height: 320px;
  }

  .g-item.g-tall {
    height: 360px;
  }

  .g-item.g-wide {
    width: 340px;
    height: 260px;
  }

  .page-hero {
    padding: 140px 0 70px;
  }
}

@media (width <= 480px) {
  .cd-unit {
    min-width: 42px;
    padding: 8px 6px;
  }

  .cd-num {
    font-size: 1.1rem;
  }

  .g-item {
    width: 220px;
    height: 280px;
  }

  .g-item.g-tall {
    height: 320px;
  }

  .g-item.g-wide {
    width: 290px;
    height: 220px;
  }
}

/* ── SECONDARY EVENTS ─────────────────────────────────── */
.secondary-header {
  margin-top: 60px;
  margin-bottom: 30px;
}

.events-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.event-card-sm {
  background: var(--black-soft);
  border: 1px solid var(--charcoal);
  overflow: hidden;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.4s;
}

.event-card-sm:hover {
  transform: translateY(-4px);
  border-color: rgb(201, 168, 76, 0.25);
}

.event-card-sm-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.event-card-sm-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s var(--ease-out);
}

.event-card-sm:hover .event-card-sm-image img {
  transform: scale(1.05);
}

.event-card-sm-body {
  padding: 20px;
}

.event-date-sm {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-card-sm-body h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--white);
  margin: 6px 0;
}

.event-card-sm-body p {
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.6;
}

@media (width <= 768px) {
  .events-grid-secondary {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
}

.events-grid:has(> .event-card:only-child) {
  grid-template-columns: 1fr;
  max-width: 480px;
}
