/* ===== 教育学311真题库 · 目录页 =====
   复用 style.css 的变量与玻璃拟态风格，仅补充目录页专属组件 */

/* ---------- Hero 徽章组 ---------- */
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.edu-hero-badge.alt { background: rgba(43,138,160,.16) !important; color: #0e6d80 !important; }
html[data-theme="dark"] .edu-hero-badge.alt { background: rgba(43,138,160,.24) !important; color: #7fd4e0 !important; }
.edu-hero-badge b { font-weight: 800; }

/* ---------- 标题下侧友链 ---------- */
.edu-friend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; margin: 0 0 14px; font-size: .82rem; }
.edu-friend-label { opacity: .62; }
.edu-friend-link { display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .85rem; border-radius: 999px; text-decoration: none;
  font-weight: 700; border: 1px solid transparent;
  transition: transform .18s, border-color .18s, background .18s, color .18s; }
html[data-theme="light"] .edu-friend-link { background: rgba(255,255,255,.7); color: #c44f1c; border-color: rgba(255,159,67,.4); }
html[data-theme="dark"]  .edu-friend-link { background: rgba(34,31,29,.7); color: #ffb347; border-color: rgba(255,159,67,.35); }
html[data-theme="light"] .edu-friend-link:hover { border-color: #e67e22; color: #a8401a; transform: translateY(-1px); }
html[data-theme="dark"]  .edu-friend-link:hover { border-color: #ffb347; color: #ffc98a; transform: translateY(-1px); }
.edu-friend-link .friend-ico { font-size: .9rem; line-height: 1; }

/* ---------- 工具条 ---------- */
.edu-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between; margin: 26px 0 6px; }
.year-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.year-chip { border: 1.5px solid transparent; background: none; font-family: inherit;
  font-size: .84rem; font-weight: 600; padding: .38rem .95rem; border-radius: 999px;
  cursor: pointer; transition: all .18s; white-space: nowrap; }
html[data-theme="light"] .year-chip { color: #5f6b7a; border-color: rgba(90,64,40,.18); background: rgba(255,255,255,.6); }
html[data-theme="dark"]  .year-chip { color: #b8c7ce; border-color: rgba(255,245,235,.18); background: rgba(34,31,29,.6); }
html[data-theme="light"] .year-chip:hover { border-color: #e67e22; color: #c44f1c; }
html[data-theme="dark"]  .year-chip:hover { border-color: #ffb347; color: #ffb347; }
.year-chip.is-active { background: linear-gradient(135deg,#1f6e7c,#2b8aa0) !important;
  border-color: transparent !important; color: #fff !important;
  box-shadow: 0 6px 16px rgba(31,110,124,.32); }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-ico { position: absolute; left: 13px; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; opacity: .45; pointer-events: none; }
.search-ico::after { content: ""; position: absolute; width: 2px; height: 7px; border-radius: 2px;
  background: currentColor; transform: rotate(-45deg); right: -4px; bottom: -5px; }
.edu-search { font-family: inherit; font-size: .87rem; padding: .5rem .95rem .5rem 2.2rem;
  border-radius: 999px; border: 1.5px solid transparent; width: 190px; outline: none;
  transition: all .2s; }
html[data-theme="light"] .edu-search { background: rgba(255,255,255,.75); border-color: rgba(90,64,40,.18); color: #2c3e50; }
html[data-theme="dark"]  .edu-search { background: rgba(34,31,29,.75); border-color: rgba(255,245,235,.18); color: #ecf0f1; }
.edu-search:focus { border-color: #e67e22; box-shadow: 0 0 0 3px rgba(230,126,34,.15); }

/* ---------- 年份卡片网格 ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr));
  gap: 18px;
}

/* 卡片：磨砂玻璃；年份水印与右上 311 分层，避免平板重叠 */
.edu-card {
  position: relative;
  overflow: visible; /* 年份水印勿被卡片裁切 */
  display: flex;
  flex-direction: column;
  min-height: 148px;
  box-sizing: border-box;
  padding: 1.25rem 1.25rem 1.15rem;
  border-radius: 1.5rem;
}
html[data-theme="light"] .edu-card {
  background: linear-gradient(160deg, rgba(255,255,255,.78) 0%, rgba(232,238,248,.62) 55%, rgba(214,226,242,.58) 100%);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: 0 4px 14px rgba(15,23,42,.06), 0 14px 28px -12px rgba(15,23,42,.14);
  border-radius: 1.5rem;
}
html[data-theme="dark"] .edu-card {
  background: linear-gradient(160deg, rgba(30,41,59,.86) 0%, rgba(22,31,45,.82) 55%, rgba(15,23,42,.86) 100%);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 14px 28px -12px rgba(0,0,0,.45);
  border-radius: 1.5rem;
}
html[data-theme="light"] .edu-card:hover {
  background: linear-gradient(160deg, rgba(255,255,255,.9) 0%, rgba(228,236,249,.72) 55%, rgba(206,221,240,.68) 100%);
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 6px 18px rgba(37,99,235,.1), 0 18px 34px -14px rgba(37,99,235,.2);
  transform: translateY(-4px);
}
html[data-theme="dark"] .edu-card:hover {
  background: linear-gradient(160deg, rgba(35,47,68,.92) 0%, rgba(26,36,52,.9) 55%, rgba(17,26,42,.92) 100%);
  border-color: rgba(96,165,250,.3);
  box-shadow: 0 6px 18px rgba(0,0,0,.34), 0 18px 34px -14px rgba(37,99,235,.3);
  transform: translateY(-4px);
}

/* 左上角年份水印：完整四位数，靠字号控制不与 311 相撞。
   hover 时水印「发亮」作为唯一的悬停反馈（左侧色条已移除）。 */
.edu-card::before {
  content: attr(data-year);
  position: absolute;
  left: 14px;
  top: 10px;
  z-index: 0;
  max-width: none;
  overflow: visible;
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: .14;
  transition: opacity .25s, transform .25s, text-shadow .25s, color .25s;
  color: #2563eb;
  user-select: none;
}
/* 亮色主题：水印加深 + 外发光，像被打亮 */
.edu-card:hover::before {
  opacity: .42;
  transform: scale(1.045);
  color: #1d4ed8;
  text-shadow: 0 0 18px rgba(37,99,235,.32);
}
html[data-theme="dark"] .edu-card::before { opacity: .2; color: #93c5fd; }
/* 夜间：用更亮的蓝 + 冷光晕，避免在深底上糊成一团 */
html[data-theme="dark"] .edu-card:hover::before {
  opacity: .5;
  transform: scale(1.045);
  color: #bfdbfe;
  text-shadow: 0 0 20px rgba(147,197,253,.45);
}
/* 333 卡的水印发亮走紫色，与 311 区分 */
html[data-theme="light"] .edu-card-alt:hover::before {
  color: #6d28d9;
  text-shadow: 0 0 18px rgba(124,58,237,.34);
}
html[data-theme="dark"] .edu-card-alt:hover::before {
  color: #ddd6fe;
  text-shadow: 0 0 20px rgba(167,139,250,.5);
}

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  .edu-card, .edu-card::before, .pager-btn { transition: none; }
  .edu-card:hover { transform: none; }
  .edu-card:hover::before { transform: none; }
}

/* 左侧年代色条已移除（2026-10-01）。
   它靠在 overflow:visible 的卡片上，4px 宽无法贴合 24px 圆角，
   无论直角、圆角还是 clip-path 都会露出破绽。
   现在改用「年份水印高亮」表达 hover，见下方 .edu-card:hover::before。 */

/* ===== 其他科目卷（如 2026 教育综合 333）：与 311 年份卡并列，用配色区分 ===== */
/* 左上角水印同为四位年份（2026），右上角标签区分科目（333 vs 311）。 */
.edu-card-alt::before {
  color: #7c3aed;
}
html[data-theme="dark"] .edu-card-alt::before { color: #c4b5fd; }
.edu-card-alt .edu-card-tag { border-color: rgba(124,58,237,.28); }
html[data-theme="light"] .edu-card-alt .edu-card-tag { color: #6d28d9; }
html[data-theme="dark"]  .edu-card-alt .edu-card-tag { color: #c4b5fd; }

/* 333 样卷：用琥珀色与正式 333（紫）区分，一眼看出不是真题 */
.edu-card-sample::before { color: #b45309; }
html[data-theme="dark"] .edu-card-sample::before { color: #fcd34d; }
.edu-card-sample .edu-card-tag { border-color: rgba(217,119,6,.3); }
html[data-theme="light"] .edu-card-sample .edu-card-tag { color: #b45309; }
html[data-theme="dark"]  .edu-card-sample .edu-card-tag { color: #fcd34d; }
html[data-theme="light"] .edu-card-sample:hover::before {
  color: #92400e; text-shadow: 0 0 18px rgba(217,119,6,.32);
}
html[data-theme="dark"] .edu-card-sample:hover::before {
  color: #fde68a; text-shadow: 0 0 20px rgba(252,211,77,.45);
}

/* 赛维自编题：青绿色，突出「自定义题库」，与真题（蓝/紫/琥珀）区分 */
.edu-card-self::before { color: #0f766e; }
html[data-theme="dark"] .edu-card-self::before { color: #5eead4; }
.edu-card-self .edu-card-tag { border-color: rgba(20,184,166,.32); }
html[data-theme="light"] .edu-card-self .edu-card-tag { color: #0f766e; }
html[data-theme="dark"]  .edu-card-self .edu-card-tag { color: #5eead4; }
html[data-theme="light"] .edu-card-self:hover::before {
  color: #115e59; text-shadow: 0 0 18px rgba(20,184,166,.32);
}
html[data-theme="dark"] .edu-card-self:hover::before {
  color: #99f6e4; text-shadow: 0 0 20px rgba(94,234,212,.45);
}


/* 右上 311 标签：压在水印之上，右侧对齐 */
.edu-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: .55rem;
  min-height: 1.7rem;
}
.edu-card-tag {
  position: relative;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
  letter-spacing: .4px;
  white-space: nowrap;
  border: 1px solid rgba(37,99,235,.22);
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
}
html[data-theme="light"] .edu-card-tag { background: rgba(255,255,255,.88); color: #1d4ed8; }
html[data-theme="dark"]  .edu-card-tag { background: rgba(15,23,42,.88); color: #93c5fd;
  border-color: rgba(96,165,250,.28); }

/* 卡片底部按钮 */
.edu-card-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: .3rem;
}
.pager-btn {
  display: inline-block;
  min-width: 88px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
  line-height: normal;
  vertical-align: middle;
  background: linear-gradient(135deg,#3b82f6,#2563eb);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,.25);
}
.pager-btn:hover { background: linear-gradient(135deg,#2563eb,#1d4ed8); color: #fff; }
.edu-card:active .pager-btn { transform: scale(.97); }

/* ---------- 空状态 ---------- */
.edu-empty { text-align: center; padding: 30px 0; font-size: .92rem; }
html[data-theme="light"] .edu-empty { color: #8a95a1; }
html[data-theme="dark"]  .edu-empty { color: #8a98a6; }

/* ---------- 关于页补充 ---------- */
.edu-article ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.edu-article li { margin-bottom: .4em; line-height: 1.8; }
.about-foot { margin-top: 1.6em; font-size: .9rem; }
.about-foot a { font-weight: 700; }
html[data-theme="light"] .about-foot a { color: #e67e22; }
html[data-theme="dark"]  .about-foot a { color: #ffb347; }
.edu-header .edu-logo { text-decoration: none; }

/* ---------- 响应式：平板常见 768–1024 ---------- */
@media (max-width: 900px) {
  .edu-grid { gap: 14px; }
  .edu-card { min-height: 140px; padding: 1.1rem 1.05rem 1rem; }
  .edu-card::before { font-size: clamp(1.85rem, 4.8vw, 2.6rem); top: 4px; }
}

@media (max-width: 720px) {
  .edu-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .edu-search { width: 100%; }
  .search-wrap { width: 100%; }
  .year-filter { justify-content: center; }
  .edu-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
  .edu-card::before { font-size: 2.3rem; left: 10px; top: 4px; max-width: 52%; }
}

@media (max-width: 620px) {
  .edu-grid { grid-template-columns: repeat(auto-fill, minmax(min(155px, 100%), 1fr)); gap: 12px; }
  .edu-card { padding: 1.05rem .9rem .95rem; border-radius: 1.3rem; min-height: 128px; }
  .edu-card::before {
    font-size: 2rem;
    left: 8px;
    top: 2px;
    max-width: 48%;
    opacity: .12;
  }
  .edu-card-tag { font-size: .62rem; padding: .16rem .48rem; }
  .pager-btn { min-width: 74px; padding: 8px 11px; font-size: 12px; border-radius: 10px; }
  .hero-badges { gap: 7px; }
}

/* ===== 大纲 / 学习工具入口 ===== */
.edu-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .95rem 1.1rem;
  border-radius: 1.1rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 6px 18px rgba(15,23,42,.05);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,159,67,.55);
  box-shadow: 0 12px 26px rgba(15,23,42,.10);
}
.tool-ico { font-size: 1.5rem; line-height: 1; flex: none; }
.tool-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tool-title { font-weight: 800; font-size: .95rem; letter-spacing: .01em; }
.tool-desc { font-size: .78rem; opacity: .68; line-height: 1.45; }
.tool-go { flex: none; font-size: .78rem; font-weight: 700; color: #ff9f43; white-space: nowrap; }
html[data-theme="dark"] .tool-card { background: rgba(30,41,59,.55); }
html[data-theme="dark"] .tool-go { color: #ffb86b; }

@media (max-width: 720px) {
  .edu-tools { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { padding: .85rem 1rem; }
}
