/* ==========================================================================
   仁和医院官网 - 全局样式表
   ==========================================================================
   设计约定：
   - 移动优先（mobile-first），断点自下而上增强
   - 配色与 public/static/img 下的 SVG 占位图保持一致
   - 不依赖任何前端框架（无 Bootstrap/jQuery），纯原生 CSS + 少量原生 JS
   - 兼容 Chrome 80+ / Edge / Safari 13+ / Firefox 78+ 及主流国产浏览器内核

   断点：
     <768px   手机
     768-991  平板
     992-1199 小屏桌面
     >=1200   桌面
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 主色：医疗青绿 */
  --c-primary: #12807a;
  --c-primary-dark: #0b5f5b;
  --c-primary-light: #e8f4f3;

  /* 辅助色：深蓝 */
  --c-secondary: #0e5a8a;
  --c-secondary-light: #eaf1f7;

  /* 强调色：暖橙（仅少量点缀） */
  --c-accent: #f0a500;
  --c-accent-light: #fdf5e3;

  /* 中性色 */
  --c-text: #2b3440;
  --c-text-light: #6b7785;
  --c-text-muted: #98a2ad;
  --c-border: #e3e8ec;
  --c-bg: #f5f7f9;
  --c-bg-soft: #eef7f6;
  --c-white: #ffffff;

  /* 语义色 */
  --c-success: #2e9e5b;
  --c-danger: #d94a4a;
  --c-warning: #e8a33d;

  /* 尺寸 */
  --container: 1200px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 72px;
  --header-h-mobile: 58px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(16, 42, 67, 0.06);
  --shadow: 0 2px 12px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 8px 28px rgba(16, 42, 67, 0.12);

  /* 过渡 */
  --trans: all 0.25s ease;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Source Han Sans CN", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-text);
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { margin: 0 0 1em; }

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: var(--trans);
}
a:hover { color: var(--c-primary-dark); }

img, svg {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}
th, td {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  text-align: left;
  font-size: 14px;
}
th {
  background: var(--c-bg);
  font-weight: 600;
  white-space: nowrap;
}

blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--c-primary);
  background: var(--c-bg-soft);
  color: var(--c-text-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--c-border);
  margin: 1.6em 0;
}

/* 表单控件基础 */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* 无障碍：仅供屏幕阅读器 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 跳转到主内容（键盘用户） */
.skip-link {
  position: absolute;
  top: -60px;
  left: 0;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--c-primary);
  color: #fff;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 40px 0;
}

.section--soft {
  background: var(--c-bg);
}

/* 区块标题（中文主标题 + 英文副标题，参考站点风格） */
.sec-head {
  text-align: center;
  margin-bottom: 28px;
}

.sec-head__cn {
  display: inline-block;
  position: relative;
  padding: 0 28px;
  font-size: 24px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
}

.sec-head__cn::before,
.sec-head__cn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-primary));
}
.sec-head__cn::before { left: -28px; transform: scaleX(-1); }
.sec-head__cn::after  { right: -28px; }

