/* ═══ BusDog 官网共享样式 ═══
   设计 Token 对齐主项目 src/core/theme.py，保证品牌一致 */

:root {
  --primary: #4a6fa5;
  --primary-dark: #3b5a8b;
  --primary-bg: #dbe4f0;
  --primary-border: #b0c0dd;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #374151;
  --text-strong: #111827;
  --text-muted: #9ca3af;
  --text-sub: #6b7280;
  --success: #16a34a;
  --info: #2563eb;
  --warning: #d97706;
  --danger: #dc2626;
  --teal: #0f766e;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .05);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── 顶栏（三页共享） ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--text-strong);
  text-decoration: none;
}
.brand img { height: 30px; }
.brand .ver { color: var(--primary); font-size: 13px; font-weight: 500; }
.main-nav { margin-left: auto; display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-size: 14.5px;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--primary-bg); color: var(--primary-dark); }
.main-nav a[aria-current="page"] {
  background: var(--primary-bg); color: var(--primary-dark); font-weight: 600;
}
.nav-toggle {
  display: none; margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
  font-size: 17px; line-height: 1; color: var(--text-strong);
}

/* ── 通用区块 ── */
.section { padding: 52px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-size: 26px; color: var(--text-strong);
  position: relative; display: inline-block; padding-bottom: 12px;
}
.section-head h2::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 48px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-bg));
}
.section-head p { color: var(--text-sub); margin-top: 10px; font-size: 14.5px; }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 26px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(74, 111, 165, .35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--primary-bg); }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { border-color: var(--primary-border); color: var(--primary-dark); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-bg); }
.btn-disabled { background: var(--surface-alt); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.btn-disabled:hover { transform: none; }

/* ── Hero 横幅 ── */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; text-align: center; padding: 84px 20px 92px;
}
.hero-compact { padding: 54px 20px 58px; }

/* ── 产品图集轮播（仅首页） ── */
.gallery {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.gallery-stage {
  position: relative; aspect-ratio: 3 / 2; background: #fff;
}
.gallery-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; transition: opacity .9s ease;
}
.gallery-slide.is-active { opacity: 1; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(17, 24, 39, .18);
  background: rgba(17, 24, 39, .38); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  transition: background .15s;
}
.gallery-arrow:hover { background: rgba(17, 24, 39, .62); }
.gallery-arrow.prev { left: 16px; }
.gallery-arrow.next { right: 16px; }
.gallery-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 18px; border-top: 1px solid var(--border); background: var(--surface);
}
.gallery-caption {
  font-size: 13.5px; color: var(--text-sub); letter-spacing: .5px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gallery-dots { display: inline-flex; gap: 9px; flex-shrink: 0; }
.gallery-dots button {
  width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%;
  background: var(--border-strong); cursor: pointer;
  transition: background .15s, transform .15s;
}
.gallery-dots button.active { background: var(--primary); transform: scale(1.3); }
.hero .logo {
  height: 92px; width: 92px; padding: 14px;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
}
.hero h1 { font-size: 38px; margin: 20px 0 4px; letter-spacing: 1px; }
.hero .ver { font-size: 17px; font-weight: 500; opacity: .85; vertical-align: middle; }
.hero .hero-sub { max-width: 660px; margin: 12px auto 30px; font-size: 16px; opacity: .92; }
.hero .hero-contact { margin: -18px auto 0; font-size: 14px; opacity: .95; }
.hero .hero-contact a { color: #fff; font-weight: 600; }
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── SVG 图标着色（mask 方式，源图标为 currentColor 线性风格） ── */
.icon-mask {
  display: inline-block; background: var(--primary);
  -webkit-mask: var(--icon) no-repeat center / contain;
          mask: var(--icon) no-repeat center / contain;
}
.feature-icon { width: 30px; height: 30px; }
.dl-icon { width: 44px; height: 44px; }

/* ── 特性卡片 ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-border); }
.feature-card h3 { font-size: 16.5px; color: var(--text-strong); margin: 14px 0 8px; }
.feature-card p { font-size: 14px; color: var(--text-sub); }

/* ── 截图预览 ── */
.shots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shot-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.shot-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.shot-card img {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  object-fit: cover; object-position: top center;
  border-bottom: 1px solid var(--border);
}
.shot-card figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--text-sub); text-align: center; }

