/* ============================================================
   XX科技有限公司 官方网站 全站样式表（全站唯一 CSS 文件）
   版式蓝本：传统企业官网（蓝白配色 / 宋体标题 / 1200px 居中）
   维护说明：
   1. 全站仅此一个样式文件，请勿另建 CSS；
   2. 主题色请统一修改 :root 中的 CSS 变量；
   3. 移动端断点为 768px（导航折叠为汉堡菜单）。
   ============================================================ */

/* ---------------- CSS 变量 ---------------- */
:root {
  --primary: #0f5bab;        /* 主题蓝 */
  --primary-dark: #0a4482;   /* 深蓝 */
  --primary-deep: #083768;   /* 页脚深蓝 */
  --primary-light: #e8f1fa;  /* 浅蓝底 */
  --accent: #f5a623;         /* 点缀橙 */
  --text-main: #333333;
  --text-sub: #666666;
  --text-light: #999999;
  --border-color: #e5e5e5;
  --bg-gray: #f5f7fa;
  --font-serif: "SimSun", "宋体", serif;                     /* 标题：宋体 */
  --font-body: "Microsoft YaHei", "微软雅黑", "SimSun", serif; /* 正文：雅黑为主 */
}

/* ---------------- 基础重置 ---------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.8;
  background: #ffffff;
}
img { max-width: 100%; display: block; border: 0; }
a { color: var(--text-main); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: bold; }

/* ---------------- 通用布局 ---------------- */
.container { width: 100%; max-width: 1230px; margin: 0 auto; padding: 0 15px; }
.section { padding: 56px 0; }
.section-gray { background: var(--bg-gray); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 30px; color: var(--primary-dark); line-height: 1.5; }
.section-header .section-sub { font-size: 13px; color: var(--text-light); letter-spacing: 3px; text-transform: uppercase; }
.section-header .section-line { width: 42px; height: 3px; background: var(--primary); margin: 14px auto 0; }
.section-header.align-left { text-align: left; margin-bottom: 24px; }
.section-header.align-left .section-line { margin: 14px 0 0; }