.sec-head__en {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.sec-head--left { text-align: left; }
.sec-head--left .sec-head__cn { padding-left: 0; }
.sec-head--left .sec-head__cn::before { display: none; }

/* ---------- 顶部通栏 ---------- */
.topbar {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 34px;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar a { color: rgba(255, 255, 255, 0.85); }
.topbar a:hover { color: #fff; }

.topbar__tel {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.topbar__links {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

.topbar__addr {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 移动端布局规则统一写在下方「院区切换器」样式块中，
   此处不再重复定义，避免 display:none 等旧规则覆盖新布局。 */

/* ---------- 院区切换器（顶部通栏内） ---------- */
.campus-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.campus-switch__label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-right: 2px;
  white-space: nowrap;
  /* 下拉箭头，提示可切换 */
  position: relative;
  padding-right: 12px;
}
.campus-switch__label::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.7);
}

.campus-switch__item {
  display: inline-block;
  padding: 2px 12px;
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  white-space: nowrap;
  transition: var(--trans);
  cursor: pointer;
}

.campus-switch__item:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.campus-switch__item.is-current {
  color: var(--c-primary-dark);
  background: #fff;
  border-color: #fff;
  font-weight: 600;
}

.campus-switch__item.is-current:hover {
  color: var(--c-primary-dark);
  background: #fff;
  transform: none;
}

/* 当前院区前的勾选标记 */
.campus-switch__check {
  display: inline-block;
  margin-right: 3px;
  font-size: 11px;
}

/* 移动端：切换器独占一行并居中，与电话信息分行显示 */
@media (max-width: 767px) {
  .topbar__inner {
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
  }
  .campus-switch {
    justify-content: center;
    width: 100%;
  }
  .campus-switch__label {
    display: inline-block;
    font-size: 12px;
  }
  .campus-switch__item { padding: 2px 14px; font-size: 13px; }
  .topbar__links {
    justify-content: center;
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.6;
    font-size: 12px;
  }
}

/* ---------- 页头 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img {
  height: 36px;
  width: auto;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-size: 19px; font-weight: 700; color: var(--c-primary-dark); }
.brand__slogan { font-size: 11px; color: var(--c-text-muted); }

/* 汉堡按钮（仅手机） */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  position: relative;
}

.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  background: var(--c-text);
  transition: var(--trans);
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.nav-toggle.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------- 主导航 ---------- */
.nav { display: flex; align-items: center; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item { position: relative; margin: 0; }

.nav__link {
  display: block;
  padding: 0 16px;
  height: var(--header-h);
  line-height: var(--header-h);
  font-size: 15px;
  color: var(--c-text);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.nav__link:hover,
.nav__item.is-active > .nav__link {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

/* 下拉菜单 */
.nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--trans);
}

.nav__item:hover > .nav__sub,
.nav__item:focus-within > .nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__sub a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  color: var(--c-text);
}
.nav__sub a:hover {
  background: var(--c-bg-soft);
  color: var(--c-primary);
}

/* 导航区右侧按钮 */
.nav__cta {
  margin-left: 12px;
  padding: 0 20px;
  height: 40px;
  line-height: 40px;
  background: var(--c-primary);
  color: #fff !important;
  border-radius: 20px;
  font-size: 14px;
  border-bottom: 0 !important;
}
.nav__cta:hover {
  background: var(--c-primary-dark);
  transform: translateY(-1px);
}

/* ---------- 移动端导航 ---------- */
@media (max-width: 991px) {
  :root { --header-h: var(--header-h-mobile); }

  .brand__slogan { display: none; }
  .brand img { height: 30px; }

  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    top: var(--header-h-mobile);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--c-white);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: block;
    padding: 12px 0 40px;
  }

  .nav.is-open { transform: translateX(0); }

  .nav__list {
    display: block;
    gap: 0;
  }

  .nav__link {
    height: auto;
    line-height: 1.5;
    padding: 15px 20px;
    border-bottom: 1px solid var(--c-border);
    font-size: 16px;
  }

  .nav__item.is-active > .nav__link {
    color: var(--c-primary);
    background: var(--c-primary-light);
    border-bottom-color: var(--c-border);
  }

  /* 下拉改为手风琴式 */
  .nav__sub {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--c-bg);
    padding: 0;
  }

  .nav__item.is-expanded > .nav__sub { display: block; }

  .nav__sub a {
    padding: 12px 20px 12px 36px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
  }

  .nav__cta {
    display: block;
    margin: 20px;
    /*height: 46px;
    line-height: 46px;*/
    text-align: center;
    border-radius: var(--radius);
  }

  /* 移动端禁止背景滚动 */
  body.nav-locked { overflow: hidden; }
}

