/* ========================================
   《丁老师的个人主页》样式
   基调：专业亲和 · 暖白底 + 消防红橙强调 + 弱化灰
   移动端优先
   ======================================== */

:root {
  --warm-white: #FBF7F2;
  --warm-card: #FFFFFF;
  --warm-soft: #F5EFE7;
  --fire-red: #D85A30;
  --fire-red-dark: #993C1D;
  --fire-orange: #EF9F27;
  --trust-blue: #378ADD;
  --trust-blue-soft: #E6F1FB;
  --mute-gray: #888780;
  --mute-soft: #F1EFE8;
  --text-main: #2C2C2A;
  --text-sub: #5F5E5A;
  --text-hint: #888780;
  --border: rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --nav-h: 54px;
  --maxw: 760px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--warm-white);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  height: var(--nav-h);
  background: rgba(251,247,242,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.nav-brand { font-size: 18px; font-weight: 700; color: var(--fire-red); }
.nav-links { display: none; gap: 18px; }
.nav-links a { font-size: 14px; color: var(--text-sub); }
.nav-links a:hover { color: var(--fire-red); }
.nav-toggle {
  display: flex; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text-main); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: var(--warm-card); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.nav-mobile.open { max-height: 360px; }
.nav-mobile a { padding: 13px 20px; border-top: 1px solid var(--border); font-size: 15px; }
.nav-mobile a:first-child { border-top: none; }

/* ---------- 通用区块 ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 40px 16px;
}
.section-title {
  font-size: 24px; font-weight: 700; color: var(--text-main);
  margin-bottom: 8px; position: relative; padding-left: 14px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 5px; border-radius: 3px; background: var(--fire-red);
}
.section-title-sub { font-size: 20px; color: var(--text-sub); }
.section-title-sub::before { background: var(--mute-gray); }
.section-intro { color: var(--text-sub); margin-bottom: 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  border-radius: 999px; font-weight: 600; text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--fire-red); color: #fff; box-shadow: 0 4px 14px rgba(216,90,48,0.32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(216,90,48,0.42); }
.btn-lg { padding: 14px 32px; font-size: 17px; }

/* ---------- 1. Hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 36px; padding-bottom: 44px;
}
.hero-media { width: 100%; max-width: 340px; margin-bottom: 24px; }
.hero-portrait {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 20px; box-shadow: var(--shadow);
  background: var(--warm-soft);
}
.hero-eyebrow { color: var(--fire-red); font-weight: 600; font-size: 15px; letter-spacing: 1px; }
.hero-name { font-size: 38px; font-weight: 800; margin: 6px 0 12px; }
.hero-slogan { font-size: 19px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.hero-subline { color: var(--text-sub); margin-bottom: 24px; }
.hero-endorse { margin-top: 18px; font-size: 13px; color: var(--text-hint); }

/* ---------- 2. About ---------- */
.about-highlights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 20px 0;
}
.about-hl-card {
  background: var(--warm-card); border-radius: var(--radius-sm);
  padding: 16px 10px; text-align: center; box-shadow: var(--shadow);
}
.about-hl-card .v { font-size: 18px; font-weight: 700; color: var(--fire-red); }
.about-hl-card .l { font-size: 12px; color: var(--text-hint); margin-top: 4px; }
.about-resume { list-style: none; }
.about-resume li {
  padding: 11px 0 11px 22px; position: relative;
  border-bottom: 1px solid var(--border); color: var(--text-sub);
}
.about-resume li::before {
  content: ""; position: absolute; left: 4px; top: 19px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--fire-orange);
}

/* ---------- 3. Teaching ---------- */
.teaching-video { margin-bottom: 22px; }
.teaching-video video {
  width: 100%; border-radius: var(--radius); background: #000;
  box-shadow: var(--shadow);
}
.teaching-video .vcaption { font-size: 13px; color: var(--text-hint); margin-top: 8px; text-align: center; }

