/* ============================================================
   GALLERY PAGE — Gallery.css
   Theme: dark (matching site), purple/blue accents
   ============================================================ */

:root {
  --gal-primary:   #667eea;
  --gal-secondary: #764ba2;
  --gal-cyan:      #00f2ff;
  --gal-dark:      #0f172a;
  --gal-dark2:     #1e293b;
  --gal-card-bg:   #111827;
  --gal-border:    rgba(102, 126, 234, 0.18);
  --gal-text:      #e2e8f0;
  --gal-muted:     #94a3b8;
  --gal-radius:    14px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #0f172a; /* prevents white flash when body becomes position:fixed */
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, var(--gal-dark), var(--gal-dark2));
  color: var(--gal-text);
  min-height: 100vh;
  overscroll-behavior: none;
}

/* Keep dark background when mobile menu opens (body gets position:fixed) */
body.menu-open {
  background: linear-gradient(135deg, var(--gal-dark), var(--gal-dark2)) !important;
}

h1, h2, h3, h4 {
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================================================
   HERO
   ================================================================ */
.gallery-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 30%, rgba(102,126,234,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(118,75,162,0.18) 0%, transparent 65%),
    linear-gradient(135deg, #0a0f1e, #111827);
  z-index: 0;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: url('../Assets/f66bd6d71df987ce9f925f8f235198e943023de5.jpg') center/cover no-repeat;
  opacity: 0.06;
  z-index: 0;
}

.gallery-hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 20px 80px;
}

.gallery-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gal-muted);
  margin-bottom: 22px;
}
.gallery-breadcrumb a {
  color: var(--gal-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.gallery-breadcrumb a:hover { color: var(--gal-cyan); }
.gallery-breadcrumb i { font-size: 10px; }

.gallery-hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 18px;
  color: #fff;
}
.gallery-hero-title span {
  background: linear-gradient(90deg, var(--gal-primary), var(--gal-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gallery-hero-sub {
  max-width: 680px;
  font-size: 15px;
  color: var(--gal-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Stats Row */
.gallery-stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 20px;
}
.gallery-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 36px 0 0;
}
.gallery-stat-item:last-child { padding-right: 0; }

/* Number row — keeps "40" and "+" on ONE line */
.gallery-stat-num-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
  line-height: 1;
}
.gallery-stat-num {
  font-family: "Orbitron", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.gallery-stat-plus {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gal-primary);
  line-height: 1;
}
.gallery-stat-label {
  font-size: 12px;
  color: var(--gal-muted);
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.gallery-stat-divider {
  width: 1px;
  height: 44px;
  background: var(--gal-border);
  margin: 0 36px 0 0;
  flex-shrink: 0;
  align-self: center;
}

.gallery-hero-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gal-muted);
  font-size: 14px;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}



/* ================================================================
   GALLERY GRID
   ================================================================ */
.gallery-main-section {
  padding: 50px 0 70px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 300px;
  gap: 20px;
}

/* Card */
.gal-item {
  border-radius: var(--gal-radius);
  overflow: hidden;
  background: var(--gal-card-bg);
  border: 1px solid var(--gal-border);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  animation: galFadeIn 0.4s ease both;
}
.gal-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(102,126,234,0.25);
}
.gal-item.gal-hidden {
  display: none;
}
/* Stagger fade-in so cards load in sequence, not all at once */
.gal-item:nth-child(1)  { animation-delay: 0.00s; }
.gal-item:nth-child(2)  { animation-delay: 0.04s; }
.gal-item:nth-child(3)  { animation-delay: 0.08s; }
.gal-item:nth-child(4)  { animation-delay: 0.12s; }
.gal-item:nth-child(5)  { animation-delay: 0.16s; }
.gal-item:nth-child(6)  { animation-delay: 0.20s; }
.gal-item:nth-child(7)  { animation-delay: 0.24s; }
.gal-item:nth-child(8)  { animation-delay: 0.28s; }
.gal-item:nth-child(9)  { animation-delay: 0.32s; }
.gal-item:nth-child(10) { animation-delay: 0.36s; }
.gal-item:nth-child(11) { animation-delay: 0.40s; }
.gal-item:nth-child(12) { animation-delay: 0.44s; }
.gal-item:nth-child(13) { animation-delay: 0.48s; }
.gal-item:nth-child(14) { animation-delay: 0.52s; }
.gal-item:nth-child(15) { animation-delay: 0.56s; }
.gal-item:nth-child(16) { animation-delay: 0.60s; }
@keyframes galFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Image wrapper */
.gal-img-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.gal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.gal-item:hover .gal-img-wrap img {
  transform: scale(1.06);
}

/* Overlay on hover */
.gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.7) 0%, rgba(15,23,42,0.15) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gal-item:hover .gal-overlay { opacity: 1; }