/* ---------- 轮播 ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--c-bg);
}

.carousel__track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.carousel__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
}

.carousel__slide img {
  width: 100%;
  display: block;
  /* 用 aspect-ratio 保证移动端不会因图片比例不同而跳动 */
  aspect-ratio: 1920 / 620;
  object-fit: cover;
}

.carousel__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 40px 0 34px;
  background: linear-gradient(to top, rgba(11, 95, 91, 0.75), transparent);
  color: #fff;
}

.carousel__caption .container { display: block; }

.carousel__title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.carousel__more {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-primary-dark);
  border-radius: 20px;
  font-size: 14px;
}
.carousel__more:hover { background: #fff; }

/* 轮播指示点 */
.carousel__dots {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 3;
}

.carousel__dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--trans);
}
.carousel__dot.is-active {
  background: #fff;
  width: 44px;
}

/* 左右箭头（仅桌面） */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.carousel__arrow:hover { background: rgba(255, 255, 255, 0.4); }
.carousel__arrow--prev { left: 24px; }
.carousel__arrow--next { right: 24px; }

@media (min-width: 992px) {
  .carousel__arrow { display: flex; }
  .carousel__title { font-size: 40px; }
}

/* 手机端：图片改为竖版比例，标题缩小，隐藏 caption 避免遮挡 */
@media (max-width: 767px) {
  .carousel__slide img { aspect-ratio: 16 / 11; }
  .carousel__caption { padding: 20px 0 18px; }
  .carousel__title { font-size: 18px; }
  .carousel__more { display: none; }
  .carousel__dots { right: 12px; bottom: 12px; }
  .carousel__dot { width: 18px; }
  .carousel__dot.is-active { width: 28px; }
}

/* 尊重用户的减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- 快捷服务入口（手机常驻） ---------- */
.quick-entry {
  background: var(--c-white);
  padding: 22px 0;
  border-bottom: 1px solid var(--c-border);
}

.quick-entry__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.qe-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 8px;
  background: var(--c-bg);
  border-radius: var(--radius);
  color: var(--c-text);
  text-align: center;
  transition: var(--trans);
}

.qe-item:hover {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.qe-item__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary);
  color: #fff;
  border-radius: 50%;
}

.qe-item__icon svg { width: 22px; height: 22px; }
.qe-item__label { font-size: 14px; font-weight: 500; }

@media (max-width: 767px) {
  .quick-entry { padding: 16px 0; }
  .quick-entry__grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .qe-item { padding: 12px 4px; }
  .qe-item__icon { width: 38px; height: 38px; }
  .qe-item__icon svg { width: 19px; height: 19px; }
  .qe-item__label { font-size: 12px; }
}

/* ---------- 通用卡片网格 ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 991px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid { gap: 12px; }
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--trans);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card__media {
  position: relative;
  overflow: hidden;
  background: var(--c-bg);
  flex-shrink: 0;
}

.card__media img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card__media img { transform: scale(1.06); }

.card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.card__title a { color: var(--c-text); }
.card__title a:hover { color: var(--c-primary); }

.card__text {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--c-text-light);
  /* 多行省略 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--c-border);
  font-size: 12.5px;
  color: var(--c-text-muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* 科室卡（图上文下） */
.dept-card .card__media { aspect-ratio: 3 / 2; }
.dept-card .card__media img { height: 100%; object-fit: cover; }

/* 专家卡（图左文右，桌面；手机上图下文） */
.doctor-card .card__media { aspect-ratio: 1 / 1; }
.doctor-card .card__media img { height: 100%; object-fit: cover; }

.doctor-card__tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-size: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* 新闻卡（图左文右） */
.news-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.news-row .card__media {
  width: 220px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}

.news-row .card__media img { height: 100%; object-fit: cover; }

@media (max-width: 767px) {
  .news-row { flex-direction: column; gap: 0; }
  .news-row .card__media { width: 100%; aspect-ratio: 16 / 9; }
}

