/* ============================================================
   MedTourChina — Platform Site Stylesheet
   Conventions (from medtourchina-i18n-site skill):
   - Single nav structure (.nav > .nav-inner)
   - .cards-grid merged selector (auto-fill minmax)
   - Central contact constants
   - .mt-disclaimer bar (injected by i18n_build later)
   - [dir="rtl"] mirror overrides
   ============================================================ */

:root {
  --primary: #1577c4;
  --primary-light: #2f9bd6;
  --primary-dark: #0f5a96;
  --accent: #14b8a6;
  --gold: #c2922f;
  --ink: #1a2733;
  --muted: #5b6b7a;
  --line: #e3e9ef;
  --bg: #ffffff;
  --bg-soft: #f4f8fb;
  --bg-tint: #eaf3fa;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(16, 53, 90, 0.08);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: 0; transition: .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--bg-tint); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 18px;
}
.nav-brand { font-weight: 800; font-size: 1.18rem; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.nav-brand .logo-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
  color: #fff; padding: 70px 0 80px;
}
.hero h1 { color: #fff; font-size: 2.5rem; max-width: 760px; }
.hero p.lead { font-size: 1.15rem; opacity: .92; max-width: 640px; }
.hero .cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Trust bar ---------- */
.trust {
  background: var(--primary-dark); color: #fff; padding: 14px 0;
}
.trust .container { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; font-size: .92rem; }
.trust b { color: #fff; }
.trust span { opacity: .85; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.bg-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); }

/* ---------- Cards grid (merged selector) ---------- */
.cards-grid, .cards-grid-2, .cards-grid-3, .cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.cards-grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cards-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary-light); }
.card .emoji { font-size: 1.9rem; }
.card h3 { margin: 10px 0 6px; }
.card .meta { color: var(--muted); font-size: .9rem; }
.card .tag {
  display: inline-block; background: var(--bg-tint); color: var(--primary-dark);
  border-radius: 999px; padding: 3px 11px; font-size: .78rem; margin: 3px 4px 3px 0; font-weight: 600;
}
.card .grow { flex: 1; }
.card .card-foot { margin-top: 14px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 20px; text-align: center; }
.stat .num { font-size: 2.4rem; font-weight: 800; color: var(--primary); }
.stat .lbl { color: var(--muted); font-size: .95rem; }

/* ---------- City / specialty chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .9rem; font-weight: 500; color: var(--ink); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip .cnt { display: inline-block; margin-left: 6px; font-size: .76rem; font-weight: 700; color: var(--primary); opacity: .8; }
.city-h { font-size: 1.25rem; margin: 34px 0 16px; display: flex; align-items: center; gap: 10px; }
.city-h:first-of-type { margin-top: 8px; }
.city-n { background: var(--bg-tint); color: var(--primary-dark); border-radius: 999px; font-size: .8rem; padding: 2px 10px; font-weight: 700; }

/* ---------- Breadcrumb / banner ---------- */
.page-banner { background: var(--bg-tint); padding: 34px 0; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Doctor profile header ---------- */
.doc-head { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; }
.doc-name { margin: 0; font-size: 1.9rem; }
.doc-title { color: var(--muted); font-size: 1.02rem; margin-top: 4px; }

/* ---------- Detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 900px) { .detail-grid.two { grid-template-columns: 1.6fr 1fr; } }
.fact-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.fact-box .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dotted var(--line); font-size: .92rem; }
.fact-box .row:last-child { border-bottom: 0; }
.fact-box .row span:first-child { color: var(--muted); }
.contact-card { background: var(--primary-dark); color: #fff; border-radius: var(--radius); padding: 22px; }
.contact-card a { color: #fff; font-weight: 600; }
.contact-card .line { margin: 6px 0; }

/* ---------- Initials avatar (replaces emoji placeholder) ---------- */
.avatar-letter {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.2rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.avatar-letter.sm { width: 46px; height: 46px; font-size: 1.2rem; }
.avatar-letter.lg { width: 84px; height: 84px; font-size: 2.1rem; box-shadow: var(--shadow); }
.avatar-letter.xl { width: 110px; height: 110px; font-size: 2.8rem; box-shadow: var(--shadow); border: 3px solid #fff; }

/* ---------- Doctor / dept rows ---------- */
.list-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row h4 { margin: 0; }
.list-row .sub { color: var(--muted); font-size: .88rem; }
.key-badge { background: var(--gold); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }

/* ---------- Search / filter ---------- */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.filter-bar input, .filter-bar select {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; min-width: 200px;
}
.filter-bar input { flex: 1; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; font-family: inherit;
}
.form-note { font-size: .85rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: #0e2233; color: #cdd9e3; padding: 44px 0 30px; margin-top: 40px; }
.footer a { color: #cdd9e3; }
.footer a:hover { color: #fff; }
.footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 28px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer .fine { border-top: 1px solid #1d3346; margin-top: 26px; padding-top: 18px; font-size: .82rem; color: #8295a5; }

/* ---------- Disclaimer (injected by i18n_build) ---------- */
.mt-disclaimer { background: #fff7e6; border-bottom: 1px solid #f0d9a8; color: #7a5b16; font-size: .82rem; padding: 8px 0; text-align: center; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; opacity: 0; transition: .3s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; }

/* ---------- Language switcher ---------- */
.lang-switcher { display: flex; gap: 8px; align-items: center; margin-left: 18px; flex-wrap: wrap; }
.lang-switcher a { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 3px 7px; border-radius: 6px; border: 1px solid transparent; }
.lang-switcher a:hover { color: var(--primary); border-color: var(--line); }
.lang-switcher a.active { color: #fff; background: var(--primary); }

/* ---------- RTL mirror ---------- */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .trust .container, [dir="rtl"] .chips { direction: rtl; }
[dir="rtl"] .detail-grid.two { direction: rtl; }
[dir="rtl"] .fact-box .row, [dir="rtl"] .list-row, [dir="rtl"] .doc-head, [dir="rtl"] .filter-bar { direction: rtl; }
[dir="rtl"] .footer .cols { direction: rtl; }
[dir="rtl"] .breadcrumb, [dir="rtl"] .city-h { direction: rtl; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    flex-direction: column; gap: 0; padding: 8px 20px 16px; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .hero h1 { font-size: 1.9rem; }
}
