:root {
  /* 海洋度假配色 */
  --ocean-dark: #006994;
  --ocean-light: #48CAE4;
  --sand: #FFFDF7;
  --coral: #FF8FAB;
  --sun: #FFD166;
  --text-main: #2B2D42;
  --text-gray: #6D6E7C;
  --white: #ffffff;
  
  /* 陰影與圓角 */
  --shadow-card: 0 10px 30px rgba(0, 105, 148, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 105, 148, 0.2);
  --radius-card: 24px;
  --radius-btn: 50px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  background-color: var(--sand);
  color: var(--text-main);
  overflow-x: hidden;
}

/* === 導覽列 (保留功能但優化外觀) === */
.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 20px;
  transition: all 0.3s ease;
  background: transparent; /* 初始透明 */
}

/* ⬇️ 修改這裡：滾動後變為海洋深藍色，讓白色 Logo 浮現 */
.main-navbar.scrolled {
  background: rgba(0, 105, 148, 0.95); /* 改用 Ocean Dark 色碼 */
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 10px 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { height: 40px; }

.nav-right a {
  text-decoration: none;
  color: var(--white); /* 預設白色字 */
  font-weight: 600;
  margin-left: 20px;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  transition: all 0.3s;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-right a:hover {
  background: rgba(255,255,255,0.2);
}

/* ⬇️ 修改這裡：滾動後文字保持白色 (因為背景變深藍了) */
.main-navbar.scrolled .nav-right a {
  color: var(--white); /* 保持白色 */
  text-shadow: none;
}

/* 滾動後的滑鼠懸停效果 */
.main-navbar.scrolled .nav-right a:hover {
  background: var(--ocean-light); /* 淺藍色背景 */
  color: var(--white);
}

/* === 1. 縮減首頁大圖區高度 === */
.island-hero {
  position: relative;
  /* 🌟 將高度從 70vh 縮減為 50vh (或更小如 45vh) */
  height: 50vh; 
  /* 🌟 將最小高度從 500px 縮減為 350px */
  min-height: 350px; 
  
  background: linear-gradient(180deg, rgba(0,105,148,0.3), rgba(0,105,148,0.1)), url('DSC_2287.webp') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* 預留頂部 Navbar 空間 */
  padding-top: 60px; 
}

/* 🌟 調整文字內容的間距，讓它更緊湊 */
.hero-content {
  z-index: 2;
  padding: 0 20px;
  margin-top: -20px; /* 稍微往上提一點 */
  animation: floatUp 1s ease-out;
}

.tagline {
  display: inline-block;
  background: var(--sun);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(255, 209, 102, 0.4);
}

.island-hero h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin: 10px 0;
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
  letter-spacing: 2px;
}

.island-hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.95);
  margin-bottom: 30px;
  font-weight: 500;
}

/* === 波浪動畫 (SVG) === */
.ocean-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.waves {
  width: 100%;
  height: 100px;
}
.parallax > use {
  animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes move-forever {
  0% { transform: translate3d(-90px,0,0); }
  100% { transform: translate3d(85px,0,0); }
}

/* === 篩選按鈕 === */
.filter-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: rgba(255,255,255,0.9);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  color: var(--ocean-dark);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.filter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.filter-btn.active {
  background: var(--ocean-light);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(72, 202, 228, 0.4);
}

/* === 2. 列表內容區塊的間距調整 === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  /* 🌟 縮小大圖與卡片之間的距離 */
  padding: 20px 20px 100px; 
}

/* === 景點卡片 Grid === */
.attractions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