/* ---------- 图片画廊（折叠 + 网格） ---------- */
.gallery { margin-top: 8px; }
.gallery-cover {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px;
  height: 150px; margin-bottom: 12px;
}
.gallery-cover .gc {
  border-radius: var(--radius-sm); overflow: hidden; background: var(--warm-soft);
  cursor: pointer;
}
.gallery-cover .gc img { width: 100%; height: 100%; object-fit: cover; }
.gallery-cover .gc-more {
  position: relative; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 15px;
}
.gallery-cover .gc-more::after {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.4);
}
.gallery-cover .gc-more span { position: relative; z-index: 1; }
.gallery-toggle {
  width: 100%; padding: 12px; border: 1.5px solid var(--fire-red);
  background: var(--warm-card); color: var(--fire-red);
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer;
  margin-top: 12px;
}
.gallery-toggle::after { content: " ›"; }
.gallery-toggle:hover { background: #FCEFE9; }
.gallery-placeholder {
  padding: 30px; text-align: center; color: var(--text-hint);
  background: var(--mute-soft); border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

/* ---------- 悬浮毛玻璃二级面板（查看全部） ---------- */
.gallery-panel { position: fixed; inset: 0; z-index: 45; }
.gallery-panel[hidden] { display: none; }
.gallery-panel .gp-scrim {
  position: absolute; inset: 0;
  background: rgba(40,34,28,0.34);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .22s ease;
}
.gallery-panel.open .gp-scrim { opacity: 1; }
.gallery-panel .gp-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86vh; display: flex; flex-direction: column;
  background: rgba(251,247,242,0.86);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-top-left-radius: 22px; border-top-right-radius: 22px;
  border-top: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22,.61,.36,1);
}
.gallery-panel.open .gp-sheet { transform: translateY(0); }
.gp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; flex-shrink: 0;
}
.gp-title { font-size: 16px; font-weight: 700; color: var(--text-main); }
.gp-close {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: none; background: rgba(0,0,0,0.06); color: var(--text-main);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.gp-close:active { transform: scale(0.92); }
.gp-grid {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  padding: 8px 16px 12px;
}
.gp-item {
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--warm-soft); cursor: pointer;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.gp-item img { width: 100%; height: 100%; object-fit: cover; }
.gp-hint { text-align: center; color: var(--text-hint); font-size: 12px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); flex-shrink: 0; }

/* ---------- 5. Enroll ---------- */
.enroll { background: var(--warm-soft); max-width: none; }
.enroll > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.enroll-policies { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.enroll-policy {
  background: var(--warm-card); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
  border-left: 4px solid var(--fire-orange);
}
.enroll-policy .pt { font-weight: 700; color: var(--text-main); }
.enroll-policy .pd { color: var(--text-sub); font-size: 14px; margin-top: 2px; }
.enroll-contact {
  background: var(--warm-card); border-radius: var(--radius);
  padding: 22px; text-align: center; box-shadow: var(--shadow);
}
.enroll-contact .qr { width: 180px; height: 180px; margin: 0 auto 12px; border-radius: var(--radius-sm); background: var(--warm-soft); object-fit: cover; }
.enroll-contact .qr-cap { color: var(--text-sub); font-size: 14px; margin-bottom: 12px; }
.enroll-contact .ct-line { font-size: 15px; margin: 4px 0; }
.enroll-contact .ct-line b { color: var(--fire-red); }

/* ---------- 6. School（弱化） ---------- */
.school { background: var(--mute-soft); max-width: none; }
.school > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* ---------- 证书卡片区 ---------- */
.certs-cards { display: flex; flex-direction: column; gap: 16px; }
.cert-card {
  background: var(--warm-card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  border-top: 4px solid var(--fire-red);
}
.cert-card:nth-child(2) { border-top-color: var(--trust-blue); }
.cert-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--fire-red-dark); background: #FCEFE9;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.cert-card:nth-child(2) .cert-tag { color: #185FA5; background: var(--trust-blue-soft); }
.cert-name { font-size: 21px; font-weight: 800; color: var(--text-main); }
.cert-level { font-size: 13px; color: var(--text-hint); margin-top: 2px; }
.cert-must { font-size: 14px; color: var(--text-sub); margin: 12px 0; line-height: 1.7; }
.cert-must b { color: var(--fire-red); }
.cert-sub { font-weight: 700; font-size: 14px; margin: 12px 0 6px; color: var(--text-main); }
.cert-list { list-style: none; }
.cert-list li {
  padding: 6px 0 6px 18px; position: relative; font-size: 14px; color: var(--text-sub);
}
.cert-list li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--fire-orange);
}
.cert-tip {
  margin-top: 12px; font-size: 13px; color: var(--text-sub);
  background: var(--warm-soft); padding: 10px 12px; border-radius: var(--radius-sm);
}

