/* =========================================================
   xyydaTheme
   尺寸基准沿用老站：1003px 内容宽、7px 顶部色条、60px logo 条、
   260px 轮播、30px 导航、首页三栏 29.7% / 41.9% / 28.4%。
   颜色取自老站 header / menu / 栏目头。
   ========================================================= */

:root {
  --brand: #004B97;
  --brand-dark: #043F7E;
  --brand-strip: #004C98;
  --bar: #DDE4EE;
  --line: #DDE0E5;
  --ink: #666666;
  --ink-3: #333333;
  --muted: #999999;
  --prod-name: #082F9A;
  --page-bg: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  font-family: Arial, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 12px;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-text-size-adjust: 100%;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; }

.site-wrap {
  width: 100%;
  max-width: 1003px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
}

@media (min-width: 1024px) {
  .site-wrap { padding-left: 0; padding-right: 0; }
}

/* ---------- 顶部 ---------- */

.topline { height: 7px; background: var(--brand-strip); }
.logobar { background: var(--bar); }

.logobar-inner {
  height: 60px;
  display: flex;
  align-items: center;
}

.logolink { display: block; line-height: 0; max-width: 260px; }
.logobar-inner img { display: block; max-height: 44px; width: auto; }
.logotext { font-size: 22px; font-weight: bold; color: var(--brand); letter-spacing: 1px; }

/* ---------- 首页 banner 轮播 ---------- */

.hero { position: relative; margin-bottom: 24px; }

.hero .carousel-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1003 / 260;
  object-fit: cover;
}

.hero-indicators { margin-bottom: 8px; }

.hero-indicators [data-bs-target] {
  width: 26px;
  height: 3px;
  border: 0;
  background: rgba(255, 255, 255, .55);
  opacity: 1;
}

.hero-indicators .active { background: #fff; }

/* ---------- 主导航 ---------- */

.mainnav { background: var(--brand-dark); height: 30px; }
.mainnav-list { display: flex; height: 30px; }
.mainnav-list li { flex: 1 1 0; }

.mainnav-list a {
  display: block;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 12px;
  color: #fff;
}

.mainnav-list a:hover { background: rgba(255, 255, 255, .12); }

.mainnav-list a.is-active {
  background: #B3C5D8;
  color: var(--brand);
  font-weight: bold;
}

/* ---------- 主体 ---------- */

.mainbody {
  padding-top: 10px;
  padding-bottom: 10px;
}

@media (min-width: 992px) {
  .home-col-news  { flex: 0 0 29.7%; max-width: 29.7%; padding-right: 18px; }
  .home-col-intro { flex: 0 0 41.9%; max-width: 41.9%; padding-right: 18px; }
  .home-col-prod  { flex: 0 0 28.4%; max-width: 28.4%; }
}

@media (max-width: 991.98px) {
  .home-col-news, .home-col-intro { margin-bottom: 22px; }
}

/* ---------- 栏目头 ---------- */

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 4px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--brand);
  line-height: 1.4;
}

.sec-more { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sec-more:hover { color: var(--brand); }

/* ---------- 首页新闻 ---------- */

.news-list li { height: 25px; }
.news-list li.empty { color: var(--muted); line-height: 25px; }

.news-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 25px;
  color: var(--ink);
}

.news-list a:hover { color: var(--brand); }

.news-list .dot {
  flex: 0 0 3px;
  width: 3px;
  height: 3px;
  background: #666;
}

.news-list .t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.news-list .d { flex: 0 0 auto; color: var(--muted); }

/* ---------- 首页简介 ---------- */

.intro { font-size: 12px; line-height: 1.9; color: var(--ink); }
.intro::after { content: ""; display: block; clear: both; }
.intro p { margin: 0 0 6px; text-indent: 2em; }
.intro img { float: left; margin: 3px 10px 4px 0; max-width: 136px; height: auto; }
.intro p:first-child { margin-top: 0; }

/* ---------- 首页产品 ---------- */

.prod-list li + li { margin-top: 8px; }
.prod-list li.empty { color: var(--muted); }
.prod-list a { display: flex; align-items: center; gap: 8px; }

.prod-list .ph {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  background: #F2F4F7;
  overflow: hidden;
}

.prod-list .ph img { display: block; width: 100%; height: 100%; object-fit: cover; }

