/* ==============================================
   找防水 WaterFinder | Portal Style
   Palette: aqua + orange (跟 pest navy+amber 區隔)
   ============================================== */
:root {
  --aqua-900: #062f4f;
  --aqua-700: #0e5d80;
  --aqua-500: #00a4c4;
  --aqua-300: #7dd3e0;
  --aqua-100: #d6f0f7;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --teal-500: #14b8a6;
  --teal-100: #d1faf3;
  --line-green: #06c755;
  --gray-900: #0f172a;
  --gray-700: #475569;
  --gray-500: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50:  #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(6, 47, 79, .06), 0 1px 2px rgba(6, 47, 79, .04);
  --shadow-md: 0 6px 16px rgba(6, 47, 79, .08);
  --shadow-lg: 0 18px 48px rgba(6, 47, 79, .14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--gray-900);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 700; }

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

/* === Top bar === */
.topbar {
  background: var(--aqua-900);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.topbar a { color: var(--white); }
.topbar-info { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-cta a {
  background: var(--orange-500);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
}

/* === Header === */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800;
}
.logo-img {
  width: 46px; height: 46px;
  background-color: var(--aqua-100);
  background-image: url("../images/logo.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--aqua-700);
  font-size: 11px;
  text-indent: -9999px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(6, 47, 79, .14);
}
.logo-text .brand {
  font-size: 23px;
  color: var(--aqua-900);
  letter-spacing: .04em;
  line-height: 1;
}
.logo-text .brand-en {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 3.4px;
  margin-top: 4px;
  display: block;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav > ul > li { position: relative; }
.nav > ul > li > a {
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--gray-900);
  border-radius: 8px;
  font-size: 15px;
}
.nav > ul > li > a:hover { background: var(--aqua-100); color: var(--aqua-700); }
.has-sub > a::after {
  content: "▾";
  font-size: 10px;
  margin-left: 6px;
  color: var(--gray-500);
}
.submenu {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: .2s;
  border: 1px solid var(--gray-200);
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a {
  display: block; padding: 10px 14px;
  border-radius: 8px;
  color: var(--gray-700);
  font-size: 15px;
}
.submenu li a:hover { background: var(--aqua-100); color: var(--aqua-900); }

.nav-cta {
  margin-left: 12px;
  background: var(--orange-500);
  color: var(--white) !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  font-weight: 700;
}
.nav-cta:hover { background: var(--orange-600); }

/* === Mega Menu（地區抓漏） === */
.has-mega { position: relative; }
.has-mega > a::after {
  content: "▾";
  font-size: 10px;
  margin-left: 6px;
  color: var(--gray-500);
}
.mega-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, 90vw);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s, visibility .2s;
  z-index: 200;
}
.has-mega:hover .mega-panel,
.has-mega.mega-open .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mega-counties {
  border-right: 1px solid var(--gray-200);
  padding-right: 16px;
  max-height: 380px;
  overflow-y: auto;
}
.mega-counties .county {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  transition: .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2px;
}
.mega-counties .county:hover,
.mega-counties .county.active {
  background: var(--aqua-100);
}
.mega-counties .county .county-icon {
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}
.mega-counties .county .county-name {
  font-weight: 600;
  color: var(--aqua-900);
  flex: 1;
  font-size: 14px;
}
.mega-counties .county .county-count {
  font-size: 11px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 999px;
}
.mega-counties .county.active .county-count {
  background: var(--orange-500);
  color: var(--white);
}
.mega-counties .group-label {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 2px;
  padding: 14px 12px 6px;
  font-weight: 700;
}
.mega-districts { min-width: 0; }
.districts-pane { display: none; }
.districts-pane.active { display: block; animation: districtFadeIn .2s; }
@keyframes districtFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.districts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}
.districts-header h4 {
  color: var(--aqua-900);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.districts-header .see-all {
  font-size: 13px;
  color: var(--orange-600);
  font-weight: 600;
  text-decoration: none;
}
.districts-header .see-all:hover { color: var(--orange-500); text-decoration: underline; }
.districts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.districts-grid a,
.districts-grid .upcoming {
  display: block;
  padding: 9px 12px;
  font-size: 14px;
  border-radius: 6px;
  color: var(--gray-700);
  transition: .15s;
  text-decoration: none;
}
.districts-grid a:hover {
  background: var(--aqua-100);
  color: var(--aqua-900);
  transform: translateX(2px);
}
.districts-grid .upcoming {
  color: var(--gray-400);
  cursor: default;
}
.districts-grid .upcoming::after {
  content: " ·規劃中";
  font-size: 10px;
  color: var(--gray-400);
}
@media (max-width: 720px) {
  .has-mega { position: static; }
  .mega-panel {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 8px 0;
    display: none;
    grid-template-columns: 1fr;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav.open .has-mega.mega-open .mega-panel {
    display: block;
  }
  .mega-counties {
    border-right: 0;
    padding-right: 0;
    max-height: none;
    overflow: visible;
  }
  .mega-counties .county {
    background: var(--gray-50);
    margin-bottom: 4px;
  }
  .mega-districts {
    margin-top: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--aqua-100);
  }
  .districts-grid { grid-template-columns: repeat(2, 1fr); }
  .districts-header h4 { font-size: 14px; }
}

.menu-toggle {
  display: none;
  background: none; border: 0;
  font-size: 24px; cursor: pointer;
  color: var(--aqua-900);
}

/* === Hero === */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--aqua-900) 0%, var(--aqua-700) 60%, #0e7a9c 100%);
  color: var(--white);
  padding: 80px 0 90px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../images/home-hero.webp");
  background-size: cover; background-position: center;
  opacity: .25;
}
.hero::after {
  content: ""; position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: var(--orange-500);
  border-radius: 50%;
  opacity: .14;
  filter: blur(20px);
}
.hero .container { position: relative; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-size: clamp(30px, 4.5vw, 50px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 18px;
  max-width: 820px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #fb923c 0%, #fed7aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p.lead {
  font-size: 18px;
  opacity: .9;
  max-width: 660px;
  margin-bottom: 30px;
}

.hero-search-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  max-width: 720px;
}
.hero-search-bar select,
.hero-search-bar input {
  border: 0; padding: 14px 16px;
  font-size: 15px; font-family: inherit;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-900);
}
.hero-search-bar select:focus,
.hero-search-bar input:focus {
  outline: 2px solid var(--aqua-500);
  background: var(--gray-50);
}
.hero-search-bar button {
  background: var(--orange-500);
  color: var(--white);
  font-weight: 700;
  border: 0;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  transition: .15s;
}
.hero-search-bar button:hover { background: var(--orange-600); }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-size: 30px; font-weight: 800; color: #fb923c;
  display: block; line-height: 1;
}
.hero-stat .label {
  font-size: 13px; opacity: .82;
  margin-top: 6px;
}

