/* ══════════════════════════════════
   苍野少年·穹顶PBL课程 共享样式
   ══════════════════════════════════ */

/* ── 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 #dde8d8;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}
.section-card h3 {
  font-size: 0.8rem; font-weight: 700; color: #7C9473;
  margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.section-card p { font-size: 0.82rem; color: #4a5e42; margin: 0; line-height: 1.6; }

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

/* ── 产出物 ── */
.output-box {
  background: linear-gradient(135deg, #e8f5e0 0%, #f0f9e8 100%);
  border: 1.5px solid #a8d8a0;
  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: #2a6e3a; letter-spacing: 0.1em; }
.output-title { font-size: 0.95rem; font-weight: 700; color: #1a4a28; margin-top: 2px; }

/* ── 教学环节 ── */
.phases { margin: 0 1.2rem; }
.phase { border: 1.5px solid #dde8d8; 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: #f8faf6; user-select: none; -webkit-user-select: none;
}
.phase-header:hover { background: #f0f6ec; }
.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;
}
.phase-title-wrap { flex: 1; }
.phase-title { font-size: 0.95rem; font-weight: 700; color: #2d3e26; }
.phase-duration { font-size: 0.7rem; color: #7C9473; margin-top: 1px; }
.phase-arrow { font-size: 0.8rem; color: #7C9473; 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 #e8f0e3; }
.phase.open .phase-body { display: block; }
.phase-body p { font-size: 0.85rem; color: #2d3e36; 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%;
  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: #3a5060; }

/* ── 数学盒子 ── */
.math-box {
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
}
.math-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.math-formula {
  font-family: 'Courier New', monospace;
  font-size: 1rem; font-weight: 700;
  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; }

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

/* ── 讨论问题 ── */
.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: #2d3e26; 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 #dde8d8;
  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: #2d3e26; margin-bottom: 0.3rem; }
.person-contrib { font-size: 0.75rem; color: #4a5e42; 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: #f0f6ec; border: 1.5px solid #a8c8a0; color: #2d4a26; }
.nav-btn-next { 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;
  border-radius: 6px; padding: 3px 7px; white-space: nowrap; flex-shrink: 0; margin-top: 2px;
}
.tl-text { font-size: 0.8rem; color: #2d3e3e; line-height: 1.5; }

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