.prod-list .pn {
  font-size: 12px;
  font-weight: bold;
  color: var(--prod-name);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 列表页 ---------- */

.crumb {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { margin: 0 6px; color: #ccc; }
.crumb .cur { color: var(--ink-3); }

.page-head { margin-bottom: 14px; }

.page-head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: var(--brand);
}

/* 页面标题背景图：由「页面管理」的封面图驱动；没有设置时上面纯文字样式不变 */
.page-head-has-bg {
  position: relative;
  min-height: 168px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--brand-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-head-has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(4, 63, 126, .80) 0%,
    rgba(4, 63, 126, .38) 55%,
    rgba(4, 63, 126, .12) 100%);
}

.page-head-inner {
  position: relative;
  z-index: 1;
  min-height: 168px;
  display: flex;
  align-items: center;
  padding: 28px 36px;
}

.page-head-has-bg h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

@media (max-width: 767px) {
  .page-head-has-bg,
  .page-head-inner { min-height: 130px; }
  .page-head-inner { padding: 20px; }
  .page-head-has-bg h1 { font-size: 20px; }
}

.page-sub { margin: 6px 0 0; color: var(--muted); }

/* 产品中心分类切换 */
.prod-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.prod-tabs .tab {
  display: inline-block;
  padding: 5px 16px;
  font-size: 12px;
  color: var(--ink-3);
  background: #F2F4F7;
  border: 1px solid transparent;
  border-radius: 2px;
}

.prod-tabs .tab:hover { color: var(--brand); border-color: #B9C6D6; }
.prod-tabs .tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 991.98px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575.98px)  { .prod-grid { grid-template-columns: repeat(2, 1fr); } }

.prod-card {
  display: block;
  border: 1px solid #E7E7E7;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.prod-card:hover { border-color: #B9C6D6; box-shadow: 0 2px 8px rgba(0, 75, 151, .12); }

.prod-card .ph {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F7F8FA;
  overflow: hidden;
}

.prod-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prod-card .pn {
  display: block;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: bold;
  color: var(--prod-name);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: #E7E7E7;
}

.news-page { border-top: 1px solid var(--line); }

.news-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px dashed #ccc;
  color: var(--ink);
}

.news-row:hover { color: var(--brand); }
.news-row .nt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-row .ns { display: block; font-style: normal; color: var(--muted); margin-top: 3px; white-space: normal; }
.news-row .nd { flex: 0 0 auto; color: var(--muted); }

.empty-box {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
}

/* ---------- 详情页 ---------- */

.detail { padding-bottom: 20px; }

.detail-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: bold;
  color: var(--ink-3);
  text-align: center;
}

.detail-meta {
  text-align: center;
  color: var(--muted);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-cover { text-align: center; margin-bottom: 16px; }
.detail-cover img { max-width: 620px; width: 100%; height: auto; }

.detail-field { margin-bottom: 16px; }

.field-label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: bold;
  color: var(--brand);
  padding-left: 8px;
  border-left: 3px solid var(--brand);
  line-height: 1.2;
}

.richtext { line-height: 1.9; color: var(--ink); }
.richtext p { margin: 0 0 8px; }
.richtext img { max-width: 100%; height: auto; }
.richtext table { width: 100%; border-collapse: collapse; }
.richtext table td, .richtext table th { border: 1px solid #ddd; padding: 4px 6px; }

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 575.98px) { .detail-gallery { grid-template-columns: repeat(2, 1fr); } }

.detail-gallery .gal-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F7F8FA;
}

.detail-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-actions {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.btn-main, .btn-ghost {
  display: inline-block;
  padding: 6px 22px;
  margin: 0 6px;
  font-size: 12px;
  border-radius: 2px;
}

.btn-main { background: var(--brand); color: #fff; }
.btn-main:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 联系我们 ---------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 767.98px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-dl { margin: 14px 0 0; }
.contact-dl dt { color: var(--brand); font-weight: bold; margin-top: 10px; }
.contact-dl dd { margin: 2px 0 0; }

.contact-map img { display: block; width: 100%; height: auto; }

.map-placeholder {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F2F4F7;
  color: var(--muted);
  border: 1px solid var(--line);
}

/* ---------- 页脚 ---------- */

.footer {
  margin-top: 10px;
  padding: 12px 0 16px;
  background: var(--bar);
  text-align: center;
  color: #8D8D8D;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}

.footer-nav a { color: #777; padding: 2px 8px; }
.footer-nav a:hover { background: #B8C7DC; }
.footer-nav .sep { color: #9FB0C6; }

.footer-copy, .footer-icp { font-size: 12px; line-height: 1.9; }
.footer-copy span { margin-left: 10px; }
.footer-icp a { color: #777; }
.footer-icp a:hover { text-decoration: underline; }
.footer-icp .sep { margin: 0 8px; color: #9FB0C6; }