.gal-zoom-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(30,30,50,0.65);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.gal-zoom-btn:hover {
  background: rgba(102,126,234,0.7);
  transform: scale(1.1);
}

/* Info — absolute overlay at bottom of card, always visible */
.gal-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 14px 14px;
  background: linear-gradient(to top, rgba(10,15,35,0.92) 0%, transparent 100%);
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
}

.gal-event-name {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  text-align: center;
}

/* No Results */
.gal-no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--gal-muted);
}
.gal-no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: rgba(102,126,234,0.3);
}
.gal-no-results p { font-size: 16px; }

/* ================================================================
   CTA SECTION
   ================================================================ */
.gallery-cta-section {
  padding: 0 0 80px;
}
.gallery-cta-card {
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
  border: 1px solid rgba(102,126,234,0.25);
  border-radius: 22px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gallery-cta-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102,126,234,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.gallery-cta-icon {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gal-primary), var(--gal-secondary));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  font-size: 28px; color: #fff;
  box-shadow: 0 8px 24px rgba(102,126,234,0.35);
}
.gallery-cta-card h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  margin-bottom: 14px;
}
.gallery-cta-card p {
  font-size: 15px;
  color: var(--gal-muted);
  max-width: 540px;
  margin: 0 auto 30px;
  line-height: 1.7;
}
.gallery-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.gallery-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--gal-primary), var(--gal-secondary));
  color: #fff;
  border: none;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(102,126,234,0.35);
}
.gallery-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(102,126,234,0.5);
}
.gallery-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--gal-primary);
  border: 2px solid rgba(102,126,234,0.45);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  transition: all 0.2s;
}
.gallery-cta-secondary:hover {
  background: rgba(102,126,234,0.1);
  border-color: var(--gal-primary);
}

/* ================================================================
   LIGHTBOX
   ================================================================ */

/* Full-screen backdrop container — centers inner box via flexbox */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gal-lightbox.open {
  visibility: visible;
  opacity: 1;
}

/* Blurred dark backdrop */
.gal-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Controls — absolute within the fixed overlay so centering is unaffected ── */
.gal-lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20,25,45,0.75);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.gal-lb-close:hover {
  background: rgba(220, 60, 60, 0.7);
  transform: scale(1.12);
}

.gal-lb-prev,
.gal-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20,25,45,0.75);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.gal-lb-prev { left: 16px; }
.gal-lb-next { right: 16px; }
.gal-lb-prev:hover { background: rgba(102,126,234,0.6); transform: translateY(-50%) scale(1.12); }
.gal-lb-next:hover { background: rgba(102,126,234,0.6); transform: translateY(-50%) scale(1.12); }

/* ── Centred content — pure flex centering, no positioning tricks ── */
.gal-lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 80px);
}

/* Image card */
.gal-lb-img-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 28px 64px rgba(0,0,0,0.8);
}
.gal-lb-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  transition: opacity 0.25s;
}
.gal-lb-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.6);
  color: var(--gal-primary);
  font-size: 28px;
}

/* ── Caption ── */
.gal-lb-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.gal-lb-event-name {
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}
.gal-lb-date {
  font-size: 12px;
  color: var(--gal-muted);
}
.gal-lb-counter {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.07);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
  }
}

@media (max-width: 768px) {
  .gallery-hero { min-height: 420px; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
    gap: 14px;
  }
  .gallery-cta-card { padding: 40px 24px; }
  .gal-lb-prev { left: 8px; }
  .gal-lb-next { right: 8px; }
  .gal-lb-prev, .gal-lb-next { width: 42px; height: 42px; font-size: 15px; }
}

@media (max-width: 540px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
    gap: 14px;
  }
  .gal-lb-prev, .gal-lb-next { width: 38px; height: 38px; font-size: 13px; }
  .gal-lb-prev { left: 6px; }
  .gal-lb-next { right: 6px; }
  .gal-lb-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 14px; }
  .gal-lb-img-wrap img { max-height: 65vh; }
}
