/* porsche-web 设计系统 — tokens 来自原站实测 */
:root {
  --gold: #BD8E62;
  --blue: #046bd2;
  --yellow: #FCBF02;
  --ink: #1C1C1C;
  --slate: #334155;
  --light: #F5F5F5;
  --light2: #FAFAFA;
  --black: #000000;
  --near-black: #111111;
  --white: #FFFFFF;
  --radius: 8px;
  --font: 'Poppins', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/poppins-600.woff2') format('woff2'); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--slate); background: var(--white); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 600; color: var(--ink); line-height: 1.25; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 区块交替底色 */
.section { padding: 88px 0; }
.section-dark { padding: 88px 0; background: var(--black); color: #cbd5e1; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-light { padding: 88px 0; background: var(--white); }
.section-gray { padding: 88px 0; background: var(--light2); }

.h1 { font-size: 40px; font-weight: 600; }
.h2 { font-size: 32px; font-weight: 600; margin-bottom: 16px; }
.muted { color: #94a3b8; }
.center { text-align: center; }

/* 按钮 */
.btn { display: inline-block; background: var(--gold); color: var(--ink); font-weight: 600;
  font-size: 16px; padding: 12px 24px; border-radius: var(--radius); border: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline { display: inline-block; border: 2px solid var(--gold); color: var(--gold);
  font-weight: 600; padding: 10px 22px; border-radius: var(--radius); background: transparent; cursor: pointer; }
.btn-outline:hover { background: var(--gold); color: var(--ink); text-decoration: none; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { filter: brightness(1.05); }

/* 头部 */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0,0,0,.92); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { color: #fff; font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; margin-left: auto; }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: 24px; }
.nav-links a { color: #fff; font-size: 15px; }
.nav-links a:hover { color: var(--gold); text-decoration: none; }
/* 语言切换：两枚胶囊等宽（以「繁中」宽度 46px 为基准），高度比原 31px 缩 20% → 25px */
.lang-switch { --pill-w: 46px; --pill-h: 25px; display: flex; gap: 8px; align-items: center; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center;
  width: var(--pill-w); height: var(--pill-h); padding: 0; font-size: 13px; line-height: 1;
  color: #94a3b8; border: 1px solid #334155; border-radius: 999px; }
.lang-switch a.active { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.lang-switch a:hover { text-decoration: none; }
.nav-toggle { display: none; flex: none; margin-right: 10px; background: none; border: 1px solid #334155;
  color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 18px; cursor: pointer; }
.nav-toggle[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }

/* Hero */
.hero { background: linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)), radial-gradient(1200px 600px at 70% 20%, #1e293b, #000); color: #fff; padding: 140px 0 120px; }
.hero h1 { color: #fff; font-size: 40px; font-weight: 600; line-height: 1.4; margin-bottom: 16px; }
.hero .sub { font-size: 20px; color: #e2e8f0; max-width: 640px; margin-bottom: 32px; }

/* 信任条 */
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.trust-bar .t { font-size: 20px; font-weight: 600; color: var(--gold); }

/* 卡片网格 */
.location-cards, .why-cards, .services-grid, .reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid #e2e8f0; border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.section-dark .card { background: var(--near-black); border-color: #1f2937; }
.section-dark .card h3 { color: #fff; }

.stars { color: var(--yellow); letter-spacing: 2px; }
.news-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.news-list a { font-size: 18px; font-weight: 500; }

/* FAQ（原生 details） */
.faq details { border-bottom: 1px solid #e2e8f0; padding: 18px 0; }
.section-dark .faq details { border-color: #1f2937; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.section-dark .faq summary { color: #fff; }
.faq summary::after { content: '+'; font-size: 20px; color: var(--gold); }
.faq details[open] summary::after { content: '−'; }
.faq p { padding-top: 12px; }

/* CTA */
.cta-section { background: var(--gold); color: var(--ink); text-align: center; }
.cta-section h2 { color: var(--ink); }

/* 表单 */
.form-grid { display: grid; gap: 16px; max-width: 560px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1;
  border-radius: var(--radius); font: inherit; background: #fff; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); border-color: transparent; }
.hp-field { display: none; }  /* honeypot */

/* 页脚 */
.footer { background: var(--black); color: #94a3b8; padding: 64px 0 32px; }
.footer a { color: #e2e8f0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-bottom: 40px; }
.footer h4 { color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #1f2937; padding-top: 24px; font-size: 14px; }

/* 错误页 */
.error-body { background: var(--black); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-box { text-align: center; color: #fff; }
.error-box h1 { color: var(--gold); font-size: 72px; }

/* 响应式 */
@media (max-width: 900px) {
  .h1, .hero h1 { font-size: 30px; }
  .h2 { font-size: 26px; }
  .section, .section-dark, .section-light, .section-gray { padding: 56px 0; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; text-align: left;
    background: var(--near-black); padding: 16px 24px; gap: 12px;
    border-bottom: 1px solid #1f2937; box-shadow: 0 14px 28px rgba(0,0,0,.45); }
  /* 展开后菜单项左对齐，与容器 24px 内边距成一条线 */
  .nav-links li { width: 100%; }
  .nav-links li a { display: block; text-align: left; }
  /* 菜单展开时压暗页面，避免菜单与黑色 hero 文字视觉粘连 */
  body.nav-open-body::before { content: ""; position: fixed; inset: 64px 0 0 0;
    background: rgba(0,0,0,.72); z-index: 40; }
  .nav-open .nav-links { display: flex; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  /* 汉堡在品牌左侧，语言切换靠右常驻（尺寸两枚胶囊统一，无需再覆盖） */
  .nav-right { margin-left: auto; gap: 8px; }
}

/* ===== 24 小時在線諮詢回覆窗 ===== */
.consult { position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.consult-fab { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--ink);
  border: none; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.consult-fab:hover { filter: brightness(1.06); }
.consult-fab-icon { width: 20px; height: 20px; flex: none; }
.consult-fab-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.22); }
.consult-panel { display: none; width: min(368px, calc(100vw - 40px)); height: min(540px, calc(100dvh - 150px));
  flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.consult.open .consult-panel { display: flex; }
.consult-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--near-black); color: #fff; }
.consult-head strong { font-size: 15px; }
.consult-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: #a3e635; }
.consult-dot { width: 7px; height: 7px; border-radius: 50%; background: #a3e635; flex: none; }
.consult-head-actions { display: flex; align-items: center; gap: 10px; }
.consult-wa { display: inline-flex; align-items: center; background: #25D366; color: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.consult-wa:hover { text-decoration: none; filter: brightness(1.06); }
.consult-close { background: none; border: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; }
.consult-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; background: #f8fafc; -webkit-overflow-scrolling: touch; }
.consult-msg { max-width: 86%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; }
.consult-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; color: var(--ink); }
.consult-msg.me { align-self: flex-end; background: var(--gold); border-bottom-right-radius: 4px; color: var(--ink); }
.consult-msg.typing { color: #64748b; font-style: italic; border-style: dashed; }
.consult-wa-msg { align-self: flex-start; display: inline-flex; align-items: center; background: #25D366; color: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; text-decoration: none; }
.consult-wa-msg:hover { text-decoration: none; filter: brightness(1.06); }
.consult-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; background: #f8fafc; }
.consult-chips[hidden] { display: none; }
.consult-chips button { background: #fff; border: 1px solid #cbd5e1; border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: 13px; color: var(--slate); cursor: pointer; }
.consult-chips button:hover { border-color: var(--gold); color: var(--ink); }
.consult-form { display: flex; gap: 8px; padding: 12px 14px 6px; background: #f8fafc; }
.consult-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px;
  font: inherit; font-size: 15px; background: #fff; }
.consult-form input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.consult-form button { flex: none; background: var(--ink); color: #fff; border: none; border-radius: 10px;
  padding: 0 16px; font: inherit; font-weight: 600; cursor: pointer; }
.consult-note { padding: 0 14px 12px; background: #f8fafc; font-size: 11.5px; color: #94a3b8; }

@media (max-width: 900px) {
  .consult { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .consult-fab { padding: 11px 16px; font-size: 14px; }
  /* 手机端：底部抽屉式，占屏 78%，避免遮住整个页面 */
  .consult-panel { position: fixed; left: 0; right: 0; bottom: 0; width: 100%;
    height: min(78dvh, 660px); border-radius: 16px 16px 0 0; }
  .consult.open .consult-fab { display: none; }
  body.consult-open { overflow: hidden; }
}