/* === 通用 button === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: .2s;
  cursor: pointer; border: 0;
}
.btn-primary { background: var(--orange-500); color: var(--white); }
.btn-primary:hover { background: var(--orange-600); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-line { background: var(--line-green); color: var(--white); }
.btn-line:hover { background: #05a649; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline:hover { background: var(--white); color: var(--aqua-900); }
.btn-ghost { background: var(--white); color: var(--aqua-900); border: 1px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-aqua { background: var(--aqua-700); color: var(--white); }
.btn-aqua:hover { background: var(--aqua-900); }

/* === Section 通用 === */
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }
.section-gray { background: var(--gray-50); }
.section-aqua { background: var(--aqua-900); color: var(--white); }
.section-aqua h2,
.section-aqua .section-head h2 { color: var(--white); }
.section-aqua .eyebrow,
.section-aqua .section-head .eyebrow { color: #fb923c; }
.section-aqua p,
.section-aqua .section-head p { color: rgba(255,255,255,.85); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block;
  color: var(--aqua-700);
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  color: var(--aqua-900);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}
.section-head p {
  color: var(--gray-700);
  max-width: 660px;
  margin: 0 auto;
  font-size: 16px;
}

/* === Problem grid (漏水問題卡片) === */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.problem-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: .2s;
  display: block;
}
.problem-card:hover {
  border-color: var(--orange-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.problem-icon {
  width: 64px; height: 64px;
  background: var(--aqua-100);
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 32px;
  margin: 0 auto 14px;
  color: var(--aqua-700);
  transition: .2s;
}
.problem-card:hover .problem-icon { background: var(--orange-500); color: var(--white); }
.problem-card h3 {
  font-size: 17px;
  color: var(--aqua-900);
  margin-bottom: 6px;
}
.problem-card p { font-size: 13px; color: var(--gray-500); }

/* === Region grid === */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.region-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex; align-items: center; gap: 14px;
  transition: .2s;
}
.region-card:hover {
  border-color: var(--aqua-500);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.region-pin {
  width: 40px; height: 40px;
  background: var(--teal-100);
  color: var(--teal-500);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.region-card h3 {
  font-size: 16px;
  color: var(--aqua-900);
  margin-bottom: 2px;
}
.region-card p { font-size: 13px; color: var(--gray-500); }
.region-card::after {
  content: "→";
  margin-left: auto;
  color: var(--gray-300);
  font-size: 18px;
  transition: .15s;
}
.region-card:hover::after { color: var(--aqua-700); transform: translateX(4px); }

/* === Guide cards === */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.guide-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: .2s;
  display: block;
}
.guide-card:hover { box-shadow: var(--shadow-md); border-color: var(--orange-500); transform: translateY(-4px); }
.guide-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--aqua-700), var(--teal-500));
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  color: rgba(255,255,255,.5);
  font-size: 13px;
}
.guide-thumb[style*="background-image"],
.article-figure[style*="background-image"] {
  color: transparent;
}
.guide-info { padding: 22px; }
.guide-tag {
  display: inline-block;
  background: var(--orange-500);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 10px;
}
.guide-info h3 { font-size: 18px; color: var(--aqua-900); margin-bottom: 8px; line-height: 1.4; }
.guide-info p { font-size: 14px; color: var(--gray-700); margin-bottom: 12px; }
.guide-meta { font-size: 12px; color: var(--gray-500); }

