/* ============================================
   card-block.css
   通用卡片模块样式（Card Block Styles）
   适用于首页或其他页面的卡片型分区模块
   ============================================ */

.section.transparent  {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}


/* ---- 卡片外层容器 ---- */
.cb-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* ---- 卡片头部：渐变背景 + 底部分割线 ---- */
.cb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(180deg, #f4f8ff 0%, #e8f1ff 100%);
  border-bottom: 1px solid #dce7fb;
}

.cb-card-header-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cb-card-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f89ff;
}

.cb-card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #2b2f36;
}

.cb-card-more {
  font-size: 15px;
  color: #4c84ff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cb-card-more:hover {
  text-decoration: underline;
  color: #2f6fff !important;
}

/* ---- 卡片内容主体 ---- */
.cb-card-body {
  padding: 16px 20px 20px;
}

.cb-item-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 14px 5px;
  padding: 6px;
  max-height: 600px;
  overflow-y: auto;
}

/* ---- 单个圆角按钮块 ---- */
.cb-item-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #2f89ff;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.04s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(47, 137, 255, 0.18);
}
.cb-item-pill:hover {
  background: #1e6fe0;
}
.cb-item-pill:active {
  transform: translateY(1px);
}



/* =========================
   List Tiles inside cb-card
   ========================= */

/* 头部右侧操作按钮区 */
.cb-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.cb-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7a99;
  text-decoration: none;
}
.cb-card-action:hover { color: #2f6fff; }

/* 小卡片网格 —— 默认 4 列（和截图相近） */
.cb-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 16px;
}

/* 单个小卡片 */
.cb-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #cce8d4;   /* ✅ 改为柔和绿色边框 */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .04s ease, border-color .15s ease, background .15s ease;
}
.cb-tile:hover {
  border-color: #8fd6a5;       /* ✅ 悬停时更亮的绿色边框 */
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}


.cb-tile:active { transform: translateY(1px); }

/* 左侧编号圆 */
.cb-tile-number {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #2f89ff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 标题与元信息 */
.cb-tile-title {
  font-size: 14px;
  font-weight: 600;
  color: #2b2f36;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cb-tile-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aa7bd;
  font-size: 12px;
  margin-top: 6px;
}

/* 右上角徽标（如：热门） */
.cb-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  color: #ff5a5a;
  background: rgba(255, 90, 90, .1);
}

/* 高亮卡：左侧渐变条 + 淡底色（与截图第一张相似） */
.cb-tile--active {
  background: linear-gradient(90deg, #fff5f5 0%, #ffffff 40%);
  border-color: #ffd7d7;
}
.cb-tile--active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ff9f9f 0%, #ff6b6b 100%);
}

/* 可选：小图标容器（放右侧第三列） */
.cb-tile-trailing {
  color: #9aa7bd;
  font-size: 12px;
}

/* —— 响应式（可选） —— */
@media (max-width: 1280px) {
  .cb-tile-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .cb-tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cb-tile-grid { grid-template-columns: 1fr; }
}



/* =========================
   Media Tiles (thumb + text)
   ========================= */

/* 网格容器：保持和小卡片网格一致，可按需改列数 */
.cb-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 如图一行 3 个 */
  gap: 14px 16px;
}

/* 单个媒体卡片：左图右文 */
.cb-media-tile {
  display: grid;
  grid-template-columns: 64px 1fr;       /* 左侧缩略图固定宽，右侧自适应 */
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #cce8d4;             /* 你之前统一的淡绿色边框 */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .04s ease, border-color .15s ease, background .15s ease;
}
.cb-media-tile:hover {
  border-color: #8fd6a5;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.cb-media-tile:active { transform: translateY(1px); }

/* 缩略图：保持方形、圆角、覆盖裁剪 */
.cb-media-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f2f4f8;                   /* 占位底色，防闪烁 */
}

/* 右侧文本区：标题 + 简介 */
.cb-media-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* ✅ 从上方开始排列 */
  align-self: flex-start;       /* ✅ 让右侧文本块与左侧图片顶部对齐 */
  min-width: 0;                 /* 保留省略号功能 */
}


.cb-media-title {
  font-size: 14px;
  font-weight: 700;
  color: #2b2f36;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;               /* 单行省略 */
  margin-bottom: 6px;
}

