/* =========================================================
   邵阳西湖桥疝专科医院 · 网站样式
   说明：所有颜色、间距集中在 :root 变量中，方便统一修改。
   ========================================================= */
:root {
  --brand: #0E9F6E;          /* 主色（医疗绿） */
  --brand-dark: #0B7A57;     /* 深绿（悬停/渐变） */
  --brand-light: #E6F7F0;    /* 浅绿背景 */
  --ink: #1F2A37;            /* 主文字 */
  --muted: #6B7280;          /* 次要文字 */
  --bg: #FFFFFF;
  --bg-soft: #F5F9F7;        /* 柔和背景 */
  --border: #E5EBE8;
  --shadow-sm: 0 2px 8px rgba(15, 70, 50, .06);
  --shadow-md: 0 10px 30px rgba(15, 70, 50, .10);
  --shadow-lg: 0 18px 50px rgba(15, 70, 50, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  color: #fff;
  font-size: 14px;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding: 8px 0; }
.topbar a { font-weight: 600; }
.topbar .tb-right { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar i { opacity: .9; margin-right: 6px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, background .3s;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand .logo {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center;
}
.brand .logo svg { width: 22px; height: 22px; }
.brand small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .5px; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  font-weight: 600; color: var(--ink); transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--brand-light); color: var(--brand-dark); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px auto; width: 24px; transition: .3s; }

/* ---------- 轮播 Hero ---------- */
.hero { position: relative; height: 560px; overflow: hidden; background: #0c3a2c; }
.slides { height: 100%; position: relative; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,46,34,.78) 0%, rgba(8,46,34,.35) 55%, rgba(8,46,34,.15) 100%); }
.hero-caption {
  position: absolute; z-index: 2; left: max(20px, calc((100% - var(--maxw)) / 2 + 20px));
  top: 50%; transform: translateY(-50%); color: #fff; max-width: 620px;
}
.hero-caption .eyebrow {
  display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; letter-spacing: 1px; margin-bottom: 18px;
}
.hero-caption h1 { font-size: clamp(28px, 4.4vw, 52px); margin: 0 0 14px; line-height: 1.15; font-weight: 800; }
.hero-caption p { font-size: clamp(15px, 1.6vw, 19px); margin: 0 0 26px; opacity: .95; }
.hero-caption .hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; cursor: pointer; border: 0; transition: transform .2s, box-shadow .2s, background .2s; font-size: 15px;
}
.btn-primary { background: #fff; color: var(--brand-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.hero-dots { position: absolute; z-index: 3; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: .3s; padding: 0; }
.hero-dots button.active { background: #fff; width: 30px; border-radius: 6px; }
.hero-arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 22px; cursor: pointer; display: grid; place-items: center; transition: .2s; }
.hero-arrow:hover { background: rgba(255,255,255,.4); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--brand); font-weight: 800; letter-spacing: 2px; font-size: 14px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); margin: 10px 0 14px; font-weight: 800; position: relative; display: inline-block; }
.section-head h2::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; background: var(--brand); margin: 14px auto 0; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- 数据统计 ---------- */
.stats { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 16px; }
.stat .num { font-size: clamp(34px, 4vw, 50px); font-weight: 800; line-height: 1; }
.stat .num span { font-size: .5em; font-weight: 700; margin-left: 4px; }
.stat .label { opacity: .9; margin-top: 8px; font-size: 15px; }

/* ---------- 卡片通用 ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand); }

/* 医院简介 */
.intro-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.intro-grid .card h4 { color: var(--brand-dark); margin: 0 0 12px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.intro-grid .card h4::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--brand); display: inline-block; }
.intro-grid ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.intro-grid ul li { margin: 6px 0; }

/* 特色诊疗 */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc { text-align: center; padding: 34px 24px; }
.svc .ic { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 20px; background: var(--brand-light); display: grid; place-items: center; transition: .3s; }
.svc:hover .ic { background: var(--brand); transform: rotate(-6deg) scale(1.05); }
.svc .ic svg { width: 36px; height: 36px; stroke: var(--brand-dark); transition: .3s; }
.svc:hover .ic svg { stroke: #fff; }
.svc h5 { margin: 0 0 8px; font-size: 19px; }
.svc p { margin: 0; color: var(--muted); font-size: 15px; }

/* 医生团队 */
.doctor { max-width: 560px; margin: 0 auto; text-align: center; }
.doctor img { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; border: 4px solid var(--brand-light); box-shadow: var(--shadow-md); }
.doctor h4 { margin: 0 0 4px; font-size: 24px; }
.doctor .role { color: var(--brand); font-weight: 700; margin: 0 0 14px; }
.doctor .bio { color: var(--muted); }
.tag-note { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted); background: var(--bg-soft); border: 1px dashed var(--border); padding: 6px 14px; border-radius: 999px; }

/* 诊疗案例 */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case img { border-radius: var(--radius-sm); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.case h4 { color: var(--brand-dark); margin: 0 0 12px; }
.case p { margin: 4px 0; color: var(--muted); }
.case p strong { color: var(--ink); }

/* 联系我们 */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; align-items: start; }
.contact-info-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-info-list li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px dashed var(--border); }
.contact-info-list .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-light); color: var(--brand-dark); display: grid; place-items: center; flex: none; }
.contact-info-list .ic svg { width: 22px; height: 22px; }
.contact-info-list .txt b { display: block; font-size: 15px; }
.contact-info-list .txt span { color: var(--muted); font-size: 15px; }
#map { width: 100%; height: 380px; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; }

/* 页脚 */
footer { background: #0c2a20; color: #cfe7dd; padding: 44px 0 26px; }
footer .container { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
footer .f-brand { font-weight: 800; color: #fff; font-size: 18px; }
footer .motto { color: #9fd3bf; letter-spacing: 4px; margin-top: 6px; }
footer .f-meta { font-size: 13px; text-align: right; line-height: 1.9; }

/* 返回顶部 */
.totop { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 22px; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: .3s; z-index: 900; }
.totop.show { opacity: 1; visibility: visible; }
.totop:hover { background: var(--brand-dark); transform: translateY(-3px); }

/* 滚动入场动画 */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .stats .grid { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; background: #fff;
    flex-direction: column; gap: 0; padding: 10px 20px 18px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { display: block; padding: 12px 10px; border-radius: 10px; }
  .nav-cta { display: none; }
  .hero { height: 460px; }
  .hero-caption { left: 20px; right: 20px; max-width: none; }
  .section { padding: 60px 0; }
  .intro-grid, .svc-grid, .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats .grid { grid-template-columns: 1fr 1fr; }
  .topbar .tb-right { width: 100%; }
}
