/* =========================================================
   临沂工业园医院 模板主题样式
   Bootstrap 5.3.8 + Swiper 14.4.0
   兼容 PC / 移动端自适应
   ========================================================= */
:root {
  --brand: #12659b;
  --brand-dark: #0d4c76;
  --brand-light: #1c86c4;
  --brand-soft: #eaf3f9;
  --hot: #c8102e;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e8eef4;
  --page-bg: #f4f7fb;
  --radius: .9rem;
  --shadow: 0 .5rem 1.5rem rgba(18, 101, 155, .08);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background-color: var(--page-bg);
  font-size: 15px;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; }

.text-brand { color: var(--brand) !important; }
.bg-brand { background-color: var(--brand) !important; }
.bg-brand-soft { background-color: var(--brand-soft) !important; }

/* ---------- 按钮 ---------- */
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  border-radius: 999px;
  font-weight: 600;
}
.btn-outline-brand {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  padding: 6px 0;
}
.topbar a { color: rgba(255, 255, 255, .82); }
.topbar a:hover { color: #fff; }
.topbar b { color: #fff; font-weight: 600; }
.topbar i { margin-right: .35rem; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 14px rgba(15, 60, 90, .08);
}
.header-main { padding: 12px 0; }
.brand { display: inline-flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.brand img { display: block; flex: 0 0 auto; }
.brand-wide { height: 54px; width: 736px; }
.brand-compact { height: 55px; width: 350px; }
.header-actions .hotline { text-align: right; line-height: 1.25; }
.hotline-icon {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 18px; margin-right: 10px;
}
.hotline { display: flex; align-items: center; }
.hotline-label { font-size: 12px; color: var(--muted); }
.hotline-num { font-size: 22px; font-weight: 700; color: var(--hot); letter-spacing: .5px; }
/* 移动端汉堡按钮：44×44 圆角方形，浅底 + 描边，展开时切换为关闭态 */
.mobile-menu-btn {
  width: 44px; height: 44px; padding: 0; flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(18, 101, 155, .28); border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.mobile-menu-btn:hover,
.mobile-menu-btn:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; }
.mobile-menu-btn.is-open { background: var(--brand); border-color: var(--brand); color: #fff; }
.menu-bars { position: relative; display: block; width: 20px; height: 14px; }
.menu-bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .25s ease, opacity .2s ease;
}
.menu-bars span:nth-child(1) { top: 0; }
.menu-bars span:nth-child(2) { top: 6px; }
.menu-bars span:nth-child(3) { top: 12px; }
.mobile-menu-btn.is-open .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.is-open .menu-bars span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 主导航 ---------- */
.main-nav { border-top: 1px solid var(--line); }
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-menu-item { position: relative; }
.nav-menu-item > a {
  display: block; padding: 14px 22px; font-size: 15px; font-weight: 600;
  color: var(--ink); white-space: nowrap;
}
.nav-menu-item > a:hover,
.nav-menu-item.active > a { color: var(--brand); }
.nav-menu-item > a::before {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 0;
  height: 3px; border-radius: 3px; background: var(--brand);
  transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.nav-menu-item:hover > a::before,
.nav-menu-item.active > a::before { transform: scaleX(1); }
.dropdown-menu { border: 0; border-radius: .75rem; box-shadow: var(--shadow); padding: .4rem; }
.dropdown-item { border-radius: .5rem; padding: .5rem .9rem; font-size: 14px; }
.dropdown-item:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- 手机端菜单 ---------- */
.offcanvas { width: min(88vw, 342px); }
.m-menu .m-item { border-bottom: 1px solid var(--line); }
.m-link,
.m-row { display: flex; align-items: center; min-height: 50px; }
.m-link {
  justify-content: space-between; padding: 0 1.15rem;
  color: var(--ink); font-weight: 600; font-size: 15px;
}
.m-link:hover { background: var(--brand-soft); color: var(--brand); }
.m-link i { color: #9db4c6; font-size: 14px; }
.m-row { padding-right: .5rem; }
.m-toggle {
  flex: 1 1 auto; min-height: 50px; display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: 0 1.15rem; border: 0; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.m-toggle .m-chev { color: #9db4c6; font-size: 14px; transition: transform .25s ease, color .25s ease; }
.m-item.is-open .m-toggle { color: var(--brand); }
.m-item.is-open .m-chev { transform: rotate(180deg); color: var(--brand); }
.m-go {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: .6rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f4f8fb; color: var(--muted); font-size: 13px;
  transition: background .2s ease, color .2s ease;
}
.m-go:hover, .m-go:focus-visible { background: var(--brand); color: #fff; }
/* 子栏目默认收起：由 JS 控制 max-height 实现手风琴过渡 */
.m-sub { max-height: 0; overflow: hidden; background: #fafcfe; transition: max-height .3s ease; }
.m-sub li a {
  display: block; padding: .7rem 1.6rem; font-size: 13.5px; font-weight: 400;
  color: var(--muted); border-top: 1px solid var(--line);
}
.m-sub li a:hover { color: var(--brand); background: var(--brand-soft); }
.m-contact { background: var(--brand-soft); font-size: 13.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .menu-bars span, .m-chev, .m-sub { transition: none; }
}

/* ---------- 幻灯片 ---------- */
.hero { position: relative; background: var(--brand-soft); }
/* 高度跟随原图 1920×500 比例（3.84:1），PC/移动端都不再裁掉两侧文字 */
.js-hero-swiper { width: 100%; aspect-ratio: 1920 / 500; max-height: 500px; background: var(--brand-soft); }
.js-hero-swiper .swiper-slide { overflow: hidden; }
.js-hero-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.js-hero-swiper .swiper-pagination { bottom: 12px; }
.hero .swiper-button-prev,
.hero .swiper-button-next { color: #fff; width: 42px; height: 42px;}
.hero .swiper-button-prev::after,
.hero .swiper-button-next::after { font-size: 16px; }
.hero .swiper-pagination-bullet { background: #fff; opacity: .55; }
.hero .swiper-pagination-bullet-active { opacity: 1; background: #fff; }

/* ---------- 科室快捷入口 ---------- */
.dept-section { margin-top:1rem;position: relative; z-index: 3; }
.dept-shell { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: .7rem .5rem; }
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: .3rem; }
.dept-item {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .5rem .15rem; border-radius: .6rem; color: var(--ink);
  font-size: 12.5px; text-align: center; line-height: 1.25;
}
.dept-item:hover { background: var(--brand-soft); color: var(--brand); }
.dept-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 15px;
  transition: background .2s ease, color .2s ease;
}
.dept-item:hover .dept-icon { background: var(--brand); color: #fff; }

/* PC 端：加宽展示区域，17 个科室图标一行排列 */
@media (min-width: 1200px) {
  .container.dept-container { max-width: 1300px; }
  .dept-grid { grid-template-columns: repeat(17, minmax(0, 1fr)); gap: .2rem; }
  .dept-item { padding: .5rem .1rem; font-size: 12.5px; gap: .25rem; }
  .dept-icon { width: 32px; height: 32px; font-size: 14px; }
  .dept-shell { padding: .55rem .35rem; }
}

/* ---------- 通用内容区 ---------- */
.page-main { padding: 2.25rem 0 1rem; }
.section { padding: 2.25rem 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title { position: relative; margin: 0; padding-left: .85rem; font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 4px; border-radius: 4px; background: var(--brand);
}
.section-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .5px; margin-top: .2rem; }
.more-link { font-size: 13px; color: var(--muted); white-space: nowrap; }
.more-link:hover { color: var(--brand); }

/* 标题行右侧工具组：更多链接 + 左右切换箭头（箭头不挤压标题） */
.section-tools { display: flex; align-items: center; gap: .4rem; flex: 0 0 auto; white-space: nowrap; }
.swiper-arrow {
  width: 34px; height: 34px; flex: 0 0 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(18, 101, 155, .2); border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; line-height: 1;
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.swiper-arrow:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.swiper-arrow:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.swiper-arrow.swiper-button-disabled { opacity: .4; cursor: default; }
.swiper-arrow.swiper-button-disabled:hover { background: var(--brand-soft); border-color: rgba(18, 101, 155, .2); color: var(--brand); }

.card-soft {
  background: #fff; border: 0; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-soft .card-body { padding: 1.25rem; }

/* 公告列表 */
.announce-list { list-style: none; margin: 0; padding: 0; }
.announce-list li { border-bottom: 1px dashed var(--line); }
.announce-list li:last-child { border-bottom: 0; }
.announce-list a { display: flex; gap: .5rem; align-items: baseline; padding: .55rem 0; color: var(--ink); font-size: 14px; }
.announce-list a:hover { color: var(--brand); }
.announce-list .dot { color: var(--brand); font-weight: 700; }
.announce-list .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 新闻列表 */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item h2 {
  font-size: 1rem; font-weight: 600; margin: 0 0 .35rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-item h2 a { color: var(--ink); }
.news-item h2 a:hover { color: var(--brand); }
.news-item p { margin: 0 0 .5rem; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.news-meta { display: flex; align-items: center; gap: .75rem; font-size: 12.5px; color: var(--muted); }
.news-meta .read { margin-left: auto; }

/* 图片卡片列表 */
.img-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 576px) { .img-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .img-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.img-card { display: block; background: #fff; border-radius: .75rem; overflow: hidden; box-shadow: 0 .25rem .9rem rgba(18, 101, 155, .07); transition: transform .25s ease, box-shadow .25s ease; }
.img-card:hover { transform: translateY(-4px); box-shadow: 0 .75rem 1.5rem rgba(18, 101, 155, .16); }
.img-card-thumb { aspect-ratio: 2 / 3; overflow: hidden; background: var(--brand-soft); }
.img-card-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.img-card-body { padding: .65rem .75rem; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 侧边栏 ---------- */
.sidebar .side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; overflow: hidden; }
.side-card-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.side-card-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.side-card-head h3 span { color: var(--brand); }
.side-card-body { padding: 1rem 1.1rem; }
.side-card-body p { color: var(--muted); font-size: 13.5px; line-height: 1.8; margin: .6rem 0 0; }
.side-card-body img { border-radius: .6rem; width: 100%; }
.side-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.side-links a {
  display: flex; align-items: center; gap: .45rem; padding: .5rem .6rem;
  background: #f7fafc; border-radius: .55rem; font-size: 13px; color: var(--ink);
}
.side-links a:hover { background: var(--brand-soft); color: var(--brand); }
.side-links i { color: var(--brand); }

/* ---------- 文章内容 ---------- */
.article-title { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; line-height: 1.45; margin-bottom: .6rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: 12.5px; padding-bottom: .9rem; border-bottom: 1px dashed var(--line); margin-bottom: 1.25rem; }
.article-content { font-size: 15.5px; line-height: 1.95; color: #374151; word-break: break-word; }
.article-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content table td, .article-content table th { border: 1px solid var(--line); padding: .5rem; }
.prev-next { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.25rem; font-size: 13.5px; color: var(--muted); }
.prev-next a { color: var(--ink); }
.prev-next a:hover { color: var(--brand); }
.prev-next strong { color: var(--brand); font-weight: 600; }

/* ---------- 分页 ---------- */
.pagination { gap: 6px; margin-bottom: 0; }
.pagination .page-item { margin: 0; }
.pagination .page-link {
  min-width: 36px; height: 36px; padding: 0 .55rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e2e9ef; border-radius: var(--radius);
  background: #fff; color: var(--brand); font-size: 13.5px; line-height: 1;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .page-link:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.pagination .page-link:focus { box-shadow: 0 0 0 3px rgba(18, 101, 155, .18); color: var(--brand); }
.pagination .page-item.disabled .page-link { color: #93a4b3; background: #f5f8fa; border-color: #e2e9ef; }
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link { border-radius: var(--radius); }
.pagination .page-item.disabled .page-link:hover { background: #f5f8fa; border-color: #e2e9ef; color: #93a4b3; }

/* ---------- 当前位置 / 公告条 ---------- */
/* 公告条底衬与上方科室卡同宽（同一个 1300px 容器），不再通栏铺满 */
.notice-section { padding: .5rem 0 0; }
.notice-bar {
  background: #fffaf0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .45rem .5rem .45rem .9rem;
}
.notice-label { flex: 0 0 auto; background: var(--hot); color: #fff; font-size: 12px; padding: .15rem .55rem; border-radius: .35rem; margin-right: .75rem; white-space: nowrap; }
/* 医院公告：自右向左无缝滚动 */
.notice-track { position: relative; overflow: hidden; min-width: 0; font-size: 13px; color: #8a6d3b; white-space: nowrap; height: 24px; line-height: 24px; }
.notice-scroll { display: inline-flex; align-items: center; width: max-content; will-change: transform; animation: notice-marquee 26s linear infinite; }
.notice-group { display: inline-flex; align-items: center; flex: 0 0 auto; }
.notice-track:hover .notice-scroll { animation-play-state: paused; }
@keyframes notice-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-scroll { animation: none; }
}
.notice-track a { color: #8a6d3b; margin-right: 2rem; }
.notice-track a:hover { color: var(--hot); }

.crumb-section { padding-bottom: .5rem; }
.crumb-bar { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem .9rem; }
.crumb { display: flex; align-items: center; gap: .35rem; font-size: 13px; color: var(--muted); }
.crumb i { color: var(--brand); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb-search { max-width: 320px; }

/* ---------- 分类导航 ---------- */
.sort-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }

/* ---------- 首页模块 ---------- */
/* 快捷服务卡与下方首个模块的间距收紧到约 24px */
.quick-service { padding-bottom: 0; }
.page-main.page-main-home { padding-top: 0; }

/* 首页第一行三列（最新公告 / 新闻中心 / 院长简介）等高 */
.home-eq-row > [class*="col-"] { display: flex; }
.home-eq-row .card-soft { display: flex; flex-direction: column; width: 100%; }
.home-eq-row .card-soft .card-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }

/* 院长简介：上图下文，图片按内容宽度自适应且不裁切、不变形 */
.president-card { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.president-photo { display: block; width: 100%; height: auto; border-radius: .5rem; }
.president-body {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-center;
  padding-top: .75rem; min-height: 0;
}
.president-body p { margin-bottom: .75rem; }

.video-box { aspect-ratio: 16 / 10; border-radius: .6rem; overflow: hidden; }
.video-box iframe { width: 100%; height: 100%; border: 0; display: block; }

.news-swiper { width: 100%; height: 300px; border-radius: .6rem; overflow: hidden; }
.news-swiper .swiper-slide { position: relative; }
.news-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-swiper .slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.25rem .75rem .65rem; color: #fff; font-size: 12.5px; line-height: 1.45;
  background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, 0) 100%);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; word-break: break-word;
}
.news-swiper .swiper-pagination { bottom: 6px; }
.news-swiper .swiper-pagination-bullet { background: #fff; opacity: .5; }
.news-swiper .swiper-pagination-bullet-active { opacity: 1; }

.doctor-card {
  background: #fff; border-radius: .75rem; overflow: hidden;
  box-shadow: 0 .25rem .9rem rgba(18, 101, 155, .08);
  text-align: center; height: 100%;
}
.doctor-card img { width: 100%; aspect-ratio: 3 / 3.6; object-fit: cover; display: block; }
.doctor-card span { display: block; padding: .6rem; font-size: 13.5px; color: var(--ink); }

.dept-card { background: #fff; border-radius: .75rem; box-shadow: 0 .25rem .9rem rgba(18, 101, 155, .07); padding: 1rem; height: 100%; }
.dept-card-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.dept-card-top .dept-icon { flex: 0 0 40px; }
.dept-card-top h3 { margin: 0; font-size: .95rem; font-weight: 700; }
.dept-card-top .doctor { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.dept-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 首页科室介绍：2 张通栏横卡（图左文右）+ 15 科室 3 列 5 行，左栏与右侧栏等高 */
.dept-main { display: flex; flex-direction: column; }
/* 右侧栏跟随左栏高度，末张卡片填充剩余空间，避免右下留白 */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar .side-card { margin-bottom: 0; }
.sidebar .side-card:last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.sidebar .side-card:last-child .side-card-body { flex: 1 1 auto; }
.dept-wide-list { display: flex; flex-direction: column; gap: .9rem; margin-bottom: .9rem; }
.dept-wide-card {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: #fff; border-radius: .75rem; box-shadow: 0 .25rem .9rem rgba(18, 101, 155, .07);
  overflow: hidden; color: inherit;
}
.dept-wide-thumb { flex: 0 0 200px; width: 200px; height: 140px; border-radius: .6rem; overflow: hidden; background: var(--brand-soft); }
.dept-wide-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dept-wide-body { flex: 1 1 auto; min-width: 0; }
.dept-wide-body h3 { margin: 0 0 .35rem; font-size: .95rem; font-weight: 700; }
.dept-wide-body h3 .doctor { margin-left: .5rem; font-size: 12px; font-weight: 400; color: var(--muted); }
.dept-wide-body p {
  margin: 0 0 .5rem; font-size: 13px; color: var(--muted); line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dept-wide-body .more-link { font-size: 13px; }
.dept-grid-3 {
  flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem; grid-auto-rows: 1fr;
}
.dept-grid-3 > div { display: flex; min-width: 0; }
.dept-grid-3 .dept-card { width: 100%; display: flex; flex-direction: column; }
.dept-grid-3 .dept-card .more-link { margin-top: auto; }

@media (max-width: 991.98px) {
  .dept-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-grid-3 > :last-child { grid-column: span 2; }
}
@media (max-width: 575.98px) {
  .dept-grid-3 { grid-template-columns: 1fr; }
  .dept-grid-3 > :last-child { grid-column: auto; }
  .dept-wide-card { flex-direction: column; align-items: stretch; }
  .dept-wide-thumb { flex: 0 0 auto; width: 100%; height: 170px; }
}

.promo-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.promo-card img { width: 100%; display: block; }
.promo-card small { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .75rem; color: #fff; font-size: 12.5px; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); }

.album-tabs .nav-link { color: var(--ink); border: 0; font-weight: 600; padding: .55rem 1.1rem; border-radius: 999px; }
.album-tabs .nav-link.active { background: var(--brand); color: #fff; }
.album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .album-grid { grid-template-columns: repeat(5, 1fr); } }
.album-item { position: relative; display: block; border-radius: .6rem; overflow: hidden; background: var(--brand-soft); }
.album-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.album-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: .4rem .5rem; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 专家团队 ---------- */
.expert-swiper { width: 100%; padding-bottom: 2.25rem; }
.expert-swiper .swiper-slide { height: auto; }
.expert-swiper .doctor-card img { aspect-ratio: 3 / 3.8; }
.expert-swiper .swiper-pagination { bottom: 0; }
.expert-swiper .swiper-pagination-bullet { background: var(--brand); }

/* ---------- 友情链接 ---------- */
.friend-links { background: #fff; border-top: 1px solid var(--line); padding: 1.25rem 0; }
.friend-links .links { display: flex; flex-wrap: wrap; gap: .5rem .75rem; font-size: 13px; }
.friend-links .links a { color: var(--muted); }
.friend-links .links a:hover { color: var(--brand); }

/* ---------- 底部 ---------- */
.site-footer { background: #0e3b57; color: rgba(255, 255, 255, .72); }
.site-footer h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer .footer-logo { background: rgba(255, 255, 255, .06); border-radius: .75rem; padding: 1rem; display: inline-block; }
.site-footer .footer-logo img { height: 52px; }
.site-footer p, .site-footer li { font-size: 13.5px; line-height: 1.9; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .3rem; }
.footer-bottom { background: rgba(0, 0, 0, .18); padding: .9rem 0; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
/* 页脚来院路线图（仅保留路线图片并放大显示） */
.footer-route a { display: block; }
.footer-route img {
  width: 100%; max-width: 240px; display: block;
  border-radius: .6rem; border: 2px solid rgba(255, 255, 255, .14);
  transition: transform .25s ease, border-color .25s ease;
}
.footer-route a:hover img { transform: translateY(-3px); border-color: rgba(255, 255, 255, .35); }
.footer-route p { margin: .55rem 0 0; font-size: 13px; }
.footer-route .route-link { color: #fff; font-weight: 600; }

/* ---------- 留言表单 ---------- */
.form-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.form-label { font-weight: 600; font-size: 13.5px; }
.form-control:focus { border-color: var(--brand-light); box-shadow: 0 0 0 .2rem rgba(28, 134, 196, .15); }
.captcha-img { height: 42px; border-radius: .4rem; cursor: pointer; border: 1px solid var(--line); }

/* ---------- 地图 ---------- */
.map-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.map-box iframe { width: 100%; height: clamp(320px, 55vw, 620px); border: 0; display: block; }

/* ---------- 响应式细节 ---------- */
@media (max-width: 767.98px) {
  body { font-size: 14px; }
  .brand-compact { height: 50px; width: 335px; }
  .header-main { padding: 10px 0; }
  .page-main { padding-top: 1.25rem; }
  .section { padding: 1.5rem 0; }
  .dept-section { margin-top:1rem; }
  .dept-grid { grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); }
  .dept-item { font-size: 12.5px; }
  .dept-icon { width: 34px; height: 34px; font-size: 15px; }
  .news-swiper { height: 220px; }
  .section-tools { gap: .3rem; }
  .swiper-arrow { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
  .pagination .page-link { min-width: 32px; height: 32px; font-size: 12.5px; padding: 0 .4rem; }
  .crumb { font-size: 12px; }
  .crumb-search { max-width: 100%; }
  /* 内页搜索栏右侧预留悬浮工具条宽度，避免按钮被悬浮按钮压住 */
  .crumb-bar .crumb-search { margin-right: 54px; }
  .article-content { font-size: 15px; }
  .site-footer { text-align: left; }
}

@media (min-width: 1400px) {
  .container { max-width: 1200px; }
}

/* =========================================================
   右侧悬浮工具条
   CMS 后台注入的 yb_conct 面板依赖 jQuery（模板已移除 jQuery），
   故旧面板彻底隐藏（含其子节点与子弹窗），改用模板自带的原生悬浮工具条
   ========================================================= */
.yb_conct,
.yb_conct *,
#kefu_pannel,
#kefu_Online_showdlg {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.float-tools {
  position: fixed; right: 14px; bottom: 96px; z-index: 1035;
  display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 19px; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 18px rgba(18, 101, 155, .28);
  transition: background .2s ease, transform .2s ease;
}
.float-btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); }
.float-weixin { position: relative; }
.float-qr {
  position: absolute; right: 56px; bottom: 0; width: 160px; padding: 10px 10px 8px;
  background: #fff; border-radius: .7rem; text-align: center;
  box-shadow: 0 12px 32px rgba(15, 60, 90, .22);
  opacity: 0; visibility: hidden; transform: translateX(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.float-qr img { display: block; width: 132px; height: auto; margin: 0 auto; border-radius: .35rem; }
.float-qr em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.float-weixin:hover .float-qr,
.float-weixin.is-open .float-qr { opacity: 1; visibility: visible; transform: translateX(0); }
@media (max-width: 575.98px) {
  .float-tools { right: 10px; bottom: 78px; gap: 8px; }
  .float-btn { width: 42px; height: 42px; font-size: 17px; }
  .float-qr { right: 50px; width: 148px; }
  .float-qr img { width: 124px; }
}

/* 移动端：幻灯片下科室入口条按 4 列排列（17 项 = 4/4/4/4/1） */
@media (max-width: 767.98px) {
  .dept-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
  .dept-item { padding: .45rem .1rem; font-size: 12.5px; line-height: 1.2; min-height: 36px; }
  .dept-icon { width: 30px; height: 30px; font-size: 13px; }
  .dept-shell { padding: .5rem .25rem; }
}

/* 移动端：科室介绍两张横卡图片按原图比例完整显示，不裁切 */
@media (max-width: 767.98px) {
  .dept-wide-thumb { height: auto; }
  .dept-wide-thumb img { height: auto; object-fit: contain; }
}