/* ============================================================
   工程应用软件服务平台 - 公共样式（万小智风格）
   深色专业风 + 蓝色科技感
   ============================================================ */

/* === CSS 变量 === */
:root {
  --primary-dark: #0A2540;
  --primary-mid: #5C7C9A;
  --accent: #0066FF;
  --accent-hover: #0052cc;
  --nav-hover: #5C7C9A;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1280px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微软雅黑', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === 容器 === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* === 导航栏 === */
.navbar {
  background: var(--primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .navbar-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .navbar-inner { padding: 0 2rem; } }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.navbar-brand:hover { opacity: 0.9; }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a {
  color: #d1d5db;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--nav-hover); color: #fff; }
.nav-links a.active { background: var(--accent); color: #fff; }

/* 汉堡菜单按钮 */
.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}
@media (min-width: 768px) { .nav-toggle { display: none; } }

/* 移动端菜单 */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.nav-links.open a { width: 100%; text-align: center; padding: 12px; }

/* === 页脚 === */
.site-footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .footer-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .footer-inner { padding: 0 2rem; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }

.footer-col h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-col p,
.footer-col a {
  color: #d1d5db;
  font-size: 0.875rem;
  text-decoration: none;
  display: block;
  line-height: 2;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

.footer-col .contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 2;
}
.footer-col .contact-item .icon { font-size: 1rem; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.8125rem;
  line-height: 2;
}
.footer-bottom a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: #fff; }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-lg { padding: 16px 32px; font-size: 1.0625rem; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-white {
  background: #fff;
  color: var(--primary-dark);
}
.btn-white:hover { background: #f1f5f9; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* === 卡片 === */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-body-lg { padding: 2rem; }

/* === Hero 区域 === */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.05);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.02);
}
.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) { .hero-content { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .hero-content { padding: 0 2rem; } }

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.5rem; } }

.hero p {
  font-size: 1.125rem;
  color: #d1d5db;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}
@media (min-width: 768px) { .hero p { font-size: 1.25rem; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* === 页面区块 === */
.section {
  padding: 4rem 0;
}
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === 网格 === */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* === 软件卡片 === */
.software-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.software-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.software-card .card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.software-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.software-card .status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.software-card .status.online { background: #d1fae5; color: #065f46; }
.software-card .status.coming { background: #fef3c7; color: #92400e; }
.software-card .status.planned { background: #e5e7eb; color: #6b7280; }
.software-card .features { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; flex: 1; }
.software-card .features li { margin-bottom: 4px; }
.software-card .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 规划中/即将上线卡片 */
.software-card.coming-soon { opacity: 0.7; }
.software-card.coming-soon:hover { opacity: 0.85; }

/* === 特性卡片 === */
.feature-card {
  text-align: center;
  padding: 2rem;
}
.feature-card .feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.feature-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; }

/* === 面包屑 === */
.breadcrumb {
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

/* === 页面头部 === */
.page-header {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-header p { color: #d1d5db; font-size: 1.0625rem; }

/* === 标准库 === */
.standard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
  justify-content: center;
}
.filter-tag {
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.filter-tag:hover, .filter-tag.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.standard-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: all 0.2s;
}
.standard-item:hover { box-shadow: var(--shadow-md); }
.standard-item .std-code { font-weight: 700; color: var(--primary-dark); font-size: 1rem; }
.standard-item .std-name { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.standard-item .std-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: var(--bg-alt);
  color: var(--text-muted);
  margin-top: 6px;
}

/* === 表单 === */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,102,255,0.15); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* === CTA 底部 === */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.75rem; }
.cta-section p { color: #d1d5db; font-size: 1.0625rem; margin-bottom: 1.5rem; }

/* === 工具类 === */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }

/* === 响应式 === */
@media (max-width: 767px) {
  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 1.75rem; }
  .section { padding: 2.5rem 0; }
  .section-title h2 { font-size: 1.5rem; }
}
