/* ============================================================
   石家庄远大中医皮肤病医院 · 毛发(脱发)专科 — 全站共享样式
   断点约定：桌面 >=1024px / 平板 768-1023px / 手机 <768px
   配色：医疗青绿 + 蓝白（避免浓重靛蓝/紫色系）
   字体：仅系统本地字体栈，不引用任何网络字体
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --primary: #0e9f8c;          /* 医疗青绿 主色 */
  --primary-dark: #0b7d70;     /* 深青绿 悬浮/按压 */
  --primary-light: #e4f4f1;    /* 浅青绿 背景 */
  --primary-lighter: #f2faf8;
  --accent: #2f80c9;           /* 医疗蓝 辅助色 */
  --accent-dark: #1f6fb2;
  --bg: #f3f8f8;               /* 页面底色 */
  --surface: #ffffff;          /* 卡片/面板 */
  --text: #23333a;             /* 正文 */
  --muted: #5f7379;            /* 次要文字 */
  --border: #dcebea;           /* 边框 */
  --danger: #c0392b;           /* 表单错误提示 */
  --header-h: 72px;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(11, 90, 80, .08);
  --shadow-md: 0 6px 20px rgba(11, 90, 80, .12);
  --font-stack: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "SimSun", sans-serif;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; color: var(--text); font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 通用区块标题 ---------- */
.section { padding: 48px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head .section-sub {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 28px; margin-bottom: 8px; }
.section-head .section-desc { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--font-stack);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s ease;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 14px 36px; font-size: 16px; }

/* ============================================================
   顶部 Header（吸顶）
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo img { height: 46px; width: auto; }
.brand-text .site-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
}
.brand-text .site-slogan {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}
.header-phone .phone-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.header-phone small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.2; }

/* 桌面导航 */
.main-nav ul { display: flex; align-items: center; gap: 0; }
.main-nav a {
  display: block;
  padding: 10px 11px;
  color: var(--text);
  font-size: 14.5px;
  white-space: nowrap;
  border-radius: 6px;
}
.main-nav a:hover { color: var(--primary-dark); background: var(--primary-lighter); }
.main-nav a.active { color: var(--primary-dark); background: var(--primary-light); font-weight: 700; }

/* 汉堡按钮（<1024px 显示） */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--primary);
  background: var(--primary-light);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  position: absolute; left: 10px;
  transition: all .2s ease;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.is-open span::after { transform: rotate(-45deg); top: 0; }

/* ============================================================
   Hero Banner
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
  background:
    linear-gradient(120deg, rgba(9, 84, 74, .82), rgba(31, 111, 178, .62)),
    url("../images/banner/home-banner.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
}
.hero-inner { position: relative; z-index: 1; padding: 60px 0; }
.hero h1 {
  font-size: 40px;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.hero .hero-sub {
  font-size: 18px;
  max-width: 620px;
  color: rgba(255,255,255,.92);
  margin-bottom: 26px;
}
.hero .btn-group { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--primary-dark); }
.hero .btn-primary:hover { background: var(--primary-light); }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }

/* 内页 banner（内页通用） */
.page-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 200px;
  background:
    linear-gradient(120deg, rgba(9, 84, 74, .85), rgba(31, 111, 178, .65)),
    url("../images/banner/inner-banner.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
}
.page-banner h1 { color: #fff; font-size: 30px; margin-bottom: 6px; }
.page-banner .crumb-in-banner { color: rgba(255,255,255,.85); font-size: 14px; }

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb .sep { margin: 0 8px; color: #b9cfcc; }
.breadcrumb .current { color: var(--text); }

/* ============================================================
   快捷服务入口（首页）
   ============================================================ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: -64px;
  position: relative;
  z-index: 5;
}
.quick-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .2s ease, box-shadow .2s ease;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11, 90, 80, .16); }
.quick-card .q-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.quick-card h3 { font-size: 18px; margin-bottom: 4px; }
.quick-card p { font-size: 13px; color: var(--muted); margin: 0; }
.quick-card .q-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; }

/* ============================================================
   医院简介
   ============================================================ */
.about-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-points { margin: 16px 0 22px; }
.about-points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text);
}
.about-points li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 3px solid var(--primary);
}
.about-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--primary-light);
  min-height: 260px;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   诊疗项目卡片网格
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .card-img {
  aspect-ratio: 4 / 3;
  background: var(--primary-light);
}
.card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--muted); flex: 1; margin-bottom: 12px; }
.card .card-more { font-size: 13px; font-weight: 700; color: var(--primary-dark); }

/* ============================================================
   医师团队预览
   ============================================================ */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.doctor-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .2s ease;
}
.doctor-card:hover { transform: translateY(-4px); }
.doctor-card .doc-photo {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--primary-light), #dceefb);
}
.doctor-card .doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card .doc-body { padding: 16px 14px 20px; }
.doctor-card .doc-name { font-size: 17px; font-weight: 700; }
.doctor-card .doc-role {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  margin: 6px 0;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.doctor-card .doc-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.doctor-card .doc-spec {
  font-size: 12.5px; color: var(--text);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.preview-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

/* ============================================================
   脱发百科（文章列表）
   ============================================================ */
.article-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
}
.article-card:hover { transform: translateY(-4px); }
.article-card .art-cover { aspect-ratio: 16 / 9; background: var(--primary-light); }
.article-card .art-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card .art-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.article-card .art-cat {
  font-size: 12px; color: var(--accent-dark);
  background: #eaf3fb;
  align-self: flex-start;
  padding: 2px 10px; border-radius: 12px; margin-bottom: 10px;
}
.article-card h3 { font-size: 16px; margin-bottom: 8px; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary-dark); }
.article-card .art-summary { font-size: 13px; color: var(--muted); flex: 1; margin-bottom: 12px; }
.article-card .art-date { font-size: 12px; color: #9fb3b0; }

/* ============================================================
   CTA / 预约表单 + 来院路线
   ============================================================ */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--accent-dark)); color: #fff; }
