/* gallery.css — 停靠點多照片切換：疊在全螢幕照片上的文字 + 控制（不含地圖） */

/* 無 JS：figure 自然堆疊可讀（漸進增強基準） */
.gallery__item { margin: 0 0 2.5rem; max-width: var(--maxw); }
/* 有 JS：隱藏原始 figure，改由覆蓋層呈現 */
.gallery.is-enhanced .gallery__item { display: none; }

.panel--stop { position: relative; }

/* 可讀性 scrim：左半 + 底部深色漸層，保證文字壓在照片上仍可讀 */
.gallery__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,16,24,0.82) 0%, rgba(7,16,24,0.45) 42%, rgba(7,16,24,0) 70%),
    linear-gradient(0deg, rgba(7,16,24,0.6) 0%, rgba(7,16,24,0) 40%);
}

/* 文字覆蓋層：左下；換照片時淡入 */
.gallery__text {
  position: absolute; z-index: 2; left: 8vw; bottom: 16vh; max-width: var(--maxw);
  animation: gallery-fade 480ms var(--ease-soft);
}
.gallery__text .panel__kicker {
  font-family: var(--font-serif); font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--c-river-l); letter-spacing: 0.08em; margin-bottom: 0.6rem;
}
.gallery__text .panel__title { margin-bottom: 0.8rem; }
@keyframes gallery-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 圓點：文字下方 */
.gallery__dots { position: absolute; z-index: 3; left: 8vw; bottom: 11vh; display: flex; gap: 8px; }
.gallery__dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; border: 0;
  background: rgba(238,243,247,0.35); cursor: pointer; transition: background 240ms var(--ease-soft);
}
.gallery__dot.is-active { background: var(--c-mist); }
.gallery__dot:focus-visible { outline: 2px solid var(--c-mist); outline-offset: 2px; }

/* 切換箭頭：照片左右緣、垂直置中 */
.gallery__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(238,243,247,0.16); color: var(--c-mist); font-size: 1.5rem; line-height: 1;
  backdrop-filter: blur(4px); transition: background 240ms var(--ease-soft);
}
.gallery__arrow:hover { background: rgba(238,243,247,0.3); }
.gallery__arrow:focus-visible { outline: 2px solid var(--c-mist); outline-offset: -2px; }
.gallery__arrow--prev { left: 2.5vw; }
.gallery__arrow--next { right: 2.5vw; }

/* RWD：手機箭頭隱藏（用 swipe），文字收窄避開右下地圖 */
@media (max-width: 768px) {
  .gallery__arrow { display: none; }
  .gallery__text { left: 7vw; right: 48%; bottom: 14vh; }
  .gallery__text .panel__kicker { font-size: 0.78rem; }
  .gallery__text .panel__title { font-size: clamp(1rem, 4.5vw, 1.3rem); }
  .gallery__text .panel__body { font-size: 0.82rem; }
  .gallery__dots { left: 7vw; bottom: 9vh; }
}

/* reduced-motion：關文字淡入 */
@media (prefers-reduced-motion: reduce) {
  .gallery__text { animation: none; }
}
