/* ==================== 沃顿在线 - 全局样式 ==================== */
:root {
  /* 品牌色 - 参考LOGO的深蓝/科技蓝 */
  --primary: #1B3A6B;
  --primary-light: #2E5A9E;
  --primary-lighter: #4A7BC8;
  --primary-dark: #0F2347;
  --accent: #C5A572;  /* 金色点缀 */
  --accent-light: #D9BE93;
  --link: #00B4D8;      /* 天青强调色（VI 副色）*/
  --bg: #FFFFFF;
  --bg-gray: #F5F7FA;
  --bg-dark: #0F2347;
  --text: #1A1A2E;
  --text-light: #5A5A72;
  --text-lighter: #8A8AA0;
  --border: #E5E8ED;
  --border-light: #F0F2F5;
  --success: #28A745;
  --danger: #DC3545;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  /* 跨操作系统字体栈：macOS → iOS → Windows → Android → Linux → 通用 */
  font-family:
    -apple-system, BlinkMacSystemFont,
    "PingFang SC",        /* macOS/iOS 中文 */
    "Microsoft YaHei",    /* Windows 中文 */
    "Noto Sans SC",       /* Android/Linux 中文 */
    "Source Han Sans SC", /* Adobe 中文 */
    "WenQuanYi Micro Hei",/* Linux 中文 */
    "Segoe UI", Roboto,   /* Windows/Android 英文 */
    "Helvetica Neue", Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS 安全区域 */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* 文字渲染优化 */
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  /* 防止 iOS 横屏字体缩放 */
  -webkit-text-size-adjust: 100%;
}
/* VI 国际化排版：所有 H1 / Hero H2 优先使用衬线字体 */
h1, .hero h1, .hero h2 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }

/* ==================== 布局 ==================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }
.bg-gray { background: var(--bg-gray); }
.bg-primary { background: var(--primary); color: #fff; }
.bg-dark { background: var(--bg-dark); color: #fff; }

/* ============================================================
   跨平台自适应样式（多端 / 多 OS / 多浏览器）
   ============================================================ */

/* 流体排版：clamp(最小, 首选, 最大) */
.hero h1 { font-size: clamp(28px, 5vw, 48px); }
.page-banner h1 { font-size: clamp(28px, 4vw, 42px); }
.section-title h2 { font-size: clamp(22px, 3vw, 32px); }
.cta-section h2 { font-size: clamp(24px, 3.5vw, 36px); }

/* 流体间距 */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.page-banner { padding: clamp(120px, 18vw, 200px) 0 clamp(40px, 6vw, 80px); }

/* 容器宽度自适应 */
.container {
  width: 100%;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}

/* iOS 安全区：底部导航 / 页脚 */
.site-footer {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.site-header {
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

/* 触摸设备优化：增大点击区域 */
@media (pointer: coarse) {
  .btn, .nav-item, .partner-item, .card, .case-card, .news-card {
    cursor: pointer;
    /* 增大触摸目标 */
    min-height: 44px;
  }
  .btn { padding: 12px 24px; }
  .nav-item { padding: 12px 16px; }
  /* 禁用 hover 效果（触屏设备不需要） */
  .card:hover, .news-card:hover, .case-card:hover, .service-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}

/* 精确指针设备（鼠标/触控板）：保留 hover 效果 */
@media (pointer: fine) {
  .btn { padding: 8px 20px; }
}

/* 不支持 hover 的设备：禁用所有 hover 样式 */
@media (hover: none) {
  *:hover {
    /* 不重置 transform/box-shadow，只在 touch 时跳过 hover 态 */
  }
  .partner-item:hover { transform: none; }
  .service-card:hover::before { width: 0; }
  .nav-item:hover { background: transparent; }
}

/* 高分辨率屏幕（Retina）优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .hero-visual svg { shape-rendering: geometricPrecision; }
  img { image-rendering: -webkit-optimize-contrast; }
}

/* 暗色模式偏好（不强制，仅优化） */
@media (prefers-color-scheme: dark) {
  /* 保持亮色主题，仅调整阴影对比度 */
  .card { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
}

/* 减少动画偏好：尊重用户选择 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-visual .ring-rotate { animation: none; }
  .hero-visual .wave-flow { animation: none; }
  .fade-in-up { opacity: 1; transform: none; }
}

/* 跨浏览器滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(10,31,68,0.2) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(10,31,68,0.2);
  border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(10,31,68,0.35);
}

/* Safari/WebKit 特定修复 */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari 100vh 修复 */
  .hero {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  /* iOS 输入框圆角和阴影修复 */
  input, textarea, select {
    -webkit-appearance: none;
    -webkit-border-radius: 6px;
  }
}

/* Firefox 特定 */
@supports (scrollbar-width: thin) {
  * { scrollbar-width: thin; }
}

/* 响应式网格：使用 minmax + auto-fit 替代固定列数 */
.services-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

/* 表格在小屏幕转卡片 */
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .case-grid { grid-template-columns: 1fr; }
}

/* 超鱼屏 / 大屏优化 */
@media (min-width: 1400px) {
  .container { max-width: 1280px; }
  .hero h1 { font-size: 52px; }
}

/* 中等屏幕（平板） */
@media (max-width: 1024px) and (min-width: 769px) {
  .services-grid, .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 移动端导航 */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-mobile-toggle { display: flex; }
  #nav-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    padding: 4px 8px;
  }
  .main-nav ul {
    flex-wrap: wrap;
  }
  .main-nav ul.nav-open li {
    margin: 0;
    padding: 8px 0;
    width: 100%;
  }
  .hero { min-height: 90vh; }
  .hero-visual { display: none; }
  .section-title h2 { font-size: 22px; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-item::after { display: none; }
  /* 合作伙伴移动端 2 列 */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partner-item {
    font-size: 13px;
    padding: 12px;
  }
  /* 新闻卡片堆叠 */
  .news-grid { grid-template-columns: 1fr; }
  /* 关于页双栏变单栏 */
  .about-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .hero h1 { font-size: 26px; }
  .hero .hero-desc { font-size: 14px; }
  .hero-buttons { flex-direction: column; gap: 8px; }
  .hero-buttons .btn { width: 100%; }
  .partners-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* 横屏模式 */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: auto; padding: 60px 0; }
  .page-banner { padding: 80px 0 40px; }
}

/* 打印样式 */
@media print {
  .site-header, .scroll-indicator, .hero-visual, .cta-section,
  .nav-mobile-toggle, .gold-rule, [class*="festival"] {
    display: none !important;
  }
  body { color: #000; background: #fff; font-size: 12pt; }
  .hero, .page-banner { color: #000; background: #fff; padding: 20px 0; }
  .section { padding: 20px 0; }
  a { text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  .card, .news-card, .case-card { box-shadow: none; border: 1px solid #ccc; }
}

/* VI 国际化装饰：金色细流线 */
.gold-rule {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--link) 50%,
    var(--accent) 80%,
    transparent 100%);
  opacity: 0.35;
  margin: 0 auto;
  max-width: var(--max-width);
}

.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.section-title .subtitle {
  font-size: 15px;
  color: var(--text-lighter);
  text-transform: uppercase;
  letter-spacing: 3px;
}
.section-title .desc {
  font-size: 16px;
  color: var(--text-light);
  max-width: 640px;
  margin: 12px auto 0;
}
.section-title .divider {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--link) 100%);
  margin: 18px auto 0;
  position: relative;
}
.section-title .divider::before,
.section-title .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
}
.section-title .divider::before { left: -10px; background: var(--accent); }
.section-title .divider::after  { right: -10px; background: var(--link); }
.section-title .subtitle {
  font-family: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: var(--link);
  font-weight: 600;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.section-title h2 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}

