/* list.css - 全站栏目列表统一壳层（P1）
 * 配套模板：
 *   ~/Pages/Web/Templates/Portal/List.cshtml      （列表壳层：红标题 + 左侧子导航 + 图文列表 + 分页）
 *   ~/Pages/Web/Templates/Shared/_PortalSideNav.cshtml（左侧子导航）
 *   ~/Pages/Web/Templates/Shared/_Pager.cshtml   （分页条）
 * 视觉约定（对齐原设计稿，参考 xiehuixinwen / tongzhigonggao / dangjiangongzuo / zhuantizhuanlan）：
 *   主色红 #d5100d（标题条 / 高亮 / 徽标）、主色蓝 #0068b7（分页 / 链接）、
 *   内容宽度 1200px 居中、左侧子导航 274px（红标题条 61px + 粉色 #fff3f3 列表）。
 * 说明：设计稿是 1920px 固定定位，本文件改为流式布局；顶部 14px 灰分隔条与浅灰分隔线沿用设计稿。
 *       响应式：<1280px 收窄、<1200px 内容随视口收窄、<900px 侧栏置顶、<640px 列表项纵向堆叠。
 */

/* ============================================================
 * 内容区骨架：1200px 居中
 * ============================================================ */
.cms-portal {
  width: 100%;
  padding-bottom: 60px;
  background-color: #fff;
  font-family: PingFangSC-Regular, "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  box-sizing: border-box;
}

/* 设计稿顶部分隔灰条（14px，与关于我们页 group_4 一致） */
.cms-portal__divider {
  width: 1200px;
  max-width: 100%;
  height: 14px;
  margin: 24px auto 0;
  background-color: rgba(237, 237, 237, 1);
  box-sizing: border-box;
}

.cms-portal__grid {
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: 1200px;
  max-width: 100%;
  margin: 25px auto 0;
  box-sizing: border-box;
}

/* ============================================================
 * 左侧子导航（_PortalSideNav.cshtml）：274px = 61px 红标题条 + 粉色子栏目列表
 * ============================================================ */
.cms-portal-side {
  flex: 0 0 274px;
  width: 274px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cms-portal-side__head {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 61px;
  padding: 0 20px;
  background-color: #d5100d;
  box-sizing: border-box;
}

.cms-portal-side__head-text {
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  line-height: 32px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cms-portal-side__list {
  flex: 1 1 auto;
  margin: 0;
  padding: 20px 30px 24px;
  background-color: #fff3f3;
  list-style: none;
  box-sizing: border-box;
}

.cms-portal-side__cell {
  margin: 0;
}

.cms-portal-side__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(213, 16, 13, 0.1);
  color: #333;
  font-size: 18px;
  line-height: 26px;
  text-decoration: none;
  transition: color 0.15s;
}

.cms-portal-side__cell:last-child .cms-portal-side__item {
  border-bottom: 0;
}

.cms-portal-side__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧小箭头（设计稿是箭头图片，这里用 CSS 绘制，避免额外资源） */
.cms-portal-side__arrow {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-top: 2px solid #c9a3a3;
  border-right: 2px solid #c9a3a3;
  transform: rotate(45deg);
}

.cms-portal-side__item:hover {
  color: #d5100d;
}

.cms-portal-side__item:hover .cms-portal-side__arrow {
  border-color: #d5100d;
}

.cms-portal-side__item--active {
  color: #d5100d;
  font-family: PingFang-SC-Bold, PingFangSC-Regular, "Microsoft YaHei", sans-serif;
  font-weight: bold;
}

.cms-portal-side__item--active .cms-portal-side__arrow {
  border-color: #d5100d;
}

/* 无子栏目时用栏目简介占位（可选） */
.cms-portal-side__note {
  flex: 1 1 auto;
  padding: 20px 30px 24px;
  background-color: #fff3f3;
  color: #666;
  font-size: 15px;
  line-height: 30px;
  box-sizing: border-box;
}

/* ============================================================
 * 右侧主区：栏目说明行 + 图文列表
 * ============================================================ */
.cms-portal-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cms-portal-main__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d5100d;
}

.cms-portal-main__title {
  margin: 0;
  overflow: hidden;
  color: #333;
  font-size: 22px;
  font-weight: normal;
  line-height: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cms-portal-main__count {
  flex: 0 0 auto;
  color: #999;
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
}

.cms-portal-main__count em {
  color: #d5100d;
  font-style: normal;
  font-weight: bold;
}

.cms-portal-main__page {
  margin-left: 12px;
}

.cms-portal-main__desc,
.cms-portal-main__filter {
  margin: 12px 0 0;
  color: #888;
  font-size: 14px;
  line-height: 26px;
}

.cms-portal-main__filter em {
  color: #0068b7;
  font-style: normal;
}

/* ============================================================
 * 列表项：封面 + 标题/摘要 + 日期
 * ============================================================ */
.cms-portal-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.cms-portal-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px dashed #e6e6e6;
  box-sizing: border-box;
}

