/* =========================================================
   2027 春日賞櫻祭　https://www.jhtour.com.tw/sakura/
   目錄：1 變數與基礎　2 背景與裝飾　3 頁首　4 主視覺輪播
        5 頁籤　6 內容框與標題　7 共用元件（按鈕／分隔線／框）
        8 產品卡片　9 花期小百科　10 頁尾裝飾（巴士動畫）
        11 頁尾公司資訊　12 浮動按鈕　13 動畫減量
   ========================================================= */

/* ---------- 1 變數與基礎 ---------- */
:root {
  --pink: #ff6fa5;          /* 主粉色（裝飾圖外框色） */
  --pink-deep: #e0447f;     /* 強調、hover */
  --rose: #c2185b;          /* 粉色按鈕上的文字 */
  --pink-soft: #ffe3ec;
  --pink-line: #fdd3dc;     /* 內容框左右邊線 */
  --btn-a: #ffb1d1;         /* 按鈕漸層（左） */
  --btn-b: #fdcacc;         /* 按鈕漸層（右） */
  --blue-line: #a5e6fb;     /* 淡藍分隔線 */
  --navy: #1f3157;          /* 內文深藍 */
  --text: #3b4560;
  --green: #7cc242;         /* 海外色帶 */
  --glass: rgba(255, 255, 255, .72);   /* 半透明白框 */
  --radius: 22px;
  --glow: 0 0 0 3px rgba(255, 150, 190, .38), 0 10px 30px rgba(255, 95, 155, .38);
  --shadow: 0 4px 16px rgba(120, 160, 190, .18);
  --wrap: 1500px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative; overflow-x: hidden;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px; line-height: 1.7; color: var(--text);
  background: #9aefff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 3px; border-radius: 6px; }

/* ---------- 2 背景與裝飾 ---------- */
.page-bg {                       /* 網頁背景：固定不隨捲動 */
  position: fixed; inset: 0; z-index: -2;
  background: #9aefff url(../images/bg.jpg) center top / cover no-repeat;
}
.bg-deco { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-deco img { position: absolute; opacity: .92; filter: drop-shadow(0 4px 8px rgba(255, 111, 165, .22)); }
.petals { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -30px; width: 14px; height: 18px; opacity: .85;
  background: linear-gradient(135deg, #ffd5e3, #ff9dbf); border-radius: 80% 0 80% 0;
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  100% { transform: translate3d(-18vw, 108vh, 0) rotate(540deg); }
}
.site-header, main, .scene, .notice, .site-footer { position: relative; z-index: 1; }

/* ---------- 3 頁首 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 50px); background: #fff;
}
.site-logo img { width: 135px; }
.site-nav { display: flex; }
.site-nav a { padding: 0 16px; font-weight: 700; color: var(--navy); line-height: 1.2; border-left: 2px solid var(--pink); }
.site-nav a:first-child { border-left: 0; }
.site-nav a:hover { color: var(--pink-deep); }

/* ---------- 4 主視覺輪播 ---------- */
.kv { position: relative; height: clamp(420px, 33.34vw, 640px); overflow: hidden; background: var(--pink-soft); }
.kv-slides, .kv-slide { position: absolute; inset: 0; }
.kv-slide {
  background-size: cover; background-position: center; opacity: 0;
  transition: opacity 1.2s ease; animation: kv-zoom 14s ease-in-out infinite;
}
.kv-slide.is-active { opacity: 1; }
.kv-slide.s1 { background-image: url(../images/slide1_pc.jpg); }
.kv-slide.s2 { background-image: url(../images/slide2_pc.jpg); }
.kv-slide.s3 { background-image: url(../images/slide3_pc.jpg); }
.kv-slide.s4 { background-image: url(../images/slide4_pc.jpg); }
@keyframes kv-zoom { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.kv-copy {
  position: relative; z-index: 2; height: 100%; padding: 12px 20px 34px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(4px, .6vw, 10px);
  text-align: center;
}
.kv-title { width: clamp(340px, 50vw, 960px); filter: drop-shadow(0 6px 14px rgba(160, 40, 90, .28)); }
.kv-title img { width: 100%; }
.kv-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.kv-dots button {
  width: 13px; height: 13px; padding: 0; border: 2px solid #fff; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .55); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.kv-dots button.is-active { background: var(--pink-deep); }

/* ---------- 5 頁籤 ---------- */
.tabs {
  position: sticky; top: 0; z-index: 50; padding: 12px 12px 10px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--pink-line); box-shadow: 0 4px 14px rgba(255, 111, 165, .16);
}
.tabs-inner { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1.2vw, 16px); }
.tab {
  display: flex; align-items: center; justify-content: center; gap: .4em;
  padding: 11px 6px; border-radius: 999px; white-space: nowrap;
  font-size: clamp(14px, 1.5vw, 20px); font-weight: 900; letter-spacing: .04em; color: var(--rose);
  background: linear-gradient(90deg, var(--btn-a), var(--btn-b));
  outline: 2px solid #fff; outline-offset: -6px;
  transition: box-shadow .25s, transform .25s, background .25s;
}
.tab svg { font-size: 1.15em; }
.tab:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.tab.is-active { color: #fff; background: linear-gradient(90deg, #ff5c9a, #ff86b3); box-shadow: 0 5px 14px rgba(255, 80, 145, .45); }

/* ---------- 6 內容框與標題 ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 34px clamp(14px, 2.4vw, 40px) 26px; }   /* 不加底色，直接透出網頁背景 */
.js .panel { display: none; }
.js .panel.is-active { display: block; animation: panel-in .45s ease; }
.panel + .panel { margin-top: 70px; }
.js .panel + .panel { margin-top: 0; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel, .group { scroll-margin-top: 90px; }
.group + .group { margin-top: clamp(40px, 4.5vw, 70px); }   /* 台灣頁籤裡：北台灣、中南台灣兩段 */
.panel-title { max-width: 820px; margin: 0 auto 8px; }
.panel-title img { width: 100%; }
.panel-sub { text-align: center; font-size: clamp(17px, 1.7vw, 22px); font-weight: 900; color: var(--pink-deep); margin-bottom: 6px; }
.panel-lead .price { margin: 0 .1em; font-size: 1.22em; font-weight: 900; color: var(--pink-deep); white-space: nowrap; }
.panel-lead { max-width: 980px; margin-bottom: 30px; margin-left: auto; margin-right: auto; text-align: center; font-size: clamp(15px, 1.4vw, 20px); font-weight: 700; color: var(--navy); }

/* ---------- 7 共用元件 ---------- */
/* 粉色按鈕：內縮白邊框，hover 粉色光暈 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  padding: 9px 26px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 900; letter-spacing: .06em; color: var(--rose); white-space: nowrap;
  background: linear-gradient(90deg, var(--btn-a), var(--btn-b));
  outline: 2px solid #fff; outline-offset: -6px;
  transition: box-shadow .25s, transform .25s, filter .25s;
}
.btn:hover, .card:hover .btn { box-shadow: var(--glow); transform: translateY(-2px); filter: saturate(1.25); }
.btn-sm { padding: 8px 26px; font-size: clamp(15px, 1.15vw, 17px); }
.btn-xs { padding: 5px 14px; font-size: 13px; outline-offset: -4px; outline-width: 1.5px; }
.btn-lg { padding: 14px 40px; font-size: clamp(17px, 1.8vw, 22px); outline-offset: -7px; }

/* 半透明白框：柔和圓角 */
.box, .card, .spot {
  background: var(--glass); border: 1.5px solid rgba(255, 255, 255, .9); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: box-shadow .3s, transform .3s, border-color .3s;
}
.card:hover { box-shadow: var(--glow); border-color: #ffc2d8; }   /* 只有產品卡片有 hover 效果 */
.box { padding: clamp(18px, 2.4vw, 30px); }
.box-title {
  display: inline-flex; align-items: center; gap: .4em; margin: 0 0 14px; padding: 5px 24px 5px 16px;
  border-radius: 999px; color: #fff; font-size: clamp(17px, 1.7vw, 21px); font-weight: 900; letter-spacing: .05em;
  background: linear-gradient(90deg, #ff5c9a, #ff9dbf); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -5px;
}
.box-note { margin-bottom: 14px; font-size: 14px; color: var(--navy); }

/* ---------- 8 產品卡片 ---------- */
.cards { --gap: clamp(12px, 1.6vw, 26px); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
/* 海外 5 品：一排 3 張、第二排置中，卡片比較大 */
.cards-c { display: flex; flex-wrap: wrap; justify-content: center; }
.cards-c .card { flex: 0 0 calc((100% - var(--gap) * 2) / 3); }
.card { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; }   /* 整張卡片都是連結 */
.card:hover { transform: translateY(-4px); }
.card-img { aspect-ratio: 3 / 2; overflow: hidden; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 16px 20px; text-align: center; }
.card-body h3 { font-size: clamp(15px, 1.45vw, 22px); font-weight: 900; line-height: 1.4; color: var(--navy); }
.card-sub { flex: 1; font-size: clamp(13.5px, 1.05vw, 16px); line-height: 1.55; color: #5b6480; }
.card-price { margin: 2px 0 6px; color: var(--pink-deep); font-weight: 700; line-height: 1.2; }
.card-price b { font-size: clamp(24px, 2.4vw, 36px); font-weight: 900; margin: 0 3px; letter-spacing: .01em; }
.card-price span { font-size: clamp(14px, 1.05vw, 16px); }

/* ---------- 9 花期小百科 ---------- */
/* 花期月曆：橫向色帶 */
.lg { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; font-weight: 700; }
.lg::before { content: ""; width: 22px; height: 10px; border-radius: 99px; background: var(--pink); }
.lg-os::before { background: var(--green); }
.cal-head, .cal-row { display: grid; grid-template-columns: minmax(150px, 230px) 1fr 150px 76px; gap: 12px; align-items: center; }
.cal-months { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; color: var(--pink-deep); font-size: 15px; }
.cal-row { padding: 7px 0; border-top: 1px dashed #ffc9db; }
.cal-name b { display: block; font-size: 15px; line-height: 1.35; color: var(--navy); }
.cal-name small { display: block; font-size: 12.5px; line-height: 1.35; color: #6b7390; }
.cal-track {
  position: relative; height: 20px; border-radius: 99px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .85) 0, rgba(255, 255, 255, .85) calc(25% - 1px), #ffc9db calc(25% - 1px), #ffc9db 25%);
  box-shadow: inset 0 0 0 1px #ffd9e5;
}
.cal-bar {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; min-width: 10px; border-radius: 99px;
  background: linear-gradient(90deg, #ff8db6, #ff5c9a); box-shadow: 0 2px 6px rgba(255, 92, 154, .4);
  transition: width .8s ease;
}
.cal-row.os .cal-bar { background: linear-gradient(90deg, #a5d86a, #6fb93a); box-shadow: 0 2px 6px rgba(111, 185, 58, .4); }
.cal-date { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--navy); }

/* 景點卡片 */
.spots { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.8vw, 26px); margin: 30px 0; }
.spot { display: flex; flex-direction: column; overflow: hidden; }
.spot-img { aspect-ratio: 3 / 2; overflow: hidden; }
.spot-img img { width: 100%; height: 100%; object-fit: cover; }
.spot-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 22px 22px; }
.spot-body h3 { font-size: clamp(20px, 1.6vw, 25px); font-weight: 900; line-height: 1.35; color: var(--pink-deep); }
.spot-sub { font-size: clamp(16px, 1.15vw, 18px); font-weight: 700; color: var(--navy); }
.spot-text { flex: 1; font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 1.8; text-align: justify; }
.spot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; font-size: 14px; }
.spot-tags span { padding: 2px 12px 2px 3px; border-radius: 99px; background: var(--pink-soft); color: var(--navy); }
.spot-tags b { display: inline-block; margin-right: 6px; padding: 0 9px; border-radius: 99px; background: var(--pink); color: #fff; }
.spot .btn { align-self: center; }
/* 第一張（武陵）做成橫式大卡，7 張剛好排滿不留空格 */
.spot-wide { grid-column: 1 / -1; flex-direction: row; }
.spot-wide .spot-img { flex: 0 0 44%; aspect-ratio: auto; min-height: 300px; }
.spot-wide .spot-body { justify-content: center; padding: clamp(20px, 2.4vw, 40px); }
.spot-wide .spot-text { flex: none; font-size: clamp(15px, 1.15vw, 18px); }
.spot-wide .btn { align-self: flex-start; }

/* 品種／秘訣／常見問題 */
.guide-grid { display: grid; grid-template-columns: 1.15fr 1fr 1.15fr; gap: clamp(14px, 1.8vw, 26px); align-items: stretch; }   /* 三個框等高，不留空塊 */
.kinds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 10px; text-align: center; }
.kinds b { display: block; margin-top: 8px; font-size: clamp(15px, 1.15vw, 17.5px); color: var(--navy); }
.kinds p { font-size: clamp(13px, 1vw, 15px); line-height: 1.55; }
.kind { width: clamp(96px, 8.4vw, 150px); height: clamp(96px, 8.4vw, 150px); margin: 0 auto; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 3px 10px rgba(255, 111, 165, .35); }
.tips li { display: flex; gap: 10px; padding: clamp(9px, 1.1vw, 18px) 0; border-top: 1px dashed #ffc9db; font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 1.65; }
.tips li:first-child { border-top: 0; padding-top: 0; }
.tips svg { margin-top: 3px; padding: 3px; border-radius: 50%; font-size: 22px; color: #fff; background: var(--pink); }
.tips b { display: block; color: var(--navy); font-size: clamp(15.5px, 1.2vw, 18.5px); }
.faq details { margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1.5px #ffd0de; }
.faq summary {
  position: relative; padding: 9px 40px 9px 16px; cursor: pointer; list-style: none;
  font-size: clamp(16px, 1.1vw, 17.5px); font-weight: 700; color: var(--navy); border-radius: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2.5px solid var(--pink-deep); border-bottom: 2.5px solid var(--pink-deep); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 16px 12px; font-size: clamp(14.5px, 1.02vw, 16px); }
.back { margin-top: 30px; text-align: center; }

/* ---------- 10 頁尾裝飾（巴士動畫） ---------- */
.scene {
  --w: 100vw;
  width: 100%; aspect-ratio: 2000 / 680; margin-top: 2vw;
  overflow-x: clip; overflow-y: visible;      /* 左右裁切（巴士出畫面就消失），上方櫻花可以超出 */
}
.scene img { position: absolute; max-width: none; }
.scene-land { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 65.8%; }
.scene-branch { bottom: -1.5vw; width: 38vw; height: auto; z-index: 3; }   /* 圖二：下方、左右邊緣、鏡射 */
.scene-branch.l { left: -4vw; }
.scene-branch.r { right: -4vw; transform: scaleX(-1); }
.scene-bus {                                   /* 巴士：最右 → 最左，線性移動到消失後重來 */
  left: 0; bottom: 27.5%; width: 15vw; height: auto; z-index: 2;
  animation: bus-run 16s linear infinite; will-change: transform;
}
@keyframes bus-run {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}
.notice { margin: 0; padding: 12px 16px; text-align: center; background: #fff; border-top: 4px solid var(--pink); }
.notice span { display: inline-block; font-size: clamp(15px, 1.5vw, 19px); font-weight: 900; letter-spacing: .04em; line-height: 1.5; color: var(--rose); }

/* ---------- 11 頁尾公司資訊 ---------- */
.site-footer { color: #fff; background: #ef6795; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 30px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 46px;
}
.footer-logo img { width: 150px; }
.footer-co { font-size: 14px; line-height: 1.8; text-align: center; }
.footer-co .co-name { margin-bottom: 4px; padding-bottom: 2px; font-size: 16px; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .7); }
.footer-sns { display: flex; gap: 12px; }
.footer-sns img { width: 40px; height: 40px; transition: transform .25s; }
.footer-sns a:hover img { transform: scale(1.12); }
.footer-copy { padding: 8px; text-align: center; font-size: 13px; background: #c94477; }

/* ---------- 12 浮動按鈕 ---------- */
.float-line, .float-top {
  position: fixed; right: 14px; z-index: 70; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; color: #fff; font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22); transition: box-shadow .25s, transform .25s;
}
.float-line { bottom: 82px; font-size: 12.5px; line-height: 1.2; text-align: center; background: #06c755; }
.float-top { bottom: 18px; font-size: 18px; background: linear-gradient(135deg, #ff8fb8, #ff5c9a); }
.float-line:hover, .float-top:hover { transform: scale(1.08); box-shadow: var(--glow); }

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .guide-grid .box:last-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .site-nav a { padding: 0 9px; font-size: 14px; }
  .site-logo img { width: 110px; }
  /* 主視覺改用手機版輪播圖 */
  .kv { height: 63vw; }
  .kv-slide.s1 { background-image: url(../images/slide1_m.jpg); }
  .kv-slide.s2 { background-image: url(../images/slide2_m.jpg); }
  .kv-slide.s3 { background-image: url(../images/slide3_m.jpg); }
  .kv-slide.s4 { background-image: url(../images/slide4_m.jpg); }
  .kv-copy { padding: 8px 12px 26px; }
  .kv-title { width: 90vw; }
  .tabs { padding: 8px 6px 7px; }
  .tab { padding: 9px 2px; letter-spacing: 0; font-size: 13.5px; gap: .2em; }
  .tab svg { display: none; }
  .wrap { padding-top: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-sub { font-size: 12.5px; }
  .btn-sm { padding: 6px 16px; font-size: 14px; }
  /* 花期月曆：手機改直向列表 */
  .cal-head { display: none; }
  .cal-row { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; }
  .cal-name { grid-column: 1 / -1; }
  .cal-track { grid-column: 1 / -1; }
  /* 景點卡片：手機左右滑動 */
  .spots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-left: -14px; margin-right: -14px; padding: 6px 14px 16px; -webkit-overflow-scrolling: touch; }
  .spot { flex: 0 0 84%; scroll-snap-align: center; }
  .spot-wide { flex-direction: column; }
  .spot-wide .spot-img { flex: none; aspect-ratio: 3 / 2; min-height: 0; }
  .spot-wide .spot-body { justify-content: flex-start; padding: 14px 18px 18px; }
  .spot-wide .spot-text { flex: 1; }
  .spot-wide .btn { align-self: center; }
  .cards-c .card { flex-basis: calc((100% - var(--gap)) / 2); }
  .guide-grid { grid-template-columns: 1fr; }
  .scene { margin-top: 6vw; }
  .scene-branch { width: 46vw; }
  .scene-bus { width: 22vw; }
  .notice { padding: 9px 12px; }
  .float-line, .float-top { width: 46px; height: 46px; right: 8px; }
  .float-line { bottom: 68px; font-size: 11px; }
  .float-top { bottom: 14px; }
}
@media (max-width: 400px) {
  .site-nav a { padding: 0 6px; font-size: 13px; }
  .card-body { padding: 10px 6px 12px; }
}

/* ---------- 13 動畫減量（使用者系統設定減少動態時） ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kv-slide, .petal { animation: none; }
  .petals { display: none; }
  .scene-bus { animation: none; transform: translateX(42vw); }
  .js .panel.is-active { animation: none; }
}