.cta-band .section-head h2, .cta-band .section-head .section-desc { color: #fff; }
.cta-band .section-head .section-desc { color: rgba(255,255,255,.85); }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.visit-info { background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 26px; }
.visit-info h3 { color: #fff; font-size: 20px; margin-bottom: 16px; }
.visit-info li {
  display: flex; gap: 10px;
  margin-bottom: 14px;
  font-size: 15px;
  color: rgba(255,255,255,.95);
}
.visit-info .v-label { flex-shrink: 0; min-width: 70px; color: rgba(255,255,255,.75); }
.visit-info a { color: #fff; font-weight: 700; }

.appointment-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-md);
}
.appointment-form h3 { font-size: 20px; color: var(--primary-dark); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-row label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--font-stack);
  background: #fbfdfd;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 159, 140, .15);
}
textarea.form-control { min-height: 90px; resize: vertical; }
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 4px; display: none; }
.form-row.has-error .form-control { border-color: var(--danger); }
.form-row.has-error .form-error { display: block; }
.form-success {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1.8;
}
.form-success.is-visible { display: block; }
.form-success a { font-weight: 700; text-decoration: underline; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ============================================================
   文章正文排版（内页共用）
   ============================================================ */
.article-body {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 36px 40px;
}
.article-body h2 {
  font-size: 22px;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}
.article-body h3 { font-size: 18px; margin: 22px 0 10px; }
.article-body p { color: #33474f; }
.article-body ul, .article-body ol { margin: 0 0 1em 1.2em; }
.article-body ul li { list-style: disc; margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--primary-light); }
.article-body blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  background: var(--primary-lighter);
  border-left: 4px solid var(--primary);
  color: var(--muted);
  border-radius: 0 6px 6px 0;
}

/* ============================================================
   来院路线页
   ============================================================ */
.route-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.route-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 22px;
}
.route-card h3 { font-size: 19px; color: var(--primary-dark); margin-bottom: 14px; }
.route-card li { padding-left: 22px; position: relative; margin-bottom: 10px; }
.route-card li::before {
  content: "";
  position: absolute; left: 0; top: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
}
.route-map-tip {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--primary-dark);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #0c3b36;
  color: #cfe3e0;
  margin-top: 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 40px 0 28px;
}
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer .foot-name { font-size: 18px; color: #fff; font-weight: 700; margin-bottom: 10px; }
.site-footer p, .site-footer li { font-size: 13.5px; line-height: 1.9; }
.site-footer a { color: #cfe3e0; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-nav li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0;
  font-size: 12.5px;
  color: #9fbdb8;
  text-align: center;
  line-height: 1.9;
}

/* ============================================================
   回到顶部
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* 图片加载失败占位 */
img[data-lazy] { background: var(--primary-light); }

/* ============================================================
   响应式：平板 768-1023px
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .section { padding: 40px 0; }
  .hero h1 { font-size: 32px; }
  .hero .hero-sub { font-size: 16px; }
  .header-phone { font-size: 17px; }
  .header-phone .phone-text-wrap small { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .article-list { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .quick-card { flex-direction: column; gap: 10px; }
  .about-wrap { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .route-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   响应式：手机 <768px
   ============================================================ */
@media (max-width: 767px) {
  body { font-size: 14px; }
  .section { padding: 32px 0; }
  .section-head h2 { font-size: 22px; }
  .header-inner { flex-wrap: wrap; }
  /* 移动端头部显式两行：第一行 品牌+汉堡，第二行 电话整行 */
  .brand { order: 1; flex: 1 1 auto; min-width: 0; }
  .brand-logo img { height: 40px; max-width: 110px; object-fit: contain; }
  .brand-text { min-width: 0; }
  .brand-text .site-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-text .site-slogan { display: none; }
  .nav-toggle {
    order: 2;
    display: flex;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
  }
  .header-phone { order: 3; flex: 0 0 100%; font-size: 15px; padding: 6px 0; }
  .header-phone .phone-text-wrap small { display: none; }
  .main-nav {
    display: none;
    width: 100%;
    order: 4;
    border-top: 1px solid var(--border);
    padding: 8px 0 12px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 12px 8px; border-radius: 0; }

  .hero { min-height: 300px; }
  .hero h1 { font-size: 26px; }
  .hero .hero-sub { font-size: 15px; }
  .hero-inner { padding: 40px 0; }

  .quick-grid { grid-template-columns: 1fr; gap: 14px; margin-top: -40px; }
  .card-grid { grid-template-columns: 1fr; }
  .doctor-grid { grid-template-columns: 1fr; }
  .article-list { grid-template-columns: 1fr; }
  .about-wrap { grid-template-columns: 1fr; gap: 22px; }
  .cta-grid { grid-template-columns: 1fr; }
  .route-layout { grid-template-columns: 1fr; }
  .article-body { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 20px; }
  .back-to-top { right: 14px; bottom: 18px; width: 42px; height: 42px; }
}

/* ============================================================
   响应式：桌面 >=1024px
   ============================================================ */
@media (min-width: 1024px) {
  .container { padding: 0 24px; }
  .hero h1 { font-size: 44px; }
  .main-nav { display: block !important; }
}
