/* 前台样式。尺寸用 rem、% 和网格，窗口变窄或浏览器放大后会自动换行，不出现横向撑破。 */
:root {
  --blue: #01459a;
  --blue-2: #0158c2;
  --text: #222;
  --muted: #6e6e6e;
  --line: #d9d9d9;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: #fff;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* 顶部白条和蓝色导航固定在窗口上方。下拉菜单仍从导航下方展开。 */
.site-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
}
.site-top.is-stuck { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.site-header { padding: 1rem 0 0.85rem; background: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo { flex: 0 0 auto; }
.logo img { height: 4.5rem; width: auto; display: block; }
.slogan-view {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.6rem;
  overflow: hidden;
  border-left: 1px solid #c9c9c9;
  padding-left: 0.8rem;
}
.slogan-track { transition: transform 0.6s ease; }
.slogan-view .line {
  height: 2.6rem;
  line-height: 2.6rem;
  color: var(--blue);
  font-weight: 800;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tel-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blue);
  font-weight: 700;
}
.tel-box img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.tel-box span, .tel-box strong { display: block; line-height: 1.35; font-size: 0.95rem; }

.main-nav { background: var(--blue); color: #fff; position: relative; z-index: 20; }
.nav-bar { display: flex; flex-direction: column; }
.nav-toggle {
  display: none;
  margin: 0.45rem 0;
  background: var(--blue-2);
  color: #fff;
  border: 0;
  min-height: 2.5rem;
  padding: 0 1rem;
  cursor: pointer;
}
.nav { display: flex; list-style: none; margin: 0; padding: 0; width: 100%; }
.nav > li { position: relative; flex: 1 1 0; min-width: 0; display: flex; }
.nav > li > a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.35rem 0.4rem;
  text-align: center;
  color: #fff;
}
.nav > li.active > a,
.nav > li:hover > a,
.nav > li:focus-within > a { background: var(--blue-2); }
.sub-toggle { display: none; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(18rem, 80vw);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.nav > li:hover > .submenu,
.nav > li:focus-within > .submenu { display: block; }
.submenu a {
  display: block;
  padding: 0.55rem 0.8rem;
  color: #fff;
  line-height: 1.4;
}
.submenu li.active > a,
.submenu a:hover { background: var(--blue-2); }

.banner {
  position: relative;
  height: clamp(11rem, 32vw, 31.25rem);
  background: #0b1e33;
  overflow: hidden;
}
.banner .slides { position: absolute; inset: 0; }
.banner .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.banner .slide.on { opacity: 1; z-index: 1; pointer-events: auto; }
.banner .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 3.4rem;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 1.6rem;
}
.banner .prev { left: 0.6rem; }
.banner .next { right: 0.6rem; }
.banner .dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0.8rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
}
.banner .dots button {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.banner .dots button.on { background: #fff; }

.block { padding: 2.4rem 0 0.4rem; }
.sec-title {
  margin: 0;
  text-align: center;
  color: var(--blue);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: 0.06em;
}
.sec-sub { margin: 0.45rem 0 0; text-align: center; color: #555; }
.sec-line { display: block; width: min(96%, 100%); margin: 0.55rem auto 1.1rem; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.4rem;
  align-items: start;
}
.about-grid img { width: 100%; height: auto; display: block; }
.about-copy { text-align: left; color: #333; line-height: 1.9; }
.about-copy p { margin: 0 0 0.8rem; }
.more { color: var(--blue); font-weight: 700; }
.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.9fr);
  gap: 1.6rem;
}
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; }
.news-card h3,
.news-item h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}
.news-card p, .news-item p { margin: 0; color: var(--muted); font-size: 0.875rem; line-height: 1.7; }
.news-card:hover h3, .news-item:hover h2 { color: var(--blue); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.guide-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 5.4rem;
  padding: 0.7rem 0.3rem;
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  text-align: center;
}
.guide-card img { width: 2rem; height: 2rem; object-fit: contain; }
.guide-card span { font-size: 0.8rem; line-height: 1.35; }
.cert-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
.client-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.85rem 0.7rem; }
.client-grid figure, .cert-grid figure { margin: 0; text-align: center; }
.client-grid figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.6rem;
  padding: 0.35rem 0.25rem;
  background: #fff;
}
.client-grid img, .cert-grid img {
  width: 100%;
  background: #fff;
  cursor: zoom-in;
}
.client-grid img { height: 4.4rem; object-fit: contain; }
.cert-grid img { aspect-ratio: 4 / 5; object-fit: contain; background: #fff; }
.client-grid figcaption, .cert-grid figcaption { margin-top: 0.35rem; line-height: 1.45; }
.friend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.friend-grid a {
  border-left: 1px dashed #c9c9c9;
  padding: 0.35rem 0.7rem;
  line-height: 1.6;
}
.friend-grid a:hover { color: var(--blue); }

.page-wrap {
  /* 短页面也至少有一屏高，点菜单后栏目区滚到固定页头下面，不再停在大图上，也不被页头挡住。 */
  min-height: 100vh;
  scroll-margin-top: var(--top-h, 8.6rem);
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1.2rem 0 2.4rem;
}
.side-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  padding: 0.6rem;
  background: var(--blue);
  color: #fff;
  text-align: center;
  font-size: 1.25rem;
}
.side a {
  display: block;
  margin-top: 2px;
  padding: 0.55rem 0.4rem;
  text-align: center;
  background: rgba(204, 204, 204, 0.45);
  line-height: 1.45;
}
.side a.active, .side a:hover { background: var(--blue); color: #fff; }
.crumb { background: var(--blue); color: #fff; padding: 0.55rem 0.8rem; margin-bottom: 1rem; }
.crumb a { color: #fff; }
.article-title { margin: 0 0 0.4rem; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; color: var(--blue); }
.article-date { margin: 0 0 0.8rem; color: var(--muted); }
.article-cover { display: block; max-width: 100%; margin: 0 auto 1rem; }
.news-item { display: block; padding: 0.9rem 0; border-bottom: 1px dashed #dbdbdb; }
.rich { line-height: 1.9; overflow-wrap: anywhere; }
.rich h2, .rich h3, .rich h4 { color: var(--blue); margin: 1.2rem 0 0.35rem; line-height: 1.45; }
.rich h3 { font-size: 1.12rem; }
.rich p { margin: 0 0 0.8rem; }
.rich ul, .rich ol { margin: 0 0 0.8rem; padding-left: 1.3rem; }
.rich img { max-width: 100%; height: auto; }
.rich table { width: 100%; border-collapse: collapse; margin: 0 0 0.8rem; }
.rich th, .rich td { border: 1px solid #d5dbe3; padding: 0.35rem 0.5rem; }
.rich blockquote { margin: 0 0 0.8rem; padding: 0.4rem 0.8rem; border-left: 3px solid var(--blue); color: #444; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.7rem;
  margin: 0 0 1.2rem;
}
.stat-grid div { background: #f4f8fd; border-top: 3px solid var(--blue); padding: 0.75rem 0.4rem; text-align: center; }
.stat-grid strong { display: block; color: var(--blue); font-size: 1.25rem; }
.stat-grid span { color: #556; font-size: 0.85rem; }
.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.pager a, .pager span { min-width: 2rem; text-align: center; padding: 0.25rem 0.55rem; border: 1px solid #d0d7e2; }
.pager .on { background: var(--blue); color: #fff; border-color: var(--blue); }
.empty { color: var(--muted); }
.site-footer { margin-top: 2.2rem; background: var(--blue); color: #fff; }
.site-footer .wrap { padding: 1rem 0; line-height: 1.8; overflow-wrap: anywhere; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.84);
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; }

@media (max-width: 980px) {
  .home-split, .about-grid, .page-wrap { grid-template-columns: 1fr; }
  .cert-grid, .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
  .slogan-view { order: 3; flex: 1 1 100%; }
  .nav-toggle { display: block; align-self: flex-start; }
  .nav { display: none; flex-direction: column; }
  .nav.open { display: flex; }
  .nav > li { flex-direction: column; }
  .nav > li > a { justify-content: flex-start; padding-left: 0.8rem; }
  .sub-toggle {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 3.15rem;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
  }
  .submenu { position: static; display: none; width: 100%; max-width: none; box-shadow: none; }
  .nav > li.open > .submenu { display: block; }
  .nav > li:hover > .submenu { display: none; }
  .nav > li.open:hover > .submenu { display: block; }
  /* 手机上菜单展开后仍停在页头里，超出窗口的部分在菜单内部滚动。 */
  .nav.open { max-height: calc(100vh - 11rem); overflow-y: auto; }
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .guide-grid, .cert-grid, .friend-grid { grid-template-columns: 1fr 1fr; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo img { height: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .slogan-track, .banner .slide { transition: none; }
}