/* === Method (工法) cards === */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.method-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: .2s;
  display: block;
}
.method-card:hover {
  border-color: var(--aqua-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.method-card .badge {
  display: inline-block;
  font-size: 11px;
  background: var(--aqua-100);
  color: var(--aqua-700);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.method-card h3 { color: var(--aqua-900); font-size: 17px; margin-bottom: 6px; }
.method-card p { color: var(--gray-700); font-size: 14px; }

/* === Vendor cards === */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.vendor-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: .2s;
  position: relative;
}
.vendor-card:hover { border-color: var(--orange-500); box-shadow: var(--shadow-md); }
.vendor-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: linear-gradient(135deg, var(--orange-500), #fb923c);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
}
.vendor-head {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 18px;
}
.vendor-logo {
  width: 72px; height: 72px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  display: grid; place-items: center;
  color: var(--aqua-700);
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}
.vendor-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.vendor-head h3 {
  font-size: 19px;
  color: var(--aqua-900);
  margin-bottom: 4px;
}
.vendor-head .area {
  font-size: 13px; color: var(--gray-500);
}
.vendor-rating {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 12px;
}
.vendor-rating .stars { color: #f5b400; letter-spacing: 1px; }
.vendor-features {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.vendor-features li {
  font-size: 12px;
  background: var(--aqua-100);
  color: var(--aqua-700);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.vendor-desc { font-size: 14px; color: var(--gray-700); margin-bottom: 16px; }
.vendor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vendor-actions .btn { padding: 9px 18px; font-size: 13px; }

/* === FAQ === */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item[open] { border-color: var(--aqua-500); }
.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  color: var(--aqua-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--aqua-700);
  font-weight: 400;
  transition: .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer {
  padding: 0 22px 20px;
  color: var(--gray-700);
  font-size: 15px;
}

/* === CTA Banner === */
.cta-banner {
  background: linear-gradient(135deg, var(--aqua-900), var(--aqua-700));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  right: -90px; top: -90px;
  width: 280px; height: 280px;
  background: var(--orange-500);
  border-radius: 50%;
  opacity: .18;
}
.cta-banner > div { position: relative; z-index: 1; }
.cta-banner h2,
.article-content .cta-banner h2 {
  color: var(--white);
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-weight: 800;
  line-height: 1.35;
}
.cta-banner p,
.article-content .cta-banner p {
  color: rgba(255,255,255,.92);
  margin: 0;
}
.cta-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: flex-end;
  position: relative; z-index: 1;
}

/* === Page Hero (內頁) === */
.page-hero {
  background: linear-gradient(135deg, var(--aqua-900), var(--aqua-700));
  color: var(--white);
  padding: 70px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../images/home-hero.webp");
  background-size: cover; background-position: center;
  opacity: .2;
}
.page-hero .container { position: relative; }
.breadcrumb {
  font-size: 13px;
  opacity: .8;
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--white); }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 10px;
  line-height: 1.25;
}
.page-hero p { opacity: .9; max-width: 640px; }

/* === 站內相關連結 / 延伸閱讀 === */
.related-articles {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid var(--gray-200);
}
.related-articles h3 {
  color: var(--aqua-900);
  font-size: 18px;
  margin-bottom: 16px;
  padding-left: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-articles h3::before {
  content: "📚";
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: block;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gray-700);
  transition: .2s;
}
.related-card:hover {
  background: var(--white);
  border-color: var(--aqua-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.related-card .related-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--orange-600);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.related-card strong {
  display: block;
  color: var(--aqua-900);
  font-size: 15px;
  margin: 2px 0 4px;
  font-weight: 700;
}

/* === 內文中的連結（contextual link） === */
.article-content a:not(.btn):not(.related-card),
.article-content p a {
  color: var(--aqua-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--aqua-100);
  transition: .15s;
}
.article-content a:not(.btn):not(.related-card):hover,
.article-content p a:hover {
  color: var(--orange-600);
  text-decoration-color: var(--orange-500);
}

/* === Article / Detail layout === */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  min-width: 0;
}
.article-content, .sidebar { min-width: 0; }
.article-content h2 {
  font-size: 24px;
  color: var(--aqua-900);
  margin: 32px 0 14px;
  border-left: 4px solid var(--orange-500);
  padding-left: 14px;
  line-height: 1.35;
}
.article-content h3 { font-size: 18px; color: var(--aqua-900); margin: 22px 0 8px; }
.article-content p { color: var(--gray-700); margin-bottom: 14px; }
.article-content ul, .article-content ol { padding-left: 22px; margin-bottom: 18px; color: var(--gray-700); }
.article-content ul li { list-style: disc; margin-bottom: 6px; }
.article-content ol li { list-style: decimal; margin-bottom: 6px; }
.article-content strong { color: var(--aqua-900); }

.article-figure {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  display: grid; place-items: center;
  color: var(--gray-500);
  margin: 22px 0;
}

.article-caption {
  color: var(--gray-500);
  font-size: 13px;
  margin-top: -12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
}

.lead-quote {
  background: linear-gradient(135deg, var(--aqua-100), var(--gray-50));
  border-left: 6px solid var(--orange-500);
  padding: 22px 26px;
  border-radius: var(--radius-md);
  margin: 24px 0;
}
.lead-quote p {
  font-size: 17px;
  font-weight: 600;
  color: var(--aqua-900);
  margin: 0;
}

/* === Pro Tip box（英文站常見元素，建立 E-E-A-T） === */
.pro-tip {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border: 1px solid #fed7aa;
  border-left: 5px solid var(--orange-500);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}
.pro-tip-label {
  display: inline-block;
  background: var(--orange-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.pro-tip h4 {
  color: var(--aqua-900);
  font-size: 16px;
  margin-bottom: 6px;
}
.pro-tip p {
  color: var(--gray-700);
  font-size: 14px;
  margin: 0;
}
.pro-tip cite {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-500);
  font-style: normal;
}

/* === Methodology box (英文站「我們的計算依據」) === */
.methodology {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 28px 0;
}
.methodology h4 {
  color: var(--aqua-900);
  font-size: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.methodology h4::before { content: "🔬"; }
.methodology p,
.methodology ul {
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.8;
}
.methodology ul { padding-left: 18px; }

.article-alert {
  border: 1px solid #fb923c;
  background: #fff7ed;
  color: #7c2d12;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 22px 0;
  line-height: 1.8;
}
.article-alert strong { color: #9a3412; }

.stat-grid, .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}
.stat-card, .info-grid > div {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card strong {
  display: block;
  color: var(--aqua-700);
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.stat-card span, .info-grid span {
  display: block;
  color: var(--gray-700);
  font-size: 14px;
  line-height: 1.7;
}
.info-grid strong {
  display: block;
  color: var(--aqua-900);
  margin-bottom: 6px;
}
.article-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
}
.article-table-wrap .compare-table {
  min-width: 680px;
  margin: 0;
}

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th {
  background: var(--aqua-900);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  background: var(--white);
}
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table tr:hover td { background: var(--gray-50); }
.compare-table .price { font-weight: 700; color: var(--aqua-900); white-space: nowrap; }

/* === Case Gallery (前後對比照) === */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 26px;
}
.case-gallery figure {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.case-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}
.case-gallery figcaption {
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px 14px;
}
.case-gallery figcaption strong {
  display: block;
  color: var(--aqua-900);
  margin-bottom: 4px;
  font-size: 14px;
}
.case-gallery .label-before {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 4px;
}
.case-gallery .label-after {
  display: inline-block;
  background: var(--teal-100);
  color: #065f54;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* === Case Card (首頁案例卡片) === */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.case-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: .2s;
  display: block;
}
.case-card:hover { box-shadow: var(--shadow-md); border-color: var(--orange-500); transform: translateY(-4px); }
.case-card .case-thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--aqua-700), var(--teal-500));
  background-size: cover; background-position: center;
}
.case-card .case-info { padding: 22px; }
.case-card .case-tag {
  display: inline-block;
  background: var(--aqua-100);
  color: var(--aqua-700);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 10px;
}
.case-card h3 {
  font-size: 17px;
  color: var(--aqua-900);
  margin-bottom: 8px;
  line-height: 1.4;
}
.case-card p { font-size: 14px; color: var(--gray-700); margin-bottom: 10px; }
.case-card .case-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  padding-top: 10px;
}

