/* ============================================================
   学术期刊 · 分类页专属样式（命名空间 jrc-）
   复用 /style/journals/index.css 的左栏手风琴 / 面包屑 / 卡片骨架，
   本文件补充：分类头 Hero、筛选工具条、期刊「列表 / 封面墙」双视图卡片。
   主色继承根元素注入的 --jr-accent。
   ============================================================ */

/* ---------- 分类头 Hero ---------- */
.jrc-hero2 { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; }
.jrc-hero2 .jrc-emblem { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 800; letter-spacing: .5px; box-shadow: 0 6px 16px rgba(27,91,213,.22); background: linear-gradient(135deg, var(--jr-accent), var(--chan-accent-dark, #1747a8)); }
.jrc-hero2 .jrc-h2main { flex: 1 1 auto; min-width: 0; }
.jrc-hero2 h1 { margin: 0; font-size: 23px; font-weight: 800; color: #1e2532; letter-spacing: .3px; line-height: 1.2; }
.jrc-hero2 .jrc-h2sub { margin: 6px 0 0; font-size: 13px; color: #97a0ac; line-height: 1.6; }
.jrc-hero2 .jrc-h2sub b { color: #f25d30; margin: 0 3px; font-weight: 700; }

/* 分类头增强：父学科返回链接 + 统计行（子分类页） */
.jrc-hero2 .jrc-parent-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 12.5px; color: #8a929d; text-decoration: none; transition: color .15s; }
.jrc-hero2 .jrc-parent-link svg { transition: transform .15s; }
.jrc-hero2 .jrc-parent-link:hover { color: var(--jr-accent); }
.jrc-hero2 .jrc-parent-link:hover svg { transform: translateX(-2px); }
.jrc-hero2 .jrc-h2stats { margin: 6px 0 0; font-size: 13px; color: #97a0ac; line-height: 1.6; }
.jrc-hero2 .jrc-h2stats b { color: #f25d30; margin: 0 3px; font-weight: 700; }

/* 同学科方向 快捷标签（复用 index.css 的 jrc-sib；补方向标题 + 期刊数气泡） */
.jrc-sibs2 { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jrc-sibs-label { font-size: 12.5px; color: #9aa2ad; margin-right: 2px; flex: 0 0 auto; }
/* 方向标签上的期刊数：去掉白底小圆环，只留数字 */
.jrc-sib .n { font-style: normal; margin-left: 5px; padding: 0; min-width: 0; height: auto; border-radius: 0; background: transparent; box-shadow: none; color: var(--jr-accent); font-size: 11px; font-weight: 700; line-height: inherit; text-align: left; }
.jrc-sib:hover .n { box-shadow: none; }
.jrc-sib.on .n { background: transparent; box-shadow: none; color: rgba(255,255,255,.9); }

/* ---------- 筛选工具条 ---------- */
.jrc-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 12px 16px; }
.jrc-tb-count { font-size: 13px; color: #6b7280; flex: 0 0 auto; }
.jrc-tb-count b { color: var(--jr-accent); font-size: 15px; margin: 0 2px; }

.jrc-tb-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.jrc-tb-filters .lb { font-size: 12.5px; color: #9aa2ad; margin-right: 1px; }

/* ──────────────────────────────────────────────────────────────
   标签样式（同学科方向 / 收录等级 / 出版周期）
   保留胶囊的尺寸与圆角，只去掉底色与描边 → 未选中项呈纯文字，
   选中项仍是实心胶囊（唯一的视觉锚点，用于标明当前筛选）。
   注：.jrc-sib 的底样式来自共享的 index.css（频道页等也在用），
   这里用 .jrc-sibs2 限定作用域覆盖，只影响本分类页。
   ────────────────────────────────────────────────────────────── */
.jrc-lv, .jrc-fq { display: inline-flex; align-items: center; font-size: 12.5px; color: #55606f; background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 4px 13px; cursor: pointer; user-select: none; transition: color .14s, background .14s, border-color .14s; }
/* 本分类下暂无该收录等级的期刊：淡显（仍可点击，点击后走列表空态） */
.jrc-lv.is-empty { color: #b6bdc7; }
.jrc-sibs2 .jrc-sib { background: transparent; border-color: transparent; }
.jrc-lv:hover, .jrc-lv.is-empty:hover, .jrc-fq:hover, .jrc-sibs2 .jrc-sib:hover { color: var(--jr-accent); background: transparent; border-color: transparent; }
.jrc-lv.on, .jrc-lv.on:hover, .jrc-fq.on, .jrc-fq.on:hover,
.jrc-sibs2 .jrc-sib.on, .jrc-sibs2 .jrc-sib.on:hover { color: #fff; background: var(--jr-accent); border-color: var(--jr-accent); }
/* 让「周期」筛选条另起一行（其后的搜索/排序/视图仍靠右同排） */
.jrc-tb-break { flex: 1 0 100%; height: 0; margin: 0; padding: 0; }

.jrc-tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.jrc-search { position: relative; }
.jrc-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #aab1bc; pointer-events: none; }
.jrc-search input { width: 170px; max-width: 42vw; height: 34px; padding: 0 12px 0 31px; font-size: 13px; color: #333; background: #f6f8fb; border: 1px solid #e4e8ef; border-radius: 8px; outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.jrc-search input::placeholder { color: #aeb4be; }
.jrc-search input:focus { background: #fff; border-color: var(--jr-accent); box-shadow: 0 0 0 3px rgba(27,91,213,.10); }

.jrc-sort { height: 34px; padding: 0 30px 0 12px; font-size: 13px; color: #454b54; background: #f6f8fb url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a929d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid #e4e8ef; border-radius: 8px; cursor: pointer; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.jrc-sort:focus { border-color: var(--jr-accent); box-shadow: 0 0 0 3px rgba(27,91,213,.10); }

.jrc-view { display: inline-flex; border: 1px solid #e4e8ef; border-radius: 8px; overflow: hidden; background: #f6f8fb; }
.jrc-view button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #97a0ac; cursor: pointer; transition: color .14s, background .14s; padding: 0; }
.jrc-view button + button { border-left: 1px solid #e4e8ef; }
.jrc-view button svg { width: 17px; height: 17px; }
.jrc-view button:hover { color: var(--jr-accent); }
.jrc-view button.on { color: #fff; background: var(--jr-accent); }

/* ---------- 结果容器（默认列表视图） ---------- */
.jrc-results { padding: 6px; }

/* —— 列表视图 —— */
.jrc-results.is-list { display: flex; flex-direction: column; gap: 6px; }
.jrc-results.is-list .jrc-item {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 14px; border-radius: 10px; text-decoration: none; transition: background .15s, box-shadow .15s, transform .12s;
}
.jrc-results.is-list .jrc-item:hover { background: #f7faff; box-shadow: 0 2px 10px rgba(20,40,90,.06); }
.jrc-results.is-list .jrc-item + .jrc-item { border-top: 1px solid #f1f3f7; }
.jrc-results.is-list .jrc-item:hover + .jrc-item { border-top-color: transparent; }

.jrc-cover { position: relative; width: 62px; aspect-ratio: 3 / 4; border-radius: 6px; background-size: cover; background-position: center; box-shadow: 0 3px 9px rgba(20,40,90,.16); overflow: hidden; flex: 0 0 auto; transition: transform .16s, box-shadow .16s; }
.jrc-cover.grad { display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.jrc-cover.grad::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: rgba(255,255,255,.22); }
.jrc-cover .cvtx { color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,.4); word-break: break-all; }
.jrc-item:hover .jrc-cover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(27,91,213,.20); }

.jrc-main { min-width: 0; }
.jrc-row1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.jrc-name { font-size: 15.5px; font-weight: 700; color: #1e2532; line-height: 1.35; transition: color .15s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.jrc-item:hover .jrc-name { color: var(--jr-accent); }
.jrc-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.jrc-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; font-size: 11px; font-weight: 600; border-radius: 4px; line-height: 1; }
.jrc-badge.lv { color: var(--jr-accent); background: rgba(27,91,213,.09); }
.jrc-badge.tag { color: #d24a20; background: rgba(210,74,32,.10); }

.jrc-pub { margin-top: 6px; font-size: 12.5px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jrc-facts { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.jrc-facts .f { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12px; color: #4b525c; background: #f4f6f9; border-radius: 5px; padding: 3px 8px; }
.jrc-facts .f i { font-style: normal; color: #9aa2ad; font-size: 11px; }
.jrc-desc { margin-top: 8px; font-size: 12.8px; color: #838b96; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.jrc-go { flex: 0 0 auto; align-self: center; font-size: 12.5px; color: var(--jr-accent); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; opacity: .0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.jrc-item:hover .jrc-go { opacity: 1; transform: none; }

/* —— 封面墙视图（复用频道页观感） —— */
.jrc-results.is-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 16px; padding: 16px; }
.jrc-results.is-grid .jrc-item { display: flex; flex-direction: column; text-decoration: none; min-width: 0; border: 0 !important; }
.jrc-results.is-grid .jrc-cover { width: 100%; border-radius: 7px; box-shadow: 0 4px 12px rgba(20,40,90,.14); }
.jrc-results.is-grid .jrc-cover .cvtx { font-size: 14px; }
.jrc-results.is-grid .jrc-item:hover .jrc-cover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(27,91,213,.20); }
.jrc-results.is-grid .jrc-name { margin-top: 9px; font-size: 13.5px; font-weight: 500; color: #333; text-align: center; white-space: normal; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 38px; }
.jrc-results.is-grid .jrc-row1 { justify-content: center; }
/* 封面墙视图下隐藏列表专属信息 */
.jrc-results.is-grid .jrc-badges,
.jrc-results.is-grid .jrc-pub,
.jrc-results.is-grid .jrc-facts,
.jrc-results.is-grid .jrc-desc,
.jrc-results.is-grid .jrc-go { display: none; }

/* —— 筛选无结果 —— */
.jrc-nohit { display: none; text-align: center; color: #aeb4be; font-size: 14px; padding: 46px 10px; }
.jrc-results.no-hit { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .jrc-results.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .jrc-toolbar { gap: 10px; }
  .jrc-tb-right { margin-left: 0; width: 100%; }
  .jrc-search input { flex: 1 1 auto; width: auto; max-width: none; }
  .jrc-results.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
  .jrc-results.is-list .jrc-item { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
  .jrc-go { display: none !important; }
}
@media (max-width: 560px) {
  .jrc-hero2 { padding: 16px; gap: 12px; }
  .jrc-hero2 .jrc-emblem { width: 48px; height: 48px; font-size: 20px; border-radius: 12px; }
  .jrc-hero2 h1 { font-size: 20px; }
  .jrc-results.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jrc-facts .f:nth-child(n+3) { display: none; }
}
