/* ============================================================
   INNER.CSS — photo-album.html & video-single.html
   ============================================================ */

/* ============================================================
   PHOTO ALBUM PAGE
   ============================================================ */

/* Album page header (replaces page-hero for tighter feel) */
.album-page-header {
  padding: calc(var(--nav-h) + 40px) 0 32px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.album-page-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.album-page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1;
  margin: 8px 0 12px;
}
.album-page-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.album-meta-item {
  font-size: 13px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.album-page-desc {
  font-size: 14px;
  color: var(--c-muted);
  max-width: 500px;
  line-height: 1.7;
}
.album-page-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.album-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-surface2);
  transition: color 0.15s, border-color 0.15s;
}
.album-nav-btn:hover { color: var(--c-accent); border-color: var(--c-accent); }
.album-prev-next {
  display: flex;
  gap: 8px;
}
.apn-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface2);
  transition: color 0.15s, border-color 0.15s;
}
.apn-btn:hover { color: var(--c-accent); border-color: var(--c-accent); }

/* Main area */
.album-main { padding: 40px 0 64px; }

/* Photo grid — masonry-like with CSS grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
  margin-bottom: 24px;
}
.photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--c-border);
  transition: border-color 0.2s, transform 0.2s;
}
.photo-item:hover { border-color: var(--c-accent); }
.photo-item-wide { grid-column: span 2; }

.photo-thumb {
  position: absolute;
  inset: 0;
  display: block;
  transition: transform 0.4s ease;
}
/* fill the fixed-height cell; an <img> height:100% does not resolve inside a
   center-aligned flexbox, so the absolute fill above gives it a definite size. */
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item:hover .photo-thumb { transform: scale(1.04); }
.photo-emoji { font-size: 64px; opacity: 0.25; pointer-events: none; }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,12,16,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.photo-item:hover .photo-overlay { background: rgba(10,12,16,0.45); }
.photo-zoom {
  font-size: 28px;
  color: var(--c-white);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
}
.photo-item:hover .photo-zoom { opacity: 1; transform: scale(1); }

/* Thumbnail strip below grid */
.thumb-strip {
  margin-top: 8px;
  max-width: 100%;
  overflow-x: auto;            /* many photos -> scroll, don't overflow the page */
  -webkit-overflow-scrolling: touch;
}
.thumb-strip-inner {
  display: flex;
  gap: 8px;
  width: max-content;          /* let the row size to its thumbs, the parent scrolls */
}
.strip-thumb {
  width: 72px;
  height: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.strip-thumb.active, .strip-thumb:hover { border-color: var(--c-accent); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 400;
  backdrop-filter: blur(6px);
}
.lightbox-bg.open { display: block; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 401;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 80px 100px;
}
.lightbox.open { display: flex; }

.lb-close {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 18px;
  color: var(--c-text);
  cursor: pointer;
  z-index: 402;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lb-close:hover { background: rgba(255,255,255,0.15); }

.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 26px;
  color: var(--c-text);
  cursor: pointer;
  z-index: 402;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.lb-arrow:hover { background: rgba(255,255,255,0.14); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 900px;
  width: 100%;
}
.lb-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-surface);
}
.lb-img-video { aspect-ratio: 16 / 9; background: #000; }
.lb-caption {
  width: 100%;
}
.lb-caption-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lb-counter {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c-accent);
  text-transform: uppercase;
}
.lb-title {
  font-size: 14px;
  color: var(--c-muted);
  flex: 1;
  text-align: right;
}

/* Bottom strip inside lightbox */
.lb-strip {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 402;
  max-width: calc(100vw - 24px);   /* many photos -> scroll, don't run off-screen */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.lb-strip-thumb {
  width: 60px; height: 46px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.1);
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.lb-strip-thumb.active,
.lb-strip-thumb:hover { border-color: var(--c-accent); }

/* ============================================================
   VIDEO SINGLE PAGE
   ============================================================ */
.vs-wrapper {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 72px;
}
.vs-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.vs-breadcrumb { margin-bottom: 20px; }
.vs-main { min-width: 0; }

/* Player */
.vs-player-wrap {
  width: 100%;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
}
.vs-player {
  position: relative;
  width: 100%;
}
.vs-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
}
.vs-poster:hover .vs-big-play { transform: scale(1.1); background: var(--c-accent); }
.vs-poster-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.vs-poster-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.vs-big-play {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(201,168,76,0.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  padding-left: 5px;
  transition: transform 0.2s, background 0.2s;
}
.vs-poster-label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.vs-poster-meta {
  position: absolute;
  bottom: 12px; right: 14px;
}
.vs-badge {
  background: rgba(10,12,16,0.8);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-muted);
}

