/* ============================================================
 * 栏目列表页 —— 按栏目切换的多套图文版式
 *   lead  : 封面式焦点（图上压标题）+ 右侧两条图文 + 带缩略图的双栏列表（头条 / 营销）
 *   brief : 时间轴图文流（日期 + 标题摘要 + 右侧缩略图）（快讯）
 *   wide  : 左右交错的宽幅图文（新片 / 纪录片）
 *   grid  : 三分栏卡片墙（默认：影评 / 影院 / 百科 / 票房 / 公司 / 招聘）
 * 配色沿用 editorial-rebuild.css 的「纸面 + 墨绿 + 砖红」体系
 * 字号阶梯：12 / 13 / 14 / 15 / 16 / 18 / 22 / 30 / 38
 * ============================================================ */

.cat-layout {
  --cat-ink: #19251f;
  --cat-muted: #53645a;
  --cat-line: #cfd7ce;
  --cat-accent: #b23b2d;
  --cat-media-bg: #e9ebe2;
}

.cat-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cat-layout ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-layout a {
  color: inherit;
  text-decoration: none;
}

.cat-layout img {
  display: block;
  max-width: 100%;
}

.cat-layout :focus-visible {
  outline: 2px solid var(--cat-accent);
  outline-offset: 3px;
}

/* ---------- grid：三分栏卡片墙 ---------- */
.cat-feed--grid {
  margin-top: 22px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cat-card {
  overflow: hidden;
  border: 1px solid var(--cat-line);
  border-radius: 12px;
  background: #fff;
}

.cat-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cat-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cat-media-bg);
}

.cat-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.cat-card > a:hover .cat-card-media img {
  transform: scale(1.045);
}

.cat-card-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 18px;
}

.cat-card-copy time {
  color: var(--cat-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cat-card-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: calc(2 * 1.45em);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.cat-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  min-height: calc(2 * 1.6em);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--cat-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- lead：封面式焦点区 ---------- */
.cat-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.cat-hero-main {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--cat-media-bg);
}

.cat-hero-media {
  position: absolute;
  inset: 0;
}

.cat-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.2, .7, .2, 1);
}

.cat-hero-main:hover .cat-hero-media img {
  transform: scale(1.03);
}

.cat-hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 92px 26px 18px;
  background: linear-gradient(to top, rgba(13, 19, 16, .95) 0%, rgba(13, 19, 16, .72) 46%, rgba(13, 19, 16, .12) 100%);
  color: #fff;
}

.cat-hero-kicker {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--cat-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.cat-hero-caption h2 {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 12px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #fff;
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cat-hero-caption p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 10px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.6;
}

.cat-hero-caption time {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cat-hero-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.cat-hero-main:hover .cat-hero-arrow {
  border-color: #fff;
  background: #fff;
  color: var(--cat-ink);
}

.cat-hero-rail {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  min-width: 0;
}

.cat-hero-rail-item {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--cat-line);
  border-radius: 12px;
  background: #fff;
}

.cat-hero-rail-media {
  position: absolute;
  inset: 0 0 74px 0;
  overflow: hidden;
  background: var(--cat-media-bg);
}

.cat-hero-rail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.cat-hero-rail-item:hover .cat-hero-rail-media img {
  transform: scale(1.045);
}

.cat-hero-rail-caption {
  position: absolute;
  inset: auto 0 0 0;
  height: 74px;
  padding: 7px 14px 7px;
  overflow: hidden;
  background: #fff;
}

.cat-hero-rail-caption h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--cat-ink);
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.32;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cat-hero-rail-caption time {
  display: block;
  margin-top: 2px;
  color: var(--cat-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cat-hero-rail-item:hover h3 {
  color: var(--cat-accent);
}

/* lead 版式下方：带缩略图的双栏列表 */
.cat-lead-feed {
  margin-top: 28px;
  border-top: 1px solid var(--cat-line);
}

.cat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}

.cat-list-item {
  border-bottom: 1px solid var(--cat-line);
}

.cat-list-item > a {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 15px 0;
}

/* 缩略图固定高度：不论标题几行，图上始终是同一个横向长方形 */
.cat-list-media {
  position: relative;
  width: 176px;
  height: 104px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cat-media-bg);
}

.cat-list-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.cat-list-item:hover .cat-list-media img {
  transform: scale(1.05);
}

.cat-list-copy time {
  color: var(--cat-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cat-list-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: inherit;
  font-size: 16.5px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cat-list-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--cat-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.cat-list-item:hover .cat-list-copy h3 {
  color: var(--cat-accent);
}

/* ---------- brief：时间轴图文流 ---------- */
.cat-feed--brief {
  margin-top: 6px;
}

.cat-brief-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 148px;
  align-items: center;
  gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cat-line);
}

