/* 石家庄远大中医皮肤病医院 - 脱发专科网站样式 */
:root {
  --primary: #1479b8;
  --primary-dark: #0d5f95;
  --primary-light: #e8f4fb;
  --accent: #d43a3a;
  --text: #333;
  --text-light: #666;
  --bg: #f7fafc;
  --border: #e3ecf3;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 顶部信息条 */
.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.topbar span { opacity: .92; }

/* 头部 */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(20, 121, 184, .06);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo-box img { width: 46px; height: 46px; }
.logo-text { line-height: 1.25; }
.logo-text strong { font-size: 18px; color: var(--primary-dark); display: block; }
.logo-text small { font-size: 12px; color: var(--text-light); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 16px;
  font-size: 16px;
  color: var(--text);
  border-radius: 4px;
  transition: .2s;
}
.nav a:hover, .nav a.active { color: #fff; background: var(--primary); }
.header-tel {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
  white-space: nowrap;
}
.header-tel small { display: block; font-size: 12px; color: var(--text-light); font-weight: normal; }
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--primary);
  cursor: pointer;
}

/* Banner 轮播 */
.banner { position: relative; overflow: hidden; background: #dfeef7; }
.banner-slides { display: flex; transition: transform .6s ease; }
.banner-slide { position: relative; width: 100%; flex-shrink: 0; }
.banner-slide img { width: 100%; height: auto; display: block; }
/* Banner 文字浮层 */
.banner-caption {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(90deg, rgba(9, 58, 92, .62) 0%, rgba(9, 58, 92, .30) 46%, rgba(9, 58, 92, 0) 72%);
  color: #fff;
  pointer-events: none;
}
.banner-caption .cap-inner { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 15px; pointer-events: auto; }
.banner-caption .cap-kicker {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 16px;
  width: fit-content;
}
.banner-caption h2 {
  font-size: 42px;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
  margin-bottom: 12px;
}
.banner-caption p {
  font-size: 17px;
  opacity: .94;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
  margin-bottom: 24px;
  max-width: 560px;
}
.banner-caption .cap-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  padding: 12px 34px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(212, 58, 58, .4);
  transition: .2s;
}
.banner-caption .cap-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(212, 58, 58, .5); }
.banner-caption .cap-btn.ghost {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: none;
  margin-left: 12px;
}
.banner-caption .cap-btn.ghost:hover { background: rgba(255, 255, 255, .28); }
.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.banner-dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
}
.banner-dots i.on { background: #fff; width: 24px; border-radius: 5px; }
.banner-prev, .banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  color: var(--primary-dark);
  font-size: 20px;
  cursor: pointer;
}
.banner-prev { left: 16px; }
.banner-next { right: 16px; }

/* 内页小banner */
.page-banner { position: relative; }
.page-banner img { width: 100%; height: auto; }
.page-banner .page-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(13,95,149,.75));
  color: #fff;
  padding: 40px 0 14px;
}
.page-banner .page-title h1 { font-size: 26px; }
.page-banner .page-title p { font-size: 13px; opacity: .85; }

/* 通用区块 */
.section { padding: 48px 0; }
.section.gray { background: var(--bg); }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: 26px; color: var(--primary-dark); }
.section-head h2::after {
  content: "";
  display: block;
  width: 46px; height: 3px;
  background: var(--primary);
  margin: 10px auto 0;
  border-radius: 2px;
}
.section-head p { color: var(--text-light); margin-top: 8px; font-size: 14px; }

/* 首页服务卡片 */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px 18px;
  text-align: center;
  transition: .25s;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(20,121,184,.12); }
.svc-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.svc-card h3 { font-size: 17px; margin-bottom: 8px; color: var(--primary-dark); }
.svc-card p { font-size: 13px; color: var(--text-light); }

/* 医生卡片 */
.doc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: .25s;
}
.doc-card:hover { box-shadow: 0 8px 22px rgba(20,121,184,.12); }
.doc-card .pic { position: relative; background: var(--primary-light); }
.doc-card .pic img { width: 100%; height: auto; }
.doc-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 3px;
}
.doc-tag.benyuan { background: var(--primary); }
.doc-info { padding: 16px; }
.doc-info h3 { font-size: 17px; color: var(--primary-dark); }
.doc-info h3 small { font-size: 13px; color: var(--text-light); font-weight: normal; margin-left: 6px; }
.doc-info .spec { font-size: 13px; color: var(--text-light); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 诊疗设备 */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.equip-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.equip-card img { width: 100%; height: 220px; object-fit: cover; }
.equip-card .eq-info { padding: 16px 18px 20px; }
.equip-card h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 8px; }
.equip-card p { font-size: 13px; color: var(--text-light); }

