/* =====================================================================
 * 新闻卡封面：统一 21:9 编辑横幅（2026-11-26 修订）
 * 原选择器 a > div:first-child 会命中首页卡片的「分类/日期」信息行，
 * 把那一行撑成 21:9（145px 高），标题被推到卡片中部，像没加载完。
 * 这里用 :has(img) 限定：只有真的带封面的卡片才启用横幅比例。
 * ===================================================================== */
a[href^="/news/"] > div:first-child:has(img) {
  aspect-ratio: 21 / 9 !important;
  overflow: hidden;
  position: relative;
}

a[href^="/news/"] > div:first-child:has(img) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}

a[href^="/news/"].group:hover > div:first-child:has(img) img {
  transform: scale(1.035);
}

/* 让栏目标签在照片上保持清晰 */
a[href^="/news/"] > div:first-child:has(img) > span {
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

/* 图片下缘压一条极淡的冷色过渡，衔接白色正文 */
a[href^="/news/"] > div:first-child:has(img)::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(to bottom, rgba(8, 42, 66, 0), rgba(8, 42, 66, .14));
  pointer-events: none;
  z-index: 1;
}

/* 无封面卡片：信息行保持自然高度，标题上移 */
a[href^="/news/"] > div:first-child:not(:has(img)) {
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
}