/* ==========================================================
   镇平百事通官网 - 前台样式（红色主题 / 响应式）
   ========================================================== */
:root {
  --red: #d81e06;
  --red-dark: #b81300;
  --red-deep: #8f0f00;
  --red-light: #fff1f0;
  --red-soft: #ffe4e0;
  --text: #333;
  --text-2: #666;
  --text-3: #999;
  --line: #eee;
  --bg: #f7f7f7;
  --shadow: 0 4px 20px rgba(0, 0, 0, .06);
  --radius: 10px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.8;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand-logo { height: 46px; width: auto; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 16px; border-radius: 6px;
  font-size: 16px; color: var(--text);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--red); background: var(--red-light); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--red); border-radius: 2px; margin: 5px 0; transition: .3s; }

/* ---------- Hero 横幅 ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 55%, #ef3b20 100%);
  color: #fff; overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.hero::before { width: 420px; height: 420px; top: -180px; right: -80px; }
.hero::after { width: 260px; height: 260px; bottom: -140px; left: 8%; }
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 72px 0;
}
.hero-text { flex: 1; min-width: 0; }
.hero-kicker {
  display: inline-block; padding: 4px 14px; margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
  font-size: 14px; letter-spacing: 2px;
}
.hero h1 { font-size: 44px; line-height: 1.3; margin-bottom: 12px; letter-spacing: 2px; }
.hero-sub { font-size: 19px; opacity: .92; margin-bottom: 8px; }
.hero-tagline { font-size: 15px; opacity: .75; }
.hero-qrs { display: flex; gap: 20px; }
.qr-card {
  background: #fff; border-radius: var(--radius); padding: 14px 14px 10px;
  text-align: center; box-shadow: var(--shadow); color: var(--text);
}
.qr-card img { width: 132px; height: 132px; object-fit: contain; border-radius: 6px; }
.qr-card p { font-size: 13px; margin-top: 6px; color: var(--text-2); }

/* ---------- 数据条 ---------- */
.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 28px 10px; }
.stat b { display: block; font-size: 34px; color: var(--red); line-height: 1.2; }
.stat span { font-size: 14px; color: var(--text-2); }

/* ---------- 通用板块 ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; letter-spacing: 1px; }
.section-head .bar { width: 48px; height: 4px; background: var(--red); border-radius: 2px; margin: 14px auto 0; }
.section-head p.sub { color: var(--text-3); font-size: 15px; margin-top: 10px; }

/* 关于我们 */
.about-flex { display: flex; gap: 40px; align-items: flex-start; }
.about-text { flex: 1.1; min-width: 0; }
.about-text p { color: var(--text-2); text-align: justify; margin-bottom: 14px; }
.about-aside { flex: 1; min-width: 0; }
.office-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.office-gallery img {
  width: 100%; height: 130px; object-fit: cover;
  border-radius: 8px; transition: transform .25s, box-shadow .25s;
}
.office-gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-caption { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 10px; }

/* 创始人 */
.founder { background: var(--red-light); border-radius: 14px; padding: 36px 40px; }
.founder h3 { color: var(--red); font-size: 22px; margin-bottom: 12px; }
.founder ul { list-style: none; columns: 2; column-gap: 40px; }
.founder li { padding: 5px 0 5px 22px; position: relative; color: var(--text-2); font-size: 15.5px; break-inside: avoid; }
.founder li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}
/* 创始人：左图右文 */
.founder-flex { display: flex; gap: 36px; align-items: center; }
.founder-photo { flex: 0 0 320px; }
.founder-photo img {
  width: 100%; border-radius: 12px; object-fit: cover;
  aspect-ratio: 3 / 4; box-shadow: var(--shadow);
  background: #fff;
}
.founder-text { flex: 1; min-width: 0; }
.founder-text ul { columns: 1; }
.founder-text h3 { display: none; }

/* 客户案例：可点击卡片 */
.case-card.clickable { cursor: pointer; }
.case-card.clickable:hover { box-shadow: 0 8px 28px rgba(216, 30, 6, .18); }
.case-arrow {
  display: inline-block; font-size: 15px; opacity: .8;
  transition: transform .25s;
}
.case-card.clickable:hover .case-arrow { transform: translateX(4px); }
.case-badge {
  display: inline-block; font-size: 12px; font-weight: normal;
  background: #07c160; color: #fff; border-radius: 999px;
  padding: 1px 10px; vertical-align: 2px; margin-left: 4px;
}

/* 小程序二维码弹窗 */
.qr-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.qr-modal.show { display: block; }
.qr-modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.qr-modal-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 14px; padding: 26px 30px;
  text-align: center; max-width: 86vw; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.qr-modal-img { width: min(280px, 60vw); height: min(280px, 60vw); object-fit: contain; }
.qr-modal-title { font-size: 17px; font-weight: bold; margin-top: 10px; color: var(--text); }
.qr-modal-tip { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.qr-modal-close {
  position: absolute; right: 10px; top: 8px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: #bbb; cursor: pointer;
}
.qr-modal-close:hover { color: var(--red); }

/* 核心优势 */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.adv-card {
  background: #fff; border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border-top: 3px solid transparent;
  transition: transform .25s, border-color .25s;
}
.adv-card:hover { transform: translateY(-4px); border-top-color: var(--red); }
.adv-card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 12px;
  background: var(--red-light); color: var(--red); font-weight: bold; font-size: 18px;
}
.adv-card h3 { font-size: 18px; margin-bottom: 8px; }
.adv-card p { color: var(--text-2); font-size: 15px; text-align: justify; }

