/* =========================================================
   华固科技 HGTEC — 官网主题样式
   基于 Bootstrap 5.3，FastAdmin 风格（简洁卡片式）
   品牌蓝 #337FE5
   ========================================================= */

:root {
  --hg-primary: #337FE5;
  --hg-primary-dark: #2266c4;
  --hg-primary-light: #eaf2fd;
  --hg-bg-gray: #f4f6f9;
  --hg-text: #333a45;
  --hg-text-muted: #7a8699;
  --hg-border: #e8ecf1;
  --hg-radius: 10px;
  --hg-shadow: 0 2px 12px rgba(31, 45, 61, .06);
  --hg-shadow-hover: 0 8px 24px rgba(51, 127, 229, .15);
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--hg-text);
  background: #fff;
  font-size: 15px;
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: #222b38; }

a { color: var(--hg-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--hg-primary-dark); }

/* ---------- 顶部条 ---------- */
.topbar {
  background: #2b3245;
  color: rgba(255,255,255,.75);
  font-size: 13px;
  padding: 6px 0;
}
.topbar a { color: rgba(255,255,255,.75); }
.topbar a:hover { color: #fff; }

/* ---------- 导航 ---------- */
.navbar-hg {
  background: #fff;
  box-shadow: 0 1px 0 var(--hg-border), 0 2px 8px rgba(31,45,61,.04);
  padding: 0;
}
.navbar-hg .navbar-brand img { height: 48px; }
.navbar-hg .nav-link {
  color: #333a45;
  font-size: 15px;
  padding: 22px 16px !important;
  position: relative;
  font-weight: 500;
}
.navbar-hg .nav-link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 12px;
  height: 3px; border-radius: 2px;
  background: var(--hg-primary);
  transform: scaleX(0);
  transition: transform .25s;
}
.navbar-hg .nav-link:hover,
.navbar-hg .nav-link.active { color: var(--hg-primary); }
.navbar-hg .nav-link:hover::after,
.navbar-hg .nav-link.active::after { transform: scaleX(1); }
.navbar-hg .dropdown-menu {
  border: 1px solid var(--hg-border);
  box-shadow: var(--hg-shadow);
  border-radius: 8px;
  font-size: 14px;
}
.navbar-hg .dropdown-item:active { background: var(--hg-primary); }
.navbar-toggler { border: none; padding: 10px; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Hero 轮播 ---------- */
.hero-carousel .carousel-item { height: 520px; background-size: cover; background-position: center; }
.hero-carousel .carousel-caption {
  bottom: auto; top: 50%; transform: translateY(-50%);
  text-align: left; max-width: 640px;
}
.hero-carousel .carousel-caption h2 { font-size: 40px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-carousel .carousel-caption p { font-size: 17px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.hero-carousel .carousel-indicators [data-bs-target] { width: 32px; height: 4px; border-radius: 2px; }

/* ---------- 通用区块 ---------- */
.section { padding: 72px 0; }
.section-gray { background: var(--hg-bg-gray); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 30px; display: inline-block; position: relative; padding-bottom: 14px; }
.section-title h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 48px; height: 4px; border-radius: 2px;
  background: var(--hg-primary); transform: translateX(-50%);
}
.section-title .en { display: block; font-size: 13px; letter-spacing: 3px; color: var(--hg-text-muted); text-transform: uppercase; margin-top: 6px; }
.section-title p { color: var(--hg-text-muted); margin-top: 12px; }

/* ---------- 卡片 ---------- */
.card-hg {
  background: #fff;
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow);
  transition: transform .3s, box-shadow .3s;
  height: 100%;
  overflow: hidden;
}
.card-hg:hover { transform: translateY(-6px); box-shadow: var(--hg-shadow-hover); }

/* 优势图标块 */
.adv-item { text-align: center; padding: 36px 24px; }
.adv-item .adv-icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--hg-primary-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--hg-primary);
  transition: background .3s, color .3s;
}
.card-hg:hover .adv-icon { background: var(--hg-primary); color: #fff; }
.adv-item h5 { font-size: 17px; margin-bottom: 10px; }
.adv-item p { color: var(--hg-text-muted); font-size: 14px; margin: 0; }

/* 产品卡片 */
.product-card .p-img {
  height: 210px; display: flex; align-items: center; justify-content: center;
  background: #fafbfc; padding: 18px;
}
.product-card .p-img img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform .35s; }
.product-card:hover .p-img img { transform: scale(1.06); }
.product-card .p-body { padding: 16px 18px 20px; text-align: center; border-top: 1px solid var(--hg-border); }
.product-card .p-body h6 { margin: 0; font-size: 15px; }
.product-card .p-cat { font-size: 12px; color: var(--hg-text-muted); }

