/* ══════════════════════════════════
   苍野少年·鱼菜共生课程 共享样式
   ══════════════════════════════════ */

/* ── Hero ── */
.course-hero {
  color: #fff;
  padding: 3rem 1.4rem 2rem;
}
.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
}
.back-link:hover { color: #fff; }
.course-code-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.course-hero h1 { font-size: 1.8rem; font-weight: 800; margin: 0 0 0.5rem; line-height: 1.2; }
.course-hero .hero-sub { font-size: 0.9rem; opacity: 0.8; margin: 0 0 1.2rem; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta-pill { background: rgba(255,255,255,0.18); border-radius: 20px; padding: 4px 12px; font-size: 0.72rem; }

/* ── 人物故事卡 ── */
.story-card {
  border-radius: 14px;
  margin: 1.4rem 1.2rem;
  padding: 1.3rem 1.2rem;
  position: relative;
  overflow: hidden;
}
.story-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}
.story-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}
.story-body {
  font-size: 0.83rem;
  line-height: 1.8;
}
.story-quote {
  border-left: 3px solid currentColor;
  padding-left: 0.8rem;
  margin: 0.8rem 0;
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.85;
}
.story-source {
  font-size: 0.65rem;
  opacity: 0.55;
  margin-top: 0.8rem;
}

/* ── 驱动问题 ── */
.driving-question {
  border-radius: 0 12px 12px 0;
  margin: 0 1.2rem 1.2rem;
  padding: 1rem 1.1rem;
}
.dq-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.dq-text { font-size: 1.05rem; font-weight: 700; line-height: 1.4; }