/* === Why Choose Us / 旋轉圓圈動畫（移植自 buyersline 技術） === */
.why-choose {
  padding: 80px 0;
  background: linear-gradient(135deg, #f0fbfd 0%, #fff7ed 100%);
}
.why-choose .why-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
}
.why-choose .why-item {
  max-width: 240px;
  text-align: center;
}
.why-choose .why-circle {
  position: relative;
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border: 1.5px solid var(--aqua-500);
  border-radius: 50%;
  background: var(--white);
  transition: .3s;
}
.why-choose .why-circle::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: var(--aqua-500);
  border-radius: 50%;
  animation: why-dot-spin 12s linear infinite;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: 0% 0%;
}
.why-choose .why-circle::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--orange-500);
  border-radius: 50%;
  animation: why-dot-spin-2 12s linear infinite;
  animation-delay: 0.3s;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: 0% 0%;
}
.why-choose .why-circle:hover {
  border-color: var(--orange-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.why-choose .why-circle:hover::before,
.why-choose .why-circle:hover::after {
  animation-play-state: paused;
}
.why-choose .why-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 64px;
  line-height: 1;
}
.why-choose .why-title {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 700;
  color: var(--aqua-900);
}
.why-choose .why-title span {
  border-bottom: 2px solid var(--orange-500);
  padding-bottom: 4px;
}
.why-choose .why-desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
}
@keyframes why-dot-spin {
  0%   { transform: rotate(0deg) translateX(104px); }
  100% { transform: rotate(360deg) translateX(104px); }
}
@keyframes why-dot-spin-2 {
  0%   { transform: rotate(0deg) translateX(106px); }
  100% { transform: rotate(360deg) translateX(106px); }
}
@media (max-width: 720px) {
  .why-choose { padding: 56px 0; }
  .why-choose .why-grid { gap: 24px; }
  .why-choose .why-item { max-width: 45%; }
  .why-choose .why-circle { width: 160px; height: 160px; }
  .why-choose .why-icon { font-size: 48px; }
  .why-choose .why-title { font-size: 16px; margin-top: 16px; }
  .why-choose .why-desc { font-size: 13px; }
  @keyframes why-dot-spin {
    0%   { transform: rotate(0deg) translateX(74px); }
    100% { transform: rotate(360deg) translateX(74px); }
  }
  @keyframes why-dot-spin-2 {
    0%   { transform: rotate(0deg) translateX(76px); }
    100% { transform: rotate(360deg) translateX(76px); }
  }
}

