/* ============================================================
   sites.css — 五站差异化 UI（2026-11-11 视觉升级）
   作用域：body.site-{code}（keben/shijuan/wangke 三站共用 front 模板，
   bbs/spw 有独立模板套与 bbs.css/spw.css，本文件只覆盖 front 三站 + 共享兜底）
   原则：布局节奏 4px 网格；chrome 安静、accent 少用；每站一个记忆点。
   ============================================================ */

/* ---------- 共享：分栏 hero 脚手架 ---------- */
.hero.hero-split, .hero.hero-wide { text-align: left; padding: 72px 0 64px; }
.hero-split-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px; align-items: center;
}
.hero-split .hero-copy .hero-search, .hero-wide .hero-copy .hero-search { margin: 0; }
.hero-split .hero-copy .hero-hot, .hero-wide .hero-copy .hero-hot { justify-content: flex-start; }
.hero-split .hero-badge, .hero-wide .hero-badge { text-align: left; }
.hero-split .hero-title, .hero-wide .hero-title { text-align: left; }
.hero-split .hero-sub, .hero-wide .hero-sub { text-align: left; margin-left: 0; }
@media (max-width: 1024px) {
  .hero.hero-split { padding: 48px 0 44px; }
  .hero-split-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual-slot { display: none; }
}

/* ---------- 共享：列表封面缺图占位 ---------- */
.res-thumb.res-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-input);
}
.res-thumb.res-thumb-empty i {
  font-size: 44px; color: var(--text-weak); opacity: 0.55;
}

