/* ============================================================
   富立傑 案例相簿（電影布幕模式）— 共用樣式
   搭配 shared/case-gallery.js。浮水印文字由 .cinema-frame[data-label] 提供。
   ============================================================ */
.cinema-gallery { max-width: 100%; margin: 14px 0 52px; padding: 0; }

.cinema-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(200,168,112,.26), transparent 32%),
    radial-gradient(circle at 86% 86%, rgba(255,255,255,.1), transparent 30%),
    linear-gradient(155deg, #161616 0%, #24201a 56%, #121212 100%);
  border: 0;
}
.cinema-frame[data-label]::before {
  content: attr(data-label);
  position: absolute;
  right: 24px; top: 18px;
  color: rgba(255,255,255,.16);
  font-size: 11px;
  letter-spacing: .34em;
  z-index: 6;
  pointer-events: none;
}
.cinema-stage {
  position: relative;
  height: min(58vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 150px 16px;
  perspective: 1200px;
}
.cinema-slide {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(52%, 620px);
  height: 84%;
  border-radius: 2px;
  overflow: hidden;
  transition: left .45s cubic-bezier(.25,.46,.45,.94), transform .45s cubic-bezier(.25,.46,.45,.94), filter .45s ease, opacity .45s ease;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  background: #111;
}
.cinema-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease-out; }
.cinema-slide::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); transition: background .28s ease; }

.pos--2 { left: 24%; transform: translate(-50%,-50%) scale(.72) rotateY(18deg);  opacity: .38; filter: blur(.6px); }
.pos--1 { left: 36%; transform: translate(-50%,-50%) scale(.84) rotateY(11deg);  opacity: .66; }
.pos-0  { left: 50%; transform: translate(-50%,-50%) scale(1); opacity: 1; z-index: 5; box-shadow: 0 25px 65px rgba(0,0,0,.45); cursor: zoom-in; }
.pos-1  { left: 64%; transform: translate(-50%,-50%) scale(.84) rotateY(-11deg); opacity: .66; }
.pos-2  { left: 76%; transform: translate(-50%,-50%) scale(.72) rotateY(-18deg); opacity: .38; filter: blur(.6px); }
.pos-0::after { background: rgba(0,0,0,.05); }

/* 進/出場位置（左右切換的滑動起訖）*/
.slide-enter-right, .slide-exit-right { left: 90%; transform: translate(-50%,-50%) scale(.6) rotateY(-24deg); opacity: 0; }
.slide-enter-left,  .slide-exit-left  { left: 10%; transform: translate(-50%,-50%) scale(.6) rotateY(24deg);  opacity: 0; }
@media (prefers-reduced-motion: reduce) { .cinema-slide { transition: none !important; } }

.cinema-stage[data-motion="next"] .pos-0 { animation: focusFromRight .38s ease; }
.cinema-stage[data-motion="prev"] .pos-0 { animation: focusFromLeft .38s ease; }
.cinema-stage[data-parallax="on"] .pos-0 img { transform: scale(1.05) translate3d(var(--px, 0px), var(--py, 0px), 0); }
@keyframes focusFromRight { from { transform: translate(-46%, -50%) scale(.97); opacity: .7; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes focusFromLeft  { from { transform: translate(-54%, -50%) scale(.97); opacity: .7; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

.cinema-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  backdrop-filter: blur(8px);
  transition: all .25s ease;
}
.cinema-nav:hover { background: rgba(200,168,112,.35); border-color: rgba(200,168,112,.75); transform: translateY(-50%) scale(1.05); }
.cinema-nav:active { transform: translateY(-50%) scale(.98); }
.cinema-nav.prev { left: 28px; }
.cinema-nav.next { right: 28px; }

.cinema-bottom { padding: 18px 24px 22px; background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(200,168,112,.12) 100%); }
.cinema-caption { color: #e9e2d4; }
.cinema-title { font-weight: 800; font-size: 18px; }
.cinema-sub { opacity: .8; margin-top: 4px; font-size: 14px; color: #d0c5b0; }
.cinema-meta { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cinema-counter { color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .15em; min-width: 74px; text-align: right; }
.cinema-progress { flex: 1; height: 3px; background: rgba(255,255,255,.2); overflow: hidden; position: relative; }
.cinema-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 16.666%; background: linear-gradient(90deg, rgba(200,168,112,.9), rgba(255,255,255,.72)); transition: width .35s ease; }

.thumb-scroller { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.thumb-scroll-btn { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.24); color: #e8e0d1; cursor: pointer; transition: all .2s ease; flex: 0 0 auto; }
.thumb-scroll-btn:hover { border-color: rgba(200,168,112,.75); color: #fff; background: rgba(200,168,112,.28); }
.thumb-strip {
  flex: 1; min-width: 0;
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,168,112,.5) rgba(255,255,255,.08);
  cursor: grab;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.thumb-strip:active { cursor: grabbing; }
.thumb-strip::-webkit-scrollbar { height: 6px; }
.thumb-strip::-webkit-scrollbar-thumb { background: rgba(200,168,112,.5); border-radius: 999px; }
.thumb-strip::-webkit-scrollbar-track { background: rgba(255,255,255,.08); }
.thumb {
  position: relative;
  flex: 0 0 160px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #f5f5f5;
  cursor: pointer;
  opacity: .7;
  transform: translateY(0);
  transition: transform .25s ease, border-color .25s ease, opacity .25s ease, box-shadow .25s ease;
}
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.thumb::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); transition: background .25s ease; }
.thumb.is-active { border-color: rgba(200,168,112,.95); opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.thumb.is-active::after { background: rgba(0,0,0,.05); }
.thumb:hover { opacity: 1; border-color: rgba(200,168,112,.65); }

/* lightbox（放大檢視）*/
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 1200; padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox-figure { margin: 0; max-width: min(92vw, 1400px); max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-image { max-width: 100%; max-height: calc(92vh - 64px); width: auto; height: auto; object-fit: contain; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.lightbox-caption { color: #ddd; font-size: 13px; letter-spacing: .08em; text-align: center; }
.lightbox-close { position: absolute; top: 12px; right: 14px; width: 42px; height: 42px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }

@media (max-width: 768px) {
  .cinema-gallery { padding: 0; }
  .cinema-stage { height: 390px; padding: 16px 48px 10px; }
  .pos--2 { left: 8%; }
  .pos--1 { left: 22%; }
  .pos-1  { left: 78%; }
  .pos-2  { left: 92%; }
  .cinema-nav.prev { left: 10px; }
  .cinema-nav.next { right: 10px; }
  .cinema-bottom { padding: 14px 14px 16px; }
  .thumb-scroll-btn { width: 30px; height: 30px; }
  .thumb-strip { gap: 8px; }
  .thumb { flex-basis: 128px; }
}
