/* ===== 設計系統 ===== */
:root {
  --primary: #C73155;
  --primary-dark: #A52345;
  --primary-light: #FBEAEF;
  --text: #2C3E50;
  --text-light: #7F8C8D;
  --bg: #FFFFFF;
  --bg-soft: #F8F9FA;
  --border: #E5E7EB;
  --success: #27AE60;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 16px;
  --max-w: 1200px;
  --transition: all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.logo {
  font-size: 21px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.logo-icon { font-size: 26px; }
.logo img { height: 40px; width: auto; display: block; }
.nav-list {
  display: flex; gap: 22px; list-style: none;
  flex-wrap: nowrap; align-items: center;
}
.nav-list a {
  font-weight: 500; font-size: 15px;
  white-space: nowrap;   /* 不讓「首頁」被拆成兩行 */
}
.nav-list a:hover { color: var(--primary); }
.nav-list a.active { color: var(--primary); font-weight: 600; }

.header-cta {
  background: var(--primary); color: white;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  flex-shrink: 0;
}
.header-cta:hover { background: var(--primary-dark); color: white; }

.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 24px; cursor: pointer; color: var(--text);
}

/* ===== 行程相簿 ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.gallery-thumb {
  aspect-ratio: 4 / 3; border-radius: 10px; border: none; cursor: pointer;
  background-size: cover; background-position: center; padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ===== 燈箱 ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center;
}
.lb-img { max-width: 90vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lb-close {
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.15); color: #fff;
  font-size: 22px; cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,0.3); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 30px; cursor: pointer;
}
.lb-nav:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-count { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

/* ===== 右側固定浮動按鈕 ===== */
.floating-bar {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 12px;
}
.floating-bar a {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22); transition: transform 0.18s, filter 0.18s;
}
.floating-bar a:hover { transform: scale(1.1); filter: brightness(1.05); color: #fff; }
.fb-phone { background: var(--primary); }
.fb-facebook { background: #1877F2; }
.fb-line { background: #06C755; }
.fb-email { background: var(--primary-dark); }
@media (max-width: 600px) {
  .floating-bar { right: 12px; gap: 9px; }
  .floating-bar a { width: 44px; height: 44px; font-size: 19px; }
}

/* ===== Hero 輪播 Banner ===== */
.hero-slider {
  position: relative; width: 100%; overflow: hidden;
  background: #1a1a1a; user-select: none;
}
.hero-track {
  display: flex; transition: transform 0.5s ease;
  touch-action: pan-y;
}
.hero-slide { flex: 0 0 100%; min-width: 0; }  /* min-width:0 避免 flex item 被圖片原始寬撐爆 */
.hero-slide a, .hero-slide .slide-img-wrap { display: block; }
.hero-slide img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 1920 / 980;   /* 與 banner 原圖同比例，完整顯示不裁切 */
  object-fit: cover;
}
.hero-dots {
  position: absolute; bottom: 18px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px; z-index: 3;
}
.hero-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,0.55); cursor: pointer;
  border: none; padding: 0; transition: all 0.25s;
}
.hero-dot.active { background: #fff; width: 30px; border-radius: 6px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,0.32); color: #fff; border: none;
  font-size: 22px; cursor: pointer; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: rgba(0,0,0,0.55); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

/* ===== Hero（舊版備用，內頁 detail-hero 仍用） ===== */
.hero {
  position: relative; height: 560px; overflow: hidden;
  background: linear-gradient(135deg, #C73155 0%, #E0527A 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=1600&q=80');
  background-size: cover; background-position: center;
  filter: brightness(0.7);
}
.hero-inner {
  position: relative; max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; flex-direction: column;
  justify-content: center; color: white;
}
.hero-tag {
  display: inline-block; padding: 6px 16px;
  background: rgba(255,255,255,0.2); border-radius: 100px;
  font-size: 14px; margin-bottom: 16px; width: fit-content;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-size: 56px; font-weight: 800;
  margin-bottom: 16px; line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero p {
  font-size: 20px; max-width: 600px;
  margin-bottom: 32px; opacity: 0.95;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  padding: 14px 32px; border-radius: var(--radius);
  font-size: 16px; font-weight: 500; cursor: pointer;
  border: none; transition: var(--transition); display: inline-block;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline {
  background: rgba(255,255,255,0.1); color: white;
  border: 2px solid rgba(255,255,255,0.6); backdrop-filter: blur(8px);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); color: white; }

/* ===== Section ===== */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-block; color: var(--primary);
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  margin-bottom: 12px;
}
.section h2 {
  font-size: 38px; font-weight: 700; margin-bottom: 12px;
}
.section-desc { color: var(--text-light); font-size: 17px; }

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  /* min(100%,320px)：避免在窄螢幕上卡片最小寬度超過版面造成橫向捲動 */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}
.trip-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); cursor: pointer;
}
.trip-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.trip-img {
  position: relative; height: 220px; overflow: hidden;
  background: #14110f;
}
.cover-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(16px) brightness(0.6); transform: scale(1.12);
}
.cover-fg {
  position: absolute; inset: 0; z-index: 1;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.trip-badge {
  position: absolute; z-index: 2; top: 16px; left: 16px;
  background: var(--primary); color: white;
  padding: 4px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 500;
}
.trip-body { padding: 20px; }
.trip-category {
  color: var(--primary); font-size: 13px;
  font-weight: 600; margin-bottom: 8px;
}
.trip-title {
  font-size: 19px; font-weight: 600;
  margin-bottom: 8px; line-height: 1.4;
}
.trip-meta {
  display: flex; gap: 16px; margin: 12px 0;
  color: var(--text-light); font-size: 14px;
}
.trip-meta-item { display: flex; align-items: center; gap: 4px; }
.trip-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.trip-price {
  font-size: 22px; font-weight: 700; color: var(--primary);
}
.price-unit { font-size: 0.5em; font-weight: 400; }
.trip-price-from { font-size: 13px; color: var(--text-light); font-weight: 400; }
.trip-link {
  font-size: 14px; color: var(--primary); font-weight: 500;
}

/* ===== Category Section Title ===== */
.cat-section { margin-bottom: 64px; }
.cat-section:last-child { margin-bottom: 0; }
.cat-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.cat-header h3 {
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; gap: 12px;
}
.cat-icon { font-size: 32px; }
.cat-link {
  color: var(--primary); font-size: 14px; font-weight: 500;
}

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; margin-top: 48px;
}
.feature {
  text-align: center; padding: 24px;
}
.feature-icon {
  font-size: 48px; margin-bottom: 16px;
  display: inline-block;
}
.feature h4 {
  font-size: 18px; margin-bottom: 8px;
}
.feature p { color: var(--text-light); font-size: 15px; }

