/* ── Book / Programme Viewer ── */
.program-section { margin: 3rem 0 2rem; }
.program-section .photos-title { margin-bottom: 1.8rem; }
.book-viewer { display: flex; align-items: center; justify-content: center; gap: 1.2rem; }
.book-stage {
  position: relative; width: min(720px, 88vw); aspect-ratio: 840 / 595;
  box-shadow: 0 28px 80px rgba(0,0,0,0.75), 0 8px 24px rgba(0,0,0,0.4);
  border-radius: 3px; perspective: 2200px;
}
.book-wrap { width: 100%; height: 100%; display: flex; border-radius: 3px; overflow: hidden; }
.book-half { flex: 1; position: relative; overflow: hidden; background: #120530; }
.book-half.book-left  { border-radius: 3px 0 0 3px; }
.book-half.book-right { border-radius: 0 3px 3px 0; }
.book-half.book-left::after {
  content: ''; position: absolute; inset: 0 0 0 auto; width: 22px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.4));
  pointer-events: none; z-index: 1;
}
.book-half.book-right::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 22px;
  background: linear-gradient(to left, transparent, rgba(0,0,0,0.4));
  pointer-events: none; z-index: 1;
}
.book-spine {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.15) 35%, rgba(255,255,255,0.07) 50%, rgba(0,0,0,0.15) 65%, rgba(0,0,0,0.6) 100%);
  z-index: 3; pointer-events: none;
}
.book-turning {
  position: absolute; top: 0; height: 100%; width: 50%;
  transform-style: preserve-3d; display: none; z-index: 10; pointer-events: none;
}
.book-turning.turn-next { left: 50%; transform-origin: left center; }
.book-turning.turn-prev { left: 0;   transform-origin: right center; }
.book-turning.animating-next { animation: pageTurnNext 0.7s ease-in-out forwards; }
.book-turning.animating-prev { animation: pageTurnPrev 0.7s ease-in-out forwards; }
@keyframes pageTurnNext { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(-180deg); } }
@keyframes pageTurnPrev { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(180deg); } }
.book-turning-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
}
.book-turning-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-turning-back { transform: rotateY(180deg); }
.book-turning-front::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to left, transparent 55%, rgba(0,0,0,0.28)); pointer-events: none;
}
.book-turning-back::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 55%, rgba(0,0,0,0.28)); pointer-events: none;
}
.book-stage.casting-shadow-left::before {
  content: ''; position: absolute; top: 0; left: 0; width: 50%; height: 100%;
  background: linear-gradient(to left, rgba(0,0,0,0.32), transparent 70%);
  z-index: 4; pointer-events: none; animation: castShadow 0.7s ease-in-out forwards;
}
.book-stage.casting-shadow-right::after {
  content: ''; position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.32), transparent 70%);
  z-index: 4; pointer-events: none; animation: castShadow 0.7s ease-in-out forwards;
}
@keyframes castShadow { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
.book-page-img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.book-nav-skip { opacity: 0.7; font-size: 0.95rem !important; }
.book-nav {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  color: #ede0f5; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.15rem;
  transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}
.book-nav:hover:not(:disabled) { background: rgba(201,160,64,0.18); border-color: rgba(201,160,64,0.4); }
.book-nav:disabled { opacity: 0.25; cursor: default; }
.book-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.9rem; }
.book-counter { color: rgba(237,224,245,0.5); font-size: 0.82rem; letter-spacing: 0.08em; }
.book-zoom-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  color: #ede0f5; padding: 0 0.85rem; height: 30px; border-radius: 15px;
  font-size: 0.78rem; cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
  transition: background 0.2s, border-color 0.2s; letter-spacing: 0.04em;
}
.book-zoom-btn:hover { background: rgba(201,160,64,0.18); border-color: rgba(201,160,64,0.4); }
.book-zoom-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(5,1,15,0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.book-zoom-overlay.open { opacity: 1; visibility: visible; }
.book-zoom-spread {
  display: flex; align-items: stretch; max-width: 96vw; max-height: 88vh;
  box-shadow: 0 24px 80px rgba(0,0,0,0.85);
}
.book-zoom-half { flex: 1; overflow: hidden; background: #120530; }
.book-zoom-half.zoom-left  { border-radius: 3px 0 0 3px; }
.book-zoom-half.zoom-right { border-radius: 0 3px 3px 0; }
.book-zoom-half img { display: block; height: 88vh; width: auto; max-width: 46vw; object-fit: contain; }
.book-zoom-spine {
  width: 5px; flex-shrink: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(255,255,255,0.06) 50%, rgba(0,0,0,0.6) 100%);
}
.book-zoom-close {
  position: fixed; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.book-zoom-close:hover { background: rgba(255,255,255,0.2); }
.book-zoom-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; width: 50px; height: 50px; border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.book-zoom-nav:hover:not(:disabled) { background: rgba(201,160,64,0.22); }
.book-zoom-nav:disabled { opacity: 0.2; cursor: default; }
.book-zoom-nav-prev { left: 1rem; }
.book-zoom-nav-next { right: 1rem; }
.book-zoom-counter {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.5); font-size: 0.8rem; letter-spacing: 0.08em; white-space: nowrap;
}
/* Single-page spreads on desktop (first cover and last page) */
.book-stage.single-page {
  aspect-ratio: 420 / 595;
  width: min(360px, 44vw);
}
.book-stage.single-page .book-spine { display: none; }
.book-stage.single-page .book-half.book-right { display: none; }
.book-stage.single-page .book-half.book-left { border-radius: 3px; }
.book-stage.single-page .book-half.book-left::after { display: none; }

@media (max-width: 600px) {
  /* Single-page portrait mode */
  .book-stage { width: min(380px, 94vw); aspect-ratio: 3 / 4; }
  .book-half.book-right { display: none; }
  .book-half.book-left { flex: 1; border-radius: 3px; }
  .book-half.book-left::after { display: none; }
  .book-spine { display: none; }
  .book-viewer { gap: 0.4rem; }
  .book-nav { width: 36px; height: 36px; font-size: 0.9rem; }
  /* Zoom: full-width single page */
  .book-zoom-half.zoom-right { display: none; }
  .book-zoom-spine { display: none; }
  .book-zoom-half.zoom-left { border-radius: 4px; }
  .book-zoom-half img { height: auto; max-height: 86vh; width: 90vw; max-width: 90vw; }
}
