/* LifeTourChina — shared stylesheet
   Brand: warm, livable palette (warm orange + soft green + cream).
   Follows TourChina cross-site card-grid + nav conventions. */

:root {
  --primary: #E0742F;        /* warm orange */
  --primary-light: #F2A468;
  --primary-dark: #B85A1E;
  --accent: #4E8C6B;         /* soft green */
  --accent-light: #7FB29A;
  --gold: #D8A24A;
  --bg: #FCF7F0;             /* cream */
  --surface: #FFFFFF;
  --surface-2: #F6EDE2;
  --text: #2B2724;
  --muted: #6E665E;
  --border: #ECE2D4;
  --shadow: 0 10px 30px rgba(120, 80, 40, 0.10);
  --radius: 16px;
  --maxw: 1140px;
  --nav-h: 64px;
}

* { 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(--text);
  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; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.bg-white { background: var(--surface); }
.bg-cream { background: var(--surface-2); }
.bg-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  color: #fff;
}
.text-center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: none;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.nav-brand { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: .2px; }
.nav-brand span { color: var(--primary); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { background: var(--primary); color: #fff !important; padding: 8px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--primary-dark); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; background: linear-gradient(135deg, #FBE9D6 0%, #EAF3EC 100%); }
.hero h1 { max-width: 760px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-badges { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: 14px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.trust-bar .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; padding: 18px 20px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item .ti-ico { font-size: 22px; }
.trust-item .ti-txt b { display: block; font-size: 15px; }
.trust-item .ti-txt small { color: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font-size: 30px; color: var(--primary); }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Cards grid (cross-site standard) ---------- */
.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)); }
.cards-grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(120,80,40,.16); }
.card .c-ico { font-size: 30px; }
.card h3 { margin: 0; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .c-link { margin-top: auto; font-weight: 600; }
.card .tag {
  align-self: flex-start; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--accent); font-weight: 600;
}

/* city card */
.city-card { position: relative; overflow: hidden; }
.city-card .city-flag { font-size: 34px; }
.city-card .rent-range { font-size: 14px; color: var(--muted); }
.city-card .rent-range b { color: var(--text); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .faq-ico { transition: transform .2s ease; color: var(--primary); }
.faq-item.open .faq-ico { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 20px 18px; color: var(--muted); }
.faq-item.open .faq-a { 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-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.contact-card .cc-ico { font-size: 26px; }
.contact-card b { display: block; margin: 6px 0 2px; }
.contact-card a { font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.consent input { margin-top: 4px; }

/* ---------- Banner (article/guide header) ---------- */
.page-banner { background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%); color: #fff; padding: 56px 0 44px; }
.breadcrumb { font-size: 14px; opacity: .9; margin-bottom: 8px; }
.breadcrumb a { color: #fff; opacity: .9; }
.breadcrumb a:hover { opacity: 1; }
.page-banner p { max-width: 680px; opacity: .95; }

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.article-main { min-width: 0; }
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 16px); }
.sidebar-cta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sidebar-cta h3 { margin-top: 0; }
.article-body h2 { margin-top: 1.6em; }
.article-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--surface-2); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0 0 18px; }
.kv dt { font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; }
.note { background: #FFF6E6; border: 1px solid #F3DCA0; border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #7a5a16; }

/* ---------- Footer ---------- */
.footer { background: #2B2724; color: #E9E2D8; padding: 48px 0 28px; margin-top: 0; }
.footer a { color: #F2A468; }
.footer .f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer .f-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px; font-size: 13px; color: #b9b0a4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #2B2724; color: #fff; padding: 14px 22px; border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 100; font-size: 15px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--accent); }
.toast.err { background: #c0492f; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--border); padding: 8px 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links li { padding: 4px 20px; }
  .nav-cta { margin: 8px 20px; text-align: center; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .footer .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer .f-grid { grid-template-columns: 1fr; }
}