/* ===== News ===== */
.news-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.news-item {
  background: white; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border); transition: var(--transition);
}
.news-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.news-date {
  color: var(--text-light); font-size: 13px; margin-bottom: 8px;
}
.news-title { font-size: 17px; font-weight: 600; line-height: 1.5; }

/* ===== Footer ===== */
.footer {
  background: #1a252f; color: rgba(255,255,255,0.7);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer h5 {
  color: white; font-size: 16px;
  margin-bottom: 16px;
}
.footer-logo {
  color: var(--primary); font-size: 24px;
  font-weight: 700; margin-bottom: 16px;
}
.footer-about { font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer ul a:hover { color: var(--primary); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 13px;
}

/* ===== Page Header ===== */
.page-header {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 42px; margin-bottom: 12px; }
.breadcrumb {
  color: var(--text-light); font-size: 14px; margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-light); }

/* ===== Filter ===== */
.filter-bar {
  display: flex; gap: 12px; margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 8px 20px; background: white; border: 1px solid var(--border);
  border-radius: 100px; cursor: pointer; font-size: 14px;
  transition: var(--transition);
}
.filter-chip.active, .filter-chip:hover {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== Trip Detail ===== */
.detail-hero {
  height: 460px; position: relative; overflow: hidden;
  background: #14110f;
}
.detail-hero-bg {
  position: absolute; inset: -40px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(30px) brightness(0.55); transform: scale(1.05);
}
.detail-hero-img {
  position: absolute; inset: 0; z-index: 1;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.detail-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6));
}
.detail-hero-content {
  position: relative; z-index: 2; max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; padding-bottom: 40px; color: white;
}
.detail-hero h1 { font-size: 42px; margin-bottom: 8px; }
.detail-layout {
  display: grid; grid-template-columns: 2fr 1fr; gap: 48px;
  padding: 60px 0;
}
.detail-block { margin-bottom: 40px; }
.detail-block h3 {
  font-size: 22px; margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary); display: inline-block;
}
.day-list { list-style: none; }
.day-item {
  padding: 20px; border-left: 3px solid var(--primary);
  background: var(--bg-soft); margin-bottom: 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.day-label {
  color: var(--primary); font-weight: 600;
  font-size: 14px; margin-bottom: 4px;
}
.day-title { font-weight: 600; margin-bottom: 8px; }
.day-content { color: var(--text-light); font-size: 15px; }

.detail-sidebar {
  position: sticky; top: 100px; align-self: start;
  background: white; padding: 28px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.detail-price {
  font-size: 36px; font-weight: 700; color: var(--primary);
  margin-bottom: 4px;
}
.detail-price-note { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }
.detail-info { margin: 24px 0; }
.detail-info-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
  font-size: 15px;
}
.detail-info-row:last-child { border-bottom: none; }
.detail-info-label { color: var(--text-light); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-line {
  background: #06C755; color: white; margin-top: 12px;
}
.btn-line:hover { background: #05A847; color: white; }

/* ===== Form ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 14px; font-weight: 500;
  margin-bottom: 6px;
}
.form-label .req { color: #E74C3C; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-family: inherit;
  background: white; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,126,34,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== Responsive ===== */
/* 導覽列：選單較多，中等螢幕(≤1080px)就收進漢堡選單，避免擠成換行 */
@media (max-width: 1080px) {
  .nav-list { display: none; }
  .mobile-menu-btn { display: block; }
  /* 點 ☰ 後展開的手機版選單 */
  .header.nav-open .nav-list {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 8px 0; z-index: 99;
  }
  .header.nav-open .nav-list a {
    display: block; padding: 14px 24px;
    border-bottom: 1px solid var(--bg-soft);
  }
}
/* 介於 900–1080px：略縮間距讓桌機版能多撐一點（已收合則不影響） */
@media (max-width: 1180px) and (min-width: 1081px) {
  .nav-list { gap: 16px; }
  .nav-list a { font-size: 14px; }
}
@media (max-width: 900px) {
  .hero-arrow { display: none; }   /* 平板 / 手機改用滑動 */
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
  .section { padding: 56px 0; }
  .section h2 { font-size: 28px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

/* 平板直式以下：把所有用 inline style 排的多欄區塊改成單欄
   （聯絡頁 2fr/1fr、關於頁品牌故事 1fr/1fr、行程頁費用包含/不包含、新聞列表 280px/1fr） */
@media (max-width: 768px) {
  .container div[style*="grid-template-columns"],
  .container article[style*="grid-template-columns"] {
    display: block !important;
  }
  .container div[style*="grid-template-columns"] > * + *,
  .container article[style*="grid-template-columns"] > * + * {
    margin-top: 20px;
  }
  /* 關於頁的 4 格統計數字：改成 2x2 而不是疊成一直條 */
  .container div[style*="repeat(4,1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding: 28px 16px !important;
  }
  .container div[style*="repeat(4,1fr)"] > * + * { margin-top: 0; }
  /* 新聞列表圖片在單欄時滿版 */
  .container article[style*="grid-template-columns"] img { width: 100%; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero-dots { bottom: 10px; }
  .logo img { height: 34px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { height: 460px; }
  .hero h1 { font-size: 30px; }
  .section { padding: 40px 0; }
  .page-header { padding: 48px 0 36px; }
  .page-header h1 { font-size: 30px; }
  .detail-hero { height: 320px; }
  .detail-hero h1 { font-size: 26px; }
  .detail-hero-content { padding-bottom: 24px; }
  .detail-price { font-size: 30px; }
  .detail-sidebar { padding: 20px; }
  .trip-title { font-size: 17px; }
  .cat-header h3 { font-size: 21px; }
}
