/* ============================================================================
   edunet 首页前端 · 干净版 home.css  (2026-11-19)
   ----------------------------------------------------------------------------
   取代旧站 fix-layout.css + overlay.css + theme.css + 内联 <style> 的补丁堆砌。
   沿用现行 sg-* 视觉：1200 容器 / 左栏 calc(100%-404px) / 右栏 380px /
   4:3 缩略图 / 白卡圆角 / 断点 1023 / 820 / 560。
   所有选择器以 .ed- 前缀隔离，避免与旧样式互相污染。
   ============================================================================ */

.ed-home { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.ed-home::before, .ed-home::after { content: ''; display: table; clear: both; }

/* ---------- 六行骨架：每行 = 左栏 + 右栏 ---------- */
.ed-row { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.ed-row > .columnleft { flex: 1 1 auto; min-width: 0; width: auto; float: none; }
.ed-row > .columnright { flex: 0 0 380px; width: 380px; float: none; }
.ed-row:only-child > .columnleft,
.ed-row:last-child:has(> .columnleft:only-child) > .columnleft { flex: 1 1 100%; }

/* 清掉旧补丁对栏容器的浮动/定宽遗留 */
.ed-home .columnleft, .ed-home .columnright { float: none; }

/* ---------- 页签栏（沿用原 DOM，仅规范外观） ---------- */
.ed-home .itemmenudivtop { display: flex; align-items: center; height: 44px;
  border-bottom: 1px solid #e6ebf2; margin-bottom: 12px; }
.ed-home .itemmenudivsel, .ed-home .itemmenudivtop > div {
  display: inline-flex; align-items: center; gap: 6px; height: 44px;
  padding: 0 14px; color: #7a8699; font-size: 15px; cursor: pointer;
  border-bottom: 2px solid transparent; box-sizing: border-box; }
.ed-home .itemmenudivsel { color: #0f5fbf; border-bottom-color: #1b6ec2; font-weight: 500; }
.ed-home .itemmenuimg1, .ed-home .itemmenuimg2 { width: 14px; height: 14px; }

/* 面板容器：两个页签面板并排，未激活的收缩，消除底部空白 */
.ed-home .neirongdiv { display: flex; align-items: flex-start; }
.ed-home .neirongdiv > div { min-width: 0; flex: 0 0 auto; }

/* ---------- 卡片面板通用 ---------- */
/* 变量默认值＝无 config 时的回退值；配置注入后按每个面板覆盖 */
.ed-panel { --ed-thumb-w: 120px; --ed-thumb-h: 80px; --ed-title-fs: 14px;
  --ed-title-lines: 2; --ed-sum-fs: 12px; --ed-sum-lines: 2; --ed-cols: 4;
  display: grid; width: 100%; box-sizing: border-box; }
.ed-bigrow { gap: 12px; grid-template-columns: 1fr; }
.ed-smallrow { gap: 12px; grid-template-columns: 1fr; }
.ed-grid { gap: 12px; grid-template-columns: repeat(var(--ed-cols), minmax(0, 1fr)); }
.ed-expert { gap: 10px; grid-template-columns: repeat(var(--ed-cols), minmax(0, 1fr)); }

/* ---------- 缩略图：尺寸由配置变量驱动，cover 居中 ---------- */
.ed-thumb { position: relative; width: var(--ed-thumb-w); height: var(--ed-thumb-h);
  flex: 0 0 auto; overflow: hidden; border-radius: 6px; background: #eef2f8; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 大行卡：左图 Right 文（图宽 = 配置缩略图高 × 宽高比） */
.ed-bigrow .ed-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px;
  background: #fff; border: 1px solid #e6ebf2; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(9,51,128,.06); cursor: pointer; }
.ed-bigrow .ed-item:hover, .ed-smallrow .ed-item:hover,
.ed-grid .ed-item:hover { border-color: #bcd3ee; }

/* 小行卡（右栏）：左小图 + 标题/摘要 */
.ed-smallrow .ed-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px;
  background: #fff; border: 1px solid #e6ebf2; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(9,51,128,.06); cursor: pointer; }

/* 网格卡（左栏三组）：上图下文 */
.ed-grid .ed-item { background: #fff; border: 1px solid #e6ebf2;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 3px rgba(9,51,128,.06); display: flex; flex-direction: column; }
.ed-grid .ed-thumb { width: 100%; border-radius: 0; }
.ed-grid .ed-title { padding: 7px 10px 9px; }

/* 专家卡：头像 + 姓名（头像尺寸跟随配置） */
.ed-expert .ed-item { text-align: center; cursor: pointer; }
.ed-avatar { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px;
  background-color: #eaf1fa; background-size: cover; background-position: center;
  border: 1px solid #e6ebf2; }
.ed-name { margin-top: 6px; font-size: var(--ed-title-fs); color: #24324a; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 文字规格：字号/行数由配置变量驱动，跟着缩略图走 ---------- */
.ed-title { font-size: var(--ed-title-fs); line-height: 1.45; color: #1c2a40; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: var(--ed-title-lines); -webkit-box-orient: vertical;
  line-clamp: var(--ed-title-lines); overflow: hidden; }
.ed-summary { margin-top: 4px; font-size: var(--ed-sum-fs); line-height: 1.5; color: #7a8699;
  display: -webkit-box; -webkit-line-clamp: var(--ed-sum-lines); -webkit-box-orient: vertical;
  line-clamp: var(--ed-sum-lines); overflow: hidden; }
.ed-panel[data-sum="0"] .ed-summary { display: none; }
.ed-panel[data-date="0"] .ed-date { display: none; }
.ed-date { margin-top: 4px; font-size: var(--ed-sum-fs); color: #9aa6b8; white-space: nowrap; }
.ed-body { min-width: 0; flex: 1 1 auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .ed-row { flex-direction: column; }
  .ed-row > .columnleft, .ed-row > .columnright { flex: 1 1 100%; width: 100%; }
  .ed-expert { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .ed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-expert { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ed-grid, .ed-expert { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-bigrow .ed-item, .ed-smallrow .ed-item {
    grid-template-columns: 1fr; flex-direction: column; }
  .ed-bigrow .ed-thumb, .ed-smallrow .ed-thumb {
    width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .ed-smallrow .ed-summary { display: none; }
}
