/* ============================================================
   模板 1 样式 —— 仿竞品单页企业站（B2B 工业风，蓝色主题）
   配套模板：src/templates/user/1.njk
   ============================================================ */

:root {
  --primary: #1456b8;
  --primary-dark: #0e3f8a;
  --accent: #f5a623;
  --text: #1f2937;
  --text-soft: #5b6675;
  --bg-soft: #f4f7fb;
  --border: #e5e9f0;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
  --container: 1200px;
}

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

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); /* 回退：不支持 color-mix 的旧浏览器用中性阴影 */
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); /* 辉光跟随 accent 色板 */
}
.btn-light {
  background: #fff;
  color: var(--primary);
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 66px;
  gap: 24px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.nav {
  flex: 1;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  /* 栏目多（8+）时仍可横向滑动，但隐藏滚动条视觉 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
/* 栏目超 8 个时自动收紧间距与字号，尽量一行放下 */
.nav:has(a:nth-child(8)) { gap: 14px; }
.nav:has(a:nth-child(8)) a { font-size: 14px; }
.nav a {
  font-size: 15px;
  color: var(--text-soft);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--primary); border-color: var(--primary); }
.header-tel {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------------- 首屏 Hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 90px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.hero-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.hero-subtitle {
  font-size: 19px;
  opacity: 0.92;
  max-width: 760px;
  margin: 0 auto 26px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 34px;
}
.hero-tags .tag {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 14px;
}
.hero-cta { position: relative; z-index: 1; }

/* ---------------- 首屏轮播（有 banner 时：文案卡 + 图卡） ---------------- */
.hero-has-carousel {
  padding: 0;
  /* 初始按 banner 比例（1600:853≈53.3%）占位：用 vw 仅影响高度，不会像 aspect-ratio 那样反推宽度导致横向滚动；JS fit() 会按真实图片比例设 inline height 覆盖 */
  min-height: max(360px, 53.3vw);
}
.hero-has-carousel::after { display: none; } /* 隐藏纯色 hero 的装饰圆 */
.hero-has-carousel .hero-inner {
  position: relative;
  z-index: 2;
  padding: 40px 20px;
}
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.is-active { opacity: 1; }
/* 文案卡片：内容居中（背景用 section 的蓝色渐变） */
.hero-slide-text {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* 高度拉满封顶时，超出部分上下/两边对称居中裁切 */
}
.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-carousel-arrow:hover { background: rgba(255, 255, 255, 0.34); }
.hero-carousel-arrow.prev { left: 20px; }
.hero-carousel-arrow.next { right: 20px; }
.hero-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-carousel-dot.is-active { background: #fff; transform: scale(1.25); }

/* ---------------- 通用版块 ---------------- */
.section { padding: 70px 0; }
.section:nth-child(even) { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-subtitle {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 16px;
}

/* 段落型 */
.prose {
  max-width: 860px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--text-soft);
  text-align: justify;
}
/* about 末尾的站群本地化 + 联系方式：与正文拉开间距，浅分隔线区分 */
.about-local {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 15px;
}

/* AI 生成的企业名片图（品牌/标语/电话已烧进图内，纯展示） */
.biz-card {
  margin: 24px auto 0;
  max-width: 720px;
}
.biz-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 关于我们：图文两栏（左文右名片图） */
.about-layout {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 440px);
  gap: 48px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}
.about-layout .prose {
  max-width: none;
  margin: 0;
}
.about-layout .about-local {
  margin-top: 20px;
  padding-top: 18px;
}
.about-layout .biz-card {
  margin: 0;
  max-width: none;
}
@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* 指标型 stats */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.stat-item {
  flex: 1 1 200px;
  max-width: 260px;
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-value {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 15px;
}

/* 卡片型 advantages / pain / cases */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14); }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.card-desc { font-size: 15px; color: var(--text-soft); }

/* 产品型 products：flex 居中，卡片限宽——满行铺满、末行不足时同宽居中，不被拉伸变形 */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.product-card {
  flex: 1 1 240px;
  max-width: 300px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-name {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

/* 问答型 faq */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.faq-q { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.faq-a { font-size: 15px; color: var(--text-soft); }

/* 流程型 process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.process-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.step-no {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step-desc { font-size: 14px; color: var(--text-soft); }

/* ---------------- 联系 CTA 带 ---------------- */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 50px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  text-align: center;
}
.cta-text { font-size: 22px; font-weight: 700; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  background: var(--footer-bg, #16202e);
  color: #9aa7b8;
  text-align: center;
  padding: 40px 0;
}
.footer-name { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-desc { font-size: 14px; max-width: 700px; margin: 0 auto 16px; }
.footer-copy { font-size: 13px; opacity: 0.7; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 768px) {
  .nav { display: none; }
  .hero { padding: 60px 0 70px; }
  .hero-has-carousel { padding: 0; }
  .hero-has-carousel .hero-inner { padding: 64px 20px 72px; }
  .hero-carousel-arrow { width: 36px; height: 36px; font-size: 22px; }
  .hero-carousel-arrow.prev { left: 10px; }
  .hero-carousel-arrow.next { right: 10px; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 26px; }
  .cta-text { font-size: 18px; }
}
