/* =========================================================
   HUJIA 護佳生醫｜關立捷 GJ+HA II 行銷網站
   Shared stylesheet
   ========================================================= */

:root {
  --c-primary: #0b6fa8;
  --c-primary-dark: #084d78;
  --c-primary-light: #e7f4fb;
  --c-accent: #5bb54c;
  --c-accent-dark: #3f8c33;
  --c-accent-light: #eef8ea;
  --c-navy: #0a2540;
  --c-gold: #c9a24b;
  --c-text: #1f2937;
  --c-muted: #5b6b78;
  --c-bg: #f7fbfd;
  --c-card: #ffffff;
  --c-border: #e2edf3;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(10, 37, 64, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 37, 64, 0.10);
  --container: 1120px;
  --ff-base: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--c-muted); }

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

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: #fff; }
.section--navy { background: linear-gradient(160deg, var(--c-navy), #0d2f52); color: #eaf2f8; }
.section--navy p { color: #b9cadb; }
.section--gradient {
  background: linear-gradient(180deg, var(--c-primary-light) 0%, #ffffff 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-accent-dark);
  background: var(--c-accent-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-dark); box-shadow: var(--shadow-md); }
.btn-outline { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ghost { border-color: var(--c-primary); color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary-light); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { height: 34px; width: auto; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--c-muted); letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--c-text); opacity: .82; transition: opacity .15s; white-space: nowrap; }
.nav-links a:hover { opacity: 1; color: var(--c-primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex;
  border: 1.5px solid var(--c-border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 7px 13px;
  cursor: pointer;
  color: var(--c-muted);
  font-family: inherit;
  font-weight: 700;
}
.lang-toggle button.active { background: var(--c-primary); color: #fff; }

.nav-burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #d7edf9 0%, #f7fbfd 45%, #ffffff 100%);
  padding: 72px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.01em; }
.hero h1 span { color: var(--c-primary); }
.hero-sub { font-size: 18px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 30px; margin-top: 44px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 26px; color: var(--c-primary-dark); }
.hero-stat span { font-size: 13px; color: var(--c-muted); }
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual .glow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(11,111,168,.18), transparent 70%);
  filter: blur(10px);
}
.hero-visual img {
  position: relative;
  max-height: 420px;
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(10,37,64,.18));
}
.hero-badge-float {
  position: absolute;
  top: 10px;
  right: 6%;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge-float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }

.wave-divider { display: block; width: 100%; line-height: 0; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: #fff;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 26px 0;
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--c-primary-dark); }
.trust-item .ico { font-size: 20px; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon-badge {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-light);
  font-size: 24px;
  margin-bottom: 18px;
}
.card h3 { font-size: 18px; }
.card p { font-size: 14.5px; margin-bottom: 0; }

/* Pain point list */
.pain-grid { grid-template-columns: repeat(4, 1fr); }
.pain-card { text-align: center; padding: 26px 18px; }
.pain-card .emoji { font-size: 34px; margin-bottom: 12px; }
.pain-card h4 { font-size: 15px; margin-bottom: 6px; }
.pain-card p { font-size: 13px; margin: 0; }

/* Two column feature */
.feature-row {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 56px;
  align-items: center;
}
.feature-row.reverse .feature-visual { order: 2; }
.feature-visual img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.feature-list { margin-top: 22px; display: grid; gap: 14px; }
.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--c-text);
}
.feature-list .check {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

/* Stat cards (evidence) */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card b { display: block; font-size: 34px; color: var(--c-primary); }
.stat-card span { font-size: 13px; color: var(--c-muted); }
.stat-card small { display: block; font-size: 11.5px; color: #98a7b3; margin-top: 6px; }

.evidence-list { display: grid; gap: 16px; margin-top: 8px; }
.evidence-item {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 14.5px;
}
.evidence-item .tag {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  background: var(--c-primary);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Badges (certification, dark showcase) */
.badge-strip { grid-template-columns: repeat(3, 1fr); }
.badge-tile {
  background: radial-gradient(120% 120% at 50% 0%, #12324f, #06131f);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
}
.badge-tile img { max-height: 150px; margin: 0 auto 12px; }
.badge-tile h4 { color: #fff; font-size: 15px; margin: 0; }

/* Timeline / process */
.process-grid { grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.process-card { position: relative; padding-top: 44px; }
.process-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Blog cards */
.blog-grid { grid-template-columns: repeat(3, 1fr); }
.blog-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card .thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.blog-card .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card .cat { font-size: 11.5px; font-weight: 800; color: var(--c-accent-dark); letter-spacing: .04em; }
.blog-card h3 { font-size: 17px; margin: 0; }
.blog-card p { font-size: 13.5px; flex: 1; }
.blog-card .readmore { font-size: 13px; font-weight: 700; color: var(--c-primary); margin-top: auto; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--c-primary), #0a86bf);
  border-radius: var(--radius-lg);
  padding: 56px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h3 { font-size: 26px; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }

/* Footer */
.site-footer { background: var(--c-navy); color: #b9cadb; padding: 60px 0 26px; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 16px; }
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid a { color: #b9cadb; opacity: .85; }
.footer-grid a:hover { opacity: 1; color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 26px; width: auto; background: #fff; padding: 6px 10px; border-radius: 10px; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  font-size: 12px;
  color: #8fa2b4;
  line-height: 1.9;
}
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 20px; font-size: 12px; color: #7488a0;
}

/* Blog post article */
.article-hero { padding: 56px 0 20px; }
.article-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--c-muted); margin-bottom: 18px; flex-wrap: wrap; }
.article-meta .cat {
  background: var(--c-accent-light); color: var(--c-accent-dark);
  padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 12px;
}
.article-title { font-size: clamp(26px, 4vw, 40px); max-width: 780px; }
.article-lede { font-size: 17px; max-width: 720px; }
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.article-body h2 { font-size: 23px; margin-top: 2.2em; }
.article-body h3 { font-size: 18px; margin-top: 1.8em; }
.article-body p { font-size: 16px; color: var(--c-text); opacity: .92; }
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.3em; color: var(--c-text); }
.article-body li { margin-bottom: .5em; font-size: 15.5px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.callout {
  background: var(--c-primary-light);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 1.6em 0;
  font-size: 14.5px;
}
.callout strong { color: var(--c-primary-dark); }
.refs {
  margin-top: 2em;
  padding: 22px;
  background: #f4f8fa;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--c-muted);
}
.refs h4 { font-size: 13px; margin-bottom: 10px; color: var(--c-text); }
.refs li { margin-bottom: 6px; }
.article-cta {
  max-width: 760px;
  margin: 40px auto 0;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--c-primary); font-weight: 600; }

/* Blog index hero */
.blog-index-hero { padding: 60px 0 30px; text-align: center; }
.filter-row { display: flex; gap: 10px; justify-content: center; margin: 26px 0 10px; flex-wrap: wrap; }
.filter-chip {
  border: 1.5px solid var(--c-border);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
  cursor: pointer;
  background: #fff;
}
.filter-chip.active, .filter-chip:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-light); }

/* Lang visibility */
[data-en] { display: none; }
/* !important is required here because several data-en elements also carry an
   inline style="display:none" (used as a no-JS/no-CSS fallback so English
   text doesn't flash before the stylesheet loads). Inline styles always beat
   a stylesheet selector, so without !important the English toggle silently
   fails to show any text. */
html[lang="en"] [data-zh] { display: none !important; }
html[lang="en"] [data-en] { display: block !important; }
html[lang="en"] span[data-en],
html[lang="en"] b[data-en],
html[lang="en"] small[data-en] { display: inline !important; }
html[lang="en"] li[data-en] { display: list-item !important; }
html[lang="en"] .btn[data-en] { display: inline-flex !important; }
html[lang="en"] h1[data-en],
html[lang="en"] h2[data-en],
html[lang="en"] h3[data-en],
html[lang="en"] h4[data-en] { display: block !important; }
html[lang="en"] .lang-toggle #btn-zh { background: transparent; color: var(--c-muted); }
html[lang="en"] .lang-toggle #btn-en { background: var(--c-primary); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .feature-row, .feature-row.reverse .feature-visual { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-visual { order: 0; }
  .grid-3, .grid-4, .pain-grid, .process-grid, .badge-strip, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid-3, .grid-4, .pain-grid, .process-grid, .badge-strip, .blog-grid, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 34px 24px; flex-direction: column; text-align: center; }
  .hero { padding: 44px 0 24px; }
  .hero-stats { gap: 20px; }
}