/* ---------- 共享：区块标题站色标记条 ---------- */
.section-title { position: relative; padding-left: 14px; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: 0.14em;
  width: 4px; height: 0.72em; border-radius: 2px;
  background: var(--primary);
}
body.site-shijuan .section-title::before { background: #DC2626; }
body.site-wangke .section-title::before { background: #16A34A; }

/* ============================================================
   keben 电子课本网 — 书卷气（纸张与书脊）
   记忆点：hero 右侧课本封面堆叠；签名：卡片左书脊线
   ============================================================ */
body.site-keben .hero.hero-split,
.hero.hero-books {
  background: linear-gradient(180deg, #FAF8F3 0%, #FFFFFF 100%);
}
body.site-keben .hero-badge {
  background: #F3EFE6; color: #6B5B3E;
}
body.site-keben .hero-search button { background: var(--primary); }

/* 课本封面堆叠（纯 CSS，无图片依赖） */
.hero-bookstack {
  position: relative; height: 340px;
  display: flex; align-items: flex-end; justify-content: center; gap: 20px;
}
.hero-bookstack .book {
  position: relative;
  width: 108px; border-radius: 6px 10px 10px 6px;
  padding: 18px 10px;
  box-shadow: 0 12px 24px rgba(31, 26, 16, 0.12), inset 4px 0 0 rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
}
.hero-bookstack .book span {
  writing-mode: vertical-rl; letter-spacing: 6px;
  font-size: 17px; font-weight: 600; color: #4A4032;
}
.hero-bookstack .b1 {
  height: 264px; background: linear-gradient(180deg, #FBF7EC, #F1EAD8);
  transform: rotate(-4deg) translateY(6px);
}
.hero-bookstack .b2 {
  height: 300px; background: linear-gradient(180deg, #FDFCF8, #F5F1E4);
  box-shadow: 0 16px 32px rgba(31, 26, 16, 0.16), inset 4px 0 0 rgba(255,255,255,0.4);
  z-index: 1;
}
.hero-bookstack .b3 {
  height: 252px; background: linear-gradient(180deg, #F6F2E8, #EDE6D2);
  transform: rotate(4deg) translateY(8px);
}
/* 书脊小标签 */
.hero-bookstack .book::after {
  content: ""; position: absolute; top: 12px; left: 10px; right: 10px;
  height: 2px; background: rgba(74, 64, 50, 0.22); border-radius: 1px;
}
@media (max-width: 1024px) {
  .hero-bookstack { height: 240px; }
  .hero-bookstack .book { width: 84px; }
  .hero-bookstack .b1, .hero-bookstack .b2, .hero-bookstack .b3 { height: 210px; }
}

/* 学段卡：书脊线签名 */
body.site-keben .entry-card { border-left: 3px solid #D8CDB4; }
body.site-keben .entry-card:hover { border-left-color: #A8946A; }

/* ============================================================
   shijuan 试卷网 — 严谨批改感（试卷纸与红批）
   记忆点：hero 右侧试卷纸；签名：红批 + 卷面行卡
   ============================================================ */
body.site-shijuan .hero.hero-split,
.hero.hero-shijuan {
  background: linear-gradient(180deg, #F6F9FF 0%, #FFFFFF 100%);
}

/* 试卷纸（纯 CSS） */
.hero-paper {
  position: relative; height: 360px; padding: 28px 26px 24px 40px;
  background: #FFFFFF;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  transform: rotate(2deg);
  overflow: hidden;
}
/* 密封线：左侧红色装订虚线 */
.hero-paper .paper-seal {
  position: absolute; left: 12px; top: 0; bottom: 0;
  display: flex; align-items: center;
  border-left: 1px dashed rgba(220, 38, 38, 0.45);
  padding-left: 6px;
  writing-mode: vertical-rl; letter-spacing: 8px;
  font-size: 11px; color: rgba(220, 38, 38, 0.55);
}
.hero-paper .paper-head {
  font-size: 14px; font-weight: 600; color: var(--text);
  text-align: center; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.hero-paper .paper-rows { margin-top: 16px; display: grid; gap: 12px; }
.hero-paper .paper-rows i {
  display: block; height: 8px; border-radius: 4px;
  background: var(--bg-input);
}
.hero-paper .paper-rows i:nth-child(2) { width: 88%; }
.hero-paper .paper-rows i:nth-child(4) { width: 72%; }
/* 作文格 */
.hero-paper .paper-grid {
  margin-top: 18px; height: 96px;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.12) 1px, transparent 1px) 0 0 / 24px 100%,
    linear-gradient(rgba(37, 99, 235, 0.12) 1px, transparent 1px) 0 0 / 100% 24px;
  border: 1px solid rgba(37, 99, 235, 0.18); border-radius: 4px;
}
/* 红批「阅」章 */
.hero-paper .paper-stamp {
  position: absolute; right: 18px; bottom: 40px;
  width: 52px; height: 52px; border: 3px solid rgba(220, 38, 38, 0.65);
  border-radius: 50%; transform: rotate(-12deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: rgba(220, 38, 38, 0.7);
}
@media (max-width: 1024px) {
  .hero-paper { height: 280px; transform: rotate(0); }
}

/* 列表卡：卷面行卡（元数据行 mono 化、红批仅热点） */
body.site-shijuan .res-meta span {
  background: var(--bg-input); color: var(--text-sub);
  border-radius: 4px; padding: 1px 8px;
}
body.site-shijuan .res-badge.hot { background: #FEF2F2; color: #B91C1C; }
body.site-shijuan .entry-card { border-top: 3px solid var(--border); }
body.site-shijuan .entry-card:hover { border-top-color: #DC2626; }

/* ============================================================
   wangke 网课网 — 全宽平台（教室与屏幕，四色通道）
   记忆点：hero 左文案右四色类型大卡；签名：四色通道
   ============================================================ */
/* 全宽容器（全站统一：wangke 走通栏，其余站 1800 居中） */
body.site-wangke .container { max-width: none; padding: 0 24px; }
@media (max-width: 768px) {
  body.site-wangke .container { padding: 0 16px; }
}

/* 通栏 hero */
.hero.hero-wide {
  text-align: left; padding: 64px 0 56px;
  background:
    radial-gradient(1200px 420px at 82% -10%, rgba(22, 163, 74, 0.06), transparent 70%),
    linear-gradient(180deg, #F4F8F7 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border);
}
body.site-wangke .hero-split-inner { grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; }

/* 四色类型大卡（2×2） */
.hero-types {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.hero-type {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 124px; padding: 18px;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.hero-type:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-primary);
}
.hero-type-icon { font-size: 28px; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; }
.hero-type-name { font-size: 17px; font-weight: 600; color: var(--text); margin-top: 12px; }
.hero-type-arrow { align-self: flex-end; color: var(--text-weak); margin-top: -26px; }
.hero-type.type-keben .hero-type-icon { background: #EFF6FF; color: #2563EB; }
.hero-type.type-shijuan .hero-type-icon { background: #FFF7ED; color: #EA580C; }
.hero-type.type-wangke .hero-type-icon { background: #F0FDF4; color: #16A34A; }
.hero-type.type-jiaofu .hero-type-icon { background: #FAF5FF; color: #9333EA; }
.hero-type.type-keben:hover { border-color: rgba(37, 99, 235, 0.35); }
.hero-type.type-shijuan:hover { border-color: rgba(234, 88, 12, 0.35); }
.hero-type.type-wangke:hover { border-color: rgba(22, 163, 74, 0.35); }
.hero-type.type-jiaofu:hover { border-color: rgba(147, 51, 234, 0.35); }
@media (max-width: 1024px) {
  .hero-types { grid-template-columns: 1fr 1fr; }
  body.site-wangke .hero-split-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-type { min-height: 104px; }
}

/* wangke 版块通栏：res 区块行满宽（卡片网格由容器控制，不再 1800 居中） */
body.site-wangke .section-head { max-width: none; }

/* wangke 学段卡：四通道顶条（蓝橙绿紫与资源类型色呼应） */
body.site-wangke .entry-card { border-top: 3px solid var(--border); }
body.site-wangke .entry-card:hover { border-top-color: var(--primary); }