/* 百科列表 */
.baike-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bk-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.bk-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(20,121,184,.12); }
.bk-card img { width: 100%; height: 180px; object-fit: cover; }
.bk-card .bk-info { padding: 16px 18px 20px; flex: 1; }
.bk-card h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.bk-card h3 a:hover { color: var(--primary); }
.bk-card p { font-size: 13px; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-card .bk-more { font-size: 13px; color: var(--primary); margin-top: 10px; display: inline-block; }

/* 文章页 */
.article-wrap { max-width: 860px; margin: 0 auto; padding: 36px 15px 56px; }
.article-wrap h1 { font-size: 26px; color: var(--primary-dark); margin-bottom: 12px; }
.article-meta { font-size: 13px; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 22px; }
.article-body h2 { font-size: 20px; color: var(--primary-dark); margin: 28px 0 12px; }
.article-body p { margin-bottom: 14px; text-indent: 2em; }
.article-body img { border-radius: 8px; margin: 18px auto; }
.article-body .tip {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  margin: 18px 0;
}
.article-body .tip p { text-indent: 0; margin: 0; }

/* 图文并排 */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.row-2 img { border-radius: 8px; }
.row-2 h2 { font-size: 24px; color: var(--primary-dark); margin-bottom: 14px; }
.row-2 p { color: var(--text-light); margin-bottom: 12px; font-size: 15px; }

/* 视频 */
.video-box { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.video-box video { width: 100%; display: block; }

/* 来院路线 */
.route-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.route-info li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.route-info li:last-child { border-bottom: none; }
.route-info .ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.route-info b { color: var(--primary-dark); }
.route-info p { font-size: 14px; color: var(--text-light); }
.map-box {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.map-box svg { width: 100%; height: auto; display: block; }

/* 页脚 */
.footer { background: #123c5c; color: #cfe2ef; margin-top: 0; }
.footer .container { padding-top: 40px; padding-bottom: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer p, .footer li { font-size: 13px; line-height: 2; }
.footer a:hover { color: #fff; }
.footer-tel { font-size: 24px; color: #ffd75e; font-weight: bold; }
.copyright {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 26px;
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #9db8c9;
}

/* 悬浮咨询条 */
.float-bar {
  position: fixed;
  right: 14px;
  bottom: 90px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.float-bar a {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(20,121,184,.35);
  line-height: 1.3;
  padding: 4px;
}
.float-bar a.tel { background: var(--accent); }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 14px;
  bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
  display: none;
  z-index: 99;
}

/* 响应式 */
@media (max-width: 992px) {
  .svc-grid, .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .equip-grid, .baike-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-tel { display: none; }
  .banner-caption h2 { font-size: 32px; }
  .banner-caption p { font-size: 15px; }
}
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 10px 15px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid #f2f6f9; }
  .row-2, .route-grid { grid-template-columns: 1fr; }
  .section { padding: 34px 0; }
  .section-head h2 { font-size: 22px; }
}
@media (max-width: 560px) {
  .svc-grid, .doc-grid, .equip-grid, .baike-list, .footer-grid { grid-template-columns: 1fr; }
  .article-wrap h1 { font-size: 21px; }
  .float-bar a { width: 46px; height: 46px; font-size: 11px; }
  .banner-caption { background: linear-gradient(90deg, rgba(9, 58, 92, .68) 0%, rgba(9, 58, 92, .38) 100%); }
  .banner-caption .cap-kicker { font-size: 11px; padding: 2px 10px; margin-bottom: 8px; letter-spacing: 1px; }
  .banner-caption h2 { font-size: 19px; margin-bottom: 6px; }
  .banner-caption p { font-size: 12px; margin-bottom: 10px; max-width: 100%; }
  .banner-caption .cap-btn { font-size: 12px; padding: 7px 18px; }
  .banner-prev, .banner-next { display: none; }
}