/* ---------- 关于我们（首页版块） ---------- */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-block__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-block__text p {
  color: var(--c-text-light);
  font-size: 14.5px;
  line-height: 1.9;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat {
  text-align: center;
  padding: 14px 8px;
  background: var(--c-bg);
  border-radius: var(--radius);
}

.stat__num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.2;
}

.stat__label { font-size: 12.5px; color: var(--c-text-light); }

@media (max-width: 991px) {
  .about-block { grid-template-columns: 1fr; gap: 24px; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat__num { font-size: 22px; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--outline:hover { background: var(--c-primary); color: #fff; }

.btn--ghost {
  background: var(--c-white);
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); }

.btn--block { display: block; width: 100%; }
.btn--sm { padding: 7px 18px; font-size: 13.5px; }
.btn--lg { padding: 14px 36px; font-size: 16px; }

.btn:disabled,
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}

.form-label .req { color: var(--c-danger); margin-left: 3px; }

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: var(--trans);
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: 0;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(18, 128, 122, 0.12);
}

.form-control::placeholder { color: var(--c-text-muted); }

textarea.form-control { min-height: 120px; resize: vertical; }

select.form-control {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7785' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
}

.form-help {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--c-text-muted);
}

.form-error {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--c-danger);
}

.has-error .form-control {
  border-color: var(--c-danger);
}

/* 双列表单 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 767px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-control { font-size: 16px; } /* 防止 iOS 聚焦时自动放大 */
}

/* ---------- 提示条 ---------- */
.alert {
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.7;
}

