/* =========================================
   羅米親子玩樂地圖 - 全站核心樣式表 (Modern App Style)
   ========================================= */
:root {
  /* 主題色：湖水綠 (景點/通用) */
  --primary: #14B8A6;
  --primary-hover: #0D9488;
  --primary-light: #E6FFFA;
  --primary-gradient: linear-gradient(135deg, #CCFBF1 0%, #F0FDF4 100%);
  
  /* 主題色：珊瑚橘 (餐廳/熱門標示) */
  --secondary: #F97316;
  --secondary-hover: #EA580C;
  --secondary-light: #FFF7ED;
  --secondary-gradient: linear-gradient(135deg, #FFEDD5 0%, #FFF7ED 100%);

  /* 主題色：薰衣草紫 (活動專屬) */
  --tertiary: #6366F1;
  --tertiary-hover: #4F46E5;
  --tertiary-light: #EEF2FF;
  --tertiary-gradient: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 100%);

  /* 文字與背景色 */
  --text-dark: #1E293B;
  --text-main: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: 65px;  /* 數值建議設定為選單的高度（約 65-70px） */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
  background-image: url('/images/background.jpg');
  /* 防止圖片重複平鋪 */
  background-repeat: no-repeat;
  /* 圖片縮放以覆蓋整個背景區域，這會讓圖片可能部分被裁切以保持比例 */
  background-size: cover;
  /* 圖片居中 */
  background-position: center;
  /* 圖片固定在視窗中，不隨頁面滾動 */
  background-attachment: fixed;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.page-pad { padding-bottom: 90px; } 

/* =========================================
   1. 共用頂部導航 (Header)
   ========================================= */
.site-header {
  position: fixed;    /* 從 sticky 改為 fixed，確保絕對置頂 */
  top: 0;
  left: 0;
  width: 100%;       /* fixed 定位需要指定寬度 */
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; color: var(--primary); white-space: nowrap; min-width: 0; }
.brand-title { white-space: nowrap; }
.top-links { display: flex; gap: 4px; flex-shrink: 0; }
.top-link { padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 800; color: var(--text-muted); white-space: nowrap; }
.top-link:hover, .top-link.active { color: var(--primary); background: var(--primary-light); }

/* 手機版：縮小 header 字級與間距，讓品牌名不會擠成兩行 */
@media (max-width: 600px) {
  .header-inner { padding: 10px 14px; gap: 6px; }
  .brand { font-size: 16px; gap: 6px; }
  .top-link { padding: 6px 9px; font-size: 13px; }
  .top-links { gap: 2px; }
}

/* =========================================
   2. 頂部視覺看板 (Hero Sections)
   ========================================= */
.hero-block {
  padding: 40px 24px 60px;
  text-align: center;
  border-radius: 0 0 32px 32px;
  margin-bottom: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
  /* 加上共用的毛玻璃模糊效果 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
/* 將原本的實色漸層改為帶有透明度 (rgba) 的漸層 */
.hero-block.green { background: linear-gradient(135deg, rgba(204, 251, 241, 0.85) 0%, rgba(240, 253, 244, 0.85) 100%); }
.hero-block.orange { background: linear-gradient(135deg, rgba(255, 237, 213, 0.85) 0%, rgba(255, 247, 237, 0.85) 100%); }
.hero-block.purple { background: linear-gradient(135deg, rgba(224, 231, 255, 0.85) 0%, rgba(238, 242, 255, 0.85) 100%); }

.hero-block h1 { font-size: 28px; font-weight: 900; margin: 0 0 12px 0; color: var(--text-dark); }
.hero-block.green h1 { color: #0F766E; }
.hero-block.orange h1 { color: #C2410C; }
.hero-block.purple h1 { color: #4338CA; } /* 紫色版標題 */

.hero-block p { font-size: 15px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.breadcrumb { font-size: 13px; font-weight: 700; margin-bottom: 16px; color: var(--text-light); }
.hero-block.green .breadcrumb { color: #0F766E; }
.hero-block.orange .breadcrumb { color: #C2410C; }
.hero-block.purple .breadcrumb { color: #4338CA; } /* 紫色版麵包屑 */

.city-header {
  /* 使用白底半透明，並微微透出一點湖水綠的漸層 */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(20, 184, 166, 0.1) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  padding: 30px 20px; 
  border-radius: 24px; 
  margin-bottom: 30px; 
  margin-top: 20px;
}
.city-header h1 { margin: 0; font-size: 28px; color: var(--text-dark); display: flex; align-items: center; gap: 10px;}

/* =========================================
   3. 全台城市選擇與分區按鈕 (Home & Index)
   ========================================= */
.all-cities-container { margin-top: -30px; padding: 0 20px 40px; }
.region-group {
  /* 將原本的純白底色改成 65% 透明度的白色 */
  background: rgba(255, 255, 255, 0.05); 
  /* 加上毛玻璃模糊效果，讓背後的風景暈開，確保文字好讀 */
  backdrop-filter: blur(1px); 
  -webkit-backdrop-filter: blur(1px); /* 支援 Safari */
  border-radius: 20px; 
  padding: 24px 20px;
  margin-bottom: 20px; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  /* 邊框也改成帶有一點透明的白色，增加玻璃邊緣的反光感 */
  border: 1px solid rgba(255, 255, 255, 0.8); 
  scroll-margin-top: 80px;
}
.region-title {
  font-size: 18px; color: var(--primary-hover); font-weight: 900; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--border-light); padding-bottom: 10px;
}
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 600px) { .city-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .city-grid { grid-template-columns: repeat(6, 1fr); } }

.city-btn {
  /* 按鈕改為 50% 透明度 */
  background: rgba(255, 255, 255, 0.5); 
  border: 1px solid rgba(255, 255, 255, 0.6); 
  color: var(--text-main);
  text-align: center; 
  padding: 12px 4px; 
  border-radius: 12px; 
  font-weight: 800; 
  font-size: 15px; 
  transition: all 0.2s;
}
/* 預設為湖水綠 Hover */
.city-btn:hover {
  background: var(--primary-light); 
  border-color: var(--primary); 
  color: var(--primary-hover); 
  transform: translateY(-2px); 
}
.city-btn.hot {
  /* 針對已建置的熱門城市，微微透出一點暖橘色 */
  background: rgba(255, 247, 237, 0.8); 
  border-color: #FED7AA; 
  color: #C2410C;
}
.city-btn.hot:hover {
  background: #FFEDD5; 
  border-color: var(--secondary);
}

.anchor-nav {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: -30px; margin-bottom: 30px; position: relative; z-index: 10;
}
.anchor-btn {
  /* 跳轉按鈕改為 70% 透明度 */
  background: rgba(255, 255, 255, 0.4); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8); 
  padding: 10px 18px; 
  border-radius: 20px;
  font-size: 14px; 
  font-weight: 800; 
  color: var(--text-muted); 
  box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
  transition: all 0.2s;
}
.anchor-btn:hover {
  background: var(--primary); 
  color: white; 
  border-color: var(--primary);
}

/* --- 🌟 紫色活動主題作用域 (Theme Purple) --- */
.theme-purple .region-title { color: #4338CA; }
.theme-purple .anchor-btn:hover { background: var(--tertiary); color: white; border-color: var(--tertiary); }
.theme-purple .city-btn:hover { background: var(--tertiary-light); border-color: var(--tertiary); color: var(--tertiary-hover); }

/* =========================================
   4. 列表頁現代化卡片 (List Pages)
   ========================================= */
.modern-cards-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 20px;}
@media (min-width: 768px) { .modern-cards-grid { grid-template-columns: repeat(2, 1fr); } }

.modern-card {
  /* 將白底改為 65% 透明度 + 毛玻璃 */
  background: rgba(255, 255, 255, 0.65); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px; 
  padding: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex; flex-direction: column; transition: all 0.2s ease;
}
.modern-card:hover {
  transform: translateY(-4px); 
  box-shadow: 0 12px 25px rgba(20, 184, 166, 0.1); 
  border-color: var(--primary); 
  /* 滑鼠游標移過去時，卡片稍微變白一點，增加互動感 */
  background: rgba(255, 255, 255, 0.85);
}
.modern-card .card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.modern-card .card-title { font-size: 20px; font-weight: 800; color: var(--text-dark); margin: 0; line-height: 1.3; }
.modern-card .district-tag {
  background: var(--secondary-light); color: #C2410C; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0;
}
.modern-card .card-desc {
  font-size: 15px; color: var(--text-muted); margin: 0 0 20px 0;
  /* 預覽卡片：最多 2 行，超過以「...」截斷，讓列表頁視覺更整齊 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; flex-grow: 1; }
.info-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.info-icon { font-size: 16px; min-width: 20px; text-align: center; }
.info-text { color: var(--text-main); font-weight: 600; }
.info-text span { color: var(--text-light); font-weight: normal; font-size: 13px; margin-right: 6px; }

.action-btn {
  display: block; width: 100%; background: #F0FDF4; color: #0F766E; padding: 14px; border-radius: 12px; 
  text-align: center; font-size: 15px; font-weight: 800; transition: 0.2s;
}
.action-btn:hover { background: var(--primary); color: white; }

/* =========================================
   5. 詳細資訊頁 (Detail Pages - Tabelog 風格)
   ========================================= */
.tabelog-wrap {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px;
  padding: 24px 20px; margin-top: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.tabelog-title {
  font-size: 18px; font-weight: 900; color: var(--primary); margin: 0 0 16px 0;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-color);
}
.tabelog-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tabelog-table th, .tabelog-table td {
  border-bottom: 1px solid var(--border-color); padding: 20px 0; vertical-align: top; font-size: 14px;
}
.tabelog-table tr:last-child th, .tabelog-table tr:last-child td { border-bottom: none; padding-bottom: 0; }
.tabelog-table th { width: 25%; min-width: 80px; color: var(--text-dark); font-weight: 800; text-align: left; }
.tabelog-table td { width: 75%; color: var(--text-main); padding-left: 16px; }
.tabelog-table ul { margin: 0; padding-left: 1.2em; }
.tabelog-table p { margin: 0 0 6px 0; }
.tabelog-table p:last-child { margin-bottom: 0; }

.bold-days { font-weight: 800; color: var(--text-dark); margin-bottom: 4px; display: block; }
.btn-primary-outline {
  display: inline-flex; align-items: center; justify-content: center; 
  background: rgba(255, 255, 255, 0.8); /* 半透明白底 */
  color: var(--primary); /* 文字維持主題色 */
  border: 2px solid var(--primary); /* 加上2px的主題色邊框 */
  padding: 10px 16px; border-radius: 12px; font-weight: 800; 
  margin-top: 10px; width: 100%; max-width: 280px; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.btn-primary-outline:hover {
  background: var(--primary-light); 
  transform: translateY(-2px);
}

.sticky-bottom-bar {
  position: fixed; bottom: 0; left: 0; width: 100%; background: var(--bg-card);
  border-top: 1px solid var(--border-color); display: flex; justify-content: center; z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05); padding-bottom: env(safe-area-inset-bottom);
}

/* 當頁面有 sticky-bottom-bar（詳細頁），在 body 底部留空間，
   讓共用頁尾不會被固定工具列蓋住 */
body:has(.sticky-bottom-bar) { padding-bottom: 80px; }
.sticky-bottom-inner { width: min(1100px, 100%); display: flex; align-items: center; padding: 12px 20px; gap: 16px; }
.action-share {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px; font-weight: 700; background: transparent; border: none; cursor: pointer; min-width: 48px;
}
.action-share svg { width: 22px; height: 22px; margin-bottom: 4px; fill: var(--text-light); }
.action-main-btn {
  flex: 1; 
  /* 用微漸層取代死板的單一橘色 */
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); 
  color: white; font-size: 16px; font-weight: 900;
  text-align: center; padding: 14px; 
  border-radius: 16px; /* 圓角加大一點，看起來更現代 */
  display: flex; justify-content: center; align-items: center; border: none; cursor: pointer;
  /* 加上柔和的立體陰影 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}
.action-main-btn:hover {
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================
   6. 其他共用元件 (Nav Pills, Mini Cards)
   ========================================= */
.scroll-nav { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; margin-top: 20px; scrollbar-width: none; }
.scroll-nav::-webkit-scrollbar { display: none; }
.nav-pill {
  /* 65% 透明白底 + 8px 模糊 */
  background: rgba(255, 255, 255, 0.65); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 24px; 
  border-radius: 16px; 
  font-weight: 800;
  color: var(--text-muted); 
  white-space: nowrap; 
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
  display: flex; 
  align-items: center; 
  gap: 8px;
  transition: all 0.2s;
}
.nav-pill:hover, .nav-pill.active {
  background: var(--primary); 
  color: white; 
  border-color: var(--primary);
}

.preview-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 768px) { .preview-grid { grid-template-columns: 1fr 1fr; } }
.mini-card {
  display: flex; 
  gap: 16px; 
  /* 65% 透明白底 + 12px 模糊 */
  background: rgba(255, 255, 255, 0.65); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px; 
  border-radius: 16px; 
  border: 1px solid rgba(255, 255, 255, 0.8); 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  align-items: center;
  transition: transform 0.2s, background 0.2s;
}
.mini-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85); /* 滑鼠游標移過去時稍微變白一點 */
}
.mini-card-icon {
  width: 50px; height: 50px; background: #F0FDF4; color: #22C55E;
  border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink:0;
}
.mini-card-info { min-width: 0; flex: 1; }
.mini-card-info h3 { margin: 0 0 4px 0; font-size: 16px; color: var(--text-main); }
.mini-card-info p {
  margin: 0; font-size: 13px; color: var(--text-light);
  /* 首頁預覽卡片：最多 2 行，保持版面整齊 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer - 舊版共用頁尾小字（保留相容） */
.footer-note { text-align: center; color: var(--text-light); padding-top: 40px; font-size: 13px; padding-bottom: 20px; }

/* =========================================
   共用頁尾 (Site Footer - 由 /assets/footer.js 注入)
   行動優先：單欄、極簡、只保留必要連結
   ========================================= */
.site-footer-main {
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 20px 16px 24px;
}
.site-footer-main .footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.site-footer-main .footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}
.site-footer-main .footer-legal a {
  color: var(--text-main);
  transition: color 0.2s;
}
.site-footer-main .footer-legal a:hover { color: var(--primary-hover); }
.site-footer-main .footer-sep { color: var(--text-light); }
.site-footer-main .footer-mail {
  font-size: 13px;
}
.site-footer-main .footer-mail a {
  color: var(--text-muted);
  font-weight: 600;
}
.site-footer-main .footer-mail a:hover { color: var(--primary-hover); }
.site-footer-main .footer-copy {
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
}

/* Mobile RWD */
@media (max-width: 600px) {
  .tabelog-wrap { padding: 20px 16px; border-radius: 0; border-left: none; border-right: none; }
  .tabelog-table th { width: 30%; }
  .tabelog-table td { width: 70%; padding-left: 12px; }
}

/* =========================================
   7. 城市儀表板專屬：不滾動的分類小按鈕
   ========================================= */
.wrap-nav { 
  display: flex; 
  flex-wrap: wrap; /* 允許自動換行，取代原本的左右滑動 */
  gap: 10px; 
  margin-top: 16px; 
}
.mini-pill {
  background: rgba(255, 255, 255, 0.65); 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px; /* 縮小按鈕的上下左右內距 */
  border-radius: 20px; /* 調整為更圓潤的藥丸形狀 */
  font-size: 14px; /* 字體稍微縮小 */
  font-weight: 800;
  color: var(--text-muted); 
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
  display: flex; 
  align-items: center; 
  gap: 6px;
  transition: all 0.2s;
}
.mini-pill:hover, .mini-pill.active { 
  background: var(--primary); 
  color: white; 
  border-color: var(--primary); 
}