/* =====================================================
   EVENT GALLERY – ENTERPRISE GLASS & DARK PRO
   Prinopix Modern Visual System
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap');

:root {
  /* BRAND COLORS */
  --primary: #EF5929;
  --primary-light: #FF7A50;
  --primary-gold: #F9AA33;
  --primary-gradient: linear-gradient(135deg, #EF5929 0%, #F9AA33 100%);
  --primary-glow: rgba(239, 89, 41, 0.35);

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.4);

  --transparent-dark: rgba(6, 11, 19, 0.85);
  --transparent-extra-dark: rgba(3, 7, 18, 0.94);
  --debug-console: #10b981;

  /* BACKGROUND SURFACES */
  --bg-main: #060b13;
  --bg-surface: rgba(15, 23, 42, 0.75);
  --bg-surface-solid: #0d1527;
  --bg-card: rgba(17, 24, 39, 0.65);
  --bg-console: #030712;

  /* BORDERS */
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glass-bright: rgba(255, 255, 255, 0.22);
  --border-glow: rgba(239, 89, 41, 0.5);
  --bg-debug-border: rgba(16, 185, 129, 0.2);

  /* TYPOGRAPHY */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-bright: #ffffff;

  --font-heading: 'Plus Jakarta Sans', 'Prompt', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* FONT SIZES */
  --fs-title: 24px;
  --fs-h4: 19px;
  --fs-icon-button: 24px;
  --fs-button: 15px;
  --fs-body: 13px;
  --fs-debug-title: 13px;

  /* RADIUS */
  --radius-xl: 24px;
  --radius-m: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;

  /* SHADOWS */
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 12px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --glow-accent: 0 0 25px rgba(239, 89, 41, 0.3);
}

/* =========================
   BASE & AMBIENT ANIMATION
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-main);
  background-image:
    radial-gradient(circle at 10% 15%, rgba(239, 89, 41, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(249, 170, 51, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  font-family: var(--font-body);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(3, 7, 18, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* =========================
   HEADER (Glassmorphic)
========================= */
.event-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  margin: 0;
  padding: 16px 20px 18px 20px;
  background: rgba(10, 17, 30, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
}

/* Circular Info Icon Button & Hint Toast Wrapper */
.info-btn-wrapper {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-btn-circle {
  position: relative;
  bottom: 0;
  left: 0;
  transform: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0a111e;
  border: 1.5px solid rgba(239, 89, 41, 0.35);
  color: var(--primary-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8), 0 0 12px rgba(239, 89, 41, 0.35);
  z-index: 15;
}

.info-btn-circle:hover {
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-color: var(--primary-gold);
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(239, 89, 41, 0.6);
}

/* Info Hint Toast Popup */
.info-hint-toast {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(0) scale(1);
  background: rgba(10, 17, 30, 0.96);
  border: 1.5px solid var(--primary-gold);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85), 0 0 18px rgba(239, 89, 41, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  white-space: nowrap;
  cursor: pointer;
  z-index: 25;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.info-hint-toast:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: #FFE29F;
  transform: translateX(-50%) translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9), 0 0 24px rgba(239, 89, 41, 0.5);
}

.info-hint-toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px) scale(0.92);
  pointer-events: none;
}

.info-hint-arrow {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid var(--primary-gold);
}

@keyframes hintPulse {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85), 0 0 18px rgba(239, 89, 41, 0.35);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 28px rgba(239, 89, 41, 0.6);
  }
}

.info-hint-toast:not(.hidden) {
  animation: hintPulse 2.5s ease-in-out infinite;
}

.info-btn-circle svg {
  width: 15px;
  height: 15px;
  stroke: var(--primary-gold);
  transition: stroke 0.25s ease;
  pointer-events: none;
}

.info-btn-circle:hover svg {
  stroke: #FFFFFF;
}