/* === 旅遊卡片設計 === */
.attraction-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.4s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.02);
  /* 動畫設定 */
  animation: cardEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.attraction-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.card-image-box {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.attraction-card:hover .card-image-box img {
  transform: scale(1.1);
}

/* 標籤貼紙化 */
.badge {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.badge-price {
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ocean-dark);
}
.badge-price.paid { color: #E63946; }
.badge-price.free { color: #2A9D8F; }

.badge-secret {
  left: 16px;
  background: linear-gradient(135deg, var(--sun), #FFA500);
  color: var(--text-main);
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === 核心優化：標題與圖片來源並列容器 === */
.card-title-container {
  display: flex; /* 啟用 Flexbox 佈局 */
  align-items: baseline; /* 讓文字的基線對齊 (讓標題和來源底部對齊) */
  gap: 10px; /* 名稱和來源間的間隔 */
  margin-bottom: 12px; /* 與下方描述保持間隔 */
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ocean-dark);
  margin: 0; /* 清除 H3 預設 margin */
  flex-grow: 1; /* 讓標題佔據大部分空間 */
  min-width: 0; /* 避免標題過長時擠壓右側元素 */
}

/* === 核心優化：圖片來源樣式 === */
.image-source, .image-source-link { /* 讓 a 標籤也套用基本樣式 */
  /* 移除預設的 p 標籤樣式，現在它是 span/a */
  margin: 0; 
  padding: 0;

  /* 文字樣式優化 */
  font-size: 0.8rem; /* 字體縮小 */
  font-weight: 500; 
  color: var(--text-gray); 
  opacity: 0.8; 
  white-space: nowrap; /* 不換行，避免名稱太長時變形 */
  overflow: hidden;
  text-overflow: ellipsis; 
  text-decoration: none; /* 移除連結下底線 */
  transition: color 0.2s; /* 讓 hover 效果更平滑 */
}

/* 新增連結專屬的 hover 效果 */
.image-source-link:hover {
  color: var(--coral); /* 懸停時使用珊瑚紅 */
  opacity: 1; /* 提高透明度 */
  text-decoration: underline; /* 加上下底線提示可點擊 */
}


.card-desc {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.info-row svg { width: 18px; height: 18px; color: var(--ocean-light); }

.card-footer {
  margin-top: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

/* 按鈕樣式 */
.btn-map {
  width: 100%;
  background: var(--ocean-light);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-map:hover {
  background: var(--ocean-dark);
}

/* === 參訪人數 === */
.visitor-section {
  text-align: center;
  margin-top: 60px;
}
#visitor-count {
  display: inline-block;
  padding: 10px 24px;
  background: var(--white);
  color: var(--text-gray);
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #eee;
}

/* === 動畫 === */
@keyframes floatUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92); 
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.no-result-message {
  animation: cardEntrance 0.6s ease-out;
}

/* === 懸浮地圖按鈕 (FAB) === */
#fab-map-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--ocean-dark);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 105, 148, 0.4);
  cursor: pointer;
  z-index: 999; 
  transition: transform 0.3s, background 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

#fab-map-btn:hover {
  transform: scale(1.05);
  background: var(--ocean-light);
}

/* === 地圖彈出視窗 (Modal) - 含精美動畫 === */
.map-modal {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); 
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(0px); 
  transition: background 0.4s ease, backdrop-filter 0.4s ease; 
}

.map-modal.show {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.map-content {
  background: white;
  width: 90%;
  max-width: 1000px;
  height: 80vh;
  border-radius: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-modal.show .map-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.map-content h3 {
  padding: 15px 20px;
  margin: 0;
  background: var(--sand, #FFFDF7);
  color: var(--ocean-dark, #006994);
  border-bottom: 1px solid #eee;
}

#map-container {
  flex: 1;
  width: 100%;
  background: #eef;
}

.close-map-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  color: #6D6E7C;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.2s;
}
.close-map-btn:hover { color: #E63946; }

/* RWD 手機版優化 */
@media (max-width: 768px) {
  .island-hero {
    height: 60vh;       
    min-height: 350px;  
    padding-top: 70px;  
  }

  .tagline {
    font-size: 12px;
    padding: 4px 10px;
    margin-bottom: 8px;
  }

  .island-hero h1 {
    font-size: 2rem; 
    margin: 5px 0 10px; 
    line-height: 1.3;
  }

  .island-hero p {
    font-size: 0.95rem; 
    margin-bottom: 20px;
    padding: 0 15px;    
    opacity: 0.9;
  }

  .filter-container {
    gap: 8px; 
  }

  .filter-btn {
    padding: 8px 16px; 
    font-size: 13px;   
    flex: 1 1 auto;    
    min-width: 80px;   
    display: flex;     
    justify-content: center;
  }

  .nav-right a {
    font-size: 14px;
    margin-left: 5px;
    padding: 6px 10px;
  }
  .logo {
    height: 32px; 
  }
  
  .main-content {
    padding: 20px 15px 60px; 
  }
  
  .attractions-grid {
    grid-template-columns: 1fr; 
    gap: 25px;
  }

  /* RWD 調整：手機版讓圖片來源可以自動換行，或將對齊改為左側 */
  .card-title-container {
      flex-direction: column; /* 垂直堆疊，避免標題和來源擠在一起 */
      align-items: flex-start; /* 靠左對齊 */
      gap: 0;
  }

  .image-source {
      font-size: 0.75rem; /* 在手機上更小一點 */
      margin-top: 4px; /* 與標題拉開一點距離 */
      white-space: normal; /* 允許換行 */
      text-align: left;
  }
}


/* 按鈕樣式 */
.card-footer {
  margin-top: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
  /* ✨ 新增：讓按鈕並排且平均分佈 ✨ */
  display: flex; 
  gap: 12px; /* 按鈕間隔 */
}

.btn-map {
  flex: 1; /* 讓兩個按鈕平均佔據空間 */
  min-width: 0; /* 修正 flex 佈局下 min-width 預設值造成的擠壓 */

  background: var(--ocean-light);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none; /* 確保 a 標籤沒有底線 */
  font-size: 15px; /* 統一字體大小 */
}

.btn-map:hover {
  background: var(--ocean-dark);
}

/* ✨ 新增：星空資訊按鈕專屬樣式 ✨ */
.btn-star {
    background: var(--text-gray); /* 改用灰色系，區別導航 */
}

.btn-star:hover {
    background: var(--text-main); /* 滑鼠懸停時變深 */
}

/* 視圖切換 */
.view-section { display: none; }
.view-section.active { display: block; }

/* --- 1. 強制導覽列高度與層級 --- */
.main-navbar {
  height: 60px; /* 🌟 統一設定為 60px，這在電腦版最美觀 */
  background: var(--ocean-dark) !important;
  z-index: 9999 !important;
}

/* --- 2. 視圖區塊修正 (解決上方空白) --- */
#app-container {
  width: 100%;
  height: 100vh;
}

.view-section {
  display: none;
  width: 100%;
  height: 100dvh;
}

/* 列表模式 */
#list-view {
  padding-top: 60px; /* 🌟 剛好對齊 Navbar 高度 */
  display: block;
}

/* 🌟 地圖模式：徹底消除上方空白 🌟 */
#map-view {
  position: fixed;
  top: 60px;        /* 🌟 必須與 Navbar 高度一模一樣 */
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 60px); /* 🌟 精確計算高度 */
  z-index: 100;
  background: #1a1a1a;
  margin: 0;
  padding: 0;
}

#map-view.active {
  display: block !important;
}

#full-map-container {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- 3. 底部膠囊選單 (電腦版精緻化) --- */
.bottom-app-nav {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 64px;
  border-radius: 50px;
  /* 🌟 磨砂玻璃質感 */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  padding: 6px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-active-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  background: var(--ocean-dark);
  border-radius: 40px;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 105, 148, 0.3);
}