.btn { display: inline-block; background: var(--primary); color: #ffffff; padding: 12px 36px; font-size: 14px; border: 0; transition: background 0.2s, color 0.2s; }
.btn:hover { background: var(--primary-dark); color: #ffffff; }
.btn-ghost { display: inline-block; padding: 10px 28px; border: 1px solid var(--primary); color: var(--primary); margin-right: 12px; font-size: 14px; transition: all 0.2s; }
.btn-ghost:hover { background: var(--primary); color: #ffffff; }

.view-more { text-align: center; margin-top: 36px; }
.view-more a { display: inline-block; padding: 10px 42px; border: 1px solid var(--primary); color: var(--primary); font-size: 14px; transition: all 0.2s; }
.view-more a:hover { background: var(--primary); color: #ffffff; }

/* ---------------- 页头 ---------------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: #ffffff; }
.top-bar { background: var(--primary-deep); color: rgba(255, 255, 255, 0.85); font-size: 12px; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.header-main { position: relative; background: #ffffff; box-shadow: 0 2px 8px rgba(8, 55, 104, 0.08); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 84px; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 52px; height: 52px; background: var(--primary); color: #ffffff;
  font-family: var(--font-serif); font-size: 24px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-family: var(--font-serif); font-size: 26px; color: var(--primary-dark); line-height: 1.2; }
.logo-text small { display: block; font-family: var(--font-body); font-size: 10px; color: var(--text-light); letter-spacing: 1px; }

/* 主导航 */
.main-nav > ul { display: flex; height: 84px; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 0 20px; line-height: 84px;
  font-size: 16px; color: var(--text-main); position: relative;
}
.nav-item > a:hover, .nav-item.active > a { color: var(--primary); }
.nav-item.active > a::after, .nav-item > a:hover::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 3px; background: var(--primary);
}
.caret {
  display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor;
}
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #ffffff; min-width: 160px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  display: none; z-index: 99;
}
.dropdown li a {
  display: block; padding: 12px 20px; font-size: 14px; line-height: 1.6;
  text-align: center; white-space: nowrap; border-bottom: 1px solid var(--primary-light); color: var(--text-main);
}
.dropdown li:last-child a { border-bottom: 0; }
.dropdown li a:hover { color: var(--primary); background: var(--primary-light); }
.has-dropdown:hover > .dropdown, .has-dropdown.open > .dropdown { display: block; }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--primary-dark); transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- 首页 Banner 轮播 ---------------- */
.banner { position: relative; overflow: hidden; background: var(--primary-deep); }
.banner-track { display: flex; transition: transform 0.6s ease; }
.banner-slide { flex: 0 0 100%; }
.banner-slide img { width: 100%; height: auto; display: block; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.25); color: #ffffff; font-size: 26px; line-height: 46px; text-align: center;
  transition: background 0.2s;
}
.banner-arrow:hover { background: var(--primary); color: #ffffff; }
.banner-arrow.prev { left: 20px; }
.banner-arrow.next { right: 20px; }
.banner-dots { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; z-index: 10; }
.banner-dot {
  display: inline-block; width: 12px; height: 12px; margin: 0 5px; padding: 0;
  border-radius: 50%; background: rgba(255, 255, 255, 0.5); transition: background 0.2s;
}
.banner-dot.active { background: #ffffff; }

/* ---------------- 首页服务四宫格卡片 ---------------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.service-card { background: #ffffff; border: 1px solid var(--border-color); transition: box-shadow 0.25s, transform 0.25s; }
.service-card:hover { box-shadow: 0 10px 24px rgba(15, 91, 171, 0.15); transform: translateY(-4px); }
.service-card img { width: 100%; height: 180px; object-fit: cover; }
.service-card-body { padding: 20px 18px 24px; text-align: center; }
.service-card-body h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 8px; }
.service-card-body p { font-size: 13px; color: var(--text-sub); line-height: 1.8; text-align: justify; }
.card-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--primary); }

/* ---------------- 首页关于我们 ---------------- */
.about-flex { display: flex; gap: 44px; align-items: center; }
.about-img { flex: 0 0 46%; }
.about-img img { width: 100%; box-shadow: 0 10px 30px rgba(8, 55, 104, 0.12); }
.about-text p { color: var(--text-sub); text-indent: 2em; margin-bottom: 14px; }
.about-stats { display: flex; margin-top: 26px; }
.about-stat { flex: 1; text-align: center; border-right: 1px solid var(--border-color); }
.about-stat:last-child { border-right: 0; }
.about-stat b { display: block; font-size: 32px; color: var(--primary); font-family: var(--font-serif); line-height: 1.4; }
.about-stat span { font-size: 13px; color: var(--text-sub); }

/* ---------------- 新闻列表 ---------------- */
.page-content { padding: 48px 0 64px; }
.news-list-item { display: flex; gap: 26px; padding: 22px 0; border-bottom: 1px dashed var(--border-color); }
.news-list-item:first-child { padding-top: 4px; }
.news-thumb { flex: 0 0 260px; }
.news-thumb img { width: 260px; height: 169px; object-fit: cover; }
.news-info h3 { font-size: 18px; line-height: 1.6; margin-bottom: 8px; }
.news-info h3 a:hover { color: var(--primary); }
.news-summary {
  font-size: 13px; color: var(--text-sub); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta { font-size: 12px; color: var(--text-light); margin-top: 10px; }

.pagination { display: flex; justify-content: center; gap: 12px; margin-top: 44px; }
.page-btn {
  display: inline-block; min-width: 40px; height: 40px; line-height: 38px;
  padding: 0 14px; text-align: center; border: 1px solid var(--border-color);
  color: var(--text-sub); font-size: 14px; transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }

/* ---------------- 内页横幅与面包屑 ---------------- */
.page-banner { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #ffffff; padding: 48px 0; }
.page-banner h1 { font-size: 32px; line-height: 1.4; }
.page-banner .page-banner-sub { font-size: 13px; letter-spacing: 3px; opacity: 0.75; margin-top: 6px; }
.breadcrumb { background: var(--bg-gray); border-bottom: 1px solid var(--border-color); padding: 12px 0; font-size: 13px; color: var(--text-sub); }
.breadcrumb a { color: var(--primary); }
.crumb-sep { margin: 0 6px; color: var(--text-light); }

/* ---------------- 单页图文（prose） ---------------- */
.prose h2 {
  font-size: 24px; color: var(--primary-dark); margin: 40px 0 18px;
  padding-left: 12px; border-left: 4px solid var(--primary);
}
.prose h2:first-child { margin-top: 0; }
.prose p { text-indent: 2em; margin-bottom: 14px; color: var(--text-main); }
.prose img { margin: 22px auto; }
.prose .plain-list li { padding-left: 22px; position: relative; margin-bottom: 10px; color: var(--text-sub); }
.prose .plain-list li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; background: var(--primary); }

/* 特色四宫格 */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 8px; }
.feature-item { background: var(--bg-gray); padding: 28px 18px; text-align: center; }
.feature-icon {
  width: 58px; height: 58px; margin: 0 auto; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-family: var(--font-serif); font-size: 24px; font-weight: bold; line-height: 58px;
}
.feature-item h3 { font-size: 17px; color: var(--primary-dark); margin: 14px 0 6px; }
.feature-item p { font-size: 13px; color: var(--text-sub); }

/* 发展历程 / 资质荣誉 */
.history-list li { padding: 14px 0 14px 22px; border-left: 2px solid var(--primary-light); position: relative; }
.history-list li::before { content: ""; position: absolute; left: -5px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.history-list b { color: var(--primary-dark); margin-right: 14px; font-family: var(--font-serif); font-size: 16px; }
.honor-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.honor-item { background: var(--bg-gray); padding: 22px 16px; text-align: center; font-size: 14px; color: var(--text-sub); border-top: 3px solid var(--primary); }

/* 项目中心（左右图文交替） */
.project-item { display: flex; gap: 36px; align-items: center; margin-bottom: 44px; }
.project-item:last-child { margin-bottom: 0; }
.project-item:nth-child(even) { flex-direction: row-reverse; }
.project-img { flex: 0 0 48%; }
.project-img img { width: 100%; box-shadow: 0 8px 22px rgba(8, 55, 104, 0.1); }
.project-info h3 { font-size: 22px; color: var(--primary-dark); margin-bottom: 12px; }
.project-info p { color: var(--text-sub); margin-bottom: 10px; }

/* ---------------- 文章详情页 ---------------- */
.article { background: #ffffff; border: 1px solid var(--border-color); padding: 48px 44px; }
.article-title { font-size: 26px; text-align: center; line-height: 1.6; color: var(--text-main); }
.article-meta {
  text-align: center; font-size: 13px; color: var(--text-light);
  margin: 18px 0 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color);
}
.article-cover { margin: 0 auto 26px; width: 100%; }
.article-body p { text-indent: 2em; margin-bottom: 16px; font-size: 15px; line-height: 2; }
.article-body h3 { font-size: 18px; color: var(--primary-dark); margin: 26px 0 12px; }
.article-nav {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid var(--border-color); margin-top: 34px; padding-top: 22px;
  font-size: 14px; color: var(--text-sub);
}
.article-nav a { color: var(--primary); }
.nav-disabled { color: var(--text-light); }

/* 服务流程步骤 */
.process-list li { position: relative; padding-left: 36px; margin-bottom: 16px; font-size: 15px; line-height: 2; }
.step-no {
  position: absolute; left: 0; top: 8px; width: 24px; height: 24px;
  background: var(--primary); color: #ffffff; font-size: 13px;
  text-align: center; line-height: 24px; border-radius: 50%; font-weight: normal;
}
.cta-box { background: var(--primary-light); border: 1px solid var(--primary); padding: 26px; text-align: center; margin-top: 34px; }
.cta-box p { color: var(--text-sub); margin-bottom: 14px; }

/* ---------------- 服务支持图集 ---------------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.service-grid-item { border: 1px solid var(--border-color); background: #ffffff; transition: box-shadow 0.25s, transform 0.25s; }
.service-grid-item:hover { box-shadow: 0 10px 24px rgba(15, 91, 171, 0.15); transform: translateY(-4px); }
.service-grid-item img { width: 100%; height: 250px; object-fit: cover; }
.service-grid-body { padding: 22px 24px 26px; }
.service-grid-body h3 { font-size: 20px; color: var(--primary-dark); margin-bottom: 10px; }
.service-grid-body h3 a:hover { color: var(--primary); }
.service-grid-body p { font-size: 13px; color: var(--text-sub); }

/* ---------------- 数字社区 ---------------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--primary); color: #ffffff; padding: 30px 0; margin: 32px 0; }
.stat-strip .stat { text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.2); }
.stat-strip .stat:last-child { border-right: 0; }
.stat-strip .stat b { display: block; font-size: 32px; font-family: var(--font-serif); line-height: 1.5; }
.stat-strip .stat span { font-size: 13px; opacity: 0.85; }

/* ---------------- App 下载页 ---------------- */
.download-flex { display: flex; gap: 56px; align-items: center; }
.download-info { flex: 1; }
.download-info h2 { font-size: 30px; color: var(--primary-dark); margin-bottom: 14px; }
.download-info > p { color: var(--text-sub); margin-bottom: 18px; }
.download-features li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--text-sub); }
.download-features li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 8px; background: var(--primary); }
.download-btns { margin-top: 26px; }
.qrcode-box { flex: 0 0 300px; background: #ffffff; border: 1px solid var(--border-color); padding: 26px 20px; text-align: center; }
.qrcode-box img { width: 240px; height: 240px; margin: 0 auto; }
.qrcode-box p { margin-top: 14px; font-size: 13px; color: var(--text-sub); }
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 8px; }
.step-item { background: var(--bg-gray); padding: 26px 20px; }
.step-item .step-num { font-size: 30px; font-family: var(--font-serif); color: var(--primary); font-weight: bold; }
.step-item h3 { font-size: 17px; color: var(--primary-dark); margin: 8px 0 6px; }
.step-item p { font-size: 13px; color: var(--text-sub); }

