/* Panda Patient Navigator — Global Styles */
:root {
  --ink: #0d1b2a;
  --navy: #0b3c5d;
  --navy-900: #072a42;
  --teal: #157d7f;
  --teal-600: #0e5c6b;
  --teal-400: #20b2b4;
  --bamboo: #2e7d5b;
  --gold: #d9a441;
  --gold-200: #f5deb3;
  --paper: #ffffff;
  --mist: #f4f7f9;
  --cloud: #e9eef2;
  --slate: #5d6c7d;
  --stone: #8a96a3;
  --line: #d9e0e6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(11, 60, 93, .08);
  --shadow-card: 0 14px 44px rgba(11, 60, 93, .12);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --maxw: 1260px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container { width: min(92%, var(--maxw)); margin-inline: auto; }
.section { padding: 80px 0; }
.section-light { background: var(--mist); }
.section-dark {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy) 100%);
  color: var(--paper);
}
.section-dark a { color: var(--gold-200); }

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: .6rem;
}
.section-lead {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 720px;
  margin-bottom: 2.5rem;
}
.section-dark .section-lead { color: rgba(255,255,255,.75); }

.text-center { text-align: center; }
.text-center .section-lead { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
  white-space: nowrap; flex-shrink: 0;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--teal); color: #fff; border-color: var(--teal);
  box-shadow: 0 6px 20px rgba(21,125,127,.35);
}
.btn-primary:hover { background: var(--teal-600); color: #fff; }
.btn-secondary {
  background: transparent; color: var(--navy); border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); background: rgba(11,60,93,.04); }
.btn-ghost {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25);
}
.btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.logo:hover { color: var(--ink); }

.nav-main { display: flex; align-items: center; gap: .2rem; }
.nav-main a {
  padding: .45rem .6rem; font-size: .85rem; font-weight: 500; color: var(--slate); border-radius: 8px;
}
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--navy); background: var(--mist); }
.nav-cta { margin-left: .5rem; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--slate); margin-left: .8rem;
  white-space: nowrap;
  min-width: max-content;
  height: 34px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.lang-toggle .globe { width: 16px; height: 16px; flex-shrink: 0; }
.lang-toggle span { white-space: nowrap; }

.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

@media (min-width: 1041px) and (max-width: 1280px) {
  .nav-main a { padding: .4rem .5rem; font-size: .8rem; }
  .btn { padding: .75rem 1.2rem; font-size: .9rem; }
  .lang-toggle { padding: .3rem .55rem; font-size: .75rem; height: 30px; }
}

@media (max-width: 1040px) {
  .nav-main { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 1rem; gap: .4rem; }
  .nav-main.open { display: flex; }
  .nav-main a { padding: .8rem 1rem; font-size: 1rem; }
  .nav-cta { margin: .5rem 0 0; white-space: nowrap; }
  .lang-toggle { margin-left: 0; margin-top: .5rem; }
  .mobile-menu-btn { display: block; }
}

/* Hero */
.hero {
  position: relative; min-height: calc(100vh - var(--header-h)); max-height: 900px;
  display: flex; align-items: center; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,27,42,.92) 0%, rgba(13,27,42,.55) 55%, rgba(13,27,42,.15) 100%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; color: #fff; padding: 6vh 0; }
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.03em;
  max-width: 780px; margin-bottom: 1.2rem;
}
.hero p.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem); color: rgba(255,255,255,.85);
  max-width: 640px; margin-bottom: 2.2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-trust {
  display: flex; gap: 2rem; flex-wrap: wrap; color: rgba(255,255,255,.7); font-size: .9rem;
}
.hero-trust li { display: flex; align-items: center; gap: .5rem; }
.hero-trust svg { color: var(--gold); width: 18px; height: 18px; }

/* Cards */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s;
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.card-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--mist);
  display: grid; place-items: center; margin-bottom: 1.1rem; color: var(--teal);
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.card p { color: var(--slate); font-size: .97rem; }
.card .cta { margin-top: auto; padding-top: 1.2rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.card .cta svg { width: 16px; height: 16px; }

.card-image { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16/10; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card-image img { transform: scale(1.04); }
.card-body { padding: 1.4rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card-body p { font-size: .93rem; color: var(--slate); }

/* Stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 2rem; box-shadow: var(--shadow); margin-top: -3.5rem; position: relative; z-index: 3;
}
.stats-strip .num { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stats-strip .label { font-size: .85rem; color: var(--slate); }
@media (max-width: 760px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }

/* Section with image side */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/3; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-content h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.split-content p { color: var(--slate); margin-bottom: 1rem; }
.split-list { margin-top: 1.2rem; }
.split-list li {
  display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line);
  color: var(--slate); font-size: .97rem;
}
.split-list li:last-child { border-bottom: none; }
.split-list svg { color: var(--bamboo); width: 22px; height: 22px; flex-shrink: 0; margin-top: .15rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 2.2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -2rem; top: .15rem; width: 22px; height: 22px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--teal); z-index: 2;
}
.timeline-content h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.timeline-content p { color: var(--slate); font-size: .95rem; }

/* FAQ */
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin-bottom: .8rem; padding: 1.1rem 1.3rem;
}
.faq summary {
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  font-weight: 600; font-size: 1.05rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.4rem; color: var(--teal); font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-top: .8rem; color: var(--slate); font-size: .96rem; }
.faq details p + p { margin-top: .5rem; }

/* Condition list */
.condition-group { margin-bottom: 2rem; }
.condition-group h3 {
  font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--teal);
  margin-bottom: .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--line);
}
.condition-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .7rem;
}
.condition-item {
  display: flex; align-items: baseline; gap: .6rem; padding: .6rem .8rem; background: var(--mist); border-radius: 8px;
  font-size: .95rem;
}
.condition-item .en { font-weight: 600; color: var(--ink); }
.condition-item .zh { color: var(--slate); font-size: .9rem; }

/* Disclaimer */
.disclaimer {
  background: #fff9ed; border-left: 4px solid var(--gold); padding: 1rem 1.3rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #5c4b1f; font-size: .95rem; margin: 1.5rem 0;
}
.disclaimer strong { color: #3d3112; }

/* Tables */
.simple-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.simple-table th, .simple-table td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.simple-table th { background: var(--mist); color: var(--navy); font-weight: 700; font-size: .9rem; }
.simple-table td { color: var(--slate); font-size: .95rem; }
.simple-table tr:last-child td { border-bottom: none; }

/* Forms */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
input, textarea, select {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .97rem; color: var(--ink); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,125,127,.12); }
.form-note {
  margin-top: .9rem; padding: .85rem 1.1rem; border-radius: 10px;
  background: #fff9ed; border-left: 4px solid var(--gold); color: #5c4b1f; font-size: .92rem;
}

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 60px 0 30px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.footer-brand .logo { color: #fff; margin-bottom: 1rem; }
.footer-brand p { max-width: 300px; line-height: 1.7; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: .95rem; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: rgba(255,255,255,.7); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: rgba(255,255,255,.5); font-size: .85rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utilities */
.badge {
  display: inline-block; padding: .25rem .7rem; border-radius: 999px;
  background: var(--mist); color: var(--teal); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.breadcrumb { display: flex; gap: .5rem; flex-wrap: wrap; color: var(--stone); font-size: .85rem; margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--navy); }

/* Language switch with CSS-only fallback */
html[lang="en"] [data-i18n="zh"] { display: none; }
html[lang="zh-Hans"] [data-i18n="en"] { display: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