/* ---------- 为什么选丁老师（对比） ---------- */
.whyme-rows { display: flex; flex-direction: column; gap: 10px; }
.whyme-row {
  background: var(--warm-card); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: flex-start;
}
.whyme-point {
  flex-shrink: 0; font-weight: 700; color: var(--fire-red);
  font-size: 15px; width: 76px;
}
.whyme-promise { font-size: 14px; color: var(--text-sub); line-height: 1.7; }

/* ---------- 防骗承诺 ---------- */
.promise {
  margin-top: 22px; background: #FFF8E8;
  border: 1px solid #FAC775; border-radius: var(--radius);
  padding: 18px 20px;
}
.promise-head { font-size: 16px; font-weight: 800; color: #854F0B; margin-bottom: 10px; }
.promise-list { list-style: none; }
.promise-list li {
  padding: 6px 0 6px 24px; position: relative; font-size: 14px; color: #633806; line-height: 1.7;
}
.promise-list li::before {
  content: "✓"; position: absolute; left: 2px; top: 6px; color: #BA7517; font-weight: 700;
}

/* ---------- 7. Location ---------- */
.location-navtip { color: var(--text-sub); margin-bottom: 16px; }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; padding: 30px 16px 90px;
  color: var(--text-hint); font-size: 13px;
  background: var(--warm-white); border-top: 1px solid var(--border);
}
.footer-icp { margin-top: 6px; font-size: 12px; }

/* ---------- 悬浮 CTA ---------- */
.float-cta {
  position: fixed; right: 16px; bottom: 18px; z-index: 25;
  background: var(--fire-red); color: #fff;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 16px;
  box-shadow: 0 6px 20px rgba(216,90,48,0.45);
}
.float-cta:active { transform: scale(0.96); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(18,16,14,0.95);
  display: flex; flex-direction: column;
}
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.lightbox-count { color: #fff; font-size: 14px; }
.lightbox-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.12);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.lightbox-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 10px; overflow: hidden; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 24px; cursor: pointer;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-hint { text-align: center; color: rgba(255,255,255,0.5); font-size: 12px; padding: 14px; }

/* ---------- 桌面适配 ---------- */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .section { padding: 60px 20px; }
  .hero { flex-direction: row; text-align: left; gap: 48px; padding-top: 56px; padding-bottom: 64px; }
  .hero-media { margin-bottom: 0; flex-shrink: 0; }
  .hero-content { flex: 1; }
  .hero-name { font-size: 46px; }
  .gallery-cover { height: 200px; }
  .lightbox-stage img { max-width: 80%; }
  .gp-sheet { left: 50%; right: auto; transform: translate(-50%, 100%); width: 720px; max-width: 92vw; max-height: 84vh; border-radius: 22px; bottom: 4vh; }
  .gallery-panel.open .gp-sheet { transform: translate(-50%, 0); }
  .gp-grid { grid-template-columns: repeat(4, 1fr); }
  .certs-cards { flex-direction: row; }
  .certs-cards .cert-card { flex: 1; }
}
