/* ============================================================
   shared-components · 区块样式
   约定：颜色一律使用主题 CSS 变量（P8 theme.css 定义），
   var() 内提供回退值，无主题时也能正常显示。
   此文件由 admin 引入（P4），发布时拷入 dist（P9）。
   ============================================================ */

/* ---------- 占位块（组件异常 / 组件未安装） ---------- */
.b-placeholder {
  padding: 24px;
  border: 1px dashed #e0a0a0;
  background: var(--color-surface, #fff5f5);
  color: #b05050;
  text-align: center;
  font-size: 14px;
  border-radius: 6px;
}

/* ---------- 标题块 ---------- */
.b-heading {
  padding: 36px 20px;
}
.b-heading .bh-title {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.3;
  color: var(--color-heading, #333);
}
.b-heading .bh-subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--color-text, #888);
}
.b-heading .bh-divider {
  width: 48px;
  height: 3px;
  margin: 0 auto;
  background: var(--color-primary, #c81e1e);
  border-radius: 2px;
}
/* 标题图标 */
.bh-icon {
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}
/* 标题背景 */
.b-heading--has-bg {
  padding: 24px 20px;
  border-radius: 8px;
}
/* 标题层级 */
.b-heading h1.bh-title {
  font-size: 36px;
}
.b-heading h2.bh-title {
  font-size: 30px;
}
.b-heading h3.bh-title {
  font-size: 24px;
}
.b-heading h4.bh-title {
  font-size: 20px;
}

/* ---------- 正文块 ---------- */
.b-text {
  padding: 12px 20px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text, #444);
}
.b-text p {
  margin: 0 0 12px;
}
.b-text p:last-child {
  margin-bottom: 0;
}
.b-text strong {
  color: var(--color-heading, #333);
}

/* ---------- 导航栏 ---------- */
.b-navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  height: 64px;
  background: var(--color-primary, #c81e1e);
  position: relative;
}
.b-navbar.sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}
/* 四种风格 */
.b-navbar.light {
  background: var(--color-surface, #fff);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}
.b-navbar.dark {
  background: #1c2128;
}
.b-navbar.glass {
  background: color-mix(in srgb, var(--color-primary, #c81e1e) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bn-logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.b-navbar.light .bn-logo {
  color: var(--color-heading, #2b120f);
}
.bn-logo-img {
  height: 36px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
.bn-links {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.bn-link {
  position: relative;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
/* 下划线 hover 动画 */
.bn-link::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.bn-link:hover::after,
.bn-link.active::after {
  transform: scaleX(1);
}
.bn-link:hover,
.bn-link.active {
  color: #fff;
}
.b-navbar.light .bn-link {
  color: var(--color-text, #4a4a4a);
}
.b-navbar.light .bn-link:hover,
.b-navbar.light .bn-link.active {
  color: var(--color-primary, #c81e1e);
}
/* 右侧：电话 + CTA */
.bn-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.bn-phone {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.b-navbar.light .bn-phone {
  color: var(--color-text, #4a4a4a);
}
.bn-cta {
  background: #fff;
  color: var(--color-primary, #c81e1e);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.b-navbar.light .bn-cta,
.b-navbar.dark .bn-cta {
  background: var(--color-primary, #c81e1e);
  color: #fff;
}
/* 汉堡按钮（桌面端隐藏） */
.bn-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.bn-burger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}
.b-navbar.light .bn-burger span {
  background: var(--color-heading, #333);
}
/* 移动端下拉菜单 */
.bn-mobile {
  display: none;
}
@media (max-width: 768px) {
  .b-navbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 8px 16px;
  }
  .bn-links,
  .bn-right {
    display: none;
  }
  .bn-burger {
    display: flex;
    margin-left: auto;
  }
  .bn-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 12px;
  }
  .b-navbar.open .bn-mobile {
    display: flex;
  }
  .b-navbar.open .bn-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .b-navbar.open .bn-burger span:nth-child(2) {
    opacity: 0;
  }
  .b-navbar.open .bn-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .bn-m-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .b-navbar.light .bn-m-link {
    color: var(--color-text, #4a4a4a);
    border-bottom-color: rgba(0, 0, 0, 0.06);
  }
  .bn-m-link:last-of-type {
    border-bottom: none;
  }
  .bn-m-cta {
    margin-top: 10px;
    text-align: center;
    background: #fff;
    color: var(--color-primary, #c81e1e);
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
  }
  .b-navbar.light .bn-m-cta,
  .b-navbar.dark .bn-m-cta {
    background: var(--color-primary, #c81e1e);
    color: #fff;
  }
}

/* ---------- 轮播图（scroll-snap） ---------- */
.b-carousel {
  overflow: hidden;
  background: var(--color-surface, #f0f0f0);
}
.bc-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.bc-track::-webkit-scrollbar {
  display: none;
}
.bc-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.bc-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 图片 ---------- */
.b-image {
  padding: 12px 20px;
}
.b-image img {
  display: inline-block;
  max-width: 100%;
}
/* 图片阴影 */
.b-image--shadow img {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
/* 图片链接 */
.bi-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.bi-link:hover img {
  opacity: 0.9;
  transition: opacity 0.2s;
}
/* 图片说明 */
.bi-caption {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
  line-height: 1.5;
}

/* ---------- 按钮 ---------- */
.b-button {
  padding: 12px 20px;
}
.bb-btn {
  display: inline-block;
  padding: 10px 32px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s;
}
.bb-btn.primary {
  background: var(--color-primary, #c81e1e);
  color: #fff;
}
.bb-btn.primary:hover {
  opacity: 0.88;
}
.bb-btn.outline {
  border: 1px solid var(--color-primary, #c81e1e);
  color: var(--color-primary, #c81e1e);
}
.bb-btn.outline:hover {
  background: var(--color-primary, #c81e1e);
  color: #fff;
}
/* 按钮尺寸变体 */
.bb-btn--small {
  padding: 6px 16px;
  font-size: 13px;
}
.bb-btn--large {
  padding: 14px 40px;
  font-size: 17px;
}
/* 通栏按钮 */
.bb-btn--block {
  display: block;
  width: 100%;
  text-align: center;
}
/* 按钮图标 */
.bb-icon {
  display: inline-block;
  margin: 0 4px;
}
.bb-text {
  display: inline-block;
}
/* 加载状态 */
.bb-btn.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}
.bb-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bb-spin 0.8s linear infinite;
}
.bb-btn.outline .bb-spinner {
  border-color: rgba(0, 0, 0, 0.2);
  border-top-color: var(--color-primary, #c81e1e);
}
@keyframes bb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 图文卡片组 ---------- */
.b-cards {
  display: grid;
  gap: 16px;
  padding: 12px 20px;
}
.bc-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  background: var(--color-surface, #fff);
}
/* 卡片样式 */
.bc-card--flat {
  border: none;
  box-shadow: none;
}
.bc-card--bordered {
  border: 1px solid var(--color-border, #eee);
}
.bc-card--elevated {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
/* 悬停效果 */
.bc-card--hover-none:hover {
  transform: none;
  box-shadow: inherit;
}
.bc-card--hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.bc-card--hover-glow:hover {
  box-shadow: 0 0 20px rgba(var(--color-primary-rgb, 200, 30, 30), 0.3);
}
.bc-card--hover-zoom .bc-img {
  transition: transform 0.3s;
}
.bc-card--hover-zoom:hover .bc-img {
  transform: scale(1.05);
}
/* 图片容器（相对定位用于标签） */
.bc-img-wrap {
  position: relative;
  overflow: hidden;
}
/* 图片比例 */
.bc-img {
  width: 100%;
  object-fit: cover;
  display: block;
}
.bc-img--ratio-16-9 {
  aspect-ratio: 16 / 9;
}
.bc-img--ratio-4-3 {
  aspect-ratio: 4 / 3;
}
.bc-img--ratio-1-1 {
  aspect-ratio: 1 / 1;
}
.bc-img-empty {
  background: var(--color-surface, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
}
/* 标签 */
.bc-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  z-index: 1;
}
.bc-body {
  padding: 12px 14px;
}
.bc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-heading, #333);
  margin-bottom: 6px;
}
.bc-desc {
  font-size: 13px;
  color: var(--color-text, #888);
  line-height: 1.6;
}

/* ---------- 分栏容器 ---------- */
.b-columns {
  display: grid;
  padding: 12px 20px;
}
.b-columns .bcol {
  min-width: 0;
}
.b-columns .bcol p:first-child {
  margin-top: 0;
}
.b-columns .bcol p:last-child {
  margin-bottom: 0;
}

/* ---------- 分割线 ---------- */
.b-divider {
  padding: 16px 20px;
}
.bd-line {
  border: none;
  margin: 0 auto;
}
/* 垂直分割线 */
.b-divider--vertical {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bd-vertical {
  display: inline-block;
  vertical-align: middle;
}

/* ---------- 图片画廊 ---------- */
.b-gallery {
  display: grid;
  padding: 12px 20px;
}
.bg-item {
  overflow: hidden;
}
.bg-item.rounded {
  border-radius: 8px;
}
.bg-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.25s;
  cursor: zoom-in;
}
.bg-item img:hover {
  transform: scale(1.05);
}

/* ---------- 灯箱（画廊点击看大图） ---------- */
.lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: lb-fade 0.18s ease;
}
.lightbox-mask img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
@keyframes lb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- 视频 ---------- */
.b-video {
  padding: 12px 20px;
}
.b-video video {
  width: 100%;
  display: block;
  background: #000;
  border-radius: 8px;
}

/* ---------- 时间轴 ---------- */
.b-timeline {
  padding: 12px 20px 12px 32px;
}
.bt-item {
  position: relative;
  padding: 0 0 22px 24px;
  border-left: 2px solid var(--tl-color, var(--color-primary, #c81e1e));
}
.bt-item:last-child {
  padding-bottom: 4px;
}
.bt-dot {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tl-color, var(--color-primary, #c81e1e));
}
.bt-date {
  font-size: 13px;
  color: var(--tl-color, var(--color-primary, #c81e1e));
  font-weight: 600;
  margin-bottom: 4px;
}
.bt-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-heading, #333);
  margin-bottom: 4px;
}
.bt-desc {
  font-size: 14px;
  color: var(--color-text, #888);
  line-height: 1.6;
}

/* ---------- 人员介绍 ---------- */
.b-team {
  display: grid;
  gap: 16px;
  padding: 12px 20px;
}
.btm-card {
  text-align: center;
  padding: 20px 14px;
  border: 1px solid var(--color-border, #eee);
  border-radius: 8px;
  background: var(--color-surface, #fff);
}
.btm-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
}
.btm-photo-empty {
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btm-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-heading, #333);
}
.btm-role {
  font-size: 13px;
  color: var(--color-primary, #c81e1e);
  margin: 4px 0 8px;
}
.btm-bio {
  font-size: 13px;
  color: var(--color-text, #888);
  line-height: 1.6;
}

/* ---------- 自定义 HTML ---------- */
.b-html {
  min-height: 20px;
}

/* ---------- 页脚 ---------- */
.b-footer {
  padding: 28px 24px;
  text-align: center;
}
.b-footer.dark {
  background: #23272e;
  color: #aab0ba;
}
.b-footer.light {
  background: var(--color-surface, #f5f6f8);
  color: var(--color-text, #666);
}
.bf-links {
  margin-bottom: 12px;
}
.bf-link {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  margin: 0 10px;
}
.bf-link:hover {
  color: var(--color-primary, #c81e1e);
}
.bf-contact {
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.bf-copyright {
  font-size: 13px;
  opacity: 0.75;
}

/* ---------- 地图 ---------- */
.b-map {
  padding: 12px 20px;
}
.b-map iframe {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* ---------- 新闻列表 ---------- */
.b-news {
  padding: 20px;
}
.bn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bn-title {
  margin: 0;
  font-size: 20px;
  color: var(--color-heading, #333);
  border-left: 4px solid var(--color-primary, #c81e1e);
  padding-left: 10px;
}
.bn-more {
  font-size: 13px;
  color: var(--color-primary, #c81e1e);
  text-decoration: none;
}
.bn-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bn-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--color-border, #eee);
  font-size: 15px;
}
.bn-item:last-child {
  border-bottom: none;
}
.bn-item-title {
  color: var(--color-heading, #333);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bn-date {
  color: #aaa;
  font-size: 13px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ---------- 新闻列表：卡片模式 ---------- */
.b-news.mode-card .bn-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.b-news.mode-card .bn-item {
  display: block;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: var(--color-surface, #fff);
  box-shadow: 0 2px 10px rgba(20, 24, 40, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.b-news.mode-card .bn-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20, 24, 40, 0.14);
}
.b-news.mode-card a.bn-item {
  text-decoration: none;
  color: inherit;
}
/* 封面容器：16:9 + 悬停缩放 + 底部渐变压角 */
.b-news.mode-card .bn-cover-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e8ebf3, #f4f6fa);
}
.b-news.mode-card .bn-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.b-news.mode-card .bn-item:hover .bn-cover {
  transform: scale(1.06);
}
/* 无封面时的占位图案 */
.b-news.mode-card .bn-cover-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #c3cad8;
}
.b-news.mode-card .bn-body {
  padding: 14px 16px 16px;
  display: block;
}
/* 分类标签 */
.b-news.mode-card .bn-cat {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  color: var(--color-primary, #c81e1e);
  background: color-mix(in srgb, var(--color-primary, #c81e1e) 10%, #fff);
}
/* 置顶角标（卡片与纯文字列表通用） */
.b-news .bn-top {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  margin-right: 6px;
  border-radius: 4px;
  color: #fff;
  background: var(--color-primary, #c81e1e);
  vertical-align: middle;
}
.b-news.mode-card .bn-top {
  margin-bottom: 8px;
}
.b-news.mode-card .bn-item-title {
  display: block;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-heading, #333);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.b-news.mode-card .bn-item:hover .bn-item-title {
  color: var(--color-primary, #c81e1e);
}
.b-news.mode-card .bn-summary {
  margin-top: 8px;
  padding: 0;
  font-size: 13px;
  color: var(--color-text, #888);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 日期行：左侧主题色短线 + 浅灰文字 */
.b-news.mode-card .bn-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  font-size: 12px;
  color: #a8aebb;
}
.b-news.mode-card .bn-date::before {
  content: '';
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--color-primary, #c81e1e);
}

/* ---------- 友情链接 ---------- */
.b-friend-links {
  padding: 24px 20px;
}
.bfl-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-heading, #333);
}
.bfl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.bfl-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-border, #e8e8e8);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #555);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.bfl-link:hover {
  color: var(--color-primary, #c81e1e);
  border-color: var(--color-primary, #c81e1e);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.bfl-logo {
  height: 20px;
  max-width: 80px;
  object-fit: contain;
  display: block;
}
/* logo 模式加大点击区域 */
.bfl--logo .bfl-link {
  padding: 10px 18px;
}
.bfl--logo .bfl-logo {
  height: 24px;
}
@media (max-width: 768px) {
  .bfl-list {
    gap: 8px;
  }
  .bfl-link {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* ---------- 留言表单 ---------- */
.b-msgform {
  padding: 20px;
  max-width: 640px;
  margin: 0 auto;
}
.bm-title {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--color-heading, #333);
  text-align: center;
}
.bm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bm-input {
  padding: 10px 14px;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.bm-input:focus {
  outline: none;
  border-color: var(--color-primary, #c81e1e);
}
.bm-textarea {
  min-height: 110px;
  resize: vertical;
}
.bm-submit {
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.bm-submit:hover {
  opacity: 0.9;
}

/* ---------- 站内搜索框 ---------- */
.b-search {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 0;
}
.bs-form {
  display: flex;
  gap: 8px;
}
.bs-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: var(--color-surface, #fff);
  color: var(--color-text, #444);
}
.bs-input:focus {
  outline: none;
  border-color: var(--color-primary, #c81e1e);
}
.bs-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.bs-btn:hover {
  opacity: 0.9;
}

/* ---------- 搜索结果页（发布器生成的静态页） ---------- */
.sp-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 60px;
}
.sp-title {
  margin: 0 0 18px;
  font-size: 24px;
  color: var(--color-heading, #333);
}
.sp-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.sp-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.sp-input:focus {
  outline: none;
  border-color: var(--color-primary, #c81e1e);
}
.sp-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.sp-btn:hover {
  opacity: 0.9;
}
.sp-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}
.sp-group {
  margin-bottom: 24px;
}
.sp-group h4 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--color-heading, #333);
  border-left: 3px solid var(--color-primary, #c81e1e);
  padding-left: 10px;
}
.sp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-border, #eee);
}
.sp-item:last-child {
  border-bottom: none;
}
.sp-link {
  display: block;
  text-decoration: none;
}
.sp-item-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading, #333);
}
.sp-link:hover .sp-item-title {
  color: var(--color-primary, #c81e1e);
}
.sp-item-date {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #bbb;
}
.sp-item-desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 搜索结果关键词高亮 */
.sp-list mark {
  background: #ffe58f;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.sp-empty {
  padding: 48px 0;
  text-align: center;
  color: #999;
  font-size: 14px;
}
.sp-loading {
  padding: 48px 0;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ---------- 新闻详情页（发布器生成的模板页） ---------- */
.b-news-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
/* 面包屑导航 */
.nd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #999;
}
.nd-bc-link {
  color: #888;
  text-decoration: none;
  flex-shrink: 0;
}
.nd-bc-link:hover {
  color: var(--color-primary, #c81e1e);
}
.nd-bc-sep {
  color: #ccc;
  flex-shrink: 0;
}
.nd-bc-current {
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.nd-bc-text {
  color: #999;
  flex-shrink: 0;
}
/* 分享工具栏 */
.nd-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 28px 0 8px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border, #eee);
  font-size: 13px;
}
.nd-share-label {
  color: #999;
}
.nd-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 20px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #555);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nd-share-btn:hover {
  color: var(--color-primary, #c81e1e);
  border-color: var(--color-primary, #c81e1e);
}
.nd-share-copy.copied {
  color: #52c41a;
  border-color: #52c41a;
}
/* 文章目录（TOC）：桌面端右侧 sticky 侧栏，移动端顶部块 */
.b-news-detail--with-toc {
  max-width: 1024px;
}
.nd-wrap {
  display: flex;
  align-items: flex-start;
  gap: 36px;
}
.nd-wrap .nd-content {
  flex: 1;
  min-width: 0;
}
.nd-toc {
  order: 2;
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  background: var(--color-surface, #fafafa);
  border: 1px solid var(--color-border, #eee);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
}
.nd-toc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-heading, #333);
  margin-bottom: 8px;
}
.nd-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.nd-toc-item {
  margin: 2px 0;
}
.nd-toc-l3 {
  padding-left: 14px;
}
.nd-toc-link {
  display: block;
  padding: 3px 0 3px 10px;
  border-left: 2px solid transparent;
  color: #777;
  text-decoration: none;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.nd-toc-link:hover {
  color: var(--color-primary, #c81e1e);
}
.nd-toc-link.active {
  color: var(--color-primary, #c81e1e);
  border-left-color: var(--color-primary, #c81e1e);
  font-weight: 600;
}
/* 锚点跳转时避开吸顶导航 */
.nd-content h2,
.nd-content h3 {
  scroll-margin-top: 90px;
}
@media (max-width: 900px) {
  .nd-wrap {
    display: block;
  }
  .nd-toc {
    position: static;
    width: auto;
    margin-bottom: 24px;
  }
  .nd-toc-list {
    max-height: 40vh;
  }
}
.nd-title {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.4;
  color: var(--color-heading, #333);
}
.nd-meta {
  font-size: 13px;
  color: #aaa;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border, #eee);
}
.nd-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text, #444);
}
.nd-content img {
  max-width: 100%;
}
.nd-empty {
  text-align: center;
  color: #999;
  padding: 60px 0;
}
/* 上一篇 / 下一篇 */
.nd-pn {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border, #eee);
}
.nd-pn-item {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--color-primary, #2f6bff);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nd-pn-item:hover {
  text-decoration: underline;
}
.nd-pn-next {
  text-align: right;
}

/* ---------- 新闻详情：相关推荐 ---------- */
.nd-related {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border, #eee);
}
.nr-title {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--color-heading, #333);
}
.nr-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nr-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--color-border, #f0f0f0);
}
.nr-list li:last-child {
  border-bottom: none;
}
.nr-link {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--color-text, #444);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}
.nr-link:hover {
  color: var(--color-primary, #c81e1e);
}
.nr-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #bbb;
}

/* ---------- 新闻评论区（发布器生成的详情页） ---------- */
.nc-comments {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border, #eee);
}
.nc-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--color-heading, #333);
}
.nc-count {
  font-size: 14px;
  color: #aaa;
  font-weight: 400;
}
.nc-list {
  margin-bottom: 20px;
}
.nc-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--color-border, #eee);
}
.nc-item:last-child {
  border-bottom: none;
}
.nc-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.nc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary, #2f6bff);
}
.nc-date {
  font-size: 12px;
  color: #bbb;
}
.nc-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text, #444);
  white-space: pre-wrap;
  word-break: break-word;
}
.nc-reply {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--color-surface, #f2f6ff);
  border-left: 3px solid var(--color-primary, #2f6bff);
  border-radius: 0 6px 6px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.nc-reply-tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary, #2f6bff);
}
.nc-reply-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text, #444);
  white-space: pre-wrap;
  word-break: break-word;
}
.nc-reply-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #bbb;
}
.nc-empty {
  padding: 24px 0;
  font-size: 13px;
  color: #bbb;
  text-align: center;
}
.nc-form {
  background: var(--color-surface, #fafafa);
  border: 1px solid var(--color-border, #eee);
  border-radius: var(--radius, 6px);
  padding: 16px;
}
.nc-field {
  margin-bottom: 12px;
}
.nc-field input,
.nc-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text, #444);
  border: 1px solid var(--color-border, #ddd);
  border-radius: var(--radius, 6px);
  background: var(--color-surface, #fff);
  outline: none;
  transition: border-color 0.2s;
}
.nc-field input:focus,
.nc-field textarea:focus {
  border-color: var(--color-primary, #2f6bff);
}
.nc-field textarea {
  resize: vertical;
  min-height: 80px;
}
.nc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nc-tip {
  font-size: 12px;
  color: #bbb;
}
.nc-submit {
  border: none;
  background: var(--color-primary, #2f6bff);
  color: #fff;
  font-size: 14px;
  padding: 9px 24px;
  border-radius: var(--radius, 6px);
  cursor: pointer;
  transition: opacity 0.2s;
}
.nc-submit:hover {
  opacity: 0.9;
}
.nc-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- 移动端适配（发布页 & 手机画布共用） ---------- */
@media (max-width: 768px) {
  /* 栅格降列 */
  .b-cards,
  .b-gallery,
  .b-team {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .b-columns {
    grid-template-columns: 1fr !important;
  }

  /* 区块横向内边距收紧（20px → 14px） */
  .b-text,
  .b-image,
  .b-button,
  .b-cards,
  .b-columns,
  .b-divider,
  .b-gallery,
  .b-video,
  .b-team,
  .b-map,
  .b-news,
  .b-msgform,
  .p-callout {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* 标题块 */
  .b-heading {
    padding: 24px 16px;
  }
  .b-heading .bh-title {
    font-size: 24px;
  }
  .b-heading .bh-subtitle {
    font-size: 14px;
  }

  /* 正文 */
  .b-text {
    font-size: 15px;
  }

  /* 占位提示 */
  .b-placeholder {
    font-size: 13px;
  }

  /* 轮播图：固定高度改为随屏宽比例，避免半屏空白 */
  .b-carousel {
    height: min(56vw, 300px) !important;
  }

  /* 视频 / 地图：内联固定高度过高，移动端按比例收缩 */
  .b-video video {
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
  .b-map iframe {
    height: min(60vw, 400px) !important;
  }

  /* 时间轴缩进收紧 */
  .b-timeline {
    padding-left: 24px;
  }
  .bt-item {
    padding-left: 18px;
  }

  /* 新闻列表（纯文字模式） */
  .bn-item {
    padding: 10px 0;
    font-size: 14px;
  }
  .bn-date {
    font-size: 12px;
    margin-left: 10px;
  }

  /* 新闻卡片模式间距 */
  .b-news.mode-card .bn-list {
    gap: 14px;
  }
  .b-news.mode-card .bn-body {
    padding: 12px 14px 14px;
  }

  /* 留言表单：输入框 16px 避免 iOS 聚焦自动放大 */
  .b-msgform {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .bm-input,
  .bm-textarea {
    font-size: 16px;
  }

  /* 页脚链接增大触达面积 */
  .b-footer {
    padding: 20px 16px;
  }
  .bf-link {
    display: inline-block;
    margin: 4px 10px;
  }

  /* 灯箱边距收紧 */
  .lightbox-mask {
    padding: 12px;
  }
}

/* ---------- 插件：提示框（_template:callout） ---------- */
.p-callout { padding: 16px 20px; margin: 12px 20px; border-radius: 0 6px 6px 0; }
.p-callout-text { font-size: 15px; line-height: 1.7; color: #333; }

/* ==================== P1 组件增强 ==================== */

/* ---------- 导航栏：布局方式 ---------- */
.b-navbar--left .bn-links {
  justify-content: flex-start;
}
.b-navbar--right .bn-links,
.b-navbar--split .bn-links {
  justify-content: flex-end;
}

/* ---------- 导航栏：下拉菜单 ---------- */
.bn-item.has-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.bn-arrow {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 8px 6px 8px 0;
  margin-left: -8px;
  transition: transform 0.2s;
}
.b-navbar.light .bn-arrow {
  color: var(--color-text, #4a4a4a);
}
.bn-item.has-dropdown:hover .bn-arrow,
.bn-item.has-dropdown.open .bn-arrow {
  transform: rotate(180deg);
}
.bn-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--color-surface, #fff);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  padding: 6px;
  z-index: 300;
}
.bn-item.has-dropdown:hover .bn-dropdown,
.bn-item.has-dropdown.open .bn-dropdown {
  display: block;
}
.bn-dropdown-link {
  display: block;
  padding: 9px 14px;
  color: var(--color-text, #4a4a4a);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  white-space: nowrap;
}
.bn-dropdown-link:hover,
.bn-dropdown-link.active {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-primary, #c81e1e);
}
/* 移动端：子菜单缩进展示 */
.bn-m-sub {
  display: flex;
  flex-direction: column;
}
.bn-m-sublink {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 8px 8px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.b-navbar.light .bn-m-sublink {
  color: var(--color-text, #4a4a4a);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
.bn-m-sublink.active {
  color: var(--color-primary, #c81e1e);
}

/* ---------- 导航栏：搜索框 ---------- */
.bn-search-input {
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  border: none;
  outline: none;
  font-size: 13px;
  width: 150px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: width 0.2s, background 0.2s;
}
.bn-search-input:focus {
  width: 190px;
  background: rgba(255, 255, 255, 0.28);
}
.bn-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.b-navbar.light .bn-search-input {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text, #4a4a4a);
}
.b-navbar.light .bn-search-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

/* ---------- 画廊：视频项 / 说明文字 / 瀑布流 ---------- */
.bg-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}
.bg-item {
  position: relative;
}
.bg-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 10px 8px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  pointer-events: none;
}
/* 瀑布流：容器改多列布局，图片恢复自然高度 */
.b-gallery--masonry {
  display: block;
}
.b-gallery--masonry .bg-item {
  break-inside: avoid;
}
.b-gallery--masonry .bg-item img,
.b-gallery--masonry .bg-video {
  aspect-ratio: auto;
}

/* ---------- 灯箱：左右切换 / 说明 / 视频 ---------- */
.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-mask video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.lb-prev {
  left: 18px;
}
.lb-next {
  right: 18px;
}
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.32);
}
.lb-caption {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  pointer-events: none;
}

/* ---------- 正文：首字下沉 ---------- */
.b-text--drop-cap p:first-of-type::first-letter {
  float: left;
  font-size: 3em;
  line-height: 1;
  font-weight: 700;
  padding-right: 8px;
  padding-top: 2px;
  color: var(--color-primary, #c81e1e);
}

/* ---------- 页脚：多列 / 社交 / 返回顶部 ---------- */
.b-footer--multi {
  text-align: left;
}
.bf-columns {
  display: grid;
  gap: 24px;
  margin-bottom: 20px;
}
.bf-col-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: inherit;
}
.bf-col-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bf-col-link {
  color: inherit;
  opacity: 0.72;
  text-decoration: none;
  font-size: 13px;
  transition: opacity 0.15s;
}
.bf-col-link:hover {
  opacity: 1;
  color: var(--color-primary, #c81e1e);
}
.b-footer--multi .bf-contact {
  justify-content: flex-start;
}
.bf-social {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 6px 0 12px;
}
.b-footer--multi .bf-social {
  justify-content: flex-start;
}
.bf-social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.15s, background 0.15s;
}
.bf-social-link:hover {
  transform: translateY(-2px);
  background: var(--color-primary, #c81e1e);
}
.b-footer.light .bf-social-link {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text, #4a4a4a);
}
.b-footer.light .bf-social-link:hover {
  background: var(--color-primary, #c81e1e);
  color: #fff;
}
.bf-backtop {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  z-index: 500;
  opacity: 0.92;
  transition: transform 0.15s, opacity 0.15s;
}
.bf-backtop:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ---------- 视频：点击播放封面 ---------- */
.bv-cover {
  position: relative;
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.bv-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  cursor: pointer;
  background: var(--color-primary, #c81e1e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.bv-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
}
.bv-play--circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 22px;
}
.bv-play--square {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  font-size: 22px;
}
.bv-play--minimal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  font-size: 16px;
}

/* ---------- P1 移动端补充 ---------- */
@media (max-width: 768px) {
  .lb-prev,
  .lb-next {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .lb-prev {
    left: 8px;
  }
  .lb-next {
    right: 8px;
  }
  .bf-columns {
    gap: 18px;
  }
  /* 多列页脚移动端转 2 列 */
  .b-footer--multi .bf-columns {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .bv-play--circle,
  .bv-play--square {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }
}

/* ==================== P2 组件增强 ==================== */

/* ---------- 分栏容器：多栏对齐 / 背景 ---------- */
.b-columns[style] {
  /* gridTemplateColumns 由内联样式接管 */
}
.b-columns--bg .bcol {
  min-width: 0;
}
@media (max-width: 768px) {
  /* 多栏移动端自动堆叠 */
  .b-columns {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- 地图：圆角 / 阴影 / 地址卡片 ---------- */
.b-map {
  position: relative;
}
.b-map--square iframe {
  border-radius: 0;
}
.b-map--shadow iframe {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.bm-card {
  position: absolute;
  top: 26px;
  left: 34px;
  background: var(--color-surface, #fff);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  font-size: 13px;
  max-width: 250px;
}
.bm-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--color-heading, #2b120f);
}
.bm-card-addr {
  color: #666;
  line-height: 1.5;
}
.bm-card-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--color-primary, #c81e1e);
  text-decoration: none;
  font-size: 12px;
}
.bm-card-link:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .bm-card {
    top: 16px;
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* ==================== 全站公告条 ==================== */
.nt-bar {
  background: var(--color-primary, #c81e1e);
  color: #fff;
  font-size: 14px;
  position: relative;
  z-index: 60;
}
.nt-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9px 44px 9px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  line-height: 1.5;
}
.nt-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nt-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nt-link:hover {
  opacity: 0.85;
}
.nt-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nt-close:hover {
  background: rgba(255, 255, 255, 0.32);
}
@media (max-width: 768px) {
  .nt-inner {
    padding: 8px 40px 8px 14px;
    font-size: 13px;
    gap: 10px;
  }
}

/* ---------- 深色模式（html[data-theme="dark"]，由 publisher 注入变量覆盖，site.js 提供切换按钮） ---------- */
html[data-theme='dark'] body {
  transition: background-color 0.3s, color 0.3s;
}
/* 新闻卡片封面占位渐变：深色下改为暗色面 */
html[data-theme='dark'] .b-news.mode-card .bn-cover-wrap {
  background: linear-gradient(135deg, #1d222b, #242a35);
}
/* 搜索结果关键词高亮：深色下使用暗金底 */
html[data-theme='dark'] .sp-list mark {
  background: #8a6d1f;
  color: #f5e9c8;
}
/* 下拉面板 hover：深色下用亮色半透明 */
html[data-theme='dark'] .bn-dropdown-link:hover,
html[data-theme='dark'] .bn-dropdown-link.active {
  background: rgba(255, 255, 255, 0.08);
}
/* 深色模式切换按钮（固定在返回顶部按钮上方，避免重叠） */
.dm-toggle {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 999;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border, #e5e5e5);
  background: var(--color-surface, #fff);
  color: var(--color-heading, #333);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s, color 0.3s;
}
.dm-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* ---------- 打印样式（@media print）：正文白底黑字、隐藏非内容区块、防分页割裂 ---------- */
@media print {
  /* 无论深色模式与否，打印一律白底黑字 */
  :root,
  html[data-theme='dark'] {
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-heading: #000000;
    --color-surface: #ffffff;
    --color-border: #cccccc;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  /* 隐藏非正文区块：导航 / 轮播 / 页脚 / 公告条 / 悬浮按钮 / 搜索 / 留言 / 视频 / 地图 / 友链 / 画廊 */
  .b-navbar,
  .b-carousel,
  .b-footer,
  .nt-bar,
  .bf-backtop,
  .dm-toggle,
  .lightbox-mask,
  .b-search,
  .sp-page,
  .b-msgform,
  .b-video,
  .b-map,
  .b-friend-links,
  .b-gallery,
  .b-divider {
    display: none !important;
  }
  /* 新闻详情页：隐藏侧栏目录 / 分享栏 / 评论表单与提示，评论列表保留可读 */
  .nd-toc,
  .nd-share,
  .nc-form,
  .nc-tip {
    display: none !important;
  }
  /* 新闻详情页布局：去掉两栏与侧栏占位，正文占满整行 */
  .nd-wrap {
    display: block !important;
  }
  .nd-content,
  .nd-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* 区块卡片去除投影与背景，减少油墨 */
  .bc-card,
  .btm-card,
  .b-news.mode-card .bn-item,
  .bfl-link,
  .nd-related,
  .nc-comments,
  .nc-item {
    box-shadow: none !important;
    background: none !important;
  }
  /* 标题与段落避免跨页割裂 */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .nd-title {
    break-after: avoid;
    page-break-after: avoid;
  }
  .bc-card,
  .btm-card,
  .nr-list li,
  .nd-pn-item,
  .nc-item,
  .nd-related,
  .bn-item,
  .nd-toc-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  /* 链接去掉下划线并保留黑字 */
  a {
    color: #000 !important;
    text-decoration: none;
  }
  a[href^='http']::after {
    content: '（' attr(href) '）';
    font-size: 11px;
    color: #666;
  }
}
