/* ==========================================================
   水文資訊官方網站 — 全站樣式
   主色 #0E96A8｜字型 Noto Sans TC
   ========================================================== */
:root {
  --primary: #0E96A8;
  --primary-dark: #0B7A89;
  --text-dark: #1D2023;
  --text-body: #333333;
  --text-muted: #666666;
  --bg-light: #F4FAFB;
  --bg-teal-light: #DFF3F4;
  --white: #FFFFFF;
  --font-stack: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", 微軟正黑體, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }

/* ---------- 導覽列 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.nav-wrap {
  max-width: 1400px; margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 88px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand-name { font-size: 20px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  color: var(--text-dark); font-size: 16px; font-weight: 700;
  padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--text-dark); }
.btn-contact {
  background: var(--primary); color: var(--white) !important;
  padding: 12px 24px; border-radius: 4px; font-weight: 700;
}
.btn-contact:hover { background: var(--primary-dark); }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 26px; height: 3px;
  background: var(--text-dark); border-radius: 2px;
  position: absolute; left: 9px; top: 20px; transition: .2s;
}
.nav-toggle span::before { left: 0; top: -8px; }
.nav-toggle span::after { left: 0; top: 8px; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block; font-size: 20px; font-weight: 500;
  padding: 16px 28px; border-radius: 4px; transition: .2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: var(--white); color: var(--text-dark); }
.btn-light:hover { background: #eee; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #9BD9DC 0%, #7ECBD1 45%, #A8E0E2 100%);
  color: var(--text-dark);
}
.hero-inner {
  max-width: 1400px; margin: 0 auto; padding: 90px 24px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  min-height: 360px;
}
.hero h1 { font-size: 48px; font-weight: 700; line-height: 1.3; margin-bottom: 18px; }
.hero .sub { font-size: 24px; margin-bottom: 30px; }
.hero-img img { margin: 0 auto; }
.hero--dark { color: var(--white); }
.hero--photo { background-size: cover; background-position: center; }
.hero--photo::before {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25);
}
.hero--photo .hero-inner { position: relative; grid-template-columns: 1fr; text-align: center; }
.hero--center .hero-inner { grid-template-columns: 1fr; text-align: center; }
.hero--center .btn { margin: 0 auto; }

/* ---------- 首頁 hero：桌機/手機兩版（原站為裝置切換，非輪播） ---------- */
.hero-home { background-size: cover; background-position: center; }
.hero-home .hero-inner { grid-template-columns: 1fr; }
.hero-home-desktop h1 { font-size: 40px; color: #222; }
.hero-home-desktop .sub { font-size: 22px; color: #000; }
.hero-home-mobile { display: none; color: var(--white); }
.hero-home-mobile .hero-inner { text-align: center; }
.hero-home-mobile .hero-mobile-title { font-size: 34px; font-weight: 700; line-height: 1.3; margin-bottom: 18px; }
.hero-home-mobile .btn { margin: 0 auto; }
@media (max-width: 700px) {
  .hero-home-desktop { display: none; }
  .hero-home-mobile { display: block; }
}

/* ---------- 全寬形象圖帶 ---------- */
.img-band img { width: 100%; }

/* ---------- 手機專用區塊 ---------- */
.mobile-only { display: none; }
@media (max-width: 700px) {
  .mobile-only { display: block; }
}

/* ---------- 背景圖區塊 ---------- */
.bg-photo { background-size: cover; background-position: center; position: relative; }
.bg-photo > .container { position: relative; z-index: 1; }
.bg-photo.overlay-dark::before {
  content: ""; position: absolute; inset: 0; background: rgba(20,25,30,.5);
}
.bg-photo.overlay-light::before {
  content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.82);
}
.bg-photo.overlay-dark { color: var(--white); }
.bg-photo.overlay-dark h2, .bg-photo.overlay-dark .cta-band h2 { color: var(--white); }
.bg-pattern { background-size: cover; background-position: center; }

/* ---------- 區塊 ---------- */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-light); }
.section-teal { background: var(--bg-teal-light); }
.section-mint { background: #EEF5F5; }
.section-teal2 { background: #BAE3E5; }
.section-gray { background: #F2F2F2; }
.section-blue { background: #EAF3FB; }
.container { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 36px; font-weight: 700; color: var(--primary); }
.section-head .en { font-size: 20px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.section-head .desc { font-size: 18px; color: var(--text-body); margin-top: 14px; }

/* ---------- 卡片網格 ---------- */
.grid { display: grid; gap: 36px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { text-align: center; }
.card img { border-radius: 8px; margin: 0 auto 18px; }
.card h3 { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 10px; line-height: 1.45; }
.card p { font-size: 16px; color: var(--text-body); text-align: left; }
.card p.center { text-align: center; }
.card ul { text-align: left; padding-left: 1.3em; font-size: 16px; }
.card li { margin-bottom: 4px; }

/* ---------- 特色列（圖左右交錯用） ---------- */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; margin-bottom: 64px;
}
.feature-row h3 { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 12px; line-height: 1.5; }
.feature-row p { font-size: 20px; color: var(--text-body); }
.feature-row img { border-radius: 8px; }
.feature-row-rev img { order: 2; }

/* ---------- clinic168 hero：圖上文下置中（原站 s-section-1） ---------- */
.hero-clinic .hero-inner {
  grid-template-columns: 1fr; text-align: center; padding: 48px 24px;
}
.hero-clinic img { margin: 0 auto 32px; }
.hero-clinic h1 { font-size: 36px; color: var(--primary); margin-bottom: 26px; }
.hero-clinic .btn { margin: 0 auto; }

/* ---------- 見證 ---------- */
.testimonial-row blockquote { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.6; }
.testimonial-row cite { display: block; font-style: normal; font-size: 17px; margin-top: 18px; color: var(--text-muted); }
.testimonial { text-align: center; }
.testimonial img { max-width: 560px; margin: 0 auto 28px; border-radius: 8px; }
.testimonial blockquote {
  font-size: 32px; font-weight: 700; color: var(--text-dark); line-height: 1.5;
}
.testimonial cite { display: block; font-style: normal; font-size: 18px; margin-top: 18px; color: var(--text-muted); }
.quote-card {
  background: var(--white); border-radius: 8px; padding: 36px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 28px;
}
.quote-card h3 { font-size: 26px; color: var(--text-dark); margin-bottom: 12px; }
.quote-card p { font-size: 17px; }
.quote-card cite { display: block; font-style: normal; margin-top: 14px; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid #e3e3e3; }
.faq-item summary {
  cursor: pointer; list-style: none; position: relative;
  font-size: 20px; font-weight: 700; color: var(--text-dark);
  padding: 20px 44px 20px 4px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%); font-size: 26px; color: var(--primary);
  transition: .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 4px 22px; font-size: 17px; color: var(--text-body); }

/* ---------- 步驟 ---------- */
.steps { counter-reset: step; max-width: 860px; margin: 0 auto; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 24px;
  margin-bottom: 40px; align-items: start;
}
.step .num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { font-size: 24px; color: var(--primary); margin-bottom: 8px; }

/* ---------- CTA 區 ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: 34px; font-weight: 700; color: var(--text-dark); margin-bottom: 14px; }
.cta-band p { font-size: 19px; margin-bottom: 28px; }

/* ---------- 客戶 Logo ---------- */
.client-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; align-items: center; }
.client-logos img { margin: 0 auto; max-height: 110px; width: auto; }

/* ---------- 文章頁（about / cookie） ---------- */
.article { max-width: 900px; margin: 0 auto; padding: 60px 24px; }
.article img { border-radius: 6px; margin-bottom: 36px; }
.article p { font-size: 18px; margin-bottom: 26px; }
.article ul { margin: 0 0 26px 1.4em; font-size: 18px; }
.article h1 { font-size: 36px; color: var(--text-dark); margin-bottom: 28px; }
.article h2 { font-size: 26px; color: var(--text-dark); margin: 36px 0 14px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #EEF4F9; padding: 44px 24px; text-align: center;
  font-size: 15px; color: var(--text-body);
}
.site-footer .contact { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer a { color: var(--text-body); }
.site-footer a:hover { color: var(--primary); }

/* ---------- LINE 浮動按鈕 ---------- */
.line-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 88px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); display: block;
  transition: transform .15s;
}
.line-float:hover { transform: scale(1.05); }
.line-float img { width: 100%; }

/* ---------- Cookie 橫幅 ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: var(--text-dark); color: var(--white);
  padding: 18px 24px; display: none;
  align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
  font-size: 15px;
}
.cookie-banner.show { display: flex; }
.cookie-banner a { color: #9BD9DC; text-decoration: underline; }
.cookie-banner button {
  background: var(--primary); color: var(--white); border: 0;
  padding: 10px 22px; border-radius: 4px; font-size: 15px; cursor: pointer;
  font-family: var(--font-stack);
}

/* ---------- RWD ---------- */
@media (max-width: 992px) {
  .hero h1 { font-size: 34px; }
  .hero .sub { font-size: 19px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 60px 24px; }
  .hero-img { order: -1; }
  /* 首頁桌機版 hero 維持靠左（原站切換點為手機寬度） */
  .hero-home-desktop .hero-inner { text-align: left; }
  .hero-home-desktop h1 { font-size: 40px; }
  .hero-clinic h1 { font-size: 36px; }
  .section-head h2 { font-size: 29px; }
  .testimonial blockquote { font-size: 24px; }
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 88px; left: 0; right: 0;
    background: var(--white); flex-direction: column; gap: 0;
    padding: 12px 0 20px; box-shadow: 0 8px 12px rgba(0,0,0,.1);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 24px; width: 100%; text-align: center; }
  .btn-contact { margin: 10px 24px 0; width: calc(100% - 48px); }
  .grid-3, .grid-2, .client-logos { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .feature-row-rev img { order: -1; }
  .hero h1 { font-size: 28px; }
  .section { padding: 56px 20px; }
  .brand-name { font-size: 16px; }
  .brand img { height: 42px; }
}