/* Controls bar (shown after play) */
.vs-controls {
  background: var(--c-surface2);
  padding: 10px 16px 12px;
  border-top: 1px solid var(--c-border);
}
.vs-progress-wrap { margin-bottom: 10px; }
.vs-progress-bar {
  position: relative;
  height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  cursor: pointer;
}
.vs-progress-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 2px;
  pointer-events: none;
}
.vs-progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  pointer-events: none;
  transition: transform 0.1s;
}
.vs-progress-bar:hover .vs-progress-thumb { transform: translate(-50%, -50%) scale(1.3); }
.vs-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vs-controls-left, .vs-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vs-btn {
  background: none;
  border: none;
  color: var(--c-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.vs-btn:hover { color: var(--c-text); background: rgba(255,255,255,0.06); }
.vs-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.vs-vol-icon { font-size: 14px; }
.vs-volume {
  width: 70px;
  accent-color: var(--c-accent);
  cursor: pointer;
}

/* Video info below player */
.vs-info { margin-bottom: 32px; }
.vs-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.vs-year-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255,255,255,0.06);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
}
.vs-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin-bottom: 12px;
}
.vs-meta-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.vs-meta-item {
  font-size: 13px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.vs-desc {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 680px;
}
.vs-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Prev / Next */
.vs-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.vs-pn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
  color: inherit;
}
.vs-pn-card:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.vs-pn-next { justify-content: flex-end; }
.vs-pn-thumb {
  width: 56px; height: 42px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.vs-pn-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--c-accent); text-transform: uppercase; }
.vs-pn-cat { font-size: 11px; color: var(--c-muted); margin-bottom: 2px; }
.vs-pn-title { font-size: 13px; font-weight: 600; }

/* Sidebar */
.vs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.vs-sidebar-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.vs-sb-title {
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-border);
}
.vs-related-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.vs-related-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border-radius: var(--radius);
  transition: background 0.15s;
  color: inherit;
}
.vs-related-item:hover { background: rgba(255,255,255,0.04); }
.vs-rel-thumb {
  width: 64px; height: 48px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.vs-rel-play {
  position: absolute;
  inset: 0;
  background: rgba(10,12,16,0);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--c-white);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.vs-related-item:hover .vs-rel-play { opacity: 1; background: rgba(10,12,16,0.5); }
.vs-rel-info { flex: 1; min-width: 0; }
.vs-rel-cat { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--c-accent); display: block; margin-bottom: 2px; }
.vs-rel-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-rel-date { font-size: 11px; color: var(--c-muted); margin-top: 2px; }

/* File info card */
.vs-file-rows { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 0; }
.vs-file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.vs-file-row:last-child { border-bottom: none; }
.vs-file-row span { color: var(--c-muted); }
.vs-file-row strong { color: var(--c-text); }
.vs-file-info .btn { margin: 0 18px 18px; width: calc(100% - 36px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .vs-container { grid-template-columns: 1fr; }
  .vs-sidebar { position: static; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-item-wide { grid-column: span 2; }

  .album-page-top { flex-direction: column; gap: 20px; }
  .album-page-nav { align-items: flex-start; flex-direction: row; align-items: center; }

  /* Lightbox adapts to mobile/tablet: drop the fixed 16:10 frame and fit the
     photo (any orientation) to the available viewport height/width. Applies on
     every <=900px screen, so members-only portrait albums work too. */
  .lb-stage { max-width: 100%; width: 100%; height: 100%; justify-content: center; gap: 10px; }
  .lb-img {
    flex: 1 1 auto;     /* grow to fill the height the stage has available */
    min-height: 0;
    width: 100%;
    aspect-ratio: auto; /* drop the fixed 16:10 frame */
    background: transparent;
    overflow: hidden;
  }
  /* fill that box, scaling the photo up/down, preserving aspect, never cropped */
  .lb-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  .lb-caption-inner { flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .lb-title { text-align: center; }
  .lb-strip {
    max-width: calc(100vw - 12px);
    overflow-x: auto;
    bottom: 14px;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .photo-item-wide { grid-column: auto; }

  .vs-prev-next { grid-template-columns: 1fr; }

  /* phone-only lightbox tweaks (fit rules are in the <=900px block above) */
  .lightbox { padding: 52px 6px 92px; }
  .lb-arrow { display: none; }
  .lb-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lb-strip-thumb { width: 46px; height: 36px; }

  .album-page-nav { flex-direction: column; align-items: flex-start; gap: 10px; }
}
