/* ============================================================
   石家庄远大中医皮肤病医院 · 脱发专病门诊
   全站样式（响应式）
   ============================================================ */
:root {
  --primary: #0d6b5c;
  --primary-dark: #084d42;
  --primary-light: #e8f4f1;
  --accent: #c8a15a;
  --text: #243230;
  --text-light: #5b6b68;
  --bg: #ffffff;
  --bg-soft: #f6faf9;
  --border: #e2ecea;
  --shadow: 0 8px 30px rgba(13, 107, 92, .08);
  --radius: 12px;
  --font-head: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.container { width: min(1200px, 92%); margin: 0 auto; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; }

/* ---------- 顶部条 ---------- */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,.85); font-size: 13px; }
.topbar-inner { display: flex; align-items: center; gap: 28px; padding: 7px 0; }
.topbar-phone { margin-left: auto; color: #fff; font-weight: 600; letter-spacing: .5px; }
.topbar-phone:hover { color: var(--accent); }

/* ---------- 主导航 ---------- */
.mainbar { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(0,0,0,.06); }
.mainbar-inner { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 48px; height: 48px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-family: var(--font-head); font-size: 18px; color: var(--primary-dark); letter-spacing: .5px; }
.brand-text em { font-style: normal; font-size: 12px; color: var(--accent); letter-spacing: 2px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 10px 16px; font-size: 15.5px; color: var(--text); border-radius: 8px; transition: .25s; white-space: nowrap; }
.nav a:hover { color: var(--primary); background: var(--primary-light); }
.nav a.active { color: #fff; background: var(--primary); }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--primary-dark); transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,52,45,.88) 0%, rgba(6,52,45,.62) 45%, rgba(6,52,45,.18) 100%); }
.hero-inner { position: relative; z-index: 2; padding: 90px 0; color: #fff; max-width: 640px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 30px; font-size: 14px; letter-spacing: 2px; margin-bottom: 22px; color: rgba(255,255,255,.9); }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 900; letter-spacing: 1px; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 17px; color: rgba(255,255,255,.85); margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 30px; border-radius: 30px; font-size: 16px; transition: .25s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #b38d47; transform: translateY(-2px); }
.btn-outline { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-green { background: var(--primary); color: #fff; font-weight: 600; }
.btn-green:hover { background: var(--primary-dark); transform: translateY(-2px); }
.hero-stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-size: 26px; font-family: var(--font-head); color: var(--accent); }
.hero-stats .stat span { font-size: 14px; color: rgba(255,255,255,.75); }

/* ---------- 内页页头 ---------- */
.page-hero { position: relative; padding: 86px 0; color: #fff; text-align: center; background-size: cover; background-position: center; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(6,52,45,.72); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: 2px; margin-bottom: 12px; }
.breadcrumb { font-size: 14px; color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb i { font-style: normal; margin: 0 8px; }

/* ---------- 通用区块 ---------- */
.section { padding: 76px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .en { display: block; font-size: 13px; letter-spacing: 4px; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); color: var(--primary-dark); letter-spacing: 1px; }
.section-head h2::after { content: ''; display: block; width: 56px; height: 3px; background: var(--accent); margin: 16px auto 0; border-radius: 2px; }
.section-head p { margin-top: 16px; color: var(--text-light); max-width: 720px; margin-left: auto; margin-right: auto; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 首页：诊疗流程 ---------- */
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.flow-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 30px; text-align: center; transition: .3s; position: relative; }
.flow-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.flow-card .num { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-family: var(--font-head); font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.flow-card h3 { font-size: 20px; color: var(--primary-dark); margin-bottom: 12px; }
.flow-card p { font-size: 14.5px; color: var(--text-light); }

/* ---------- 首页：脱发类型 ---------- */
.types-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.type-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--border); transition: .3s; }
.type-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.type-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.type-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.type-card:hover .thumb img { transform: scale(1.06); }
.type-card .body { padding: 20px 22px 24px; }
.type-card h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 8px; }
.type-card p { font-size: 14px; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 首页：诊疗技术 ---------- */
.treat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.treat-card { display: flex; gap: 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.treat-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.treat-card .thumb { width: 220px; flex-shrink: 0; aspect-ratio: 4/3; }
.treat-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.treat-card .body { padding: 24px 24px 24px 0; }
.treat-card h3 { font-size: 19px; color: var(--primary-dark); margin-bottom: 10px; }
.treat-card p { font-size: 14px; color: var(--text-light); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.text-link { color: var(--primary); font-size: 14.5px; font-weight: 600; }
.text-link:hover { color: var(--accent); }

/* ---------- 医师卡片 ---------- */
.doctor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.doctor-grid.four { grid-template-columns: repeat(4, 1fr); }
.doctor-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.doctor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.doctor-card .photo { aspect-ratio: 210/267; overflow: hidden; background: var(--primary-light); }
.doctor-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card .info { padding: 22px 24px 26px; }
.doctor-card .name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.doctor-card h3 { font-size: 20px; color: var(--primary-dark); }
.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12.5px; }
.badge.green { background: var(--primary-light); color: var(--primary); }
.badge.gold { background: #f7efdf; color: #9a7a34; }
.doctor-card .title { font-size: 14px; color: var(--accent); margin-bottom: 10px; }
.doctor-card .desc { font-size: 14px; color: var(--text-light); margin-bottom: 12px; }
.doctor-card .good { font-size: 13.5px; color: var(--text-light); border-top: 1px dashed var(--border); padding-top: 12px; }
.doctor-card .good strong { color: var(--primary-dark); }

/* ---------- 环境图集 ---------- */
.env-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.env-grid figure { border-radius: var(--radius); overflow: hidden; position: relative; }
.env-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: .5s; }
.env-grid figure:hover img { transform: scale(1.05); }
.env-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; font-size: 14px; color: #fff; background: linear-gradient(transparent, rgba(6,52,45,.75)); }

/* ---------- 文章列表 ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.article-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.article-card:hover .thumb img { transform: scale(1.06); }
.article-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.article-card .date { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.article-card h3 { font-size: 17.5px; color: var(--primary-dark); margin-bottom: 10px; line-height: 1.55; }
.article-card p { font-size: 14px; color: var(--text-light); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .text-link { margin-top: 14px; }

/* 列表页横排样式 */
.news-list { display: flex; flex-direction: column; gap: 24px; }
.news-item { display: flex; gap: 26px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .3s; }
.news-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.news-item .thumb { width: 300px; flex-shrink: 0; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .body { padding: 26px 26px 26px 0; display: flex; flex-direction: column; }
.news-item .date { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.news-item h3 { font-size: 19px; color: var(--primary-dark); margin-bottom: 10px; }
.news-item p { font-size: 14.5px; color: var(--text-light); flex: 1; }
.news-item .text-link { margin-top: 12px; }

/* ---------- 内容页 ---------- */
.article-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.article-main { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 46px; }
.article-main h1 { font-size: clamp(22px, 2.6vw, 30px); color: var(--primary-dark); margin-bottom: 14px; line-height: 1.5; }
.article-meta { font-size: 13.5px; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 26px; display: flex; gap: 22px; flex-wrap: wrap; }
.article-content h2 { font-size: 21px; color: var(--primary-dark); margin: 34px 0 14px; padding-left: 14px; border-left: 4px solid var(--accent); }
.article-content p { margin-bottom: 16px; color: #3a4845; font-size: 15.5px; }
.article-content img { border-radius: var(--radius); margin: 22px auto; }
.article-content ul { margin: 0 0 16px 22px; list-style: disc; color: #3a4845; font-size: 15.5px; }
.article-content li { margin-bottom: 8px; }
.article-note { background: var(--primary-light); border-radius: 10px; padding: 18px 22px; font-size: 14px; color: var(--primary-dark); margin: 26px 0; }
.side-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.side-box h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }
.side-box .side-articles li { margin-bottom: 12px; }
.side-box .side-articles a { font-size: 14px; color: var(--text-light); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-box .side-articles a:hover { color: var(--primary); }
.side-contact { text-align: center; }
.side-contact .phone { font-size: 22px; font-weight: 700; color: var(--primary); font-family: var(--font-head); display: block; margin: 8px 0 14px; }

/* ---------- 来院路线 ---------- */
.route-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: start; }
.route-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.route-map img { width: 100%; }
.route-info .info-block { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 18px; }
.info-block h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.info-block h3 svg { flex-shrink: 0; }
.info-block p { font-size: 14.5px; color: var(--text-light); }
.info-block p strong { color: var(--text); }

/* ---------- 视频 ---------- */
.video-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #06342d; }
.video-box video { width: 100%; display: block; }

/* ---------- 特色列表 ---------- */
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; font-size: 14.5px; color: var(--text-light); }
.feature-list li::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 9px; }
.feature-list li strong { color: var(--primary-dark); }

/* ---------- 底部CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: 1px; }
.cta-inner p { color: rgba(255,255,255,.8); margin-top: 8px; font-size: 15px; }
.cta-phone { font-family: var(--font-head); font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--accent); }
.cta-phone small { display: block; font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,.7); font-weight: 400; letter-spacing: 2px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0a2f2a; color: rgba(255,255,255,.72); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 36px; padding: 60px 0 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 8px; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 17px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-col .phone-lg { font-family: var(--font-head); font-size: 24px; color: var(--accent); font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: 13px; text-align: center; color: rgba(255,255,255,.45); }

/* ---------- 浮动工具条 ---------- */
.float-bar { position: fixed; right: 18px; bottom: 90px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.float-bar a, .float-bar button { width: 52px; height: 52px; border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(13,107,92,.18); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--primary); border: none; cursor: pointer; transition: .25s; }
.float-bar a:hover, .float-bar button:hover { background: var(--primary); color: #fff; }
.float-bar svg { width: 20px; height: 20px; }
#backTop { display: none; }
#backTop.show { display: flex; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .types-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-grid.four { grid-template-columns: repeat(2, 1fr); }
  .treat-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .topbar-inner { gap: 12px; justify-content: center; }
  .topbar-hide { display: none; }
  .topbar-item:first-child { display: none; }
  .brand-text strong { font-size: 15px; }
  .brand-text em { font-size: 11px; letter-spacing: 1px; }
  .nav { position: fixed; top: 0; right: -100%; width: min(300px, 80vw); height: 100vh; background: #fff; flex-direction: column; padding: 90px 24px 24px; gap: 6px; box-shadow: -6px 0 24px rgba(0,0,0,.12); transition: right .35s ease; z-index: 99; }
  .nav.open { right: 0; }
  .nav a { padding: 14px 16px; font-size: 16px; border-bottom: 1px solid var(--bg-soft); border-radius: 0; }
  .nav-toggle { display: flex; position: relative; z-index: 101; }
  .hero { min-height: 480px; }
  .hero-inner { padding: 70px 0; }
  .section { padding: 56px 0; }
  .flow-grid { grid-template-columns: 1fr; }
  .env-grid { grid-template-columns: repeat(2, 1fr); }
  .treat-card { flex-direction: column; }
  .treat-card .thumb { width: 100%; aspect-ratio: 16/9; }
  .treat-card .body { padding: 0 22px 24px; }  .news-item { flex-direction: column; gap: 0; }
  .news-item .thumb { width: 100%; aspect-ratio: 16/9; }
  .news-item .body { padding: 20px 22px 24px; }
  .route-grid { grid-template-columns: 1fr; }
  .article-main { padding: 26px 22px; }
  .doctor-grid { grid-template-columns: 1fr; }
  .float-bar { right: 12px; bottom: 70px; }
}
@media (max-width: 480px) {
  .types-grid, .article-grid, .env-grid, .doctor-grid.four, .feature-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-actions .btn { width: 100%; }
}
