/* ===================================================================
   小題大作的樂趣所在 (polodeluxe.idv.tw) - 數位典藏館樣式表
   風格定位: 明亮優雅、書香雅緻、數位典藏、大方留白、高易讀性
   =================================================================== */

:root {
  --bg-primary: #fcfcfb;
  --bg-card: #ffffff;
  --bg-subtle: #f6f6f4;
  --bg-hover: #f0f0ed;
  --text-main: #1f2937;
  --text-body: #374151;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --accent-blue: #1e3a8a;      /* 經典深墨水藍 */
  --accent-gold: #b45309;      /* 賽璐珞筆身暖琥珀色 */
  --accent-gold-bg: #fef3c7;
  --accent-gold-text: #92400e;
  --accent-green: #065f46;     /* 單車逐風墨綠 */
  --accent-green-bg: #ecfdf5;
  --border-light: #e5e7eb;
  --border-subtle: #f0f0ee;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.08);
  --shadow-hover: 0 14px 34px rgba(0,0,0,0.11);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --content-width: 840px;
  --site-width: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: all 0.18s ease;
}

a:hover {
  color: #1d4ed8;
}

/* -------------------------------------------------------------
   頂部導覽列 Header
   ------------------------------------------------------------- */
.site-header {
  background: rgba(252, 252, 251, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.header-container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-title:hover {
  text-decoration: none;
  color: var(--accent-blue);
}

.brand-badge {
  font-size: 0.75rem;
  background: var(--accent-gold-bg);
  color: var(--accent-gold-text);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(180, 83, 9, 0.2);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
}

.nav-links a:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  text-decoration: none;
}

/* -------------------------------------------------------------
   典藏大廳 Hero Section
   ------------------------------------------------------------- */
.hero-section {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 0.8rem;
  background: rgba(180, 83, 9, 0.08);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.stat-chip strong {
  color: var(--accent-blue);
  font-weight: 700;
}

/* -------------------------------------------------------------
   焦點特展 Spotlight Section
   ------------------------------------------------------------- */
.spotlight-section {
  max-width: var(--site-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-note {
  font-size: 0.85rem;
  color: var(--text-light);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.spotlight-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(30, 58, 138, 0.25);
  text-decoration: none;
}

.spotlight-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(180, 83, 9, 0.92);
  color: #ffffff;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.spotlight-cover {
  height: 180px;
  background: #edece8;
  position: relative;
  overflow: hidden;
}

.spotlight-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.spotlight-card:hover .spotlight-cover img {
  transform: scale(1.05);
}

.spotlight-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.spotlight-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.45rem;
  display: flex;
  gap: 0.5rem;
}

.spotlight-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.spotlight-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* -------------------------------------------------------------
   控制列 Toolbar (搜尋、分類標籤、年代、視圖切換)
   ------------------------------------------------------------- */
.toolbar-section {
  max-width: var(--site-width);
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.toolbar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* 搜尋列 */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.1rem;
  margin-bottom: 1.1rem;
  transition: all 0.2s ease;
}

.search-wrapper:focus-within {
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.search-icon {
  font-size: 1.1rem;
  color: var(--text-light);
}

.search-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
}

.search-clear {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  display: none;
}

.search-clear:hover {
  color: var(--text-main);
}

.search-count-badge {
  font-size: 0.8rem;
  background: rgba(30, 58, 138, 0.08);
  color: var(--accent-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

/* 快速關鍵字推薦 Chips */
.quick-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.quick-tag-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-right: 0.25rem;
}

.quick-tag-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-tag-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--text-light);
}

/* 篩選標籤按鈕群組 */
.filter-row {
  margin-bottom: 1rem;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-row-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-btn {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.18s ease;
  font-weight: 500;
}

.filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--text-main);
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.year-btn {
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
}

/* 視圖切換列 */
.view-switcher-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--border-light);
}

