html {
  scroll-behavior: smooth;
}
/* --- 導覽列對齊修正 --- */
.main-navbar .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important; /* 關鍵：強制垂直置中 */
    height: 60px !important;       /* 確保容器高度撐滿 60px */
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* 確保 Logo 垂直置中 */
.nav-left, .nav-right {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

/* 確保漢堡按鈕本身沒有多餘的外距 */
.menu-toggle {
    margin: 0 !important;
    padding: 10px !important; /* 增加點擊面積 */
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
}
/* =========================
   HERO 主視覺
========================= */

.hero {
  position: relative;
  height: 68vh;
  min-height: 420px;
  background: linear-gradient(180deg, rgba(0,105,148,0.25), rgba(0,105,148,0.05)),
              url("../圖片/20240211_153906.jpg") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;   
  align-items: center;       
  text-align: center;
}

.hero-overlay {
  background: rgba(0,0,0,0.45);
  padding: 28px 34px;
  border-radius: 12px;
  color: white;
  width: 90%;
  max-width: 650px;
  backdrop-filter: blur(3px);
  animation: floatUp 1s ease-out;
}

.hero-overlay h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.hero-overlay p {
  font-size: 16px;
  opacity: 0.95;
}


/* =========================
   主內容區
========================= */

.container {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 22px;
}
/* --- 修正標題左側線條 --- */
.section-title {
  font-size: 28px;
  font-weight: 800;
  /* 直接給顏色，不要只用變數 */
  border-left: 6px solid #007bff; 
  padding-left: 16px;
  margin-bottom: 26px;
  margin-top: 40px;
  color: #333;
  display: flex;
  align-items: center;
}

/* 讓地圖區塊內的標題也能吃到樣式 */
.map-text .section-title {
  margin-top: 0;
  margin-bottom: 15px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 30px 36px;
  margin-bottom: 35px;
  box-shadow: var(--shadow-card);
  animation: cardEntrance 0.8s cubic-bezier(0.22,1,0.36,1) backwards;
}

.card p { 
  color: var(--text-gray);
  margin-bottom: 12px;
}

.card ul { padding-left: 20px; }
.card li { margin-bottom: 10px; }


/* =========================
   CTA 按鈕
========================= */

.cta-btn {
  display: inline-block;
  padding: 14px 25px;
  background: var(--ocean-light);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 700;
  transition: 0.3s;
}

.cta-btn:hover {
  background: var(--ocean-dark);
}


/* =========================
   動畫
========================= */

@keyframes floatUp {
  from { opacity: 0; transform: translateY(25px); }
  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);
  }
}


/* =========================
   手機版 RWD（<=768px）
========================= */

@media (max-width: 768px) {

  .hero {
    height: 60vh;
    min-height: 360px;
    padding: 0 20px;
  }

  .hero-overlay {
    max-width: 88%;
    padding: 22px 18px;
    border-radius: 10px;
  }

  .hero-overlay h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero-overlay p {
    font-size: 14px;
    line-height: 1.5;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 22px 20px;
    border-radius: 10px;
  }
}
/* 小琉球在哪裡？ — 左右兩欄 */
.map-box {
  padding: 32px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  margin-bottom: 32px;
}

.map-grid {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 20px;
}

/* 文字區域 */
.map-grid .text-block {
  flex: 1;
}

/* 地圖 */
.map-grid iframe {
  flex: 1;
  max-width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
}

/* --- 統一地圖導航按鈕樣式 --- */
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;                    /* 圖示與文字的距離 */
  padding: 12px 24px;
  background: #ffffff;
  color: #1a73e8 !important;   /* Google 地圖藍 */
  border: 1.5px solid #dadce0;
  border-radius: 50px;         /* 圓角膠囊形狀 */
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 15px;
  cursor: pointer;
}

.map-btn i {
  color: #ea4335;              /* 定位點圖示改為地圖標誌紅 */
  font-size: 16px;
}

.map-btn:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* 修正卡片內的警告框樣式 */
.warning-tip {
  background: #fff5f5;
  border-left: 5px solid #ff4d4f;
  padding: 15px;
  border-radius: 8px;
  color: #c92a2a;
  font-weight: 600;
  margin: 10px 0 20px 0;
  line-height: 1.6;
}

/* 手機版 → 改成上下排列 */
@media (max-width: 768px) {
  .map-grid {
    flex-direction: column;
  }

  .map-grid iframe {
    width: 100%;
  }
}