.cat-brief-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-brief-date span {
  color: var(--cat-ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.cat-brief-date em {
  color: var(--cat-muted);
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.cat-brief-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: calc(2 * 1.5em);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: inherit;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cat-brief-body p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--cat-muted);
  font-size: 14px;
  line-height: 1.6;
}

.cat-brief-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cat-media-bg);
}

.cat-brief-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.cat-brief-item:hover .cat-brief-thumb img {
  transform: scale(1.05);
}

.cat-brief-body a:hover h3 {
  color: var(--cat-accent);
}

/* ---------- wide：左右交错的宽幅图文 ---------- */
.cat-feed--wide {
  margin-top: 6px;
}

.cat-wide-item {
  border-bottom: 1px solid var(--cat-line);
}

.cat-wide-item > a {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 26px 0;
}

.cat-wide-item:nth-child(even) > a {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.cat-wide-item:nth-child(even) .cat-wide-media {
  order: 2;
}

.cat-wide-item:nth-child(even) .cat-wide-copy {
  order: 1;
}

.cat-wide-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cat-media-bg);
}

.cat-wide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.cat-wide-item > a:hover .cat-wide-media img {
  transform: scale(1.045);
}

.cat-wide-copy {
  min-width: 0;
}

.cat-wide-meta {
  display: inline-block;
  color: var(--cat-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cat-wide-meta i {
  margin: 0 8px;
  font-style: normal;
}

.cat-wide-copy h3 {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 10px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: inherit;
  font-size: clamp(23px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cat-wide-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 10px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--cat-muted);
  font-size: 15px;
  line-height: 1.65;
}

.cat-wide-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--cat-accent);
  font-size: 13px;
  font-weight: 600;
}

.cat-wide-item > a:hover .cat-wide-copy h3 {
  color: var(--cat-accent);
}

.cat-wide-item > a:hover .cat-wide-more {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 空列表 ---------- */
.cat-grid:empty::after,
.cat-brief:empty::after,
.cat-wide:empty::after,
.cat-list:empty::after {
  content: "该栏目暂无内容";
  display: block;
  padding: 60px 0;
  color: var(--cat-muted);
  text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-hero {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  }

  .cat-wide-item > a,
  .cat-wide-item:nth-child(even) > a {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 26px;
  }

  .cat-wide-item:nth-child(even) .cat-wide-media {
    order: 0;
  }

  .cat-wide-item:nth-child(even) .cat-wide-copy {
    order: 0;
  }
}

@media (max-width: 900px) {
  .cat-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cat-hero-main {
    aspect-ratio: 16 / 10;
  }

  .cat-hero-rail {
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .cat-hero-rail-item {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .cat-list {
    grid-template-columns: 1fr;
  }

  .cat-brief-item {
    grid-template-columns: 72px minmax(0, 1fr) 124px;
    gap: 16px;
  }

  .cat-wide-item > a,
  .cat-wide-item:nth-child(even) > a {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 0;
  }

  .cat-wide-copy h3 {
    font-size: 21px;
  }
}

@media (max-width: 640px) {
  .cat-feed--grid {
    margin-top: 16px;
  }

  .cat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cat-card-copy h3 {
    font-size: 17px;
  }

  /* lead */
  .cat-hero-main {
    aspect-ratio: 16 / 11;
  }

  .cat-hero-caption {
    padding: 64px 16px 16px;
  }

  .cat-hero-caption h2 {
    margin-top: 8px;
    font-size: 21px;
  }

  .cat-hero-caption p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .cat-hero-arrow {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .cat-hero-rail {
    grid-template-columns: 1fr;
  }

  .cat-list-item > a {
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
  }

  .cat-list-media {
    width: 126px;
    height: 84px;
  }

  .cat-list-copy h3 {
    font-size: 15.5px;
  }

  /* brief */
  .cat-brief-item {
    grid-template-columns: 62px minmax(0, 1fr) 96px;
    gap: 12px;
    padding: 13px 0;
  }

  .cat-brief-date span {
    font-size: 17px;
  }

  .cat-brief-body h3 {
    font-size: 15.5px;
    min-height: calc(2 * 1.5em);
  }


  /* wide */
  .cat-wide-item > a,
  .cat-wide-item:nth-child(even) > a {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  .cat-wide-item:nth-child(even) .cat-wide-media {
    order: 0;
  }

  .cat-wide-item:nth-child(even) .cat-wide-copy {
    order: 0;
  }

  .cat-wide-copy h3 {
    margin-top: 8px;
    font-size: 19px;
  }

  .cat-wide-copy p {
    font-size: 13.5px;
  }

  .cat-wide-more {
    margin-top: 10px;
  }
}