/* === Cost Calculator Widget (英文站差異化重點) === */
.calc-widget {
  background: var(--white);
  border: 2px solid var(--aqua-500);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 28px 0;
  box-shadow: var(--shadow-md);
}
.calc-widget h3 {
  color: var(--aqua-900);
  font-size: 22px;
  margin-bottom: 6px;
}
.calc-widget .calc-sub {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 20px;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.calc-field label {
  display: block;
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 600;
  margin-bottom: 6px;
}
.calc-field select,
.calc-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
}
.calc-result {
  margin-top: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--aqua-100), var(--gray-50));
  border-radius: var(--radius-md);
  text-align: center;
}
.calc-result-label {
  font-size: 13px;
  color: var(--aqua-700);
  font-weight: 600;
  letter-spacing: 1px;
}
.calc-result-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--aqua-900);
  margin: 6px 0;
}
.calc-result-note {
  font-size: 12px;
  color: var(--gray-500);
}

/* Sidebar */
.sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  color: var(--aqua-900);
  margin-bottom: 14px;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}
.sidebar-list li a {
  display: block; padding: 9px 12px;
  color: var(--gray-700);
  border-radius: 8px;
  font-size: 14px;
  transition: .15s;
}
.sidebar-list li a:hover, .sidebar-list li a.active {
  background: var(--aqua-100);
  color: var(--aqua-900);
  font-weight: 600;
}
.sidebar-cta {
  background: var(--aqua-900);
  color: var(--white);
  text-align: center;
}
.sidebar-cta h4 { color: var(--white); border-color: rgba(255,255,255,.2); }
.sidebar-cta .sub {
  font-size: 13px; opacity: .85;
  margin: 4px 0 14px;
}
.sidebar-cta .btn { width: 100%; justify-content: center; margin-top: 8px; padding: 11px 16px; }