.cb-media-desc {
  font-size: 12px;
  color: #8a96a9;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;                 /* 2 行截断 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 响应式：窄屏改两列/一列 */
@media (max-width: 1024px) {
  .cb-media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cb-media-grid { grid-template-columns: 1fr; }
}


/* 让媒体卡片可以放绝对定位的徽标 */
.cb-media-tile {
  position: relative;            /* 新增：用于定位右上角徽标 */
}

/* 右上角徽标（热门） */
.cb-media-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  /* 主题：暖色系更醒目，也可换成你的绿色主题 */
  color: #ff5a5a;
  background: linear-gradient(180deg, #fff2e9 0%, #ffe4d4 100%);
  border: 1px solid #ffc6a7;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  pointer-events: none;          /* 不挡点击 */
}

/* ==============================
   单图相框（center + hover zoom）
   ============================== */
.cb-photo-single {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;

  /* ✅ 柔和边框绿色：低饱和度 + 高亮度 */
  border: 1px solid #dceee1;   /* 浅淡绿色，几乎白中带绿 */

  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: zoom-in;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.cb-photo-single:hover {
  transform: scale(1.03);
  border-color: #b7dfc2;        /* ✅ hover 时略加深，保持温和 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 图片 */
.cb-photo-single img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  transform: scale(1);
}

.cb-photo-single:hover img {
  transform: scale(1.02);
}



/* ==============================
   笔试卡片样式 (Exam Card)
   ============================== */
.cb-exam-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #dbe7fa;        /* ✅ 淡蓝色外线 */
  border-radius: 10px;
  padding: 10px 16px 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  cursor: pointer;
}

.cb-exam-card:hover {
  border-color: #bcd2f7;             /* hover 时略深蓝 */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* 标题 */
.cb-exam-title {
  font-size: 14px;
  font-weight: 700;
  color: #2b2f36;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* 链接列表容器 */
.cb-exam-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
}

/* 单条链接样式 */
.cb-exam-link {
  font-size: 14px;
  color: #2f89ff !important;                   /* ✅ 蓝色字体 */
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 600;
}

.cb-exam-link:hover {
  color: #1e6fe0 !important;                   /* hover 深蓝 */
  text-decoration: underline;
}

/* 网格布局（如果一行放多个卡片） */
.cb-exam-grid {
  /* grid-auto-rows: var(--exam-card-h);  删掉或注释 */
  grid-auto-rows: auto;                 /* 或 minmax(min-content, auto) */
  max-height: 260px;                    /* 视口高度你原来怎么控制就保留 */
  overflow-y: auto;
  padding-right: 4px;
}
@media (max-width: 1024px) {
  .cb-exam-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cb-exam-grid { grid-template-columns: 1fr; }
}
/* ===== 控制可见高度：约两张卡片，内部滚动 ===== */

/* 可调参数：一张卡片的行高 & 卡片间距 */
:root {
  --exam-card-h: 120px;   /* ❗️卡片可见高度（按你页面实际调整 110~140 都可） */
  --exam-gap: 12px;       /* 与 .cb-exam-grid 的 gap 保持一致 */
}

.cb-exam-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  justify-items: center;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;      /* ✅ 禁止左右滚动 */
  box-sizing: border-box;
}

.cb-exam-card {
  width: 220px;
  max-width: 90%;
  box-sizing: border-box;  /* ✅ 防止撑宽 */
}

/* 3) 文本处理更稳（长标题/长链接省略） */
.cb-exam-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-exam-link {
  display: inline-block;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 只让带有这个修饰类的 body 出现内部滚动 */
.cb-card-body--scroll {
  max-height: 260px;     /* 调整可见高度：能露出几张卡就改这里 */
  overflow-y: auto;      /* 竖向滚动 */
  padding-right: 4px;    /* 给滚动条留点空间 */
}

/* 网格自身不滚动，交给上层 body */
.cb-card-body--scroll .cb-exam-grid {
  overflow: visible;
}



/* ==============================
   用户反馈卡片 (Feedback Card)
   ============================== */
.cb-feedback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #f0fff4 0%, #e6f8ff 100%); /* ✅ 渐变背景 */
  backdrop-filter: blur(8px);  /* ✅ 虚化背景效果 */
  border: 1px solid rgba(190, 230, 210, 0.6);
  padding: 24px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 标题 */
.cb-feedback-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

/* 文本说明 */
.cb-feedback-text {
  font-size: 14px;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* 按钮 */
.cb-feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #34d058, #28a745);
  color: #fff;
  border-radius: 999px; /* ✅ 完全圆形 */
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
  transition: all 0.25s ease;
}

.cb-feedback-btn:hover {
  background: linear-gradient(145deg, #2eb94d, #1f943c);
  box-shadow: 0 6px 14px rgba(40, 167, 69, 0.4);
  transform: scale(1.05);
}
.cb-feedback-btn {
  color: #fff !important;   /* ✅ 白色文字 */
}