/* Title wrapper */
.event-title-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* Title */
.event-title {
  font-family: var(--font-heading);
  font-size: var(--fs-title);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.25;
  word-break: break-word;
  margin-bottom: 0;

  background: linear-gradient(135deg, #ffffff 30%, var(--primary-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.info-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass-bright);
  color: var(--primary-gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20;
  margin: 0 !important;
}

.info-btn:hover {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: var(--primary-gold);
  transform: scale(1.12);
  box-shadow: 0 0 16px var(--primary-glow);
}

@media (max-width: 600px) {
  .info-btn {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
  }
}

/* Buttons below title */
.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.header-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.header-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-btn svg {
  width: 15px;
  height: 15px;
  stroke: var(--primary-gold);
  transition: transform 0.25s ease, stroke 0.25s ease;
}

.header-btn:hover {
  background: rgba(239, 89, 41, 0.15);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 89, 41, 0.25);
}

.header-btn:hover svg {
  stroke: #ffffff;
  transform: scale(1.1);
}

.header-btn:active {
  transform: translateY(0);
}


/* =========================
   LOADER
========================= */
.loader-overlay {
  position: fixed;
  top: 85px;
  left: 0;
  width: 100%;
  height: calc(100% - 85px);
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--transparent-extra-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 40;
}

/* Loader content box */
.loader-box {
  text-align: center;
  color: var(--text-main);
  max-width: 90%;
  margin: 0 auto;
  padding: 32px 40px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

#loaderText {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.2px;
  display: block;
  margin-top: 6px;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--primary);
  border-right: 3px solid var(--primary-gold);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.85s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
  box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loader messages */
.loader-messages {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  height: 22px;
  position: relative;
  overflow: visible;
}

.loader-messages div {
  position: absolute;
  left: 50%;
  width: max-content;
  opacity: 0;
  animation: rotateMessages 12s infinite;
  white-space: nowrap;
  line-height: 1.4;
  max-width: 90vw;
  text-align: center;
  font-weight: 500;
}

.loader-messages div:nth-child(1) {
  animation-delay: 0s;
}

.loader-messages div:nth-child(2) {
  animation-delay: 3s;
}

.loader-messages div:nth-child(3) {
  animation-delay: 6s;
}

.loader-messages div:nth-child(4) {
  animation-delay: 9s;
}

@keyframes rotateMessages {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px);
  }

  8% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  25% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  33% {
    opacity: 0;
    transform: translate(-50%, -12px);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}


/* =========================
   GALLERY (Dynamic Columns)
========================= */
.gallery {
  padding: 30px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);
  transition: all 0.35s ease;
  max-width: 1600px;
  margin: 0 auto;
}

/* Column Modes */
.gallery.cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.gallery.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}


/* =========================
   PHOTO CARD
========================= */
.photo-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.photo-card:hover {
  border-color: rgba(239, 89, 41, 0.45);
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(239, 89, 41, 0.2);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
}

.photo-card:hover img {
  transform: scale(1.06);
}

/* Download Overlay Button (High-Contrast Solid Glass Bar) */
.download-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background: rgba(10, 17, 30, 0.92);
  border: none;
  border-top: 2px solid var(--primary);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.download-btn::before {
  content: "📥";
  font-size: 14px;
}

.photo-card:hover .download-btn {
  background: var(--primary-gradient);
  border-top-color: var(--primary-gold);
  box-shadow: 0 -6px 20px rgba(239, 89, 41, 0.5);
  color: #ffffff;
}

.download-btn:hover {
  filter: brightness(1.1);
}


/* =========================
   FLOATING BUTTON
========================= */
.floating-btn {
  position: fixed;
  right: 28px;
  bottom: 36px;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  border: none;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: var(--fs-button);
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 26px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(239, 89, 41, 0.45), 0 0 20px rgba(249, 170, 51, 0.25);
  z-index: 30;
  overflow: visible;
}

