:root {
  --bg: #fbf7f0;
  --bg-soft: #f3ece0;
  --card: #ffffff;
  --ink: #2f2a24;
  --ink-soft: #6b6358;
  --primary: #c8703c;
  --primary-dark: #a85728;
  --sage: #4c9a6f;
  --blue: #3f7fb0;
  --purple: #9b6cc4;
  --line: #e7ddcd;
  --shadow: 0 6px 22px rgba(80, 60, 30, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--sage));
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
}
.nav-links { display: flex; gap: 26px; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 64px;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(200,112,60,0.14), transparent),
    radial-gradient(700px 320px at 5% 10%, rgba(76,154,111,0.14), transparent);
}
.hero h1 { font-size: 2.9rem; margin: 0 0 16px; letter-spacing: 1px; }
.hero h1 .accent { color: var(--primary); }
.hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 620px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 14px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 2.1rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat .label { color: var(--ink-soft); font-weight: 600; font-size: .92rem; margin-top: 4px; }

/* ---------- Sections ---------- */
section.block { padding: 64px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 1.9rem; margin: 0 0 6px; }
.section-head .sub { color: var(--ink-soft); }
.section-head .bar {
  width: 54px; height: 5px; border-radius: 4px; margin-top: 12px;
  background: linear-gradient(90deg, var(--primary), var(--sage));
}

/* ---------- Filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-weight: 600; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
}
.search input { border: none; outline: none; font-size: 1rem; background: transparent; width: 200px; }
.search .ico { color: var(--ink-soft); }

/* ---------- Book grid ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.book {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.book:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book .cover {
  height: 210px; padding: 18px 16px 16px 20px; color: #fff; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.book .cover:before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px;
  background: rgba(0,0,0,.20);
}
.book .cover:after {
  content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 1px;
  background: rgba(255,255,255,.28);
}
.book .cover .cat-icon { font-size: 1.7rem; }
.book .cover .fmt {
  position: absolute; top: 14px; right: 12px; font-size: .7rem; font-weight: 800;
  background: rgba(255,255,255,.26); padding: 3px 9px; border-radius: 999px; letter-spacing: .5px;
}
.book .cover .fmt.local { top: 46px; background: rgba(0,0,0,.32); }
.book.local-only .cover { filter: saturate(.85); }
.book .local-note {
  font-size: .78rem; color: var(--primary-dark); background: var(--bg-soft);
  border: 1px dashed var(--line); border-radius: 8px; padding: 7px 10px; margin-top: 4px;
}
.book .cover .cover-title {
  margin-top: auto; font-size: 1.08rem; font-weight: 800; line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.book .cover .cover-author { font-size: .8rem; opacity: .93; margin-top: 5px; }
.book .cover .cover-open {
  font-size: .8rem; font-weight: 800; margin-top: 12px; opacity: 0;
  transform: translateY(4px); transition: opacity .2s ease, transform .2s ease;
}
.book:hover .cover .cover-open { opacity: 1; transform: translateY(0); }
.book .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.book .title { font-weight: 800; font-size: 1.02rem; line-height: 1.4; }
.book .author { color: var(--ink-soft); font-size: .85rem; }
.book .desc { color: var(--ink-soft); font-size: .86rem; flex: 1; }
.book .open {
  margin-top: 8px; align-self: flex-start; font-weight: 700; color: var(--primary); font-size: .9rem;
}
.empty { grid-column: 1/-1; text-align: center; color: var(--ink-soft); padding: 40px; }

/* ---------- Courses ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.course {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.course .top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.course .emoji { font-size: 2.2rem; }
.course h3 { margin: 0; font-size: 1.2rem; }
.course .desc { color: var(--ink-soft); font-size: .92rem; margin: 0 0 16px; }
.course .files { display: flex; flex-direction: column; gap: 8px; }
.course .file-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600;
  transition: all .15s;
}
.course .file-link:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-soft); }
.course .file-link .ext { font-size: .72rem; color: var(--ink-soft); font-weight: 700; }
.course .page-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; padding: 11px 14px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 700;
  transition: opacity .15s;
}
.course .page-link:hover { color: #fff; opacity: .88; }
.course .page-link .go { font-size: .78rem; font-weight: 600; opacity: .85; white-space: nowrap; }

/* ---------- Lecture ---------- */
.lecture-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.lecture-card video { width: 100%; display: block; background: #000; }
.lecture-meta { padding: 20px 24px 26px; }
.lecture-meta h3 { margin: 0 0 6px; font-size: 1.3rem; }
.lecture-meta p { color: var(--ink-soft); margin: 0; }

/* ---------- Footer ---------- */
.footer { background: #2f2a24; color: #e8e0d4; padding: 36px 0; margin-top: 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.footer a { color: #e8c9a8; }
.footer .muted { color: #b6ad9f; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 2.1rem; }
  .stats { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; font-size: .9rem; }
  .search { width: 100%; margin-left: 0; }
  .search input { width: 100%; }
}

/* ---------- 书籍卡片 hover ---------- */
.book { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.book:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow); }
.book .desc { transition: color .18s ease; }
.book:hover .desc { color: var(--ink); }
.book .tag {
  align-self: flex-start; font-size: .74rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); cursor: pointer;
  transition: all .15s;
}
.book .tag:hover { background: var(--primary); color: #fff; }

/* ---------- Hero 图片条 ---------- */
.hero-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 40px 0 8px;
}
.hero-strip img {
  width: 100%; height: 132px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-soft);
  transition: transform .2s ease;
}
.hero-strip img:hover { transform: translateY(-4px) scale(1.03); }

