/*
 * zbservice 补丁样式 —— 必须最后加载。
 *
 * 做三件事：
 *  1. 用 CSS 复刻原站由 layui.js 在运行时做的事（导航悬停下拉），
 *     这样就不用再引 jQuery + layui.js 两个包。
 *  2. 抵消 Tailwind preflight（后台包引入）对 img / ul / p 的重置，
 *     原主题是按浏览器默认样式写的。
 *  3. 补原主题漏掉的响应式：原站把容器宽度写死 1440px，
 *     在 1280/1366 笔记本和手机上会横向溢出。
 */

/* ── 1. 导航下拉（原来由 layui.js 切换 class 实现） ─────────────────────── */
.header-container .layui-nav .layui-nav-item > .layui-nav-child {
  display: none;
  /*
   * layui 写死了 top:65px，而本站导航项高 60px —— 中间空出 5px。
   * 鼠标从导航项往下移的时候会从这条缝里掉出去，:hover 断掉、菜单当场消失，
   * 表现就是「下拉里的项点不到」。改成贴着导航项底边。
   */
  top: 100%;
}
.header-container .layui-nav .layui-nav-item:hover > .layui-nav-child,
.header-container .layui-nav .layui-nav-item:focus-within > .layui-nav-child {
  display: block;
}
/*
 * 再加一条「桥」：菜单上方伸出一块透明区域盖住导航项底边，
 * 这样即使以后改了行高、或者浏览器四舍五入差半个像素，鼠标也不会掉出去。
 * 用 ::before 而不是 padding，是为了不把菜单自身的蓝底往上撑。
 */
.header-container .layui-nav .layui-nav-item > .layui-nav-child::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}
.header-container .layui-nav .layui-nav-item:hover > a .layui-nav-more {
  transform: rotate(180deg);
  margin-top: -9px;
}
/* 下拉项给足点击区域，鼠标扫过时整行都可点 */
.header-container .layui-nav .layui-nav-child dd > a {
  display: block;
  padding: 0 20px;
  white-space: nowrap;
}

/*
 * 悬停态：白字 + 加粗。
 *
 * layui 自带 `.layui-nav .layui-nav-child a:hover{background:#0c4d99;color:rgba(0,0,0,.8)}`
 * —— 深蓝底配近黑字，对比度极差，鼠标移上去反而看不清。这里改回白字。
 *
 * 加粗会让拉丁字母变宽（中文字形宽度不变），英文站下菜单宽度会跟着跳。
 * 所以用 ::after 把加粗后的文字预先占好位：始终按粗体宽度撑开，
 * 悬停时宽度纹丝不动。文案由组件写进 data-label。
 */
.header-container .layui-nav .layui-nav-child a,
.header-container .layui-nav .layui-nav-child a:hover,
.header-container .layui-nav .layui-nav-child dd.layui-this a {
  color: #fff;
}
.header-container .layui-nav .layui-nav-child a:hover,
.header-container .layui-nav .layui-nav-child a:focus-visible,
.header-container .layui-nav .layui-nav-child dd.layui-this a {
  background-color: #0c4d99;
  font-weight: 700;
}
/* 顶部一级导航悬停也加粗，保持一致（layui 已经给了白字） */
.header-container .layui-nav .layui-nav-item > a:hover,
.header-container .layui-nav .layui-nav-item.layui-this > a {
  color: #fff;
  font-weight: 700;
}

/* 加粗不撑宽：用不可见的粗体副本把宽度预留出来 */
.header-container .layui-nav .layui-nav-child dd > a[data-label],
.header-container .layui-nav .layui-nav-item > a[data-label] {
  position: relative;
}
.header-container .layui-nav .layui-nav-child dd > a[data-label]::after,
.header-container .layui-nav .layui-nav-item > a[data-label]::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  font-weight: 700;
  visibility: hidden;
  pointer-events: none;
}

/*
 * 左侧栏目导航（列表/详情页的「新闻公告」块）。
 * 这块是白底黑字，白字会看不见 —— 悬停改成品牌蓝底白字 + 加粗，
 * 和顶部下拉的反馈保持一致。
 */
.news-category dl dt > a {
  display: block;
  transition: background-color 0.15s, color 0.15s;
}
.news-category dl dt > a:hover,
.news-category dl dt > a:focus-visible {
  background-color: #3193de;
  color: #fff;
  font-weight: 700;
}
/* layui 默认把面包屑藏到 element.render() 之后，本站是服务端直出 */
.layui-breadcrumb {
  visibility: visible;
}

/* ── 2. Tailwind preflight 反制 ─────────────────────────────────────────── */
.zb-site img {
  display: inline-block;
  max-width: 100%;
}
.zb-site .section-content-item-img img,
.zb-site .swiper-img {
  display: block;
}
.zb-site .i_content ul,
.zb-site .news-category dl {
  list-style: none;
}

/* ── 3. 容器自适应 ──────────────────────────────────────────────────────── */
@media (max-width: 1440px) {
  .header-container,
  .index-container,
  .nav-container,
  .logo-container,
  .news-cust,
  .footer-container {
    width: 100% !important;
    max-width: 1440px;
    box-sizing: border-box;
  }
  .index-container,
  .news-cust {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* 首页左右两栏在窄屏下改为上下堆叠 */
@media (max-width: 1024px) {
  .rest-container {
    flex-direction: column;
  }
  .left-container,
  .right-container {
    width: 100% !important;
    max-width: none;
  }
}

/* 列表行：标题单行省略号，日期永不换行
   （原主题只在 ≥1441px 时给 li a 补了宽度限制，中间那段漏了） */
.news-list-right .i_content ul#fanye li {
  display: flex;
  align-items: center;
  gap: 16px;
}
.news-list-right .i_content ul#fanye li > a {
  float: none;
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-list-right .i_content ul#fanye li > span {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: auto;
}
.news-list-right .i_content ul#fanye li .istop {
  flex: 0 0 auto;
  background: #ff5722;
  color: #fff;
  font-size: 12px;
  padding: 0 6px;
  border-radius: 2px;
  margin-right: 6px;
}
.zb-empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
  list-style: none;
}

