/* g.css (new gallery: full-width thumbs + lightbox overlay) */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #fafafa;
  color: #111827;
  line-height: 1.45;
}

/* Centered wrapper for header/footer text only */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

/* Full-width gallery area (thumb grid should stretch) */
.gallery-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 12px; /* small gutter */
}

/* ---------- Header (shared) ---------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

/* Floating header over hero image */
.site-header.header-floating {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
}

.site-header.header-floating .brand-name,
.site-header.header-floating .brand-sub,
.site-header.header-floating .album-title,
.site-header.header-floating .album-meta {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.site-header.header-floating .view-toggle {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  backdrop-filter: blur(10px);
}

.site-header.header-floating .view-toggle:hover {
  background: rgba(255,255,255,0.25);
}

/* Hide album info in header when hero is present (it's shown in hero overlay instead) */
.site-header.header-floating .header-center {
  display: none;
}

/* Simplify header layout when floating (2 columns: brand left, toggle right) */
.site-header.header-floating .header-row {
  grid-template-columns: 1fr auto;
}

/* 3-column header: brand (L), album (C), toggle (R) */
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}

.header-left { text-align: left; }
.header-center { text-align: center; }
.header-right { text-align: right; display: flex; justify-content: flex-end; align-items: center; }

.brand-name,
.album-title {
  font-family: Georgia, "Times New Roman", Times, serif;
  letter-spacing: .2px;
}

.brand-name { font-size: 18px; font-weight: 600; }
.brand-sub  { font-size: 12px; color: #6b7280; margin-top: 2px; }

.album-title { font-size: 18px; font-weight: 500; }
.album-meta  { font-size: 12px; color: #6b7280; margin-top: 2px; }

.header-heading { padding-bottom: 14px; color:#4b5563; font-size: 14px; }

/* Toggle link (classic/new) */
.view-toggle {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: #111827;
  font-size: 13px;
  white-space: nowrap;
}
.view-toggle:hover {
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

@media (max-width: 700px) {
  .header-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }
  .header-center, .header-right { text-align: left; justify-content: flex-start; }
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.5) 100%
  );
  text-align: center;
  padding: 20px;
}

.hero-title {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 400;
  color: #fff;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  letter-spacing: 2px;
}

.hero-subtitle {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  margin: 0 0 16px 0;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
  letter-spacing: 1px;
}

.hero-meta {
  font-size: clamp(13px, 1.8vw, 16px);
  color: rgba(255,255,255,0.75);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  animation: bounce 2s infinite;
}

.hero-scroll-hint svg {
  opacity: 0.7;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 600px) {
  .hero-scroll-hint {
    bottom: 30px;
    font-size: 12px;
  }
}

/* ---------- Gallery masonry layout ---------- */
.gallery-wrap { padding: 8px 12px; } /* ✅ small left/right gutter */

.gallery {
  position: relative;
  width: 100%;
  column-count: 4;
  column-gap: 10px;
}

@media (min-width: 1200px) {
  .gallery {
    column-count: 5;
    column-gap: 12px;
  }
}

@media (max-width: 900px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 600px) {
  .gallery {
    column-count: 2;
  }
}

.gallery button.thumb {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
  transition: transform .12s ease;
  display: inline-block;
  width: 100%;
  margin-bottom: 10px;
  break-inside: avoid;
}

@media (min-width: 1200px) {
  .gallery button.thumb {
    margin-bottom: 12px;
  }
}

.gallery button.thumb:hover { transform: translateY(-2px); }

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   LIGHTBOX - Natural size images with hover controls
   ========================================================= */

/* Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  overflow: hidden;         /* no scroll in fit-to-screen mode */
  -webkit-overflow-scrolling: touch;
}

.lightbox.open {
  display: block;
  animation: fadeIn .25s ease;
}

/* Zoomed: allow scrolling to see full natural-size image */
.lightbox.zoomed {
  overflow: auto;
  cursor: default;
}

.lightbox.zoomed .lb-ui {
  align-items: flex-start;   /* image scrolls from top */
  padding: 70px 20px 40px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Backdrop fills screen */
.lb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: -1;
}

/* UI container - simple wrapper */
.lb-ui {
  position: relative;
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Stage - scrollable container for image */
.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

/* Fit-to-screen by default */
#lbImg {
  display: block;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 88vh;
  box-shadow: 0 20px 80px rgba(0,0,0,.8);
  cursor: zoom-in;
  transition: box-shadow .2s ease;
}

/* Zoomed: natural pixel size */
#lbImg.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* Top bar - hidden by default, shows on hover */
.lb-ui .lb-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 10001;
}

.lightbox:hover .lb-ui .lb-top {
  opacity: 1;
  pointer-events: auto;
}

/* Title */
.lb-title {
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  opacity: .95;
}

/* Buttons - minimal style */
.lb-btn {
  border: 0;
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: background .2s ease;
}

.lb-btn:hover {
  background: rgba(0,0,0,.75);
}

/* Close button in top bar */
#lbClose {
  margin-left: auto;
  pointer-events: auto;
}

/* Hide bottom text button row */
.lb-ui > .lb-top[style] {
  display: none;
}

/* Navigation arrows - hidden by default, show on hover */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease, background .2s ease;
  pointer-events: none;
}

.lightbox:hover .lb-nav {
  opacity: 1;
  pointer-events: auto;
}

.lb-nav:hover {
  background: rgba(0,0,0,.75);
}

.lb-prev { left: 30px; }
.lb-next { right: 30px; }

/* Mobile adjustments */
@media (max-width: 700px) {
  .lb-ui {
    padding: 20px 10px;
  }

  .lb-nav {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .lb-prev { left: 15px; }
  .lb-next { right: 15px; }

  .lb-ui .lb-top {
    padding: 15px 15px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
  padding: 16px 0;
  background: #fff;
  font-size: 13px;
  color: #374151;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #374151;
  text-decoration: none;
  margin: 0 6px;
}
.footer-links a:hover { text-decoration: underline; }
