/* ═══════════════════════════════════════════════════════════════
   GALLERY PAGE STYLES
   Mobile-photo era galleries: E3 2005, E3 2006
   No zoom needed — images are tiny/low-res by design
   ═══════════════════════════════════════════════════════════════ */

/* ── Page layout ── */
.gallery-page {
  padding: 2rem 0 4rem;
}

.gallery-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */
.gallery-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(100, 140, 255, 0.2);
}

.gallery-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.gallery-location {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.gallery-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2rem);
  background: linear-gradient(135deg, #ffffff 0%, #a8c4ff 50%, #6699ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.75rem;
  filter: drop-shadow(0 0 8px rgba(80, 120, 255, 0.35));
}

.gallery-blurb {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

.gallery-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* type badge for gallery */
.type-gallery {
  background: linear-gradient(135deg, rgba(100, 80, 200, 0.3), rgba(140, 100, 220, 0.2));
  color: #c0a8ff;
  border: 1px solid rgba(140, 100, 220, 0.35);
}

/* ── Gallery viewer wrapper ── */
.gallery-viewer {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #0a0c10;
  border: 1px solid rgba(80, 110, 200, 0.25);
  border-radius: 8px;
  overflow: hidden;
}

/* ── Stage (main display) ── */
.gallery-stage {
  position: relative;
  width: 100%;
  background: #050608;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem 1.5rem 0;
}

.gallery-item.active {
  display: flex;
}

/* ── Images ── */
.gallery-photo {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  /* Crisp upscaling for tiny mobile-era photos */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 3px;
  /* Gentle glow to make tiny images pop against dark bg */
  box-shadow: 0 0 20px rgba(80, 110, 255, 0.15), 0 0 60px rgba(80, 110, 255, 0.08);
}

/* ── Video ── */
.gallery-video {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 3px;
  background: #000;
}

/* ── Audio ── */
.gallery-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem 1rem;
}

.gallery-audio-icon {
  font-size: 3rem;
  opacity: 0.7;
}

.gallery-audio {
  width: 100%;
  max-width: 400px;
}

/* ── Caption ── */
.gallery-caption {
  width: 100%;
  padding: 0.75rem 0 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.5rem;
}

.caption-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
}

.caption-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: 'Orbitron', sans-serif;
  opacity: 0.6;
}

/* ── Controls bar ── */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(80, 110, 200, 0.15);
  border-bottom: 1px solid rgba(80, 110, 200, 0.15);
}

.gallery-btn {
  background: transparent;
  border: 1px solid rgba(100, 140, 255, 0.3);
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gallery-btn:hover {
  background: rgba(100, 140, 255, 0.12);
  border-color: rgba(100, 140, 255, 0.6);
  color: #fff;
}

.gallery-btn:active {
  transform: scale(0.95);
}

.gallery-counter {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ── Thumbnail strip ── */
.gallery-thumbs {
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.4);
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 110, 200, 0.4) transparent;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}
.gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(80, 110, 200, 0.4);
  border-radius: 2px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  background: #0f1118;
  transition: border-color 0.15s ease, opacity 0.15s ease;
  opacity: 0.55;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-thumb:hover {
  opacity: 0.85;
  border-color: rgba(100, 140, 255, 0.4);
}

.gallery-thumb.active {
  opacity: 1;
  border-color: #6699ff;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-video-icon,
.thumb-audio-icon {
  font-size: 1.3rem;
  color: rgba(150, 180, 255, 0.7);
  line-height: 1;
}

/* ── Body text below gallery ── */
.gallery-body {
  margin-top: 2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gallery-page .container {
    padding: 0 0.75rem;
  }
  .gallery-item {
    padding: 1rem 0.75rem 0;
  }
  .gallery-photo,
  .gallery-video {
    max-height: 300px;
  }
  .gallery-controls {
    padding: 0.5rem 0.75rem;
  }
  .gallery-thumb {
    width: 44px;
    height: 44px;
  }
}