.alert--success { background: #eaf7ef; border-color: #bfe4cd; color: #1f7a44; }
.alert--error   { background: #fdeeee; border-color: #f3c9c9; color: #a83232; }
.alert--info    { background: var(--c-secondary-light); border-color: #c9dced; color: #0c4a70; }
.alert--warning { background: var(--c-accent-light); border-color: #f0dcae; color: #8a6209; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--c-text-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li { margin: 0; display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: var(--c-border); }
.breadcrumb a { color: var(--c-text-light); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .current { color: var(--c-text); }

/* ---------- 页面横幅（内页顶部） ---------- */
.page-banner {
  position: relative;
  padding: 44px 0;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  color: #fff;
  overflow: hidden;
}

.page-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.page-banner__title {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.page-banner__desc {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 767px) {
  .page-banner { padding: 30px 0; }
  .page-banner__title { font-size: 21px; }
  .page-banner__desc { font-size: 13px; }
}

/* ---------- 内容区双栏布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 991px) {
  .layout { grid-template-columns: 1fr; gap: 20px; }
  .layout__side { order: 2; }
  .layout__main { order: 1; }
}

/* 侧栏组件 */
.side-box {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}

.side-box__title {
  margin: 0;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-box__title::before {
  content: "";
  width: 3px;
  height: 15px;
  background: var(--c-primary);
  border-radius: 2px;
}

.side-box__body { padding: 12px 16px; }
.side-box__body--flush { padding: 0; }

.side-list { margin: 0; padding: 0; list-style: none; }
.side-list li { margin: 0; }

.side-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
}

.side-list li:last-child a { border-bottom: 0; }
.side-list a:hover { background: var(--c-bg-soft); color: var(--c-primary); }
.side-list a.is-active { background: var(--c-primary-light); color: var(--c-primary-dark); font-weight: 500; }

.side-list__count {
  font-size: 12px;
  color: var(--c-text-muted);
  background: var(--c-bg);
  padding: 1px 8px;
  border-radius: 9px;
}

/* 侧栏联系方式 */
.side-contact { padding: 16px; font-size: 13.5px; line-height: 2; }
.side-contact__tel {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.3;
  margin: 4px 0 8px;
}
.side-contact dt { color: var(--c-text-muted); font-size: 12.5px; }
.side-contact dd { margin: 0 0 10px; color: var(--c-text); }

/* ---------- 列表页 ---------- */
.list { margin: 0; padding: 0; list-style: none; }

.list__item {
  padding: 18px 0;
  border-bottom: 1px solid var(--c-border);
}
.list__item:first-child { padding-top: 0; }
.list__item:last-child { border-bottom: 0; }

.list__link {
  display: block;
  color: var(--c-text);
}
.list__link:hover { color: var(--c-primary); }

.list__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.list__summary {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--c-text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--c-text-muted);
}

.list__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.7;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag--top   { background: var(--c-accent-light); color: #8a6209; }
.tag--hot   { background: #fdeeee; color: var(--c-danger); }
.tag--cate  { background: var(--c-primary-light); color: var(--c-primary-dark); }
.tag--blue  { background: var(--c-secondary-light); color: var(--c-secondary); }

@media (max-width: 767px) {
  .list__item { padding: 14px 0; }
  .list__title { font-size: 15.5px; }
  .list__summary { -webkit-line-clamp: 2; font-size: 13px; }
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.pagination li { margin: 0; }

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: var(--trans);
}

.pagination a:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.pagination .active span,
.pagination .active a {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  cursor: default;
}

.pagination .disabled span {
  color: var(--c-text-muted);
  cursor: not-allowed;
  background: var(--c-bg);
}

@media (max-width: 767px) {
  .pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 8px; font-size: 13px; }
}

/* ---------- 详情页 ---------- */
.article-head { padding-bottom: 18px; border-bottom: 1px solid var(--c-border); margin-bottom: 22px; }

.article-head__title {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.45;
  font-weight: 700;
}

.article-head__subtitle {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--c-text-light);
  line-height: 1.6;
}

.article-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--c-text-muted);
}

.article-body {
  font-size: 15.5px;
  line-height: 1.95;
  color: #3a4450;
}

.article-body h3 {
  margin: 1.8em 0 0.8em;
  padding-left: 12px;
  border-left: 4px solid var(--c-primary);
  font-size: 18px;
  line-height: 1.4;
}

.article-body h4 {
  margin: 1.5em 0 0.7em;
  font-size: 16px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

.article-body .tip {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--c-bg);
  border-left: 3px solid var(--c-text-muted);
  font-size: 13px;
  color: var(--c-text-light);
  line-height: 1.8;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body .note {
  font-size: 12.5px;
  color: var(--c-text-muted);
}

@media (max-width: 767px) {
  .article-head__title { font-size: 20px; }
  .article-head__subtitle { font-size: 14px; }
  .article-body { font-size: 15px; line-height: 1.85; }
  .article-body h3 { font-size: 16.5px; }
}

/* 上一篇/下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--c-border);
}

.article-nav a {
  padding: 12px 14px;
  background: var(--c-bg);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--c-text-light);
  line-height: 1.6;
  display: block;
  overflow: hidden;
}

.article-nav a:hover { background: var(--c-primary-light); color: var(--c-primary-dark); }
.article-nav__label { display: block; font-size: 12px; color: var(--c-text-muted); margin-bottom: 4px; }
.article-nav__next { text-align: right; }
.article-nav span.empty { color: var(--c-text-muted); font-size: 13.5px; padding: 12px 14px; display: block; background: var(--c-bg); border-radius: var(--radius); }

@media (max-width: 767px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__next { text-align: left; }
}

/* ---------- 空状态 ---------- */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--c-text-muted);
}

.empty-state svg { width: 72px; height: 72px; stroke: var(--c-border); margin-bottom: 16px; }
.empty-state p { margin: 0; font-size: 14.5px; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 48px;
  background: #23303d;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
}

.footer a { color: rgba(255, 255, 255, 0.72); }
.footer a:hover { color: #fff; }

.footer__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 44px 0 32px;
}

.footer__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.footer__brand img { margin-bottom: 14px;  padding: 5px 10px; border-radius: var(--radius-sm); }

.footer__links { margin: 0; padding: 0; list-style: none; }
.footer__links li { margin-bottom: 9px; }
.footer__links a { font-size: 13.5px; }

.footer__contact { line-height: 2; }
.footer__contact .tel {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.footer__bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.9;
}

.footer__bottom a { color: rgba(255, 255, 255, 0.65); margin: 0 6px; }

.footer__beian { display: inline-block; }

@media (max-width: 991px) {
  .footer__main { grid-template-columns: 1fr 1fr; gap: 26px; padding: 32px 0 24px; }
}

@media (max-width: 767px) {
  .footer__main { grid-template-columns: 1fr; gap: 22px; padding: 28px 0 20px; }
  .footer__brand { text-align: center; }
  .footer__brand img { margin: 0 auto 12px; }
}

/* ---------- 侧边浮动工具条（参考站点的电话咨询/微信/回顶部） ---------- */
.float-bar {
  position: fixed;
  right: 14px;
  bottom: 96px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-bar__item {
  width: 50px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--c-text-light);
  font-size: 10px;
  cursor: pointer;
  transition: var(--trans);
  position: relative;
  text-align: center;
  line-height: 1.2;
  padding: 0;
}

.float-bar__item svg { width: 19px; height: 19px; }
.float-bar__item:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.float-bar__item--tel:hover .float-bar__pop,
.float-bar__item--wx:hover .float-bar__pop { display: block; }

/* 悬停弹出信息 */
.float-bar__pop {
  display: none;
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 168px;
  padding: 14px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--c-text);
  text-align: left;
  line-height: 1.8;
  cursor: default;
}

.float-bar__pop strong {
  display: block;
  font-size: 19px;
  color: var(--c-primary);
  margin-bottom: 2px;
}

.float-bar__pop img { width: 108px; height: 108px; display: block; margin: 6px auto 0; }

/* 回到顶部按钮：默认隐藏，滚动后显示 */
.float-bar__top { opacity: 0; visibility: hidden; }
.float-bar__top.is-visible { opacity: 1; visibility: visible; }

@media (max-width: 767px) {
  .float-bar { right: 10px; bottom: 74px; gap: 6px; }
  .float-bar__item { width: 44px; height: 44px; font-size: 9px; }
  .float-bar__item svg { width: 17px; height: 17px; }
  /* 手机上点击弹出而非悬停 */
  .float-bar__item.is-active .float-bar__pop { display: block; }
  .float-bar__pop { right: 52px; min-width: 150px; padding: 12px 14px; }
  .float-bar__pop strong { font-size: 17px; }
}

/* ---------- 移动端底部固定操作栏 ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  background: var(--c-white);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -2px 10px rgba(16, 42, 67, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bar__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 10px;
}

.mobile-bar a,
.mobile-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 42px;
  padding: 0 6px;
  font-size: 13.5px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-white);
  color: var(--c-text);
  text-decoration: none;
}

.mobile-bar svg { width: 17px; height: 17px; flex-shrink: 0; }

.mobile-bar__primary {
  background: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
  color: #fff !important;
  font-weight: 500;
}

@media (max-width: 767px) {
  .mobile-bar { display: block; }
  /* 给底部栏留出空间，避免遮挡页脚内容 */
  body { padding-bottom: 60px; }
}

/* ---------- 加载动画（图片懒加载占位） ---------- */
.lazy {
  background: linear-gradient(90deg, #f0f2f5 25%, #e6e9ed 37%, #f0f2f5 63%);
  background-size: 400% 100%;
  animation: lazy-shimmer 1.4s ease infinite;
}

@keyframes lazy-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- 打印样式 ---------- */
@media print {
  .header, .topbar, .float-bar, .mobile-bar, .footer,
  .pagination, .article-nav, .layout__side, .carousel__arrow, .carousel__dots {
    display: none !important;
  }
  body { padding-bottom: 0; color: #000; font-size: 12pt; }
  .layout { grid-template-columns: 1fr; }
  a { color: #000; text-decoration: underline; }
  .page-banner { background: #fff; color: #000; padding: 12px 0; }
  .page-banner__title, .page-banner__desc { color: #000; }
}
