/* ============================================================
   Xuanlangge Health — Medical Tourism to Beijing
   Style sheet (single-page site)
   Palette: calm medical teal + neutral grays
   ============================================================ */

:root {
  --teal-900: #0f3d3a;
  --teal-700: #0f766e;
  --teal-600: #14938a;
  --teal-500: #14b8a6;
  --teal-50:  #ecfdf9;
  --ink:      #1f2937;
  --ink-soft: #4b5563;
  --line:     #e5e7eb;
  --bg:       #ffffff;
  --bg-soft:  #f8fafc;
  --warn:     #b45309;
  --warn-bg:  #fffbeb;
  --maxw:     1120px;
  --radius:   14px;
  --shadow:   0 6px 24px rgba(15,61,58,.08);
  --shadow-sm:0 2px 8px rgba(15,61,58,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--teal-900); font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-bottom: .4em; }
h3 { font-size: 1.25rem; margin-bottom: .35em; }
p  { color: var(--ink-soft); }

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

.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section h2 { text-align: center; }
.section .lead { text-align: center; max-width: 720px; margin: 0 auto 40px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  min-height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 8px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--teal-900); font-size: 15px; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
}
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft); letter-spacing: .5px; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  padding: 7px 8px; border-radius: 8px; color: var(--ink); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.nav-links a:hover { background: var(--teal-50); text-decoration: none; }
.nav-cta {
  background: var(--teal-700); color: #fff !important; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-600); }

.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--teal-900); }