/* ---------- 教育方法 ---------- */
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.m-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease;
}
.m-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(80,60,30,.16); }
.m-tag {
  position: absolute; top: 16px; right: 16px; font-size: .72rem; font-weight: 700;
  background: var(--bg-soft); color: var(--primary-dark); padding: 3px 10px; border-radius: 999px;
}
.m-name { margin: 0; font-size: 1.25rem; line-height: 1.4; }
.m-origin { color: var(--primary); font-size: .84rem; font-weight: 600; margin: 6px 0 16px; }
.m-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.m-imgs.single { grid-template-columns: 1fr; }
.m-imgs img {
  width: 100%; height: 170px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.m-body { color: var(--ink-soft); font-size: .93rem; margin: 0 0 14px; flex: 1; text-align: justify; }
.m-key {
  font-size: .82rem; font-weight: 700; color: var(--sage);
  border-top: 1px dashed var(--line); padding-top: 12px;
}

/* ---------- 基督教教育根基 ---------- */
.faith-block {
  background:
    radial-gradient(800px 340px at 12% 0%, rgba(63,127,176,.12), transparent),
    radial-gradient(700px 320px at 88% 100%, rgba(155,108,196,.12), transparent),
    var(--bg-soft);
}
.f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.f-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.f-card:before {
  content: "\201C"; position: absolute; top: -14px; left: 10px; font-size: 5.5rem;
  color: rgba(200,112,60,.14); font-family: Georgia, serif; line-height: 1;
}
.f-verse {
  margin: 0 0 12px; font-size: 1rem; line-height: 1.9; color: var(--ink);
  border-left: 3px solid var(--primary); padding-left: 14px; font-weight: 600;
}
.f-ref { color: var(--primary); font-weight: 800; font-size: .86rem; margin-bottom: 10px; }
.f-note { margin: 0; color: var(--ink-soft); font-size: .9rem; }

/* ---------- 信仰根基：两部分子区块 ---------- */
.subpart { margin-top: 40px; }
.subpart-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.subpart-head .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px rgba(200,112,60,.14); flex: 0 0 auto;
}
.subpart-head .dot.gold { background: var(--sage); box-shadow: 0 0 0 4px rgba(76,154,111,.14); }
.subpart-head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.subpart-head .subpart-sub {
  font-size: .82rem; color: var(--ink-faint, #9aa1b4); font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 3px 11px; border-radius: 999px;
}
.subpart + .subpart { border-top: 1px dashed var(--line); padding-top: 8px; }

/* ---------- 导航：激活态 / 移动端折叠 ---------- */
.nav-links a.active { color: var(--primary); position: relative; }
.nav-links a.active:after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.nav-toggle { display: none; border: none; background: transparent; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- 页面 Hero（子页面通用） ---------- */
.page-hero {
  padding: 56px 0 30px;
  background:
    radial-gradient(800px 320px at 88% -20%, rgba(200,112,60,.13), transparent),
    radial-gradient(700px 300px at 4% 0%, rgba(76,154,111,.13), transparent);
}
.page-hero h1 { font-size: 2.3rem; margin: 0 0 14px; letter-spacing: .5px; }
.page-hero p { font-size: 1.08rem; color: var(--ink-soft); max-width: 760px; margin: 0; }

/* ---------- 首页入口卡片 ---------- */
.entry-wrap { padding: 30px 22px 60px; }
.section-head.center { text-align: center; }
.section-head.center .bar { margin-left: auto; margin-right: auto; }
.entry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px;
}
.entry {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.entry:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(80,60,30,.16); border-color: var(--primary); }
.entry-icon { font-size: 2.1rem; }
.entry h3 { margin: 14px 0 8px; font-size: 1.3rem; }
.entry p { color: var(--ink-soft); font-size: .92rem; margin: 0 0 16px; flex: 1; text-align: justify; }
.entry-go { font-weight: 700; color: var(--primary); font-size: .92rem; }

/* ---------- 主题卡片（讲座首页） ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.topic-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.topic-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(80,60,30,.16); }
.topic-cover {
  height: 150px; background-size: cover; background-position: center; position: relative;
  display: grid; place-items: center;
}
.topic-cover:before { content: ""; position: absolute; inset: 0; background: rgba(40,30,20,.30); }
.topic-icon { position: relative; font-size: 2.6rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.topic-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.topic-body h3 { margin: 0 0 8px; font-size: 1.25rem; }
.topic-body p { color: var(--ink-soft); font-size: .9rem; margin: 0 0 14px; flex: 1; text-align: justify; }
.topic-go { font-weight: 700; color: var(--primary); font-size: .92rem; }

/* ---------- 讲座卡片：主讲 / 来源 / 待补充 ---------- */
.lec-speaker, .lec-source {
  display: inline-block; font-size: .8rem; font-weight: 600; margin-right: 12px;
  padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft);
}
.lec-source { color: var(--primary-dark); background: rgba(200,112,60,.12); }
.lec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lec-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 14px;
  font-weight: 700; color: #fff; background: var(--primary);
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s ease, background .15s ease;
}
.lec-link:hover { transform: translateY(-2px); background: var(--primary-dark); }
.lec-pending {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 220px; border-radius: 12px; background: var(--bg-soft); border: 1px dashed var(--line);
  color: var(--ink-soft); text-align: center; padding: 16px;
}
.lec-pending .emo { font-size: 2.4rem; }
.lec-pending .t { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.lec-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 220px; border-radius: 12px; background: var(--bg-soft); border: 1px dashed var(--line);
  color: var(--ink-soft); text-align: center; padding: 16px; text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.lec-page:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.lec-page .emo { font-size: 2.4rem; }
.lec-page .t { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.lec-page .muted { color: var(--ink-soft); font-size: .88rem; }

/* ---------- 返回链接 ---------- */
.back-link { display: inline-block; color: var(--primary); font-weight: 700; margin-bottom: 12px; }
.back-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .subpart-head { flex-wrap: wrap; gap: 8px; }
  .subpart-head .subpart-sub { width: 100%; margin-left: 24px; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .m-imgs img { height: 150px; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 22px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links a.active:after { display: none; }
}
@media (max-width: 460px) {
  .entry-grid { grid-template-columns: 1fr; }
}