/* --- 修正船班 CTA 區塊圓角 --- */
.ferry-cta {
  background: linear-gradient(135deg, #eef7ff, #ffffff);
  padding: 35px 25px;
  border-radius: 20px !important; /* 強制執行大圓角 */
  margin: 40px 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 123, 255, 0.08); /* 加上淡淡的藍色陰影 */
  border: 1px solid rgba(0, 123, 255, 0.1);
  overflow: hidden; /* 確保內容不會溢出圓角 */
}

/* 船班標題與 Icon 排版 */
.ferry-cta h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
  font-weight: 800;
  color: #333;
}

.ferry-cta h2 i {
  color: #007bff;
}

/* --- 修正船班按鈕圓角 --- */
.ferry-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 14px 30px;
  background: #ff7e57;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px !important; /* 按鈕小圓角，若要膠囊狀可改 50px */
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 126, 87, 0.3);
  border: none;
}

.ferry-btn:hover {
  background: #e9683f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 126, 87, 0.4);
}
/* =====================
   小琉球地圖：左右版面
===================== */

.map-flex {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 32px;
}

.map-text {
  flex: 1;
}

.map-embed {
  flex: 1;
  min-height: 260px;
}

.map-embed iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* 手機版改為上下排 */
@media (max-width: 768px) {
  .map-flex {
    flex-direction: column;
    padding: 22px;
  }

  .map-embed iframe {
    height: 250px;
  }
}
/* =======================
   🚨 自行開車警告提示
   ======================= */
/* 🚨 自行開車警示提示 - 優化版配色 */
.warning-tip {
  /* 使用深酒紅色漸層，模仿圖片中的深色質感 */
  background: linear-gradient(135deg, #a52a2a 0%, #8b1a1a 100%);
  
  /* 左側亮紅色重點邊框 */
  border-left: 6px solid #ff3b3b; 
  
  padding: 16px 20px;
  font-size: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  color: #ffffff; /* 純白文字確保可讀性 */
  font-weight: 500;
  line-height: 1.8;
  
  /* 柔和陰影 */
  box-shadow: 0 4px 15px rgba(139, 26, 26, 0.25);
  
  /* 確保圖示有足夠間距 */
  letter-spacing: 0.5px;
}

/* 圖示專屬顏色與間距 */
.warning-tip i {
  margin-right: 8px;
  font-size: 1.5em;
  /* 讓圖示帶一點淡淡的金黃色或淺色，顯得更專業 */
  color: #ffda44; 
}

/* 圖示對齊修正 */
.warning-tip i.fa-triangle-exclamation {
  color: #ffd700; /* 警告三角形用金色 */
}

.warning-tip i.fa-motorcycle {
  color: #ffffff; /* 機車圖示用淺粉紅/淡紅 */
}
/* ============================
   🌊 HERO 底部波浪動畫
   ============================ */
.ocean-waves {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 5;
}

.waves {
  position: relative;
  width: 100%;
  height: 90px;
  min-height: 9dvb;
  max-height: 70px;
}

.parallax > use {
  animation: waveMove 10s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 11s;
}

.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 13s;
}

.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 15s;
}

@keyframes waveMove {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}
/* -----------------------
   🌊 HERO 波浪（統一風格）
------------------------ */
.hero-waves {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: hidden;
}

/* ===================================================
   🐢 Emoji 海龜游動（保證會顯示的最終版本）
=================================================== */

/* 海龜會在這條軌道裡面游動 */
.turtle-track {
  position: relative;
  width: 100%;
  height: 60px;         /* 海龜活動空間 */
  margin-top: -30px;    /* 貼近波浪 */
  z-index: 50;
  overflow: visible;
}

/* 海龜容器 */
.emoji-turtle-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;         /* 最重要：海龜高度區 */
  overflow: visible;
  pointer-events: none;
}

/* 單隻海龜 */
.emoji-turtle {
  position: absolute;
  left: -60px;
  font-size: 34px;
  animation:
    swim var(--turtle-speed) linear forwards,
    float 3s ease-in-out infinite;
}

/* 左→右 游動 */
@keyframes swim {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 140px)); }
}

/* 上下浮動（像海浪） */
@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
/* 🔥 移除黑邊框與預設空白 */
html, body {
  margin: 0;
  padding: 0;
  background: #ffffff; /* 避免深色模式外框 */
}

/* 🔶 卡片上方 icon + 標題區塊 */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

/* 大鵬灣 9127-D 路線圖 */
.route-image {
  margin-top: 20px;
  text-align: center;
}

.route-image img {
  width: 100%;
  max-width: 820px;   /* 不會太大，剛好卡片寬度 */
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* =========================
   票價
========================= */
.time-table, .fare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 15px;
}