/* ---------- Language switch (bilingual EN / 中, and multilingual) ---------- */
.lang-switch { display: flex; border: 1px solid var(--teal-700); border-radius: 999px; overflow: hidden; margin-left: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.lang-switch button { background: #fff; border: 0; color: var(--teal-700); padding: 6px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lang-switch button.active { background: var(--teal-700); color: #fff; }
.lang-switch a { background: #fff; color: var(--teal-700); padding: 6px 9px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lang-switch a.active { background: var(--teal-700); color: #fff; }
.lang-switch a:hover { background: var(--teal-50); text-decoration: none; }
.lang-switch a.active:hover { background: var(--teal-700); }
.nav-links a.active { color: var(--teal-700); font-weight: 700; background: var(--teal-50); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: .15s; text-align: center;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-600); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--teal-700); border-color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-50); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--teal-900), var(--teal-700));
  color: #fff; padding: 86px 0 96px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(20,184,166,.35), transparent 70%); border-radius: 50%;
}
.hero h1 { color: #fff; font-size: 2.7rem; max-width: 820px; white-space: nowrap; }
.hero .sub { font-size: 1.15rem; color: #d6f3ee; max-width: 680px; margin: 18px 0 30px; }
.hero .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .hero-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .hero-cta .btn-ghost:hover { background: rgba(255,255,255,.12); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.pillar {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 22px;
}
.pillar .ico { font-size: 26px; }
.pillar h3 { color: #fff; margin: 10px 0 6px; }
.pillar p { color: #cdeee8; font-size: 14.5px; }

/* ---------- Generic cards / grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { color: var(--teal-800, #115e59); }
.card .tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .4px;
  color: var(--teal-700); background: var(--teal-50); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.card ul { margin: 10px 0 0 18px; }
.card ul li { margin: 4px 0; color: var(--ink-soft); }

/* tier badges */
.tier {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; margin-left: 8px;
}
.tier-1 { background: #e0f2fe; color: #0369a1; }
.tier-2 { background: #f1f5f9; color: #475569; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
thead th { background: var(--teal-700); color: #fff; text-align: left; padding: 14px 16px; font-size: 14px; }
tbody td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; font-size: 14.5px; }
tbody tr:nth-child(even) { background: var(--bg-soft); }
.price { font-weight: 800; color: var(--teal-700); white-space: nowrap; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 14px; }
.step {
  display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--teal-700); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; font-size: 14.5px; }

/* ---------- Callout / warning ---------- */
.note {
  background: var(--warn-bg); border: 1px solid #fde68a; border-left: 4px solid var(--warn);
  border-radius: 10px; padding: 16px 18px; color: #92400e; font-size: 14.5px; margin: 18px 0;
}
.note strong { color: #78350f; }

.info {
  background: var(--teal-50); border: 1px solid #99f6e4; border-left: 4px solid var(--teal-600);
  border-radius: 10px; padding: 16px 18px; font-size: 14.5px; margin: 18px 0;
}

/* ---------- Accordion (articles) ---------- */
details.article {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
details.article summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--teal-900);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.article summary::-webkit-details-marker { display: none; }
details.article summary .chev { transition: .2s; color: var(--teal-600); }
details.article[open] summary .chev { transform: rotate(45deg); }
details.article .body { padding: 0 22px 20px; color: var(--ink-soft); }
details.article .body p { margin: 8px 0; }

/* ---------- Image placeholder ---------- */
.img-ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #99f6e4);
  border: 1px dashed var(--teal-500);
  display: grid; place-items: center; min-height: 180px; color: var(--teal-900); font-weight: 600;
}
.img-ph::after { content: attr(data-label); padding: 12px; text-align: center; font-size: 13px; opacity: .85; }
.img-ph.tall { min-height: 320px; }

/* split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split-photo { width: 100%; border-radius: var(--radius); object-fit: cover; min-height: 320px; max-height: 480px; box-shadow: var(--shadow-sm); display: block; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal-500); border-color: transparent; }
.contact-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 24px; }
.contact-cards .card { text-align: center; }
.contact-cards .card .ico { font-size: 24px; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0; margin-bottom: 12px; background: #fff; }
.faq details summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--teal-900); }
.faq details summary::-webkit-details-marker { display: none; }
.faq details p { padding: 0 20px 16px; margin: 0; }
.faq-group { margin: 34px 0 12px; font-size: 1.15rem; color: var(--teal-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #cdeee8; padding: 48px 0 28px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 15px; }
.site-footer a { color: #9be7dc; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer p { color: #a7d8d0; font-size: 14px; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; font-size: 12.5px; color: #8fc7bf; }

/* ---------- Hospital Grid (Beijing Top Hospitals) ---------- */
.hospital-section { margin-top: 54px; }
.hospital-section h2 { color: #fff; text-align: center; font-size: 1.5rem; margin-bottom: 8px; }
.hospital-section .lead { text-align: center; color: #d6f3ee; font-size: 14px; margin-bottom: 28px; }
.hospital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.hospital-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: .2s;
}
.hospital-card:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.hospital-card .logo-ph {
  width: 56px; height: 56px; margin: 0 auto 10px;
  background: rgba(255,255,255,.15); border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600;
}
.hospital-card h4 { color: #fff; font-size: 14px; margin-bottom: 4px; }
.hospital-card p { color: #cdeee8; font-size: 12.5px; }
.hospital-card .hospital-logo {
  height: 46px; width: auto; max-width: 100%; object-fit: contain;
  margin: 0 auto 10px; display: block;
}
.hospital-card.summary {
  grid-column: 1 / -1; text-align: left; background: rgba(255,255,255,.12);
}
.hospital-card.summary h4 { text-align: left; }
.hospital-card.summary p { text-align: left; font-size: 13px; }
.eco-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 10px; }
.eco-stats span { font-size: 13px; color: #e6fffb; }
.eco-stats strong { font-size: 21px; color: #fff; margin-right: 5px; font-weight: 800; }
.eco-eg { font-size: 12.5px !important; color: #bfe9e2 !important; line-height: 1.6; }

/* ---------- TCM Specialty page ---------- */
.tcm-profile {
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 36px;
}
.tcm-profile .avatar {
  width: 160px; height: 160px; border-radius: 16px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700; text-align: center;
}
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.case-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
.case-card .img-ph { border-radius: 0; border: 0; min-height: 180px; }
.case-card .cap { padding: 12px 14px; font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 900px) { .tcm-profile { grid-template-columns: 1fr; } .tcm-profile .avatar { width: 100%; height: 120px; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none; padding: 8px 12px 16px; max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 15px; }
  .nav-links .lang-switch { margin: 6px 0; justify-content: center; }
  .nav-toggle { display: block; }
  .pillars, .grid-3, .grid-2, .split, .form-grid, .contact-cards, .site-footer .cols { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 64px; }
  .hero h1 { font-size: 2.1rem; white-space: normal; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 52px 0; }
  .hospital-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .case-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .split { gap: 24px; }
  .brand small { display: none; }
  /* allow grid/flex children to shrink so wide tables scroll inside their wrapper instead of breaking the page */
  .split > *, .grid > *, .grid-3 > *, .grid-2 > *, .form-grid > *, .pillars > *, .contact-cards > * { min-width: 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 52px; }
  .hero h1 { font-size: 1.7rem; }
  .hero .sub { font-size: 1rem; margin: 14px 0 24px; }
  .hero .hero-cta { flex-direction: column; }
  .hero .hero-cta .btn { width: 100%; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; }
  .section { padding: 40px 0; }
  .card, .step, details.article { padding: 18px; }
  .pillars { gap: 12px; }
  .pillar { padding: 18px; }
  .hospital-section h2 { font-size: 1.3rem; }
  .hospital-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hospital-card { padding: 14px; }
  .case-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .contact-cards { gap: 12px; }
  .form-grid { gap: 12px; }
  .steps { gap: 10px; }
  .step { padding: 16px; gap: 12px; }
  .step::before { flex: 0 0 32px; width: 32px; height: 32px; }
  .brand small { display: none; }
  .btn { font-size: 14px; padding: 12px 20px; }
  .table-wrap { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  table { min-width: 440px; font-size: 13px; }
  thead th, tbody td { padding: 10px 11px; }
  .price { font-size: 13px; }
  .site-footer { padding: 36px 0 20px; }
}