/* 新闻动态 */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s;
}
.news-card:hover { transform: translateY(-4px); }
.news-card .thumb { height: 180px; background: var(--red-soft); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 { font-size: 17px; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card p { color: var(--text-2); font-size: 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { margin-top: 12px; color: var(--text-3); font-size: 13px; display: flex; justify-content: space-between; }
.more-bar { text-align: center; margin-top: 32px; }
.btn-more {
  display: inline-block; padding: 10px 34px; border: 1px solid var(--red);
  color: var(--red); border-radius: 999px; transition: .2s;
}
.btn-more:hover { background: var(--red); color: #fff; }

/* 客户案例 */
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.case-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 240px; }
.case-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.case-card:hover img { transform: scale(1.06); }
.case-card .mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .72));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; color: #fff;
}
.case-card h3 { font-size: 17px; }
.case-card p { font-size: 13px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 联系我们 */
.contact-flex { display: flex; gap: 40px; align-items: stretch; }
.contact-info { flex: 1.2; }
.contact-list { list-style: none; }
.contact-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); color: var(--text-2); }
.contact-list .ico {
  flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--red-light);
  color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.contact-qrs { flex: 1; display: flex; gap: 20px; justify-content: center; align-items: center; }
.contact-qrs .qr-card img { width: 150px; height: 150px; }

/* ---------- 新闻页 ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: #fff; text-align: center; padding: 46px 20px;
}
.page-banner h1 { font-size: 30px; letter-spacing: 1px; }
.breadcrumb { color: var(--text-3); font-size: 14px; padding: 16px 0; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--red); }

.news-list { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 900px; margin: 0 auto; }
.news-row {
  display: flex; gap: 20px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; padding: 16px; transition: transform .25s;
}
.news-row:hover { transform: translateY(-3px); }
.news-row .thumb { flex: 0 0 220px; height: 140px; border-radius: 8px; overflow: hidden; background: var(--red-soft); }
.news-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row h2 { font-size: 18px; line-height: 1.5; margin-bottom: 6px; }
.news-row h2 a:hover { color: var(--red); }
.news-row p { color: var(--text-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-row .meta { margin-top: 10px; color: var(--text-3); font-size: 13px; }

/* 文章详情 */
.article { max-width: 860px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; }
.article h1 { font-size: 26px; line-height: 1.5; margin-bottom: 14px; }
.article .meta { color: var(--text-3); font-size: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article .content { font-size: 16.5px; color: #444; word-break: break-word; }
.article .content p { margin-bottom: 14px; text-align: justify; }
.article .content img { border-radius: 8px; margin: 10px auto; }
.article .content ul, .article .content ol { padding-left: 24px; margin-bottom: 14px; }
.pager-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.pager-nav a { color: var(--red); font-size: 14.5px; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 36px 0 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid var(--line); color: var(--text-2); font-size: 14px;
}
.pagination .cur { background: var(--red); border-color: var(--red); color: #fff; }
.pagination a:hover { border-color: var(--red); color: var(--red); }

/* ---------- 底部 ---------- */
.site-footer { background: var(--red-deep); color: rgba(255, 255, 255, .85); margin-top: 70px; padding: 36px 0 30px; font-size: 14.5px; }
.footer-links { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .15); margin-bottom: 18px; line-height: 2; }
.footer-links a { margin-right: 16px; opacity: .85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-beian { margin-top: 4px; text-align: center; line-height: 2; }
.footer-beian span { display: inline-block; margin: 0 14px; opacity: .8; white-space: nowrap; }
.footer-beian a:hover { text-decoration: underline; }

/* 返回顶部 */
.back-top {
  position: fixed; right: 24px; bottom: 32px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: var(--red); color: #fff;
  font-size: 20px; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 99;
}
.back-top.show { opacity: 1; pointer-events: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .hero h1 { font-size: 34px; }
  .hero-inner { flex-direction: column; text-align: center; padding: 52px 0; }
  .hero-qrs { justify-content: center; }
  .about-flex, .contact-flex { flex-direction: column; align-items: stretch; }
  .about-aside { width: 100%; margin: 0 auto; }
  .office-gallery { width: 100%; margin: 0 auto; }
  .gallery-caption { text-align: center; }
  .founder ul { columns: 1; }
  .founder-flex { flex-direction: column; }
  .founder-photo { flex: none; width: min(280px, 70%); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav {
    position: fixed; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 10px 20px 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    transform: translateY(-130%); transition: transform .3s; z-index: 998;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 24px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 16px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 26px; }
  .office-gallery { grid-template-columns: repeat(2, 1fr); }
  .office-gallery img { height: 110px; }
  .founder { padding: 24px 20px; }
  .founder-flex { gap: 20px; }
  .founder-photo { width: min(220px, 60%); }
  .news-grid { grid-template-columns: 1fr; }
  .news-row { flex-direction: column; }
  .news-row .thumb { flex: none; width: 100%; height: 170px; }
  .article { padding: 26px 20px; }
  .article h1 { font-size: 22px; }
  .brand-logo { height: 38px; }
  .qr-card img { width: 108px; height: 108px; }
  .contact-qrs { flex-wrap: wrap; }
}

/* ===== 微信公众号采集正文适配（原文样式保留 + 移动端自适应） ===== */
.article .content img { max-width: 100% !important; height: auto !important; }
.article .content section, .article .content div { max-width: 100%; }
.article .content p { margin: 0 0 1em; }
.article .content blockquote { border-left: 3px solid #ddd; margin: 1em 0; padding: 4px 0 4px 14px; color: #666; }
.article .content table { border-collapse: collapse; max-width: 100%; margin: 1em 0; }
.article .content table td, .article .content table th { border: 1px solid #e5e5e5; padding: 6px 10px; }
.article .content ul, .article .content ol { padding-left: 24px; }