/* ---------------- 联系我们 ---------------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.contact-item { background: var(--bg-gray); padding: 30px 18px; text-align: center; }
.contact-item h3 { font-size: 17px; color: var(--primary-dark); margin: 10px 0 8px; }
.contact-item p { font-size: 14px; color: var(--text-sub); word-break: break-all; }
.map-block { border: 1px solid var(--border-color); }
.map-block img { width: 100%; }
.map-caption { text-align: center; font-size: 12px; color: var(--text-light); padding: 10px; background: var(--bg-gray); }
.contact-form { margin-top: 52px; }
.contact-form h2 { font-size: 24px; color: var(--primary-dark); margin-bottom: 22px; padding-left: 12px; border-left: 4px solid var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; border: 1px solid var(--border-color); padding: 10px 12px;
  font-size: 14px; font-family: inherit; background: #ffffff;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--primary-deep); color: rgba(255, 255, 255, 0.75); font-size: 13px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding: 48px 0 36px; }
.footer-col h4 {
  color: #ffffff; font-size: 16px; margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.18); display: inline-block;
}
.footer-col p { line-height: 2.1; }
.footer-col ul li { line-height: 2.2; }
.footer-col ul a { color: rgba(255, 255, 255, 0.75); }
.footer-col ul a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; text-align: center; }
.footer-bottom p { line-height: 2; }
.footer-bottom a { color: rgba(255, 255, 255, 0.55); }
.footer-bottom a:hover { color: #ffffff; }

/* ---------------- 响应式：平板 ---------------- */
@media (max-width: 992px) {
  .card-grid, .feature-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }
  .about-flex { flex-direction: column; }
  .about-img { flex: none; width: 100%; }
  .download-flex { flex-direction: column; }
  .qrcode-box { flex: none; width: 100%; max-width: 360px; }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .project-item, .project-item:nth-child(even) { flex-direction: column; }
  .project-img { flex: none; width: 100%; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .news-thumb, .news-thumb img { flex: none; width: 220px; height: 143px; }
}