.view-status-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.view-toggle-btns {
  display: flex;
  background: var(--bg-subtle);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  gap: 0.2rem;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.view-toggle-btn:hover {
  color: var(--text-main);
}

.view-toggle-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* -------------------------------------------------------------
   展品卡片網格 (Gallery View)
   ------------------------------------------------------------- */
.collection-grid {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(30, 58, 138, 0.25);
  text-decoration: none;
}

.card-cover {
  height: 200px;
  background: #edece8;
  position: relative;
  overflow: hidden;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-cover img {
  transform: scale(1.05);
}

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #c9c7be;
  background: linear-gradient(135deg, #f7f6f2 0%, #ebe9e1 100%);
}

.card-photo-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.card-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 0.76rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card:hover .card-title {
  color: var(--accent-blue);
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.card-read-more {
  color: var(--accent-blue);
  font-weight: 600;
}

/* -------------------------------------------------------------
   編年流水清單 (Timeline Stream View)
   ------------------------------------------------------------- */
.timeline-container {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: none; /* 由 JS 切換 */
}

.timeline-year-group {
  margin-bottom: 2.5rem;
}

.timeline-year-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-year-badge {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

.timeline-list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.timeline-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
  text-decoration: none;
  gap: 1rem;
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-row:hover {
  background: var(--bg-subtle);
  text-decoration: none;
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-light);
  min-width: 105px;
  font-variant-numeric: tabular-nums;
}

.timeline-cat-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  flex-grow: 1;
  transition: color 0.15s ease;
}

.timeline-row:hover .timeline-title {
  color: var(--accent-blue);
}

.timeline-photo-tag {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
}

.timeline-arrow {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* -------------------------------------------------------------
   無結果空狀態 Empty State
   ------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 5rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-light);
  margin-top: 1rem;
  display: none;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.reset-filter-btn {
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.reset-filter-btn:hover {
  background: #1d4ed8;
}

/* -------------------------------------------------------------
   文章詳情頁 (archives/<id>/index.html) 排版
   ------------------------------------------------------------- */
.article-container {
  max-width: var(--content-width);
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.article-breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-breadcrumbs a {
  color: var(--text-muted);
}

.article-category {
  color: var(--accent-blue);
  font-weight: 600;
  background: rgba(30, 58, 138, 0.08);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

.article-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.75rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-content {
  font-size: 1.12rem;
  line-height: 2.05;
  color: #27272a;
}

.article-content p {
  margin-bottom: 1.75rem;
  letter-spacing: 0.015em;
  word-break: break-word;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4 {
  color: var(--text-main);
  font-weight: 700;
  margin: 2.5rem 0 1.1rem;
  line-height: 1.4;
}

.article-content h1 { font-size: 1.65rem; }
.article-content h2 { font-size: 1.45rem; }
.article-content h3 { font-size: 1.25rem; }

.article-figure {
  margin: 2.25rem auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.6rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.article-figure img:hover {
  opacity: 0.95;
}

.article-figure figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  font-style: normal;
}

.photo-lost-notice {
  background: #fbfbf9;
  border: 1px dashed #d6d3cd;
  color: #78716c;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 0.92rem;
  margin: 1.5rem auto;
  max-width: 600px;
}

/* 上下一篇導覽 */
.post-navigation {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.nav-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.nav-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.nav-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
}

/* -------------------------------------------------------------
   頁尾 Footer
   ------------------------------------------------------------- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: var(--site-width);
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------
   圖片燈箱 Lightbox Modal
   ------------------------------------------------------------- */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

/* -------------------------------------------------------------
   回到頂部按鈕 Back to Top
   ------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-main);
  color: #ffffff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 0.88;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: var(--accent-blue);
}

/* -------------------------------------------------------------
   響應式斷點 Responsive Media Queries
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .collection-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 3rem;
  }
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .post-navigation {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .article-title {
    font-size: 1.75rem;
  }
  .timeline-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}


/* ==========================================================================
   NextGEN 歷史藝廊相簿專用排版
   ========================================================================== */
.article-gallery-section {
  margin: 3rem 0 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.gallery-section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.ngg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ngg-gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.ngg-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-accent);
}

.ngg-gallery-item img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.ngg-item-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.35rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
