/* 华培集团官网样式 —— 品牌红主题 */
:root {
  --red: #d5281f;
  --red-dark: #a91b14;
  --gold: #c9973f;
  --ink: #22252a;
  --gray: #6b7178;
  --bg: #ffffff;
  --bg-gray: #f6f6f7;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 20, 30, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.75;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.container { width: min(1160px, 92%); margin: 0 auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.narrow-p { max-width: 860px; margin: 0 auto 40px; }
.muted { color: var(--gray); }
.red { color: var(--red); }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 46px; width: auto; }
.footer-logo { height: 56px; width: auto; margin-bottom: 12px; }
.logo-mark {
  width: 42px; height: 42px; background: var(--red); color: #fff;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
}
.logo-text strong { display: block; font-size: 18px; letter-spacing: 2px; line-height: 1.2; }
.logo-text em { font-style: normal; font-size: 10px; color: var(--gray); letter-spacing: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 16px; border-radius: 8px; font-size: 15px; font-weight: 500;
  transition: .2s;
}
.nav a:hover { background: #fdeceb; color: var(--red); }
.nav a.on { background: var(--red); color: #fff; }
.header-phone { color: var(--red); font-weight: 700; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; }

/* ===== 主视觉 ===== */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(169,27,20,.92), rgba(213,40,31,.78)),
              url('/images/hero.jpg') center/cover no-repeat;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-content { position: relative; padding: 110px 0 130px; max-width: 720px; }
.hero-slogan {
  display: inline-block; border: 1px solid rgba(255,255,255,.6);
  padding: 4px 16px; border-radius: 99px; font-size: 14px; letter-spacing: 2px;
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 4.5vw, 50px); line-height: 1.3; letter-spacing: 3px; margin-bottom: 18px; }
.hero-sub { color: rgba(255,255,255,.85); max-width: 620px; margin-bottom: 34px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 99px;
  font-size: 15px; font-weight: 600; transition: .25s; cursor: pointer; border: 2px solid transparent;
}
.btn-solid { background: #fff; color: var(--red); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-outline { border-color: var(--red); color: var(--red); margin-top: 22px; }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-lg { padding: 14px 42px; font-size: 16px; }
.cta-band .btn-solid { background: var(--red); color: #fff; }
.cta-band .btn-solid:hover { background: var(--red-dark); }

/* ===== 统计条 ===== */
.stats-band { background: var(--bg-gray); border-bottom: 1px solid #eee; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 0; }
.stat { text-align: center; }
.stat strong { display: block; font-size: clamp(26px, 3.4vw, 40px); color: var(--red); font-weight: 800; }
.stat span { color: var(--gray); font-size: 14px; }

/* ===== 通用区块 ===== */
.section { padding: 84px 0; }
.section-gray { background: var(--bg-gray); }
.sec-tag { color: var(--red); font-weight: 700; letter-spacing: 4px; font-size: 13px; margin-bottom: 6px; }
.sec-tag.center { text-align: center; }
.sec-title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin-bottom: 28px; letter-spacing: 1px; }
.sec-title small { display: block; font-size: 14px; color: var(--gray); font-weight: 400; margin-top: 6px; letter-spacing: 0; }
.sec-title.center { text-align: center; }
.lead { margin-bottom: 14px; }

/* ===== 图文分栏 ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-img { position: relative; }
.split-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.img-badge {
  position: absolute; left: -14px; bottom: -14px; background: var(--red); color: #fff;
  padding: 10px 22px; border-radius: 10px; font-weight: 700; letter-spacing: 2px;
  box-shadow: var(--shadow);
}

/* ===== 业务卡片 ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 20px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow); transition: .3s; border-top: 3px solid transparent;
}
.card:hover { transform: translateY(-6px); border-top-color: var(--red); }
.card-icon { font-size: 34px; margin-bottom: 12px; }
.card h3 { font-size: 19px; margin-bottom: 2px; }
.card-en { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.card p { font-size: 14px; color: var(--gray); margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  background: #fdeceb; color: var(--red); font-size: 12px;
  padding: 3px 12px; border-radius: 99px;
}

/* ===== 服务闭环列表 ===== */
.loop-list { margin-top: 8px; }
.loop-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed #eee; font-size: 15px; }
.loop-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

/* ===== 文化 ===== */
.section-red { background: linear-gradient(120deg, var(--red-dark), var(--red)); color: #fff; }
.culture-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.culture-band h3 { font-size: 20px; margin-bottom: 6px; }
.culture-band p { color: rgba(255,255,255,.88); }
.culture-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.culture-card {
  background: #fff; border-radius: var(--radius); padding: 30px; text-align: center;
  box-shadow: var(--shadow); border-bottom: 3px solid var(--red);
}
.culture-card h3 { color: var(--red); margin-bottom: 8px; }
.principles { margin-top: 44px; background: #fff; border-radius: var(--radius); padding: 34px 40px; box-shadow: var(--shadow); }
.principles h3 { color: var(--red); margin-bottom: 14px; }
.principles li { padding: 8px 0 8px 26px; position: relative; }
.principles li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 12px; }

/* ===== 页头横幅 ===== */
.page-hero {
  padding: 96px 0; color: #fff; background-size: cover; background-position: center;
  position: relative;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(169,27,20,.88), rgba(213,40,31,.55)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: 4px; }
.page-hero p { color: rgba(255,255,255,.85); letter-spacing: 2px; }

/* ===== 时间轴 ===== */
.timeline { position: relative; margin-top: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(var(--red), var(--gold)); transform: translateX(-50%);
  border-radius: 3px;
}
.tl-item { width: 50%; padding: 0 40px 36px 0; position: relative; }
.tl-item.right { margin-left: 50%; padding: 0 0 36px 40px; }
.tl-item::before {
  content: ""; position: absolute; right: -9px; top: 26px; width: 15px; height: 15px;
  background: #fff; border: 4px solid var(--red); border-radius: 50%; z-index: 1;
}
.tl-item.right::before { right: auto; left: -10px; }
.tl-card {
  background: #fff; border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--shadow); transition: .3s;
}
.tl-card:hover { transform: translateY(-4px); }
.tl-year { font-size: 26px; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.tl-year small { font-size: 14px; color: var(--gray); font-weight: 400; margin-left: 6px; }
.tl-card h3 { font-size: 17px; margin-bottom: 4px; }
.tl-card p { font-size: 14px; color: var(--gray); }

/* ===== 业务范围卡片 ===== */
.scope-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.scope-card {
  background: #fff; border-radius: var(--radius); padding: 22px 18px;
  border: 1px solid #eee; transition: .3s;
}
.scope-card:hover { border-color: var(--red); box-shadow: var(--shadow); transform: translateY(-4px); }
.scope-card h3 { font-size: 15px; margin-bottom: 10px; line-height: 1.5; }

/* ===== 服务目录 ===== */
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.menu-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.menu-head {
  background: linear-gradient(120deg, var(--red-dark), var(--red)); color: #fff;
  padding: 14px 24px; font-size: 18px; font-weight: 700; letter-spacing: 2px;
}
.menu-card ul { padding: 18px 26px 22px; }
.menu-card li { padding: 7px 0 7px 22px; position: relative; border-bottom: 1px dashed #f0f0f0; }
.menu-card li:last-child { border-bottom: 0; }
.menu-card li::before { content: "·"; position: absolute; left: 6px; color: var(--red); font-weight: 900; font-size: 22px; top: -4px; }

/* ===== 公司环境 ===== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 16px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.gallery-item img { height: 220px; width: 100%; object-fit: cover; transition: .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { padding: 12px 16px; font-size: 14px; font-weight: 600; }
.gallery-wide { margin-top: 24px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-wide img { width: 100%; max-height: 460px; object-fit: cover; }

/* ===== 联系页 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.info-list { margin-top: 26px; }
.info-list > div { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.info-list dt { flex: none; width: 96px; color: var(--gray); font-size: 14px; }
.info-list dd { font-weight: 600; }
.info-list dd a { color: var(--red); }
.contact-form {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px 34px 30px; border-top: 4px solid var(--red);
}
.contact-form h3 { margin-bottom: 18px; font-size: 20px; }
.contact-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.contact-form em { color: var(--red); font-style: normal; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid #ddd;
  border-radius: 10px; font-size: 14px; font-family: inherit; transition: .2s; background: #fafafa;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(213,40,31,.12);
}
.contact-form .btn { width: 100%; margin-top: 4px; }
.form-msg { margin-top: 12px; text-align: center; font-size: 14px; min-height: 20px; }
.form-msg.ok { color: #1a9c5b; }
.form-msg.err { color: var(--red); }

/* ===== 后台表格 ===== */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: top; }
.admin-table th { background: var(--bg-gray); font-size: 13px; color: var(--gray); }
.admin-table td a { color: var(--red); }

/* ===== CTA ===== */
.cta-band { background: var(--bg-gray); }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; }
.cta-phone a { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--red); letter-spacing: 2px; }
.cta-band p { color: var(--gray); margin-bottom: 24px; }
.cta-band .btn { margin-top: 4px; }

/* ===== 页脚 ===== */
.site-footer { background: #1d2025; color: #aeb4bb; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 30px; padding: 52px 0 38px; }
.site-footer h4 { color: #fff; margin-bottom: 10px; font-size: 16px; }
.site-footer a { color: #d5dae0; }
.site-footer a:hover { color: #fff; }
.footer-bar { border-top: 1px solid #33373d; padding: 16px 0; font-size: 13px; text-align: center; }
.footer-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bar .icp a { color: #b8bdc5; display: inline-flex; align-items: center; gap: 6px; }
.footer-bar .icp a:hover { color: #fff; }
.footer-bar .beian-icon { width: 14px; height: 14px; vertical-align: middle; }

/* ===== 悬浮咨询 ===== */
.float-cta {
  position: fixed; right: 22px; bottom: 26px; z-index: 90;
  background: var(--red); color: #fff; padding: 12px 22px; border-radius: 99px;
  font-weight: 700; box-shadow: 0 10px 24px rgba(213,40,31,.4); transition: .25s;
}
.float-cta:hover { transform: translateY(-3px); }

/* ===== 进场动画 ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 12px 4%;
    border-bottom: 1px solid #eee; box-shadow: 0 14px 24px rgba(0,0,0,.08);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-phone { display: none; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .culture-band, .culture-grid { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 10px; }
  .tl-item, .tl-item.right { width: 100%; margin-left: 0; padding: 0 0 30px 34px; }
  .tl-item::before, .tl-item.right::before { left: 2px; right: auto; }
  .hero-content { padding: 80px 0 90px; }
  .section { padding: 60px 0; }
}

/* ===== 首页轮播（替换原静态 hero） ===== */
.hero-slider { position: relative; color: #fff; overflow: hidden; height: 520px; }
.slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease; display: flex; align-items: center;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-mask { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(169,27,20,.88), rgba(213,40,31,.55)); }
.slide-content { position: relative; z-index: 1; }
.hero-slider h1 { font-size: clamp(28px, 4.5vw, 50px); line-height: 1.3; letter-spacing: 3px; margin-bottom: 18px; }
.slider-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 5; display: flex; gap: 10px;
}
.slider-dots .dot {
  width: 30px; height: 4px; background: rgba(255,255,255,.4); border-radius: 4px;
  cursor: pointer; transition: .2s;
}
.slider-dots .dot.active { background: #fff; width: 50px; }

/* ===== 新闻卡片 ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 14px;
}
.news-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .3s; display: block; color: var(--ink);
}
.news-card:hover { transform: translateY(-6px); }
.news-cover { width: 100%; height: 200px; overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.news-card:hover .news-cover img { transform: scale(1.06); }
.news-body { padding: 22px 24px 24px; }
.news-body h3 { font-size: 17px; margin-bottom: 8px; line-height: 1.5; }
.news-body p { color: var(--gray); font-size: 14px; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta {
  display: flex; gap: 14px; color: var(--gray); font-size: 13px; padding-top: 10px;
  border-top: 1px dashed #eee;
}

/* ===== 新闻详情 ===== */
.back-link { display: inline-block; color: var(--red); font-size: 14px; margin-bottom: 18px; }
.news-title { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 12px; line-height: 1.4; }
.news-banner { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 26px; }
.news-content { font-size: 16px; line-height: 1.9; color: #333; }
.news-content p { margin-bottom: 14px; }

/* ===== 新闻列表响应式 ===== */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
  .hero-slider { height: 420px; }
}