/* === Footer === */
.footer {
  background: #041e33;
  color: rgba(255,255,255,.75);
  padding: 56px 0 24px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer h5 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.footer .logo { color: var(--white); margin-bottom: 12px; }
.footer .logo .brand { color: var(--white); }
.footer p { line-height: 1.8; }
.footer ul li { margin-bottom: 7px; }
.footer ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.footer-bottom .disclaimer { font-size: 12px; opacity: .65; margin-top: 8px; }

/* === Floating CTA === */
.floating {
  position: fixed; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 90;
}
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  transition: .2s;
  font-size: 22px;
}
.fab:hover { transform: translateY(-3px) scale(1.05); }
.fab-line { background: var(--line-green); }
.fab-orange { background: var(--orange-500); color: var(--white); }
.fab-top { background: var(--aqua-900); font-size: 16px; }
.fab-wrap { position: relative; }
.fab-label {
  position: absolute;
  right: 68px; top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--gray-900);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: .2s;
  pointer-events: none;
}
.fab-wrap:hover .fab-label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* === Form === */
.lead-form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px;
}
.lead-form h3 { color: var(--aqua-900); margin-bottom: 6px; }
.lead-form .muted { color: var(--gray-500); font-size: 14px; margin-bottom: 22px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.form-row.full { grid-template-columns: 1fr; }
.form-field label {
  font-size: 13px; color: var(--gray-700);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  transition: .15s;
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--aqua-500);
  box-shadow: 0 0 0 3px var(--aqua-100);
}
.form-submit { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.form-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: none;
}
.form-status.sending { display: block; background: var(--gray-100); color: var(--gray-700); }
.form-status.success { display: block; background: var(--teal-100); color: #065f54; border: 1px solid var(--teal-500); }
.form-status.error { display: block; background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* === RWD === */
@media (max-width: 980px) {
  .detail-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cta-banner { grid-template-columns: 1fr; padding: 32px; text-align: center; }
  .cta-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-search-bar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    box-shadow: var(--shadow-md);
  }
  .nav.open > ul { flex-direction: column; gap: 0; align-items: stretch; }
  .nav.open > ul > li > a {
    display: block; padding: 13px;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
  }
  .nav.open .submenu {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none;
    padding-left: 16px; border: 0;
  }
  .nav.open .nav-cta { margin: 12px 0 0; text-align: center; }
  .section { padding: 56px 0; }
  .stat-grid, .info-grid { grid-template-columns: 1fr; }
  .calc-row { grid-template-columns: 1fr; }
  .article-meta { gap: 6px; }
  .article-meta span { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