/* ── 顶部：语言切换 + 移动端菜单 ────────────────────────────────────────── */
.common-nav {
  display: flex;
  align-items: center;
}
.zb-lang-switch {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  padding: 4px 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}
.zb-lang-switch:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 移动端汉堡按钮（原站靠 layui.js，这里自绘，避免依赖 iconfont 字形） */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 16px;
  flex-direction: column;
  gap: 5px;
  align-self: flex-start;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .logo-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }
  .logo-container p:first-child {
    font-size: 22px !important;
  }
  .logo-container p:last-child {
    font-size: 14px !important;
  }
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-toggle {
    display: flex;
  }
  .header-container .ew-nav-group .layui-nav.menu-nav {
    display: none;
  }
  .header-container .ew-nav-group .layui-nav.menu-nav.nav-open {
    display: block;
  }
  .header-container .layui-nav .layui-nav-item {
    display: block;
    width: 100%;
  }
  .header-container .layui-nav .layui-nav-item > .layui-nav-child,
  .header-container .layui-nav .layui-nav-item:hover > .layui-nav-child {
    position: static;
    display: block;
    box-shadow: none;
  }
  .header-container .layui-form {
    padding: 0 16px 12px;
  }
  .header-container .layui-form .layui-input {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }
  .news-list-con {
    flex-direction: column;
  }
  .news-list-left,
  .news-list-right {
    width: 100% !important;
    max-width: none;
  }
  .section-content-item-position {
    display: none;
  }
}

/* ── 首页会员登录框的提示文案 ──────────────────────────────────────────── */
.zb-login-message {
  margin: 8px 16px 12px;
  color: #ff5722;
  font-size: 13px;
  line-height: 1.6;
}

/* ── 文章正文：原站正文是各来源网站的 HTML，宽度不受控 ─────────────────── */
/* .news-list-right 已经有 20/30px 内边距，这里只补上下留白，别再加左右 */
.zb-article-body {
  padding: 12px 0 24px;
  overflow-x: auto;
}
.zb-article-body img {
  max-width: 100%;
  height: auto;
}
.zb-article-body table {
  max-width: 100%;
  border-collapse: collapse;
}
.zb-article-body table td,
.zb-article-body table th {
  border: 1px solid #ddd;
  padding: 6px 8px;
}
.zb-article-nav {
  padding: 16px 0;
  border-top: 1px dashed #ddd;
  font-size: 14px;
  color: #666;
}
.zb-article-nav a {
  color: #1e5cb3;
}

/* ── 分页 ───────────────────────────────────────────────────────────────── */
ul#pages {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0 4px;
  margin: 0;
  justify-content: center;
}
ul#pages li a,
ul#pages li span {
  display: block;
  min-width: 32px;
  text-align: center;
  padding: 5px 10px;
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  color: #333;
  background: #fff;
  font-size: 14px;
}
ul#pages li a:hover {
  border-color: #1e5cb3;
  color: #1e5cb3;
}
ul#pages li.active span {
  background: #1e5cb3;
  border-color: #1e5cb3;
  color: #fff;
}
ul#pages li.disabled span {
  color: #c9c9c9;
  background: #fafafa;
}

/* ── 搜索结果页 ────────────────────────────────────────────────────────── */
.zb-search-form {
  display: flex;
  align-items: center;
  margin: 16px 0;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.zb-search-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 12px;
  font-size: 14px;
  background: transparent;
}
.zb-search-form button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  background: #1e5cb3;
  color: #fff;
  padding: 0 18px;
  line-height: 36px;
}
.zb-search-summary {
  margin: 0;
  padding: 12px 0;
  color: #666;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}
.zb-search-summary b {
  color: #1e5cb3;
}
.zb-search-list {
  list-style: none;
  margin: 0;
  padding: 0 0 10px;
}
.zb-search-list li {
  padding: 16px 0;
  border-bottom: 1px dashed #dcdcdc;
  height: auto;
  display: block;
}
.zb-search-list .t {
  display: block;
  float: none;
  width: auto;
  font-size: 16px;
  color: #2d3037;
  line-height: 1.6;
  margin-bottom: 6px;
  white-space: normal;
}
.zb-search-list .t:hover {
  color: #1e5cb3;
}
.zb-search-list .s {
  margin: 0 0 8px;
  color: #7a7f87;
  font-size: 13px;
  line-height: 1.8;
}
.zb-search-list .m {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 18px;
}
.zb-search-list em.kw {
  font-style: normal;
  color: #ff003e;
  font-weight: 600;
}

/* ── 页脚链接分隔符 ────────────────────────────────────────────────────── */
.zb-footer-links .zb-footer-sep {
  margin: 0 12px;
  opacity: 0.8;
}

/* ── 轮播（Swiper 的定位由 JS 写 inline style，这里补自绘版本需要的部分）── */
.news-swiper {
  position: relative;
  overflow: hidden;
}
.news-swiper .swiper-wrapper {
  display: flex;
}
.news-swiper .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
}
.news-swiper .swiper-pagination {
  bottom: 8px;
}
.news-swiper .swiper-pagination-bullet {
  cursor: pointer;
}
.news-swiper .swiper-button-prev,
.news-swiper .swiper-button-next {
  cursor: pointer;
}
