/* ===================== 基础变量（改配色改这里） ===================== */
:root {
  --bg:        #faf7f0;   /* 页面背景：米白 */
  --bg-alt:    #f1ece0;   /* 交替板块背景 */
  --card:      #ffffff;   /* 卡片背景 */
  --green:     #1f6b4f;   /* 主色：墨绿 */
  --green-d:   #155239;   /* 深绿（按钮悬停） */
  --gold:      #c8a24a;   /* 点缀：金 */
  --text:      #1f2a24;   /* 正文深色 */
  --muted:     #6b776e;   /* 次要文字 */
  --shadow:    0 4px 18px rgba(31,42,36,.08);
  --radius:    14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;            /* 偏大，照顾年长读者 */
  -webkit-font-smoothing: antialiased;
}

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

/* ===================== 顶部导航 ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,240,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31,107,79,.12);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
}
.nav-brand { font-weight: 800; font-size: 20px; color: var(--green); white-space: nowrap; }
.nav-links {
  display: flex; gap: 4px; margin-left: auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.nav-links a {
  padding: 6px 12px; border-radius: 999px;
  font-size: 15px; color: var(--muted); white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus { background: rgba(31,107,79,.1); color: var(--green); }

/* ===================== 学习口号（位于 hero 大字下方） ===================== */
.slogan-banner {
  margin: 16px auto 4px; text-align: center; padding: 6px 16px;
}
.slogan-banner-inner {
  display: flex; flex-direction: column; gap: 4px;
}
.slogan-ar {
  font-size: 27px; font-weight: 700; color: var(--gold); letter-spacing: .5px; line-height: 1.5;
  direction: rtl; font-family: "Amiri", "Scheherazade New", "Geeza Pro",
    "Traditional Arabic", "Segoe UI", serif;
}
.slogan-cn { font-size: 23px; font-weight: 700; color: #f6e7c1; letter-spacing: 2px; line-height: 1.7; margin-top: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.25); }

.plat-intro {
  margin: 10px 0 4px; color: var(--text); font-size: 14px; line-height: 1.8;
  text-align: left;
}

/* ===================== 首屏 Hero ===================== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--green) 0%, #134634 100%);
  color: #fff; text-align: center;
  padding: 56px 16px 64px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(60% 50% at 85% 18%, rgba(200,162,74,.18), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-title { font-size: 40px; font-weight: 800; letter-spacing: 1px; }
.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  margin: 26px 0 30px;
}
.hero-stats:empty { display: none; }
.hero-stats .stat {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px; padding: 12px 20px; min-width: 110px;
}
.hero-stats .stat .v { font-size: 24px; font-weight: 800; }
.hero-stats .stat .l { font-size: 13px; opacity: .85; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 按钮 */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-size: 16px; font-weight: 700; transition: .2s;
  font-family: inherit; cursor: pointer;
}
.btn-primary { background: var(--gold); color: #2a200a; }
.btn-primary:hover { background: #d9b25c; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }

/* ===================== 通用板块 ===================== */
.section { max-width: 1080px; margin: 0 auto; padding: 52px 16px; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section-title {
  font-size: 28px; font-weight: 800; color: var(--green);
  margin-bottom: 24px; padding-left: 12px; border-left: 5px solid var(--gold);
}
.section-intro { color: var(--muted); font-size: 16px; margin: -12px 0 22px; }

/* ===================== 关于我 ===================== */
.about-body p {
  font-size: 18px; margin-bottom: 16px; color: #2c382f;
}

/* ===================== 卡片网格 ===================== */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(31,42,36,.14); }
.card-cover {
  height: 140px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800; text-align: center; padding: 10px;
  background: linear-gradient(135deg, var(--green), #2e8661);
}
/* 学习资源封面：深墨绿渐变 + 大字号篇名（顶部留白避开「免费」角标） */
.res-cover {
  height: auto; min-height: 176px; padding: 46px 16px 22px;
  font-size: 26px; letter-spacing: 1px; line-height: 1.45; position: relative;
  background: linear-gradient(135deg, #155239 0%, #0e3a2a 100%);
}
.free-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--gold); color: #2a200a; font-size: 13px; font-weight: 800;
  padding: 3px 12px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 18px; font-weight: 700; }
.card-source { font-size: 14px; color: var(--muted); }
.card-link {
  margin-top: auto; display: inline-block; color: var(--green);
  font-weight: 700; font-size: 15px; padding-top: 8px;
}
/* 资料卡片：迅雷领取方法列表 + 二维码 */
.res-tips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.res-tips li { font-size: 13.5px; color: #3a4a40; line-height: 1.55; padding-left: 18px; position: relative; }
.res-tips li::before { content: "·"; color: var(--gold); font-weight: 800; position: absolute; left: 4px; }
.res-qr { margin-top: 16px; text-align: center; }
.res-qr img { width: 168px; height: 168px; border-radius: 10px; border: 1px solid #e4e9e5; background: #fff; }
.res-qr p { font-size: 13px; color: var(--muted); margin-top: 6px; }


/* ===================== 视频号付费合集 ===================== */
.course-cover {
  position: relative;
  height: 138px;
  background: linear-gradient(135deg, #155239 0%, #0e3a2a 100%);
}
.course-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--gold); color: #1a3a2a;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.course-badge.muted { background: rgba(255,255,255,.88); color: var(--green); }
.course-cover-title {
  font-size: 18px; font-weight: 700; color: #f3e7c6;
  letter-spacing: 1px; line-height: 1.4; padding: 0 8px;
}
.course-meta {
  font-size: 13px; color: var(--muted); margin-top: 2px;
}
.course-price {
  font-size: 22px; font-weight: 800; color: var(--gold);
  margin-top: 6px; line-height: 1.1;
}
.course-price span {
  font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px;
}
.course-yuan {
  font-size: 13px; color: var(--muted); margin-top: 2px;
}
.course-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.course { cursor: pointer; }
.course:active { transform: translateY(-2px); }

/* 试看按钮 */
/* ===================== 视频号二维码弹窗 ===================== */
.qr-modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; }
.qr-modal[hidden] { display: none; }
.qr-modal-backdrop { position: absolute; inset: 0; background: rgba(15,30,22,.62); backdrop-filter: blur(2px); }
.qr-modal-inner {
  position: relative; z-index: 1; background: #fff; border-radius: 16px;
  padding: 22px 22px 18px; width: 300px; max-width: 86vw; text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.qr-modal-close {
  position: absolute; top: 8px; right: 10px; border: none; background: transparent;
  font-size: 26px; line-height: 1; color: #999; cursor: pointer;
}
.qr-modal-close:hover { color: #555; }
.qr-modal-img { width: 220px; height: 220px; object-fit: contain; border-radius: 10px; background: #f5f7f5; }
/* 个人微信码：放大显示，方便年长粉丝扫码 */
#wechatQrImg { width: 240px; height: 240px; }
.qr-modal-title { font-size: 16px; font-weight: 800; color: var(--green); margin: 14px 0 4px; }
.qr-modal-sub { font-size: 13px; color: var(--muted); margin: 0; }


/* ===================== 视频号会员专区 ===================== */
.membership-card {
  max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid rgba(31,107,79,.18);
  border-radius: 14px; padding: 20px 22px 18px;
  box-shadow: 0 4px 18px rgba(15,30,22,.06);
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.membership-card:hover, .membership-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,30,22,.12);
  border-color: var(--green);
  outline: none;
}
.membership-prices {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.membership-price {
  border: 1.5px solid #e2ece7; border-radius: 10px;
  padding: 16px 14px; text-align: center; background: #fafdfb;
  flex: 0 1 280px;
}
.membership-price.recommended {
  border-color: var(--green); background: #f1f8f4;
  position: relative;
}
.membership-price-label {
  font-size: 14px; color: var(--muted); font-weight: 600;
}
.membership-tag {
  display: inline-block; margin-left: 4px;
  background: var(--gold); color: #1a3a2a;
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  vertical-align: middle;
}
.membership-price-amount {
  font-size: 30px; font-weight: 800; color: var(--green);
  line-height: 1.1; margin: 6px 0 2px;
}
.membership-price-amount span {
  font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px;
}
.membership-price-beans {
  font-size: 12px; color: var(--muted);
}
.membership-body { margin-top: 16px; }
.membership-content-title {
  font-size: 14px; font-weight: 700; color: var(--green);
  margin-bottom: 8px;
}
.membership-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
}
.membership-list li {
  font-size: 14px; color: #444; padding-left: 16px; position: relative;
}
.membership-list li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  color: var(--green); font-weight: 700; font-size: 11px;
}
.membership-card .card-link {
  display: block; text-align: center; margin-top: 12px;
}

/* ===================== 微信小程序卡片（首屏正下方） ===================== */
.miniapp-wrap { max-width: 1080px; margin: 24px auto 0; padding: 0 16px; }
.miniapp-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(135deg, var(--green) 0%, #0e3a2a 100%);
  color: #fff; border-radius: 18px; padding: 22px 26px;
  box-shadow: 0 10px 28px rgba(31,42,36,.18);
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.miniapp-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 130% at 90% 0%, rgba(200,162,74,.24), transparent 62%);
}
.miniapp-card:hover, .miniapp-card:focus-visible {
  transform: translateY(-3px); box-shadow: 0 14px 34px rgba(31,42,36,.24); outline: none;
}
.miniapp-left { position: relative; z-index: 1; flex: 1; min-width: 0; }
.miniapp-tag {
  display: inline-block; background: var(--gold); color: #1a3a2a; font-weight: 700;
  font-size: 13px; padding: 3px 11px; border-radius: 999px; white-space: nowrap;
}
.miniapp-name { font-size: 24px; font-weight: 800; letter-spacing: 1px; margin: 10px 0 6px; }
.miniapp-desc { font-size: 15px; color: #e8f3ec; line-height: 1.65; }
.miniapp-status {
  display: inline-block; margin-top: 13px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  color: #f6e7c1; font-size: 13.5px; font-weight: 700;
  padding: 5px 14px; border-radius: 999px;
}
.miniapp-right { position: relative; z-index: 1; flex: 0 0 auto; text-align: center; }
.miniapp-qrbox {
  width: 132px; height: 132px; background: #fff; border-radius: 14px; padding: 7px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.miniapp-qrbox img { width: 100%; height: 100%; object-fit: contain; display: block; }
.miniapp-qrnote { font-size: 12.5px; color: #cfe3d8; margin-top: 8px; }

@media (max-width: 560px) {
  .miniapp-card { flex-direction: column; text-align: center; gap: 16px; padding: 20px 18px 22px; }
  .miniapp-name { font-size: 21px; }
  .miniapp-qrbox { width: 152px; height: 152px; }
}

/* ===================== 平台卡片 ===================== */
.platform .card-cover { background: linear-gradient(135deg, #2e8661, var(--green)); font-size: 40px; }
.platform .desc { font-size: 14px; color: var(--muted); }
.platform .note { font-size: 13px; color: #555; line-height: 1.6; background: #f5f9f7; border: 1px solid #e2ece7; border-radius: 8px; padding: 10px 12px; }
.platform .notes { background: #f5f9f7; border: 1px solid #e2ece7; border-radius: 8px; padding: 10px 12px; margin-top: 2px; }
.platform .note-item { font-size: 13px; color: #555; line-height: 1.6; }
.platform .note-item + .note-item { margin-top: 8px; }
.platform .note-label { display: inline-block; font-weight: 600; color: var(--green); margin-right: 4px; }
.platform .note-label::after { content: ""; }
.platform .note-text { color: #555; }
.qr-box {
  margin: 12px auto 0; width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 10px;
  background: #f3f3f3; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; border: 1px solid #e2ece7;
}

/* 社群区：免费 / 付费 双卡并排（左免费右付费，窄屏自动竖排） */
.follow-grid {
  max-width: 860px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.plat-tag {
  display: inline-block; align-self: flex-start;
  font-size: 12.5px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 12px; border-radius: 999px;
  background: rgba(31,107,79,.1); color: var(--green);
}
.plat-tag.gold { background: rgba(200,162,74,.18); color: #8a6d23; }

/* ===================== 联系 ===================== */
.contact-quote {
  text-align: center;
  white-space: pre-line;
  font-size: 19px; font-weight: 700; color: var(--green);
  margin-bottom: 22px; line-height: 1.95; letter-spacing: .5px;
}
.contact-quote::after {
  content: ""; display: block; width: 56px; height: 3px;
  background: var(--gold); border-radius: 2px; margin: 14px auto 0;
}
.contact-body { font-size: 18px; }
.contact-body .row { margin-bottom: 12px; }
.contact-body .k { color: var(--green); font-weight: 700; margin-right: 8px; }

/* ===================== 页脚 ===================== */
.footer { text-align: center; padding: 30px 16px; color: var(--muted); font-size: 14px; }
.footer .icp { margin-top: 8px; font-size: 12px; }
.footer .icp a { color: var(--muted); text-decoration: none; }
.footer .icp a:hover { text-decoration: underline; }

/* ===================== 桌面端微调 ===================== */
@media (min-width: 768px) {
  .hero-title { font-size: 52px; }
  .slogan-ar { font-size: 32px; }
  .slogan-cn { font-size: 16px; }
  .contact-quote { font-size: 22px; }
  .section-title { font-size: 32px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* ===================== 滚动入场动效 ===================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
