/* 列表卡片图：4:3，无圆角 */
.card-img-150{
  position:relative;
  overflow:hidden;
  aspect-ratio: 4 / 3;
}
.card-img-150 img,
.card .card-img-top{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:0 !important;
}
@supports not (aspect-ratio: 1 / 1){
  .card-img-150::before{ content:""; display:block; padding-top:75%; }
  .card-img-150 > .img-link{ position:absolute; inset:0; }
  .card-img-150 img{ position:absolute; inset:0; height:100%; }
}
.clamp-2{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  overflow:hidden; line-height:1.6; min-height:calc(1.6em * 2);
}
.card-tags{ margin-top:2px; display:flex; gap:6px; flex-wrap:wrap; }
.card-tags .badge{ font-size:12px; }
.card-meta{ border-top:1px dashed #e2e8f0; padding-top:8px; margin-top:8px; }

/* ====== 搜索弹窗样式（窄、去上下线、内容垂直居中） ====== */
#searchAlert .modal-dialog{ max-width:250px; }          /* 想更窄可改 380px */
#searchAlert .modal-content{ border-radius:10px; }
#searchAlert .modal-header,
#searchAlert .modal-footer{ border:0; }                 /* 去掉上下两根线 */
#searchAlert .modal-title{ font-size:16px; }
#searchAlert .modal-body{
  display:flex; align-items:center; gap:8px;             /* 图标+文本垂直居中 */
  padding:16px 18px;
}
#searchAlert .modal-body .warn{ font-size:22px; color:#f0ad4e; line-height:1; }
@media (max-width:575.98px){ #searchAlert .modal-dialog{ margin:.5rem; } }

/* ===== Hero 粒子特效（tsParticles） ===== */
.hero-particles{ position:relative; overflow:hidden; }
#heroParticles{ position:absolute; inset:0; z-index:0; }
.hero-particles > .container{ position:relative; z-index:1; }
/* 可选：叠加微弱渐变提升对比度 */
.hero-particles::after{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.08));
}
@media (prefers-reduced-motion: reduce){
  #heroParticles{ display:none; }
}


/* 让粒子层下面恢复原来的背景图，并加轻微渐变 */
.hero-particles{
  --hero: url({pboot:sitepath}/static/upload/image/20180412/2.png);
}
.hero-particles::before{
  content:""; position:absolute; inset:0; z-index:0;
  background:
    var(--hero-bg, transparent);
}
#heroParticles{ z-index:1; }
.hero-particles > .container{ z-index:2; position:relative; }

/* ===== Hero Canvas 粒子，无外部依赖 ===== */
.hero-particles{ position:relative; overflow:hidden; }
.hero-particles::before{ content:""; position:absolute; inset:0; z-index:0;
  background: var(--hero-bg, transparent);
}
#heroCanvas{ position:absolute; inset:0; z-index:1; pointer-events:none; }
.hero-particles > .container{ position:relative; z-index:2; }
@media (prefers-reduced-motion: reduce){ #heroCanvas{ display:none; } }

/* ===== 背景左右缓慢移动 ===== */
.hero-particles{ --hero-pan-speed: 60s; } /* 速度：改 40s/80s 更快更慢 */
.hero-particles::before{
  animation: hero-pan var(--hero-pan-speed) linear infinite alternate;
  /* 只放大图片层，渐变层保持充满 */
  background-size: 100% 100%, 112% auto;
  will-change: background-position;
}
@keyframes hero-pan{
  0%   { background-position: 0% 50%,   0% 50%; }
  100% { background-position: 100% 50%, 100% 50%; }
}
@media (prefers-reduced-motion: reduce){
  .hero-particles::before{ animation: none; }
}

/* 统一控制首页/搜索页的横幅背景：完整显示、不裁切 */
.hero-particles{
  /* 让 var(--hero-bg) 生效 */
  background: var(--hero-bg);
  /* 关键三行： */
  background-size: contain !important;     /* 等比完整显示 */
  background-position: center top !important; /* 顶部对齐（可改 center） */
  background-repeat: no-repeat !important;

  /* 这几项保留原有布局特性（你之前是内联写的） */
  display: flex;
  align-items: center;
  position: relative;
  min-height: 320px;  /* 用你当前的高度即可 */
}

/* 可选：大屏保持同样规则（用于覆盖旧媒体查询的偏移） */
@media (min-width: 1200px){
  .hero-particles{
    background-position: center top !important;
  }
}