/*
 * 智育创新主站共享样式
 * 基准：index.html。各页面保留自身内容布局，公共视觉规则统一从这里加载。
 */
:root {
  --primary: #0052d9;
  --primary-hover: #003caf;
  --primary-light: #e8f3ff;
  --secondary: #6f5dd6;
  --gradient: linear-gradient(135deg, #0052d9 0%, #6f5dd6 100%);
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #888888;
  --border: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* 历史页面变量别名，统一映射到 index 的设计令牌。 */
  --fg: var(--text-primary);
  --fg-dim: var(--text-secondary);
  --fg-mute: var(--text-tertiary);
  --line: var(--border);
  --line-soft: rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
a { color: var(--primary); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--primary-hover); }
a:focus-visible { outline: 3px solid rgba(0, 82, 217, 0.24); outline-offset: 4px; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 全站导航：与 index.html 一致。 */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  white-space: nowrap;
}
.logo:hover { color: var(--text-primary); }
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
}
.logo-dot { display: none; }
.nav-links { display: flex; gap: 32px; font-size: 15px; }
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-links .nav-cta {
  padding: 10px 24px;
  background: var(--primary);
  color: white !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 页头、标题与面包屑。 */
.page-header {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #f5f7fa 0%, #ffffff 100%);
  text-align: center;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { color: var(--primary); margin: 0; }
.page-header h1, h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.page-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.7;
}
.product-icon-lg { margin-left: auto; margin-right: auto; }
.sec-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.sec-kicker::before { display: none; }

/* 内容区节奏与 index 的 section 规则统一。 */
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--border); background: var(--bg); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
h2.section-title, section h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc, .sec-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
}
.section-desc { margin: 0 auto 40px; }
.sec-desc { max-width: 760px; margin: 0 0 40px; }

/* 所有内容卡共用 index 产品卡的边框、悬浮和顶部渐变线。 */
.product-card,
.product-detail,
.challenge-item,
.solution-item,
.metric-card,
.tech-stack-section,
.stack-item,
.value-item,
.contact-card,
.service-item,
.process-step,
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.product-card::before,
.product-detail::before,
.challenge-item::before,
.solution-item::before,
.metric-card::before,
.tech-stack-section::before,
.stack-item::before,
.value-item::before,
.contact-card::before,
.service-item::before,
.process-step::before,
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: auto;
  height: 4px;
  background: var(--gradient);
  border-radius: 0;
  box-shadow: none;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s;
}
.product-card:hover,
.product-detail:hover,
.challenge-item:hover,
.solution-item:hover,
.metric-card:hover,
.tech-stack-section:hover,
.stack-item:hover,
.value-item:hover,
.contact-card:hover,
.service-item:hover,
.process-step:hover,
.project-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card:hover::before,
.product-detail:hover::before,
.challenge-item:hover::before,
.solution-item:hover::before,
.metric-card:hover::before,
.tech-stack-section:hover::before,
.stack-item:hover::before,
.value-item:hover::before,
.contact-card:hover::before,
.service-item:hover::before,
.process-step:hover::before,
.project-card:hover::before { transform: scaleX(1); }

/* 标签、数据与链接。 */
.product-tag,
.entry-count {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.tag {
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.chip,
.summary-chip {
  padding: 4px 10px;
  background: var(--bg-soft);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.metric-card .v,
.metric .v,
.process-step .step-num {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product-link,
.view-detail,
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

/* 按钮与底部行动区。 */
.btn-primary,
.btn-secondary,
.cta-btn {
  display: inline-block;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary {
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}
.btn-secondary {
  padding: 14px 32px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-size: 16px;
}
.btn-secondary:hover { background: var(--primary-light); transform: translateY(-2px); }
.cta-section {
  padding: 80px 0;
  background: var(--gradient);
  border-radius: 0;
  margin: 0;
  text-align: center;
  color: white;
  box-shadow: none;
}
.cta-section h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
  color: white;
}
.cta-section p {
  font-size: 17px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
  color: white;
}
.cta-btn {
  padding: 16px 40px;
  background: white;
  color: var(--primary);
  font-size: 16px;
  box-shadow: var(--shadow-lg);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  color: var(--primary);
}

footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 80px; }
  .page-header { padding: 60px 0 44px; }
  section { padding: 60px 0; }
  .section-desc, .sec-desc { margin-bottom: 32px; }
  .cta-section { padding: 60px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