.cms-portal-item:last-child {
  border-bottom: 0;
}

.cms-portal-item__cover {
  position: relative;
  flex: 0 0 178px;
  width: 178px;
  height: 112px;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background-color: #f2f2f2;
  text-decoration: none;
}

.cms-portal-item__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.cms-portal-item__cover:hover .cms-portal-item__cover-img {
  transform: scale(1.04);
}

/* 无封面占位块（设计未提供占位图，先用灰色块 + 文案） */
.cms-portal-item__cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f6f6f6 0%, #ececec 100%);
  color: #b5b5b5;
  font-size: 13px;
  letter-spacing: 1px;
}

.cms-portal-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cms-portal-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cms-portal-item__title {
  display: flex;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #333;
  font-size: 17px;
  font-weight: normal;
  line-height: 26px;
}

.cms-portal-item__badge {
  flex: 0 0 auto;
  display: inline-block;
  height: 20px;
  margin-right: 8px;
  padding: 0 6px;
  border-radius: 2px;
  background-color: #d5100d;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  line-height: 20px;
}

.cms-portal-item__link {
  overflow: hidden;
  color: #333;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.cms-portal-item__link:hover {
  color: #d5100d;
}

.cms-portal-item__date {
  flex: 0 0 auto;
  color: #999;
  font-size: 14px;
  line-height: 26px;
  white-space: nowrap;
}

.cms-portal-item__summary {
  margin: 8px 0 0;
  overflow: hidden;
  color: #777;
  font-size: 15px;
  line-height: 26px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ============================================================
 * 空态
 * ============================================================ */
.cms-portal-empty {
  padding: 90px 0 100px;
  text-align: center;
}

.cms-portal-empty__icon {
  color: #d8d8d8;
  font-size: 42px;
  line-height: 48px;
}

.cms-portal-empty__text {
  margin: 14px 0 0;
  color: #999;
  font-size: 16px;
  line-height: 28px;
}

/* ============================================================
 * 分页条（_Pager.cshtml）：蓝白风格
 * ============================================================ */
.cms-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0 10px;
  color: #666;
  font-size: 14px;
}

.cms-pager__total {
  color: #999;
}

.cms-pager__total em {
  color: #d5100d;
  font-style: normal;
  font-weight: bold;
}

.cms-pager__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-pager__item {
  margin: 0;
}

.cms-pager__link {
  display: inline-block;
  box-sizing: border-box;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 2px;
  background-color: #fff;
  color: #666;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

a.cms-pager__link:hover {
  border-color: #0068b7;
  background-color: #f2f8ff;
  color: #0068b7;
}

.cms-pager__link--active {
  border-color: #0068b7;
  background-color: #0068b7;
  color: #fff;
}

.cms-pager__link--disabled {
  border-color: #eee;
  background-color: #fafafa;
  color: #ccc;
  cursor: not-allowed;
}

.cms-pager__gap {
  display: inline-block;
  min-width: 24px;
  color: #bbb;
  text-align: center;
}

.cms-pager__pages {
  color: #999;
}

/* ============================================================
 * 响应式
 * ============================================================ */

/* <1280px：内容整体收窄（设计稿 1193px 内容区） */
@media (max-width: 1280px) {
  .cms-portal__divider,
  .cms-portal__grid {
    width: 1100px;
  }
}

/* <1200px：随视口收窄，封面同步缩小 */
@media (max-width: 1200px) {
  .cms-portal__divider,
  .cms-portal__grid {
    width: calc(100% - 40px);
  }

  .cms-portal-item__cover {
    flex-basis: 150px;
    width: 150px;
    height: 96px;
  }
}

/* <900px：左侧子导航置顶（横向排布） */
@media (max-width: 900px) {
  .cms-portal__grid {
    flex-direction: column;
  }

  .cms-portal-side {
    flex: 0 0 auto;
    width: 100%;
  }

  .cms-portal-side__head {
    justify-content: flex-start;
    height: 48px;
    padding: 0 16px;
  }

  .cms-portal-side__head-text {
    font-size: 18px;
    line-height: 28px;
  }

  .cms-portal-side__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
    padding: 14px 16px;
  }

  .cms-portal-side__item {
    padding: 6px 12px;
    border: 1px solid rgba(213, 16, 13, 0.15);
    border-radius: 2px;
    font-size: 15px;
    line-height: 22px;
  }

  .cms-portal-side__arrow {
    display: none;
  }

  .cms-portal-main__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cms-portal-item {
    gap: 12px;
  }

  .cms-portal-item__cover {
    flex-basis: 120px;
    width: 120px;
    height: 80px;
  }

  .cms-pager {
    justify-content: flex-start;
  }
}

/* <640px：列表项纵向堆叠 */
@media (max-width: 640px) {
  .cms-portal-item {
    flex-direction: column;
  }

  .cms-portal-item__cover {
    width: 100%;
    height: 160px;
  }

  .cms-portal-item__head {
    flex-direction: column;
    gap: 4px;
  }

  .cms-pager__link {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    line-height: 28px;
  }
}
