/* index_v2.css — V2 首頁專屬樣式 */

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; background: #fff; color: #1a1a1a; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* ── Homepage: hero flush behind fixed header ── */
#header { height: 0 !important; }

/* ── 共用 Section ── */
.v2-section { padding: 40px 20px; }
.v2-section__head { margin-bottom: 20px; }
.v2-section__head h2 { margin: 0 0 4px; font-size: clamp(24px, 5vw, 36px); font-weight: 700; letter-spacing: -0.01em; }
.v2-section__head p  { margin: 0; font-size: 13px; color: #666; }
.v2-section__more   { text-align: center; padding: 28px 0 0; }

/* ── Ticker 跑馬燈 ── */
.v2-ticker-wrap {
  background: #111;
  overflow: hidden;
  white-space: nowrap;
  padding: 9px 0;
  border-bottom: 1px solid #222;
}
.v2-ticker-wrap--bottom {
  border-bottom: none;
  border-top: 1px solid #222;
}
.v2-ticker {
  display: inline-flex;
  gap: 0;
}
.v2-ticker__track {
  display: inline-block;
  padding-right: 0;
  animation: ticker-scroll 35s linear infinite;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
  font-family: ui-monospace, "Courier New", monospace;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── Outline button (探索更多 / 瀏覽所有行程) ── */
.v2-btn-outline {
  display: inline-block;
  padding: 11px 28px;
  border: 1.5px solid #1a1a1a;
  color: #1a1a1a;
  font-size: 13px;
  border-radius: 4px;
  text-decoration: none;
  transition: background .15s, color .15s;
  letter-spacing: 0.03em;
}
.v2-btn-outline:hover { background: #1a1a1a; color: #fff; }

/* ──────────── HERO ──────────── */
.v2-hero { position: relative; width: 100%; height: 60vh; min-height: 320px; overflow: hidden; background: #111; }

.v2-hero .carousel-wrapper { position: absolute; inset: 0; margin: 0; padding: 0; }
.v2-hero .carousel-content { position: absolute; inset: 0; }
.v2-hero .carousel-content img,
#carouselImage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

#heroVideo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}

.v2-hero .carousel-prev,
.v2-hero .carousel-next { display: none; } /* V2 用 swipe，不顯示箭頭 */

/* 漸層覆蓋 */
.v2-hero__gradient {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

/* 文字覆蓋 */
.v2-hero__overlay {
  position: absolute; bottom: 60px; left: 24px; right: 40%;
  color: #fff; pointer-events: none;
}
.v2-hero__tag {
  display: inline-block; font-size: 11px; letter-spacing: .08em;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4);
  padding: 2px 8px; border-radius: 4px; margin-bottom: 10px;
}
.v2-hero__title {
  margin: 0 0 6px; font-size: clamp(20px, 4vw, 32px); font-weight: 700; line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.v2-hero__date {
  margin: 0 0 4px; font-size: 13px; opacity: .85; letter-spacing: .04em;
}
.v2-hero__location {
  margin: 0 0 16px; font-size: 13px; opacity: .75;
}
.v2-hero__cta {
  pointer-events: auto; display: inline-block;
  padding: 8px 20px; background: #fff; color: #111; border: none;
  font-size: 13px; border-radius: 4px; text-decoration: none;
  transition: background .2s, color .2s;
}
.v2-hero__cta:hover { background: #e0e0e0; color: #111; }

/* 分頁點 */
.v2-hero__dots {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.v2-hero__dots .pager-dot {
  width: 24px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.4); border: none; padding: 0; cursor: pointer;
  transition: background .2s, width .2s;
}
.v2-hero__dots .pager-dot.active { background: #fff; width: 36px; }

/* ──────────── 探索附近 ──────────── */
.v2-explore { padding: 40px 20px 0; }

/* 標題列：左邊文字 + 右邊 tabs */
.v2-explore__top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.v2-explore__head-left { flex: 1; min-width: 0; }
.v2-explore__title { margin: 0 0 4px; font-size: clamp(24px, 5vw, 36px); font-weight: 700; letter-spacing: -0.01em; }
.v2-explore__sub { margin: 0; font-size: 13px; color: #666; }

.v2-section__divider { border: none; border-top: 1px solid #e0e0e0; margin: 16px 0; }

.v2-explore__tabs { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.v2-explore__tabs .tab {
  padding: 6px 16px; border-radius: 20px; border: 1.5px solid #d0d0d0;
  background: #fff; color: #555; font-size: 13px; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.v2-explore__tabs .tab.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* 隱藏 V1 overview scroll */
.overview-scroll-wrapper { display: none !important; }

/* 地圖容器（相對定位，讓卡片可以絕對浮在上面） */
.v2-map-wrap { position: relative; }
#map.v2-map { width: 100%; height: 58vh; min-height: 360px; border-radius: 0 !important; overflow: hidden; filter: grayscale(100%) contrast(1.05); }

/* 探索更多按鈕 */
.v2-explore__more { text-align: center; padding: 24px 0 40px; }
.v2-btn-dark {
  display: inline-block; padding: 12px 28px;
  background: #1a1a1a; color: #fff; font-size: 14px;
  border-radius: 6px; text-decoration: none; transition: opacity .15s;
}
.v2-btn-dark:hover { opacity: .8; }

/* ── event-card (地圖右側面板 — Figma v2) ── */
.event-card {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.18);
  overflow: hidden;
  width: 300px;
  flex-direction: column;
}
.event-card.active { display: flex; }

/* 圖片區 */
.ec-img-wrap { position: relative; width: 100%; flex-shrink: 0; }
.ec-cover-img { width: 100%; height: 200px; object-fit: cover; display: block; }

/* ♡ 收藏（左上） */
.ec-fav-btn {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(0,0,0,.35); color: #fff; border: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; padding: 0;
}
.ec-fav-btn.liked i { font-weight: 900; color: #e53935; }

/* × 關閉（右上） */
.event-card-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; line-height: 1; padding: 0;
}

/* ◀ ▶ 輪播箭頭 */
.ec-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 11; background: #fff; border: 1px solid #e0e0e0;
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 13px; color: #333;
  transition: background .15s;
}
.ec-arrow:hover { background: #f5f5f5; }
.ec-arrow--prev { left: -16px; }
.ec-arrow--next { right: -16px; }

/* 分頁點 */
.ec-dots {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 0 4px;
}
.ec-dot {
  width: 6px; height: 6px; background: #ccc; cursor: pointer;
  transition: background .15s;
}
.ec-dot.active { background: #111; }

/* 內文區 */
.ec-body { padding: 12px 14px 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.ec-body .ec-actions { margin-top: auto; padding-top: 10px; }

/* Mobile：卡片回到底部 */
@media (max-width: 640px) {
  .event-card { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; flex-direction: column; }
  .ec-arrow--prev { left: 4px; }
  .ec-arrow--next { right: 4px; }
}

/* 雙 badge */
.ec-badges { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.ec-badge {
  font-size: 11px; padding: 2px 10px; border-radius: 20px;
  font-weight: 500; letter-spacing: 0.02em;
}
.ec-badge--cat { background: #f0f0f0; color: #444; }
.ec-badge--status { background: #201F21; color: #fff; }
.ec-badge--status.ongoing { background: #201F21; }
.ec-badge--status.upcoming { background: #1565C0; color: #fff; }
.ec-badge--status.ended { background: #757575; color: #fff; }
.ec-badge:empty { display: none; }

/* 標題 */
.ec-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.35; }

/* date / location 行（icon + text） */
.ec-meta {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 0 4px; font-size: 12px; color: #555;
}
.ec-meta i { flex-shrink: 0; margin-top: 1px; font-size: 12px; color: #888; }
.ec-meta span { flex: 1; }

/* description（選填，通常空著） */
.ec-desc { margin: 6px 0 10px; font-size: 12px; color: #666; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-desc:empty { display: none; margin: 0; }

/* 操作列 */
.ec-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ec-btn-primary {
  flex: 1; background: #201F21; color: #fff; border: none;
  border-radius: 24px; padding: 11px 0;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.ec-btn-primary:hover { opacity: .85; }
.ec-btn-link {
  background: transparent; border: none; color: #1a1a1a;
  font-size: 13px; cursor: pointer; padding: 0;
  text-decoration: none; white-space: nowrap; font-weight: 500;
}
.ec-btn-link:hover { text-decoration: underline; }

/* ──────────── 發掘附近作品 ──────────── */
.v2-artworks { padding: 40px 20px; }

#artworks-container.v2-masonry {
  columns: 4; column-gap: 6px;
  position: relative;
}
#artworks-container.v2-masonry::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}
#artworks-container.v2-masonry .artwork-item {
  break-inside: avoid; margin-bottom: 6px; cursor: pointer; overflow: hidden;
}
#artworks-container.v2-masonry .artwork-item img {
  width: 100%; display: block;
  transition: transform 0.35s ease;
}
#artworks-container.v2-masonry .artwork-item:hover img { transform: scale(1.04); }
#artworks-container.v2-masonry .no-image-box { display: none; }

/* ──────────── Photo pin marker ──────────── */
.gmap-photo-pin {
  position: relative;
  width: 52px;
  cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.gmap-photo-pin img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  display: block;
  border: 2.5px solid #fff;
}
.gmap-photo-pin::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #fff;
  margin: 0 auto;
}

/* ──────────── 精選行程 ──────────── */
.v2-trips { padding: 40px 20px 60px; }
.v2-trips__head {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px;
}
.v2-trips__head h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.v2-trips__head p  { margin: 0; font-size: 13px; color: #666; }
.v2-trips__all   { font-size: 13px; color: #1a1a1a; text-decoration: none; white-space: nowrap; }
.v2-trips__all:hover { text-decoration: underline; }

.v2-trips__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.v2-trip-card { display: block; text-decoration: none; color: inherit; overflow: hidden; background: #f8f8f8; }
.v2-trip-card__img { width: 100%; aspect-ratio: 4/5; overflow: hidden; }
.v2-trip-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.v2-trip-card:hover .v2-trip-card__img img { transform: scale(1.04); }
.v2-trip-card__body { padding: 12px 0 14px; }
.v2-trip-card__title { margin: 0 0 8px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.v2-trip-card__divider { border: none; border-top: 1px solid #E5E5E5; margin: 0 0 8px; }
.v2-trip-card__meta { font-size: 11px; color: #888; display: block; }

/* ──────────── Artwork dialogs (保留 V1) ──────────── */
.artwork-detail-dialog { border: none; border-radius: 14px; padding: 0; max-width: 92vw; box-shadow: 0 8px 40px rgba(0,0,0,.2); }
.artwork-detail-dialog::backdrop { background: rgba(0,0,0,.5); }
.detail-wrap { display: flex; gap: 0; }
.detail-image { flex: 1; min-width: 0; }
.detail-image img { width: 100%; max-height: 70vh; object-fit: contain; display: block; border-radius: 14px 0 0 14px; background: #f0f0f0; }
.detail-meta { width: 220px; padding: 20px 16px; position: relative; display: flex; flex-direction: column; gap: 6px; }
.detail-close { position: absolute; top: 10px; right: 10px; background: #f0f0f0; border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.detail-meta h3 { margin: 0 0 2px; font-size: 16px; font-weight: 700; line-height: 1.3; padding-right: 24px; }
.detail-meta p { margin: 0; font-size: 12px; color: #666; }
.detail-meta .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.detail-meta .action-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid #ddd; background: #fff; color: #333; transition: background .15s, border-color .15s; font-family: inherit; }
.detail-meta .action-button:hover { border-color: #111; color: #111; }
.detail-meta .action-button.detail { background: #111; color: #fff; border-color: #111; }
.detail-meta .action-button.detail:hover { background: #333; }
.artwork-zoom-dialog { border: none; background: transparent; padding: 0; max-width: 100vw; max-height: 100vh; }
.artwork-zoom-dialog::backdrop { background: rgba(0,0,0,.85); }
#zoomWrapper { position: relative; display: flex; align-items: center; justify-content: center; }
#zoomedImage { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.zoom-close-button { position: fixed; top: 16px; right: 16px; background: rgba(255,255,255,.2); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 20px; cursor: pointer; }
.zoom-controls { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.zoom-controls button { background: rgba(255,255,255,.2); color: #fff; border: none; border-radius: 8px; width: 40px; height: 40px; font-size: 16px; cursor: pointer; }

/* ──────────── Bottom nav (由 bottomnavbar2.css 統一管理，不在此覆蓋) ──────────── */

/* ──────────── Footer ──────────── */
.v2-footer {
  background: #111;
  padding: 48px 40px 100px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 320px;
  gap: 24px;
}
.v2-footer__wordmark {
  flex: 1;
  color: #fff;
  font-size: clamp(52px, 10vw, 130px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  user-select: none;
}
.wm-row {
  display: flex;
  align-items: center;
  gap: 0.12em;
}
.wm-letter {
  white-space: nowrap;
  line-height: 1;
}
.wm-bar {
  flex: 2;
  height: 0.09em;
  background: #fff;
  flex-shrink: 0;
}
.wm-bar--sm { flex: 0.6; }
.v2-footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-shrink: 0;
  padding-bottom: 4px;
}
.v2-footer__social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}
.v2-footer__social a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.75;
  transition: opacity .15s;
}
.v2-footer__social a:hover { opacity: 1; }
.v2-footer__copy {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ── Curated Journeys head (no 瀏覽所有行程 link inline) ── */
.v2-trips__head { margin-bottom: 20px; }

/* ──────────── RWD ──────────── */
@media (max-width: 768px) {
  .v2-hero__overlay { right: 10%; bottom: 50px; }
  #artworks-container.v2-masonry { columns: 2; }
  .v2-trips__grid { grid-template-columns: 1fr; }
  .v2-trips__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .v2-footer { flex-direction: column; align-items: flex-start; min-height: auto; padding: 36px 24px; }
  .v2-footer__right { align-items: flex-start; gap: 24px; }
  .v2-footer__social { text-align: left; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  #artworks-container.v2-masonry { columns: 3; }
  .v2-trips__grid { grid-template-columns: repeat(3, 1fr); }
}