.time-table th, .fare-table th {
  background: #e6f2ff;
  padding: 10px;
  text-align: center;
  font-weight: 700;
}

.time-table td, .fare-table td {
  border-bottom: 1px solid #eee;
  padding: 8px 10px;
  text-align: center;
}

.fare-table tr:nth-child(even),
.time-table tr:nth-child(even) {
  background: #fafafa;
}

.map-btn i {
  margin-right: 8px; /* 增加 Icon 和文字之間的距離 */
  color: #ea4335;    /* 讓定位點變成地圖經典的紅色 */
}

.ferry-cta i {
  margin-right: 10px;
  color: #007bff;
}

/* ============================================================
   【琉急式停車圖卡 - 精裝旗艦版 2.5 修復版】 
============================================================ */

/* 卡片主容器 */
.luxury-parking-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 35px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-sizing: border-box; /* 確保內容不溢出 */
    width: 100%;
}

.luxury-parking-card * {
    box-sizing: border-box; /* 全域鎖定容器計算模式 */
}

/* 相簿排版區 */
.p-gallery-container {
    display: flex;
    height: 300px;
    background: #000;
}

.p-photo-main {
    flex: 1.8;
    overflow: hidden;
    border-right: 1px solid #fff;
}

.p-photo-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-photo-side img {
    height: 50%;
    object-fit: cover;
    border-bottom: 1px solid #fff;
}

.p-photo-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 內容主要區塊 */
.p-content-main {
    padding: 30px 40px;
    width: 100%;
}

/* 標題欄 */
.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    gap: 15px;
}

.p-header h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
}

.p-auth-tag {
    background: #e1f5fe;
    color: #0288d1;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* 資訊網格排版 (2x2) */
.p-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.p-item {
    display: flex;
    gap: 12px;
}

.p-item-icon {
    font-size: 16px;
    color: #007bff;
    margin-top: 3px;
}

.p-item-text label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #adb5bd;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.p-item-text span {
    font-size: 15px;
    font-weight: 700;
    color: #444;
}

/* 功能標籤列 */
.p-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid #f8f9fa;
}

.p-tag {
    border: 1px solid #dee2e6;
    color: #000000;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- 修復後的主按鈕：卡片內置中並防止溢出 --- */
.p-nav-action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%; /* 桌機維持全寬 */
    max-width: 100%;
    padding: 16px;
    background: #007bff;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 17px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.15);
    transition: all 0.25s ease;
    margin: 0 auto; /* 置中邏輯 */
}

.p-nav-action-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* ============================================================
   【手機版完全縮小排版 - 緊湊優化】
============================================================ */
@media (max-width: 768px) {
    /* 1. 極小化相簿 */
    .p-gallery-container {
        height: 120px; /* 從 140px 再次壓縮到 120px */
    }
    .p-photo-side {
        display: none; /* 捨棄小拼圖 */
    }
    .p-photo-main {
        flex: 1;
        border-right: none;
    }

    /* 2. 緊湊內距 */
    .p-content-main {
        padding: 15px 16px; /* 更窄的內距 */
    }

    /* 3. 縮小標題與認證 */
    .p-header {
        flex-direction: row; /* 維持橫向，避免佔據垂直空間 */
        margin-bottom: 15px;
    }
    .p-header h3 {
        font-size: 17px;
    }
    .p-auth-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* 4. 縮小網格間隔 */
    .p-info-grid {
        grid-template-columns: 1fr;
        gap: 12px; /* 更窄的網格間距 */
        margin-bottom: 15px;
    }
    .p-item {
        gap: 10px;
    }
    .p-item-text span {
        font-size: 13px; /* 文字縮小一點 */
    }

    /* 5. 標籤與公告縮小 */
    .p-tags-row {
        gap: 5px;
        padding: 10px 0;
        margin-bottom: 15px;
    }
    .p-tag {
        font-size: 10.5px;
        padding: 3px 10px;
    }
    .p-notice-banner {
        padding: 10px 14px;
        margin-bottom: 20px;
    }
    .p-notice-banner p {
        font-size: 11.5px;
    }

    /* 6. 按鈕變精緻，寬度改為內容寬度並置中 */
    .p-nav-action-btn {
        width: 92%; /* 手機上按鈕留出一點邊緣更精緻 */
        padding: 13px;
        font-size: 15px;
        border-radius: 50px; /* 手機改用全膠囊造型更時尚且省視覺空間 */
    }
}
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-wrapper {
  position: relative;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  display: block;
  border-radius: 12px;
}

.close {
  position: absolute;
  top: 10px;
  right: 14px;
  left: auto;
  bottom: auto;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}