.nav-item {
  position: relative;
  z-index: 2;
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-item.active { color: white !important; }
.nav-item i { font-size: 18px; }
.nav-item span { font-size: 12px; font-weight: 900; }

/* 電腦版滑鼠懸停效果 */
@media (min-width: 769px) {
  .bottom-app-nav:hover {
    bottom: 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  }
}
.nav-item {
  border: none; background: none;
  color: #aaa; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; width: 50%;
}
.nav-item.active { color: var(--ocean-dark); }
.nav-item i { font-size: 20px; }
.nav-item span { font-size: 12px; font-weight: bold; }

/* 地圖容器 */
#map-view { height: 100vh; width: 100%; }
#full-map-container { height: calc(100vh - 65px); width: 100%; }

/* 🌟 修正後的泡泡標籤樣式 */
.custom-label-marker {
  background: white;
  border-radius: 50px;
  padding: 6px 14px;      /* 左右內距，控制文字離圓角的距離 */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;    /* 確保文字不換行 */
  font-weight: 800;
  font-size: 13px;
  color: #1e293b;
  
  /* 關鍵修正 */
  width: fit-content;     /* 🌟 寬度隨內容縮放 */
  transform: translate(-50%, -50%); /* 🌟 讓標籤中心點對準座標 */
}

/* 修正 Leaflet 預設容器，不要擋住點擊 */
.custom-div-icon {
  border: none !important;
  background: none !important;
}

/* --- 1. 右下角控制項：磨砂玻璃膠囊版 --- */
.map-controls {
  position: fixed;   /* 🌟 改為 fixed，確保相對於螢幕 */
  bottom: 110px;      /* 🌟 向上推高，完全避開底部的膠囊導覽 */
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10000 !important; /* 🌟 超高層級，絕對要蓋過地圖 */
  pointer-events: auto !important; /* 🌟 確保可以接收點擊 */
}

.map-ctrl-btn {
  /* 🌟 磨砂玻璃效果 */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  
  padding: 12px 20px;
  border-radius: 50px; /* 🌟 完美的膠囊形狀 */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #2c3e50;
  cursor: pointer;
  min-width: 110px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-ctrl-btn i {
  font-size: 16px;
  color: #006994; /* 統一使用你的海洋藍 */
}

/* 懸停與點擊動畫 */
.map-ctrl-btn:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.map-ctrl-btn:active {
  transform: scale(0.92);
}

/* --- 2. 地圖泡泡標籤：浮動設計 --- */
.custom-label-marker {
  background: white;
  border-radius: 50px;
  padding: 6px 14px;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
  color: #1e293b;
  position: relative;
  transition: transform 0.2s;
}

/* 🌟 綠色呼吸燈點點 */
.custom-label-marker::before {
  content: '';
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse-green 2s infinite; /* 增加呼吸感 */
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* 標籤箭頭小尾巴 (選擇性，可增加層次感) */
.custom-label-marker::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
}

/* 隱藏 Leaflet 預設縮放按鈕與版權資訊 (讓地圖更清爽) */
.leaflet-control-zoom, .leaflet-control-attribution {
  display: none !important;
}

/* 🌟 改良：合併標記的樣式 (Clustering) */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
  background-color: rgba(0, 105, 148, 0.2); /* 海洋藍透明底 */
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background-color: var(--ocean-dark); /* 海洋深藍 */
  color: white;
  font-weight: 900;
}

/* 🌟 改良：泡泡標籤根據縮放微調 */
.leaflet-zoom-animated .custom-label-marker {
  transition: transform 0.2s cubic-bezier(0,0,0,1);
}

/* 縮小地圖時，隱藏標籤文字，只留點點 (進階質感) */
.map-zoom-out .custom-label-marker {
  padding: 6px;
  min-width: 0;
}
.map-zoom-out .custom-label-marker span {
  display: none;
}

/* 🌟 文字折疊基礎 */
.card-desc {
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.5; /* 🌟 固定的行高方便計算 */
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 4.5em; /* 1.5行高 * 3行 */
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-desc.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: 1000px; /* 展開後的高度限制 */
}

/* 🌟 「更多內容」按鈕：預設隱藏並準備動畫 */
.expand-btn {
  display: none; /* 🌟 由 JS 偵測後決定是否變更為 flex */
  background: none;
  border: none;
  color: var(--ocean-dark);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 0;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  
  /* 進場動畫設定 */
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 當被判定需要顯示時觸發動畫 */
.expand-btn.show-action {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.expand-btn i {
  font-size: 10px;
  transition: transform 0.3s ease;
}

.expand-btn.active i {
  transform: rotate(180deg);
}

.expand-btn:hover {
  color: var(--ocean-light);
  letter-spacing: 0.5px; /* 懸停時微動效 */
}

/* SEO 內容：給搜尋引擎與輔助閱讀器讀取，不影響畫面版面 */
.seo-content {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}