/* ── CTA 横幅 ── */
.cta-band {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; text-align: center; padding: 48px 20px;
}
.cta-band h2 { font-size: 22px; margin-bottom: 8px; }
.cta-band p { opacity: .9; margin-bottom: 22px; font-size: 14.5px; }
.cta-band .cta-contact { margin: 20px 0 0; font-size: 14.5px; }
.cta-band .cta-contact a { color: #fff; font-weight: 600; }

/* ── 下载页卡片 ── */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.dl-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 26px 26px; text-align: center;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.dl-card.featured { border: 2px solid var(--primary); }
.dl-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: 12px; padding: 2px 14px; border-radius: 999px; white-space: nowrap;
}
.dl-card h3 { font-size: 18px; color: var(--text-strong); }
.dl-card .dl-ver { color: var(--primary); font-size: 14px; font-weight: 600; }
.dl-card .dl-meta { font-size: 13px; color: var(--text-sub); }
.dl-card .dl-note { font-size: 12.5px; color: var(--text-muted); }
.dl-card .dl-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* ── 数据表格（下载页更新日志等） ── */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
  border: none; border-bottom: 1px solid var(--border);
  padding: 12px 18px; text-align: left; vertical-align: top;
}
.data-table th {
  background: var(--surface-alt); font-weight: 700;
  color: var(--text-strong); border-bottom: 2px solid var(--border-strong);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) td { background: var(--surface-alt); }
.data-table tbody tr:hover td { background: var(--primary-bg); }
.data-table code {
  background: #eef2f7; padding: 1px 6px; border-radius: 4px;
  font-size: 13px; color: var(--primary-dark);
}

/* ── 步骤列表（编号圆点） ── */
ol.steps { counter-reset: step; list-style: none; margin: 12px 0; }
ol.steps li { counter-increment: step; position: relative; padding-left: 44px; margin: 12px 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 13.5px; font-weight: 700; line-height: 28px; text-align: center;
  box-shadow: 0 2px 6px rgba(74, 111, 165, .35);
}

/* ── 提示框（左侧粗边条） ── */
.tip, .warn {
  border-radius: 8px; padding: 12px 16px 12px 18px; margin: 14px 0; font-size: 14px;
  border: 1px solid; border-left-width: 4px; border-left-style: solid;
}
.tip { background: #ecfdf5; border-color: #a7f3d0; border-left-color: var(--success); }
.tip::before { content: "提示："; font-weight: 700; color: var(--success); }
.warn { background: #fffbeb; border-color: #fde68a; border-left-color: var(--warning); }
.warn::before { content: "注意："; font-weight: 700; color: var(--warning); }

/* ── 键盘按键 ── */
kbd {
  display: inline-block; padding: 1px 7px; font-size: 12.5px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 5px; background: var(--surface-alt); font-family: inherit;
}

/* ── 页脚（三页共享） ── */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: 13px;
}
.site-footer .footer-nav { display: flex; gap: 18px; justify-content: center; margin-bottom: 8px; }
.site-footer .footer-nav a { color: var(--text-sub); text-decoration: none; }
.site-footer .footer-nav a:hover { color: var(--primary); }
.site-footer .motto { margin: 6px 0 4px; color: var(--text-sub); letter-spacing: 2px; }
.site-footer .contact { margin: 0 0 4px; }
.site-footer .contact a { color: var(--primary); text-decoration: none; }
.site-footer .contact a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .features-grid, .shots-grid, .dl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 10px 20px; gap: 4px; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .features-grid, .shots-grid, .dl-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .gallery-arrow { width: 36px; height: 36px; font-size: 19px; }
  .gallery-arrow.prev { left: 10px; }
  .gallery-arrow.next { right: 10px; }
  .section { padding: 40px 0; }
}

/* 用户偏好减少动态效果时，关闭轮播过渡 */
@media (prefers-reduced-motion: reduce) {
  .gallery-slide { transition: none; }
  .gallery-dots button, .gallery-arrow { transition: none; }
}