/* ── 通用信息卡 ── */
.section-card {
  margin: 0 1.2rem 0.8rem;
  background: #fff;
  border: 1.5px solid #c8e0d8;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}
.section-card h3 {
  font-size: 0.8rem; font-weight: 700; color: #0a7a6a;
  margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.section-card p { font-size: 0.82rem; color: #1a3a34; margin: 0; line-height: 1.6; }

/* ── 材料 ── */
.materials { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0; }
.material-item { background: #d8f0e8; border-radius: 8px; padding: 5px 12px; font-size: 0.78rem; color: #0a3a2a; }

/* ── 产出物 ── */
.output-box {
  background: linear-gradient(135deg, #d0f0e8 0%, #e8f8f2 100%);
  border: 1.5px solid #80c8b0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0 1.2rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.output-icon { font-size: 2rem; flex-shrink: 0; }
.output-label { font-size: 0.65rem; font-weight: 700; color: #0a5a48; letter-spacing: 0.1em; }
.output-title { font-size: 0.95rem; font-weight: 700; color: #063830; margin-top: 2px; }

/* ── 教学环节 ── */
.phases { margin: 0 1.2rem; }
.phase { border: 1.5px solid #c8e0d8; border-radius: 12px; margin-bottom: 0.8rem; overflow: hidden; }
.phase-header {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1rem; cursor: pointer;
  background: #f0faf6; user-select: none; -webkit-user-select: none;
}
.phase-header:hover { background: #e0f4ee; }
.phase-num {
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
  background: #0a7a6a;
}
.phase-title-wrap { flex: 1; }
.phase-title { font-size: 0.95rem; font-weight: 700; color: #1a3a34; }
.phase-duration { font-size: 0.7rem; color: #0a7a6a; margin-top: 1px; }
.phase-arrow { font-size: 0.8rem; color: #0a7a6a; transition: transform 0.2s; }
.phase.open .phase-arrow { transform: rotate(180deg); }
.phase-body { display: none; padding: 1rem 1.1rem 1.1rem; border-top: 1px solid #d8f0e8; }
.phase.open .phase-body { display: block; }
.phase-body p { font-size: 0.85rem; color: #1a3a34; line-height: 1.7; margin: 0 0 0.8rem; }

/* ── 步骤列表 ── */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0.8rem 0 0; }
.step { counter-increment: step; display: flex; gap: 0.8rem; margin-bottom: 1rem; align-items: flex-start; }
.step::before {
  content: counter(step);
  width: 26px; height: 26px; border-radius: 50%;
  background: #d8f0e8; color: #0a3a2a;
  font-weight: 800; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.step-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; }
.step-body { font-size: 0.8rem; line-height: 1.6; color: #1a3a34; }

/* ── 数学/科学盒子 ── */
.math-box {
  background: #e8f8f2;
  border: 1.5px solid #80c8b0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
}
.math-label { font-size: 0.65rem; font-weight: 700; color: #0a5a48; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.math-formula {
  font-family: 'Courier New', monospace;
  font-size: 1rem; font-weight: 700;
  color: #063830;
  text-align: center; padding: 0.5rem 0; line-height: 1.8;
}
.math-explain { font-size: 0.8rem; line-height: 1.7; margin-top: 0.5rem; color: #1a3a2a; }

/* ── 图示 ── */
.diagram {
  background: #f0faf6;
  border: 1px solid #c8e0d8;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.8rem 0;
  text-align: center;
}
.diagram svg { max-width: 100%; }
.diagram figcaption { font-size: 0.72rem; color: #0a7a6a; margin-top: 0.5rem; line-height: 1.5; }

/* ── 数据表格 ── */
.data-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.8rem; }
.data-table th { background: #0a7a6a; color: #fff; padding: 0.5rem 0.7rem; text-align: left; }
.data-table td { padding: 0.4rem 0.7rem; border-bottom: 1px solid #d8f0e8; color: #1a3a34; }
.data-table tr:nth-child(even) td { background: #f0faf6; }

/* ── 讨论问题 ── */
.discussion { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.discussion li {
  display: flex; gap: 0.6rem; margin-bottom: 0.6rem;
  font-size: 0.85rem; color: #1a3a34; line-height: 1.5;
}
.discussion li::before { content: '💬'; flex-shrink: 0; }

/* ── 人物卡片网格 ── */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
  margin: 0.8rem 0;
}
.person-card {
  background: #fff;
  border: 1.5px solid #c8e0d8;
  border-radius: 12px;
  padding: 0.85rem;
}
.person-era { font-size: 0.65rem; color: #888; margin-bottom: 2px; }
.person-name { font-size: 0.9rem; font-weight: 800; color: #0a3a34; margin-bottom: 0.3rem; }
.person-contrib { font-size: 0.75rem; color: #1a5a48; line-height: 1.5; }

/* ── 底部导航 ── */
.course-nav {
  display: flex; gap: 0.8rem; margin: 1.5rem 1.2rem 2rem; flex-wrap: wrap;
}
.nav-btn {
  flex: 1; min-width: 140px; border-radius: 10px;
  padding: 0.85rem 1rem; text-decoration: none;
  font-size: 0.82rem; font-weight: 700; text-align: center;
}
.nav-btn-prev { background: #e8f8f2; border: 1.5px solid #80c8b0; color: #0a3a2a; }
.nav-btn-next { background: #0a7a6a; color: #fff; }

/* ── 通用提示盒子 ── */
.tip-box {
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0.8rem 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ── 时间轴 ── */
.timeline { margin: 0.8rem 0; }
.tl-item { display: flex; gap: 0.8rem; margin-bottom: 0.6rem; align-items: flex-start; }
.tl-year {
  font-size: 0.68rem; font-weight: 800; color: #fff;
  background: #0a7a6a;
  border-radius: 6px; padding: 3px 7px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.tl-text { font-size: 0.8rem; color: #1a3a34; line-height: 1.5; }

/* ── 站点通用 ── */
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #1a3a34;
  background: #F5F2E9;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(10,122,106,0.1);
  font-size: 0.85rem;
  color: #7a9a94;
}
.site-footer a { color: #7a9a94; }
.site-footer a:hover { color: #0a7a6a; }

@media (max-width: 480px) {
  .course-hero h1 { font-size: 1.4rem; }
  .person-grid { grid-template-columns: 1fr 1fr; }
  .course-nav { flex-direction: column; }
}
