/* ============================================
   AquireX 通用基础模板样式 v3.0
   制造业/企服行业独立模板 + 现代化 Grid/Flexbox
   向后兼容 v2.x，所有行业共用 base
   ============================================ */

/* CSS Variables */
:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --secondary: #374151;
  --secondary-light: #e5e7eb;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-white: #ffffff;
  --bg: #ffffff;
  --bg-gray: #f3f4f6;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
  --max-width: 1200px;
  --header-height: 72px;
  --transition: all 0.3s ease;
  --hero-gradient: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 40%, #f3f4f6 100%);
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 32px;
  --gap-xl: 48px;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --font-2xl: 2rem;
  --font-3xl: 2.5rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text); line-height: 1.6; background: var(--bg);
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* Container + Utilities */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg-gray); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: var(--font-2xl); color: var(--text); margin-bottom: 8px; }
.section-title p { color: var(--text-light); font-size: var(--font-md); }
.section-label { display: inline-block; font-size: var(--font-sm); color: var(--primary); background: var(--primary-light); padding: 4px 14px; border-radius: 20px; margin-bottom: 8px; font-weight: 600; }
.subtitle-line { width: 48px; height: 3px; background: var(--primary); margin: 12px auto 0; border-radius: 2px; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); z-index: 1000; display: flex; align-items: center;
}
.header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { color: var(--secondary); font-size: 0.95rem; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav-cta { display: inline-block; padding: 8px 20px; background: var(--primary); color: var(--text-white) !important; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-phone { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* ===== Hero (shared base) ===== */
.hero { margin-top: var(--header-height); padding: 80px 0; background: var(--hero-gradient); text-align: center; position: relative; overflow: hidden; }
.hero h1 { font-size: var(--font-3xl); font-weight: 800; color: var(--text); margin-bottom: 16px; }
.hero p { font-size: var(--font-lg); color: var(--text-light); max-width: 700px; margin: 0 auto 24px; }
.hero-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hero-tag { display: inline-block; padding: 4px 14px; background: rgba(255,255,255,0.7); border-radius: 20px; font-size: var(--font-sm); color: var(--secondary); }

/* ===== Hero — 制造业 ===== */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-xl); align-items: center; text-align: left; }
.hero-content h1 { text-align: left; }
.hero-content p { margin: 0 0 24px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-size: var(--font-sm); font-weight: 600; margin-bottom: 16px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-stats-stack { display: flex; flex-direction: column; gap: 16px; }
.hero-stat-card { background: white; padding: 24px 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); text-align: center; }
.hero-stat-num { display: block; font-size: var(--font-3xl); font-weight: 800; color: var(--primary); }
.hero-stat-label { display: block; font-size: var(--font-sm); color: var(--text-light); margin-top: 4px; }

/* CTA Buttons */
.cta-btn { display: inline-block; padding: 12px 32px; background: white; color: var(--primary); border-radius: var(--radius); font-weight: 600; font-size: var(--font-md); transition: var(--transition); border: none; cursor: pointer; text-decoration: none; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cta-primary { background: var(--primary); color: white !important; }
.cta-primary:hover { background: var(--primary-dark); }
.cta-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary) !important; }
.cta-outline:hover { background: var(--primary); color: white !important; }

/* ===== Product Grid（制造业） ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap-lg); }
.product-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform 0.3s ease, box-shadow 0.3s ease; display: block; color: var(--text); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.product-card-img { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; }
.product-card-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.9); padding: 4px 12px; border-radius: 20px; font-size: var(--font-sm); color: var(--primary); }
.product-card-body { padding: 20px; }
.product-card-body h3 { font-size: var(--font-lg); margin-bottom: 8px; }
.product-card-body p { color: var(--text-light); font-size: var(--font-sm); line-height: 1.6; }
.product-card-link { display: inline-block; margin-top: 12px; color: var(--primary); font-weight: 600; font-size: var(--font-sm); }

/* ===== Service Grid（企服） ===== */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--gap-lg); }
.service-card { background: white; border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-card); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.service-card h3 { font-size: var(--font-lg); margin: 16px 0 8px; }
.service-card p { color: var(--text-light); font-size: var(--font-sm); line-height: 1.6; }

/* ===== Capability Grid（制造业生产能力） ===== */
.capability-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap-lg); }
.capability-card { display: flex; gap: 16px; background: white; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow-card); transition: transform 0.3s ease; }
.capability-card:hover { transform: translateY(-2px); }
.capability-icon { flex-shrink: 0; width: 56px; height: 56px; background: var(--primary-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.capability-card h3 { font-size: var(--font-md); margin-bottom: 4px; }
.capability-card p { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Cert Grid（资质认证） ===== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-md); }
.cert-card { display: flex; gap: 16px; align-items: flex-start; background: white; padding: 20px 24px; border-radius: var(--radius); box-shadow: var(--shadow-card); border-left: 3px solid var(--primary); }
.cert-card h4 { font-size: var(--font-md); margin-bottom: 2px; }
.cert-card p { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Feature Grid（优势） ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap-lg); }
.feature-card { background: white; padding: 32px; border-radius: var(--radius-lg); text-align: center; box-shadow: var(--shadow-card); transition: transform 0.3s ease; }
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; }
.feature-card h3 { font-size: var(--font-lg); margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: var(--font-sm); line-height: 1.6; }