/* ==================== 头部 ==================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -1px;
}
.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}
.logo-text .en {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-lighter);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: var(--transition);
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--bg-gray);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27,58,107,0.3);
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-light);
  color: #fff;
}
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ==================== 卡片 ==================== */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-lighter);
}

/* ==================== 页面 Banner ==================== */
.page-banner {
  padding: calc(var(--header-h) + 80px) 0 80px;
  background:
    radial-gradient(ellipse at top right, rgba(0,180,216,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(197,165,114,0.18) 0%, transparent 55%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath d='M0 100 Q 100 60 200 100 T 400 100' stroke='%23C5A572' stroke-width='0.8' fill='none' opacity='0.18'/%3E%3Cpath d='M0 130 Q 100 90 200 130 T 400 130' stroke='%2300B4D8' stroke-width='0.8' fill='none' opacity='0.14'/%3E%3Cpath d='M0 70 Q 100 30 200 70 T 400 70' stroke='%23ffffff' stroke-width='0.5' fill='none' opacity='0.10'/%3E%3C/svg%3E");
  background-size: 400px 200px;
  pointer-events: none;
}
.page-banner::after {
  content: '';
  position: absolute;
  right: 8%;
  top: 50%;
  width: 220px; height: 220px;
  transform: translateY(-50%);
  border: 1px solid rgba(197,165,114,0.35);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M20 100 Q 60 60 100 100 T 180 100' stroke='%23C5A572' stroke-width='1' fill='none' opacity='0.5'/%3E%3Cpath d='M20 130 Q 60 90 100 130 T 180 130' stroke='%2300B4D8' stroke-width='0.8' fill='none' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.7;
  pointer-events: none;
}
.page-banner h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  letter-spacing: 1px;
}
.page-banner .breadcrumb {
  font-size: 14px;
  opacity: 0.8;
  position: relative;
  letter-spacing: 1px;
}
.page-banner .breadcrumb a:hover { text-decoration: underline; }
.page-banner .banner-desc {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 16px;
  opacity: 0.9;
  position: relative;
  line-height: 1.8;
}
.page-banner .banner-en {
  display: inline-block;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  position: relative;
  padding: 6px 18px;
  border: 1px solid rgba(197,165,114,0.4);
  border-radius: 999px;
}
.page-banner .container { position: relative; z-index: 1; }
@media (max-width: 768px) {
  .page-banner::after { display: none; }
}

/* ==================== 网格 ==================== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== Footer ==================== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 24px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.site-footer h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  max-width: 320px;
}

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================== 响应式 ==================== */
@media (max-width: 968px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: flex; }
  .section { padding: 56px 0; }
  .section-title h2 { font-size: 28px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-banner h1 { font-size: 30px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .site-footer .footer-bottom { flex-direction: column; gap: 12px; }
  .container { padding: 0 16px; }
}
