
/* ==========================================================================
   移动端卡片排版修复（DSH）
   --------------------------------------------------------------------------
   问题：单列/双列布局下卡片仍被 height:100% 的拉伸链撑高，配合 <p class="flex-1">
        吃满剩余空间，导致卡片高度失控（实测 1272px）、图文间距异常、大片空白。
   修复：≤1023px 时断开拉伸链，卡片与段落均按内容高度。
   实测：卡片 1272px → 514px；<p> 832px → 72px；横向溢出 0px。
   ========================================================================== */
@media (max-width: 1023px) {
  /* ① 断开「容器 → 卡片」的 height:100% 拉伸链 */
  .glass-link-card,
  [class*="h-full"] > .glass-link-card,
  .grid > [class*="h-full"],
  .grid > [class*="h-full"] > .glass-link-card {
    height: auto !important;
    min-height: 0 !important;
  }
  /* ② 文字容器不再抢占剩余高度 */
  .glass-link-card > div:last-child {
    flex: 0 0 auto !important;
  }
  /* ③ 正文段落按内容高度（原本 flex-1 会被撑到数百 px） */
  .glass-link-card p {
    flex: 0 0 auto !important;
  }
  /* ④ 图片容器锁定 16:9 */
  .glass-link-card .aspect-\[16\/9\] {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    overflow: hidden !important;
  }
  .glass-link-card .aspect-\[16\/9\] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
}

/* 小屏再收一道：卡片圆角内不允许溢出 */
@media (max-width: 640px) {
  .glass-link-card { overflow: hidden !important; }
  .glass-link-card > div:first-child { overflow: hidden !important; }
  .glass-link-card > div:last-child { max-height: none !important; }
}