/* Bubble animation layers */
.floating-btn::before,
.floating-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.floating-btn::before {
  animation: bubblesSpread 8s infinite linear;
  box-shadow:
    50px -20px rgba(255, 255, 255, 0.6),
    -40px 25px rgba(255, 255, 255, 0.6),
    40px 25px rgba(255, 255, 255, 0.6),
    0px -40px rgba(255, 255, 255, 0.6),
    0px 40px rgba(255, 255, 255, 0.6),
    -70px -10px rgba(255, 255, 255, 0.6);
}

.floating-btn::after {
  animation: bubblesSpread 8s infinite linear 4s;
  box-shadow:
    70px 10px rgba(255, 255, 255, 0.6),
    -25px -35px rgba(255, 255, 255, 0.6),
    25px -35px rgba(255, 255, 255, 0.6),
    -60px 35px rgba(255, 255, 255, 0.6),
    60px -30px rgba(255, 255, 255, 0.6),
    -40px -50px rgba(255, 255, 255, 0.6);
}

@keyframes bubblesSpread {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }

  50% {
    opacity: 0.3;
  }

  70% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

.floating-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 36px rgba(239, 89, 41, 0.6), 0 0 30px rgba(249, 170, 51, 0.4);
}

.floating-btn:active {
  transform: translateY(-1px) scale(0.98);
}


/* =========================
   IMAGE MODAL
========================= */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  z-index: 300;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 20px;
}

.image-modal img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.image-modal.zoomed img {
  cursor: grab;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 400;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.close-modal svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  pointer-events: none;
}

.close-modal:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 0 20px rgba(239, 89, 41, 0.5);
}

/* Modal Direct Download Button */
.modal-download-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  height: 44px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-bright);
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 400;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.4px;
}

.modal-download-btn svg {
  stroke: currentColor;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.modal-download-btn:hover {
  background: var(--primary-gradient);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(239, 89, 41, 0.5);
  transform: translateY(-2px);
}

.modal-download-btn:hover svg {
  transform: translateY(2px);
}

.modal-download-btn:active {
  transform: translateY(0);
}

/* Mobile Swipe Hint Badge */
.swipe-hint {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--primary-gold);
  color: var(--text-bright);
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 360;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(249, 170, 51, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.swipe-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.swipe-hint .swipe-icon {
  animation: swipePulse 1.2s ease-in-out infinite alternate;
}

@keyframes swipePulse {
  from {
    transform: translateX(-3px);
  }

  to {
    transform: translateX(3px);
  }
}

/* Modal Navigation Arrow Buttons */
.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 350;
  user-select: none;
}

.modal-nav-btn:hover {
  background: var(--primary-gradient);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(239, 89, 41, 0.5);
  transform: translateY(-50%) scale(1.12);
}

.modal-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.modal-nav-btn.prev-btn {
  left: 24px;
}

.modal-nav-btn.next-btn {
  right: 24px;
}

/* Modal Photo Counter Indicator */
.modal-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 350;
  pointer-events: none;
  letter-spacing: 0.5px;
}


/* =========================
   POPUP & OVERLAYS
========================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: var(--transparent-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 550;
  padding: 20px;
}

.popup-box {
  background: rgba(15, 23, 42, 0.92);
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border-glass-bright);
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: popupFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-box h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 16px 0;
}

.popup-box button {
  margin: 8px 0;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  border: none;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(239, 89, 41, 0.3);
}

.popup-box button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 89, 41, 0.45);
}

.option-btn {
  width: 90%;
  margin-bottom: 10px;
  padding: 12px 20px !important;
}

ul {
  font-size: var(--fs-body);
  margin: 14px 0 20px 0;
  padding-left: 0;
  list-style: none;
  text-align: left;
}

li {
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xs);
  line-height: 1.4;
  color: var(--text-main);
}


/* =========================
   THRESHOLD SLIDER
========================= */
.threshold-container {
  margin: 22px 0 18px 0;
  text-align: center;
  padding: 16px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-m);
}

.threshold-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.threshold-label #thresholdPercent {
  color: var(--primary-gold);
}

.threshold-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

#thresholdSlider {
  width: 90%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

#thresholdSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 0 14px var(--primary-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#thresholdSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 0 14px var(--primary-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#thresholdSlider::-webkit-slider-thumb:hover,
#thresholdSlider::-moz-range-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 20px var(--accent-glow);
}


/* =========================
   DEBUG CONSOLE
========================= */
.debug-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 220px;
  background: var(--bg-console);
  color: var(--debug-console);
  font-size: var(--fs-body);
  font-family: 'Consolas', 'Fira Code', monospace;
  display: none;
  flex-direction: column;
  z-index: 50;
  border-top: 1px solid var(--bg-debug-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
  transition: height 0.3s ease;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid var(--bg-debug-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: ns-resize;
  user-select: none;
}

#debugToggleBtn {
  background: none;
  border: none;
  color: var(--debug-console);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
}

.debug-content {
  flex: 1;
  overflow: auto;
  padding: 10px 16px;
  line-height: 1.5;
}

.debug-panel.minimized {
  height: 34px;
}

.debug-panel.minimized .debug-content {
  display: none;
}


/* =========================
   EMPTY STATE
========================= */
.empty-state-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  padding: 20px;
  pointer-events: none;
}

.empty-state {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 320px;
  line-height: 1.6;
  padding: 28px 32px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}


/* =========================
   RESPONSIVE LAYOUT
========================= */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    padding: 20px;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .modal-nav-btn {
    display: none !important;
  }

  .close-modal {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .modal-download-btn {
    top: 16px;
    left: 16px;
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
  }

  .download-btn {
    padding: 8px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: rgba(10, 17, 30, 0.94);
    border-top: 2px solid var(--primary);
    color: #ffffff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.7);
  }

  .download-btn::before {
    font-size: 12px;
  }

  .gallery.cols-4 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    gap: 14px;
  }

  .event-title {
    font-size: 20px;
  }

  .header-btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .floating-btn {
    right: 20px;
    bottom: 24px;
    height: 48px;
    padding: 0 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(1, 1fr);
    gap: 14px;
  }

  .download-btn {
    padding: 7px 0;
    font-size: 10px;
    border-top-width: 2px;
  }

  .popup-overlay {
    padding: 12px;
  }

  .popup-box {
    padding: 22px 18px !important;
  }

  .popup-box h4 {
    font-size: 17px !important;
    margin-bottom: 12px !important;
  }

  .option-btn {
    width: 96% !important;
    padding: 11px 16px !important;
  }

  .threshold-container {
    margin: 14px 0 12px 0 !important;
    padding: 12px 10px !important;
  }

  .threshold-desc {
    font-size: 11.5px !important;
    margin-bottom: 10px !important;
  }

  ul {
    margin: 10px 0 14px 0 !important;
  }

  li {
    margin: 6px 0 !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
  }
}

/* =========================
   PHOTOGRAPHER INFO MODAL
========================= */
.photographer-modal-box {
  max-width: 400px;
  width: 90%;
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  background: var(--transparent-dark);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: popupScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photographer-modal-box .close-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid var(--border-glass-bright) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.photographer-modal-box .close-modal-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary-light) !important;
  color: #ffffff !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 14px var(--primary-glow) !important;
  filter: none !important;
}

.photographer-modal-box .close-modal-btn svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2.5;
  display: block;
  pointer-events: none;
}

.photographer-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.photographer-logo-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(239, 89, 41, 0.25), rgba(249, 170, 51, 0.25));
}

.photographer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photographer-initials {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-gold);
  letter-spacing: 1px;
}

.photographer-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 4px 0;
}

.photographer-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.photographer-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.photographer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.photographer-action-btn:hover {
  background: rgba(239, 89, 41, 0.18);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 89, 41, 0.3);
}

.photographer-action-btn svg {
  color: var(--primary-gold);
  transition: transform 0.25s ease;
}

.photographer-action-btn:hover svg {
  color: #ffffff;
  transform: scale(1.1);
}

/* Photographer Branding */
.photographer-branding {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.photographer-branding span {
  font-weight: 500;
}

.branding-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.branding-link:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.branding-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
}