/* ============================================
   GALLERY PAGE — uses the site's shared teal/copper
   dark theme (same as index/about/people), scoped
   under .gallery-page where custom.
   ============================================ */

/* ===== Hero with rotating background images ===== */
.gallery-hero {
  position: relative;
  height: 62vh;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 0;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.active {
  opacity: 1;
}

/* Shown behind the images at all times, so if zero photos load,
   the hero still looks intentional rather than a blank box */
.gallery-hero {
  background: linear-gradient(155deg, #14201c, #0c1513);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,20,21,0.35) 0%, rgba(16,20,21,0.55) 55%, rgba(16,20,21,0.92) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px 48px;
  max-width: 900px;
}

@media (min-width: 768px) {
  .hero-content { padding: 0 64px 64px; }
}

/* ===== Album grid (12 cards) ===== */
.album-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 640px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .album-grid { grid-template-columns: repeat(4, 1fr); }
}

.album-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
  border-color: rgba(0,219,231,0.3);
}

.album-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, #1b2c26, #0e1815);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.album-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-card:hover .album-thumb img {
  transform: scale(1.05);
}

.album-thumb-fallback {
  color: rgba(224,227,228,0.18);
  font-size: 2.5rem;
  display: flex;
}

.album-icon {
  color: #00dbe7;
  font-size: 20px !important;
}

.album-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem 0.5rem;
}

.album-name {
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: #e0e3e4;
}

.album-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #8fa3a4;
  margin-top: 0.1rem;
}

.album-view-btn {
  margin: 0.6rem 1rem 1rem;
  align-self: flex-start;
  background: none;
  border: none;
  color: #e9c349;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
}

.album-view-btn .arrow { transition: transform 0.2s ease; }
.album-card:hover .album-view-btn .arrow { transform: translateX(3px); }

/* ===== Album detail view ===== */
.breadcrumb-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: #8fa3a4;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  padding: 0;
}

.breadcrumb-back .material-symbols-outlined { font-size: 18px; }
.breadcrumb-sep { opacity: 0.5; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}

.photo-item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.no-photos-msg {
  grid-column: 1 / -1;
  color: #8fa3a4;
  font-size: 0.85rem;
  padding: 2rem 0;
  text-align: center;
}

.no-photos-msg code {
  background: rgba(255,255,255,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6,9,10,0.96);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e3e4;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover { background: rgba(255,255,255,0.16); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e3e4;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-nav:hover { background: rgba(0,219,231,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (min-width: 768px) {
  .lightbox-prev { left: 32px; }
  .lightbox-next { right: 32px; }
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #8fa3a4;
  background: rgba(255,255,255,0.06);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .album-card, .album-thumb img, .photo-item img { transition: none !important; }
}
