/* ============================================================
   中英双语切换 —— 通用样式
   品牌色：#182ca7（蓝） / #ff8500（橙）
   ============================================================ */

/* ---------- 切换按钮 ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: #f1f3f7;
  border: 1px solid rgba(24, 44, 167, 0.10);
}
.lang-switch button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border-radius: 999px;
  color: #5a6677;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch button:hover { color: #182ca7; }
.lang-switch button.is-active {
  background: #182ca7;
  color: #ffffff;
}
.lang-switch button:focus-visible {
  outline: 2px solid #ff8500;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .lang-switch { margin-left: auto; margin-right: 8px; }
  .lang-switch button { padding: 5px 10px; font-size: 0.72rem; }
}

/* ---------- 防闪烁：英文模式先隐藏，脚本替换完再显示 ---------- */
html[data-sy-lang="en"] body { visibility: hidden; }
html[data-sy-lang="en"].sy-i18n-ready body { visibility: visible; }

/* ---------- 英文版排版补偿（英文普遍比中文长 30%~60%） ---------- */
html[data-sy-lang="en"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1.65;
}
html[data-sy-lang="en"] .hero h1,
html[data-sy-lang="en"] .page-hero h1 {
  font-size: clamp(1.85rem, 3.9vw, 3.05rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}
html[data-sy-lang="en"] .hero-desc { max-width: 580px; font-size: 1.02rem; }
html[data-sy-lang="en"] .hero-actions .btn-hero {
  padding: 0.9rem 1.5rem;
  font-size: 0.875rem;
}
html[data-sy-lang="en"] .nav-links { gap: 1.2rem; }
html[data-sy-lang="en"] .nav-links a { font-size: 0.8rem; white-space: nowrap; }
html[data-sy-lang="en"] .nav-btn { white-space: nowrap; padding: 0.5rem 1rem; }
html[data-sy-lang="en"] .header__nav { gap: 1.1rem; }
html[data-sy-lang="en"] .header__nav a { font-size: 0.8rem; white-space: nowrap; }
html[data-sy-lang="en"] .hero-grid { grid-template-columns: 1.3fr 1fr; }
html[data-sy-lang="en"] .hero h1 {
  font-size: clamp(1.8rem, 3.3vw, 2.6rem);
  line-height: 1.18;
}
html[data-sy-lang="en"] .hero h1 .accent { white-space: nowrap; }
html[data-sy-lang="en"] .section-text { max-width: 780px; }
html[data-sy-lang="en"] .btn-hero { white-space: normal; text-align: center; }

/* 关于我们 —— 企业文化卡片：中文单行不换行，英文较长恢复换行 */
html[data-sy-lang="en"] .culture-card__desc { white-space: normal; }
html[data-sy-lang="en"] .culture-card { padding: 2.5rem 1.25rem; }

/* 服务对象小字 / 实践页副标题 / 公司全称：中文单行，英文较长恢复换行 */
html[data-sy-lang="en"] .target-item p { white-space: normal; }
html[data-sy-lang="en"] .practice-hero p { white-space: normal; }
html[data-sy-lang="en"] .contact-info__nowrap { white-space: normal; }