/* ---------------- 响应式：移动端（≤768px） ---------------- */
@media (max-width: 768px) {
  .section { padding: 36px 0; }
  .section-header h2 { font-size: 24px; }
  .page-banner { padding: 32px 0; }
  .page-banner h1 { font-size: 24px; }
  .article { padding: 28px 16px; }
  .page-content { padding: 28px 0 44px; }

  /* 顶栏 */
  .top-bar .top-welcome { display: none; }
  .top-bar-inner { justify-content: center; }

  /* 页头与导航折叠 */
  .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #ffffff; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12); max-height: 70vh; overflow-y: auto;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { display: block; height: auto; }
  .nav-item > a { line-height: 1.4; padding: 14px 20px; border-bottom: 1px solid var(--border-color); font-size: 15px; }
  .nav-item.active > a::after, .nav-item > a:hover::after { display: none; }
  .nav-item.active > a { background: var(--primary); color: #ffffff; }
  .dropdown { position: static; transform: none; display: none; box-shadow: none; background: var(--bg-gray); min-width: 0; }
  .has-dropdown.open > .dropdown { display: block; }
  .dropdown li a { border-bottom: 1px solid #ffffff; }

  /* 轮播箭头缩小 */
  .banner-arrow { width: 34px; height: 34px; line-height: 34px; font-size: 20px; }

  /* 新闻列表纵排 */
  .news-list-item { flex-direction: column; gap: 14px; }
  .news-thumb, .news-thumb img { width: 100%; height: auto; }

  /* 其他栅格单列化 */
  .step-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip .stat:nth-child(2) { border-right: 0; }
  .stat-strip .stat:nth-child(1), .stat-strip .stat:nth-child(2) { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 24px; }
}

/* ---------------- 响应式：小屏手机 ---------------- */
@media (max-width: 560px) {
  .card-grid, .card-grid.cols-3, .feature-grid, .contact-grid, .honor-list { grid-template-columns: 1fr; }
  .about-stats { flex-direction: column; gap: 18px; }
  .about-stat { border-right: 0; }
  .logo-text { font-size: 20px; }
  .logo-mark { width: 42px; height: 42px; font-size: 19px; }
}