/* 分类标签 */
.pill-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.pill-nav .btn {
  border: 1px solid var(--hg-border);
  background: #fff; color: var(--hg-text);
  border-radius: 999px; padding: 8px 22px; font-size: 14px;
  transition: all .2s;
}
.pill-nav .btn:hover { border-color: var(--hg-primary); color: var(--hg-primary); }
.pill-nav .btn.active { background: var(--hg-primary); border-color: var(--hg-primary); color: #fff; }

/* 新闻列表 */
.news-item {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; background: #fff;
  border: 1px solid var(--hg-border); border-radius: var(--hg-radius);
  margin-bottom: 14px; transition: box-shadow .25s, transform .25s;
}
.news-item:hover { box-shadow: var(--hg-shadow-hover); transform: translateX(4px); }
.news-item .date {
  flex: 0 0 74px; text-align: center; border-right: 1px dashed var(--hg-border); padding-right: 16px;
}
.news-item .date .d { font-size: 24px; font-weight: 700; color: var(--hg-primary); line-height: 1.2; }
.news-item .date .ym { font-size: 12px; color: var(--hg-text-muted); }
.news-item .t { font-size: 15px; color: var(--hg-text); }
.news-item:hover .t { color: var(--hg-primary); }

/* 案例 */
.case-img { border-radius: var(--hg-radius); box-shadow: var(--hg-shadow); border: 1px solid var(--hg-border); }

/* 页头横幅 */
.page-banner {
  height: 260px;
  background: linear-gradient(120deg, #2266c4 0%, #337FE5 55%, #5f9bef 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.page-banner::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.12) 0, transparent 40%),
                    radial-gradient(circle at 85% 70%, rgba(255,255,255,.1) 0, transparent 40%);
}
.page-banner h1 { font-size: 34px; font-weight: 700; color: #fff; }
.page-banner .crumb { font-size: 14px; opacity: .85; }
.page-banner .crumb a { color: #fff; }

/* ---------- 页脚 ---------- */
.footer { background: #232a3a; color: rgba(255,255,255,.65); padding: 56px 0 0; font-size: 14px; }
.footer h6 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer a { color: rgba(255,255,255,.65); display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer .contact-line { padding: 4px 0; }
.footer .copyright {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px; padding: 18px 0; text-align: center; font-size: 13px;
}
.footer .wechat-qr { width: 108px; border-radius: 8px; background: #fff; padding: 6px; }

/* ---------- 返回顶部 ---------- */
#backTop {
  position: fixed; right: 24px; bottom: 32px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--hg-primary); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(51,127,229,.4);
  opacity: 0; visibility: hidden; transition: all .3s;
  display: flex; align-items: center; justify-content: center;
}
#backTop.show { opacity: 1; visibility: visible; }
#backTop:hover { background: var(--hg-primary-dark); }

/* ---------- 滚动显现动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 按钮 ---------- */
.btn-hg {
  background: var(--hg-primary); border-color: var(--hg-primary); color: #fff;
  border-radius: 6px; padding: 10px 30px; font-weight: 500;
}
.btn-hg:hover { background: var(--hg-primary-dark); border-color: var(--hg-primary-dark); color: #fff; }
.btn-outline-hg {
  border: 1px solid var(--hg-primary); color: var(--hg-primary); background: transparent;
  border-radius: 6px; padding: 10px 30px; font-weight: 500;
}
.btn-outline-hg:hover { background: var(--hg-primary); color: #fff; }

/* ---------- 资质证书 ---------- */
.cert-card img { width: 100%; height: 300px; object-fit: contain; background: #fafbfc; padding: 14px; }
.cert-card .p-body { padding: 14px; text-align: center; border-top: 1px solid var(--hg-border); font-size: 14px; }

/* ---------- 招聘 ---------- */
.job-card { padding: 28px; }
.job-card .job-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.job-card h4 { margin: 0; }
.job-card .salary { color: #f56c6c; font-weight: 600; }
.job-tags { margin-bottom: 14px; }
.job-tags .badge {
  background: var(--hg-primary-light); color: var(--hg-primary);
  font-weight: 500; margin-right: 8px; padding: 6px 12px; border-radius: 6px;
}
.job-card ul { color: var(--hg-text-muted); padding-left: 18px; margin-bottom: 0; }

/* ---------- 手风琴 ---------- */
.accordion-hg .accordion-item { border: 1px solid var(--hg-border); border-radius: var(--hg-radius) !important; overflow: hidden; margin-bottom: 12px; }
.accordion-hg .accordion-button { font-weight: 500; padding: 16px 22px; }
.accordion-hg .accordion-button:not(.collapsed) { background: var(--hg-primary-light); color: var(--hg-primary); box-shadow: none; }
.accordion-hg .accordion-button:focus { box-shadow: none; border: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
  .navbar-hg .nav-link { padding: 12px 16px !important; }
  .navbar-hg .nav-link::after { display: none; }
  .hero-carousel .carousel-item { height: 380px; }
  .hero-carousel .carousel-caption h2 { font-size: 28px; }
  .section { padding: 52px 0; }
  .section-title h2 { font-size: 24px; }
}
@media (max-width: 575.98px) {
  .hero-carousel .carousel-item { height: 300px; }
  .hero-carousel .carousel-caption h2 { font-size: 22px; }
  .hero-carousel .carousel-caption p { font-size: 14px; }
  .page-banner { height: 200px; }
  .page-banner h1 { font-size: 26px; }
  .news-item .date { flex-basis: 60px; }
}

/* old content compatibility */
.content-body img{max-width:100%;height:auto}
.content-body table{width:100%;border-collapse:collapse}
.content-body table,.content-body th,.content-body td{border:1px solid #dee2e6}
.content-body th,.content-body td{padding:.5rem}
.content-body p{line-height:1.8}

/* 关于华固左侧图文 3×2 小格 */
.about-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.about-gallery .gi{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.07);padding-bottom:6px}
.about-gallery .gi img{display:block;width:100%;aspect-ratio:219/173;object-fit:cover;transition:transform .35s ease}
.about-gallery .gi:hover img{transform:scale(1.05)}
.about-gallery .gi span{display:block;padding:6px 6px 0;font-size:.8rem;color:#3c4652;text-align:center;line-height:1.3}
@media (max-width:575.98px){
  .about-gallery{grid-template-columns:repeat(2,1fr)}
  .about-gallery .gi span{font-size:.75rem}
}

/* 品牌案例图文混排 */
.case-tile{position:relative;border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.06);aspect-ratio:1/1}
.case-tile img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.case-tile:hover img{transform:scale(1.06)}
.case-tile .cap{position:absolute;left:0;right:0;bottom:0;padding:.45rem .55rem;background:linear-gradient(transparent,rgba(0,0,0,.68));color:#fff;font-size:.78rem;line-height:1.35}
.case-tile.text{display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(135deg,#337FE5,#2266c4);color:#fff;text-align:center;padding:.5rem}
.case-tile.text .num{font-size:1.5rem;font-weight:700;line-height:1.2}