/* ===== Article Grid ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap-lg); }
.article-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform 0.3s ease, box-shadow 0.3s ease; display: block; color: var(--text); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.article-card-img { height: 160px; display: flex; align-items: center; justify-content: center; }
.article-card-body { padding: 20px; }
.article-card-tag { display: inline-block; font-size: var(--font-sm); color: var(--primary); background: var(--primary-light); padding: 2px 10px; border-radius: 12px; margin-bottom: 8px; }
.article-card-body h3 { font-size: var(--font-md); margin-bottom: 8px; }
.article-card-body p { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Case Grid ===== */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap-lg); }
.case-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform 0.3s ease; }
.case-card:hover { transform: translateY(-4px); }
.case-card-img { height: 200px; display: flex; align-items: center; justify-content: center; }
.case-card-body { padding: 20px; }
.case-card-body h3 { font-size: var(--font-md); margin-bottom: 8px; }
.case-card-body p { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Process Timeline（企服） ===== */
.process-timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 40px; }
.process-timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: var(--primary-light); }
.process-step { display: flex; gap: 24px; padding: 16px 0; position: relative; }
.process-step-num { flex-shrink: 0; width: 36px; height: 36px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--font-sm); position: absolute; left: -40px; }
.process-step h3 { font-size: var(--font-md); margin-bottom: 4px; }
.process-step p { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Testimonial Grid（企服） ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--gap-lg); }
.testimonial-card { background: white; padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); border-left: 4px solid var(--primary-light); }
.testimonial-quote { margin-bottom: 16px; }
.testimonial-quote p { color: var(--text); font-style: italic; line-height: 1.7; }
.testimonial-author strong { display: block; color: var(--text); }
.testimonial-author span { color: var(--text-light); font-size: var(--font-sm); }

/* ===== Related Pages（SEO Graph 内链） ===== */
.related-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.related-link { display: inline-block; padding: 10px 20px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-card); font-weight: 500; color: var(--primary); transition: var(--transition); }
.related-link:hover { background: var(--primary); color: white; transform: translateY(-2px); }

/* ===== CTA Form Inline（留资表单） ===== */
.cta-form-inline { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 600px; margin: 24px auto 0; }
.cta-input { flex: 1; min-width: 180px; padding: 12px 16px; border: 2px solid rgba(255,255,255,0.3); border-radius: var(--radius); font-size: var(--font-md); background: rgba(255,255,255,0.15); color: white; outline: none; transition: border-color 0.2s; }
.cta-input::placeholder { color: rgba(255,255,255,0.6); }
.cta-input:focus { border-color: white; }
.mfg-cta { border-left: 4px solid var(--accent); }

/* ===== CTA Banner ===== */
.cta-banner { background: var(--primary); color: white; text-align: center; padding: 64px 40px; border-radius: var(--radius-lg); }
.cta-banner h2 { font-size: var(--font-2xl); margin-bottom: 12px; }
.cta-banner p { opacity: 0.9; margin-bottom: 24px; font-size: var(--font-md); }

/* ===== Content + Sidebar ===== */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: var(--gap-xl); }
.sidebar-widget { background: var(--bg-gray); padding: 20px; border-radius: var(--radius); margin-bottom: 20px; }
.sidebar-widget h4 { margin-bottom: 12px; }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gap-lg); margin-bottom: 32px; }
.footer h4 { color: white; font-size: var(--font-md); margin-bottom: 16px; }
.footer p, .footer a { color: rgba(255,255,255,0.6); font-size: var(--font-sm); line-height: 1.8; display: block; }
.footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: var(--font-sm); }

/* ===== Floating CTA ===== */
.float-cta { position: fixed; bottom: 24px; right: 24px; z-index: 999; }
.float-btn { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--primary); color: white; border-radius: 50%; font-size: 1.5rem; box-shadow: var(--shadow-lg); transition: transform 0.3s ease; }
.float-btn:hover { transform: scale(1.1); }

/* ===== Mobile Call Bar ===== */
.mobile-call-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--primary); color: white; padding: 12px 20px; z-index: 998; text-align: center; }
.mobile-call-bar a { color: white; font-weight: 600; }

/* Legacy Grid helpers (backward compat with v2 templates) */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }

/* ===== Animations ===== */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== data-section hidden ===== */
[data-section="hidden"] { display: none; }

/* ===== Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: white; flex-direction: column; padding: 20px; gap: 16px; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-phone { display: none; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: var(--font-2xl); }
  .hero p { font-size: var(--font-md); }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content h1 { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
  .section { padding: 48px 0; }
  .section-title { margin-bottom: 32px; }
  .section-title h2 { font-size: var(--font-xl); }
  .product-grid, .service-grid, .article-grid, .case-grid, .feature-grid, .capability-grid, .cert-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .cta-form-inline { flex-direction: column; }
  .cta-input { min-width: auto; }
  .cta-banner { padding: 40px 20px; border-radius: 0; margin: 0; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .mobile-call-bar { display: block; }
}
