/* =========================================================
   木鱼资源 MUYUWEB — 主题样式
   基于 Bootstrap 5 的自定义主题：
   淡蓝灰底 + 白色圆角容器 + 靛蓝侧栏 + 明黄强调色
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --bg-page: #f6f8ff;
  --bg-card: #ffffff;
  --brand-primary: #364cc6;
  --brand-primary-soft: rgba(54, 76, 198, 0.16);
  --brand-accent: #ffd55d;
  --brand-accent-soft: rgba(255, 213, 93, 0.18);
  --text-heading: #313546;
  --text-body: #3e4252;
  --text-muted: #9da0b3;
  --radius-shell: 46px;
  --radius-panel: 30px;
  --radius-card: 16px;
  --shadow-aside: 0 0 50px 0 rgba(0, 0, 0, 0.06);
  --font-base: "Microsoft Yahei", "Yuanti SC", "Source Han Sans CN", -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. 基础 ---------- */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-base);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s linear, background-color 0.2s linear;
}

a:hover {
  color: var(--brand-primary);
}

img {
  max-width: 100%;
}

/* ---------- 3. 页面外壳（白色圆角大容器） ---------- */
.site-shell {
  display: flex;
  width: calc(100% - 48px);
  max-width: 1440px;
  margin-top: 24px;
  background-color: var(--bg-card);
  border-radius: var(--radius-shell);
  flex-shrink: 0;
}

/* ---------- 4. 左侧栏 ---------- */
.site-sidebar {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: flex-start;
  width: 168px;
  margin: 24px 0 24px 24px;
  padding-bottom: 24px;
  background: var(--brand-primary);
  border-radius: var(--radius-panel);
  color: #fff;
  position: sticky;
  top: 48px;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
  text-align: center;
}

.logo-wrap .logo-img {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  border-radius: 18px;
}

.logo-wrap .site-name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 4px;
  color: #fff;
}

.logo-wrap .sub-title {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.85;
}

.side-menu {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 44px;
}

.side-menu .menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  font-size: 13px;
  color: #fff;
}

.side-menu .menu-item .bi {
  font-size: 26px;
  margin-bottom: 5px;
}

.side-menu .menu-item:hover {
  color: var(--brand-accent);
  background: rgba(255, 255, 255, 0.1);
}

.side-menu .menu-item.active {
  background-color: #fff;
  color: var(--brand-primary);
}

.sidebar-foot {
  font-size: 12px;
  text-align: center;
  opacity: 0.65;
}

/* ---------- 5. 主内容区 ---------- */
.site-main {
  flex-grow: 1;
  min-width: 0;
  padding: 24px 56px 38px;
  display: flex;
  flex-direction: column;
}

/* 搜索栏 */
.search-form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 460px;
  height: 52px;
  padding: 0 20px;
  background-color: var(--bg-page);
  border-radius: 52px;
  overflow: hidden;
}

.search-form .bi {
  font-size: 18px;
  color: var(--text-muted);
  margin-right: 10px;
}

.search-form input {
  flex-grow: 1;
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 14px;
  color: var(--text-body);
}

.search-form input::placeholder {
  color: var(--text-muted);
}

/* 右栏顶部搜索 */
.aside-search {
  max-width: none;
  margin-bottom: 26px;
}

/* 区块标题 */
.block-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 20px;
}

.block-title .icon-arrow {
  display: inline-block;
  color: var(--brand-accent);
  font-size: inherit;
  font-weight: normal;
  transition: transform 0.25s ease;
}

.block-title:hover .icon-arrow {
  transform: translateX(6px);
}

.block-wrap {
  margin-top: 30px;
}

/* ---------- 6. 首页轮播 ---------- */
.hero-carousel {
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.hero-carousel .carousel-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  height: 400px;
}

.hero-carousel .carousel-caption {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 46px 20px 18px;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.hero-carousel .carousel-caption h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 15px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-carousel .carousel-item > a:hover {
  color: #fff;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 64px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
  opacity: 0.7;
}

/* ---------- 7. 文章卡片 ---------- */
.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card-cover {
  position: relative;
  display: flex;
  justify-content: center;
}

.post-card-cover::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.post-card-img {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--bg-page);
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.post-card-img:hover img {
  opacity: 0.82;
}

.post-card-cat {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px 10px;
  line-height: 1;
  white-space: nowrap;
  background-color: var(--brand-accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--brand-primary);
}

.post-card-cat:hover {
  color: var(--brand-primary);
  filter: brightness(0.96);
}

.post-card-title {
  display: block;
  margin-top: 14px;
  color: var(--text-body);
}

.post-card-title h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-card-title:hover h3 {
  color: var(--brand-primary);
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 8px;
}

.tag-wrap {
  flex-grow: 1;
  overflow: hidden;
}

.tag-wrap a {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  margin: 0 1px 0 4px;
  color: #c6a549;
  font-size: 12px;
  background-color: var(--brand-accent-soft);
  border-radius: 22px;
}

.tag-wrap a:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.post-card-meta {
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-card-summary {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: justify;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ---------- 8. 右侧栏 ---------- */
.site-aside {
  width: 400px;
  flex-shrink: 0;
  padding: 24px 38px 38px 0;
}

.aside-block {
  padding: 34px;
  margin-bottom: 26px;
  background: var(--bg-card);
  box-shadow: var(--shadow-aside);
  border-radius: 38px;
}

.aside-block .block-title {
  font-size: 20px;
  margin-bottom: 14px;
}

/* 图库网格：1 大 + 4 小 */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.photo-grid-item {
  position: relative;
  flex: 1 1 calc(50% - 6px);
  height: 118px;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.photo-grid-item.is-wide {
  flex-basis: 100%;
  height: 148px;
}

.photo-grid-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-grid-item .photo-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  font-size: 13px;
  color: #fff;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* 字体 3x2 网格 */
.font-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}



.font-grid-item {
  flex: 1 1 calc(33.333% - 6px);
  border-radius: 12px;
  overflow: hidden;
}

.font-subtitle {
  margin-top: 6px;
  font-size: 8px;
  line-height: 1.4;
  color: #666;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-grid-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s ease;
}

.font-grid-item:hover img {
  opacity: 0.82;
}

/* 侧栏横向文章列表 */
.sider-post-item {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.sider-post-item:first-of-type {
  margin-top: 6px;
}

.sider-post-item img {
width: 110px;
height: 82px;
object-fit: cover;
border-radius: 14px;
margin-right: 14px;
flex-shrink: 0;
transition: transform 0.3s ease;
}

.sider-post-item h4 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sider-post-item:hover h4 {
  color: var(--brand-primary);
}

.aside-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  margin-top: 24px;
  font-weight: bold;
  font-size: 16px;
  background-color: var(--brand-accent);
  border-radius: 16px;
  color: var(--text-heading);
}

.aside-btn:hover {
  color: var(--brand-primary);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  color: #c6a549;
  background-color: var(--brand-accent-soft);
  border-radius: 30px;
}

.tag-cloud a:hover {
  color: var(--brand-primary);
  background-color: var(--brand-primary-soft);
}

/* 主栏首块贴合顶部 */
.site-main > .block-wrap:first-child {
  margin-top: 0;
}

/* ---------- 9. 列表页：分类标签 ---------- */
.cat-head h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 10px 0 8px;
  color: var(--text-main);
}

.cat-head .tip {
  margin: 0 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cat-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0 16px 0;
  background-color: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 20;
}

.cat-tabs a {
  font-size: 16px;
  color: var(--text-body);
  position: relative;
  padding-bottom: 4px;
}

.cat-tabs a.active {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-heading);
}

.cat-tabs a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 40%;
  bottom: 0;
  height: 10px;
  background-color: var(--brand-accent);
  z-index: -1;
}

/* 面包屑 */
.crumbs {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.crumbs a {
  color: var(--text-body);
}

.crumbs a:hover {
  color: var(--brand-primary);
}

.crumbs .sep {
  margin: 0 10px;
  color: var(--text-muted);
}

.crumbs .current {
  color: var(--text-muted);
}

/* 面包屑 + 行内搜索 */
.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.top-bar .crumbs {
  flex-grow: 1;
  margin-bottom: 0;
}

.crumbs-search {
  flex-shrink: 0;
  max-width: 240px;
  height: 44px;
}

/* ---------- 10. 分页（参考站胶囊样式，沿用 Bootstrap 分页结构） ---------- */
.pagination {
  margin-top: 38px;
  gap: 6px;
}

.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 42px;
  background-color: var(--bg-page);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  background-color: var(--bg-page);
  color: var(--brand-primary);
  box-shadow: none;
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-primary);
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  background-color: transparent;
  color: var(--text-muted);
}

/* ---------- 11. 内容页 ---------- */
.post-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-heading);
  margin: 18px 0 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.post-meta .cat-badge {
  padding: 5px 10px;
  line-height: 1;
  background-color: var(--brand-accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--brand-primary);
}

.post-cover {
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 26px;
}

.post-body {
  font-size: 17px;
  line-height: 2;
  text-align: justify;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--bg-page);
}

.post-body p {
  margin: 22px 0;
}

.post-body h2,
.post-body h3 {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-heading);
  margin-top: 30px;
}

.post-body h3 {
  font-size: 21px;
}

.post-body h2::after {
  content: "";
  position: absolute;
  left: 0;
  top: auto;
  bottom: 0.05em;
  width: 3em;
  height: 10px;
  background-color: var(--brand-accent);
  z-index: -1;
}

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px auto;
  border-radius: var(--radius-card);
}

/* 桌面：三列 */
/* ============================================================
   图片画廊（自动包装后的 Flex 布局）
============================================================ */
.post-body .image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 1.5rem 0;
    padding: 0;
    background: transparent;          /* ← 防止容器自身白底 */
}

.post-body .image-gallery > a,
.post-body .image-gallery > img {
    display: block;
    flex: 0 1 calc(33.333% - 8px);
    min-width: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
    padding: 0;                       /* ← 清除 Bootstrap 可能给 <a> 的 padding */
    line-height: 0;                   /* ← 消除行内元素底部间隙 */
    font-size: 0;                     /* ← 双保险，消除文字节点占位 */
    cursor: zoom-in;
    background: transparent;          /* ← 关键：去掉 <a> 默认白底 */
    text-decoration: none;            /* ← 去掉下划线占位 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-body .image-gallery > a img,
.post-body .image-gallery > img {
    margin: 0;          /* ← 覆盖 .post-body img 的 22px auto */
}

.post-body .image-gallery > a:hover,
.post-body .image-gallery > img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.post-body .image-gallery > a img,
.post-body .image-gallery > img {
    display: block;
    width: 100%;
    height: auto;                     /* ← 改 auto，让图片按自身比例撑高 */
    max-height: 40vh;
    object-fit: cover;
    border-radius: 8px;
    vertical-align: top;              /* ← 消除 img 底部 3-4px 行内间隙 */
}

/* 平板：两列 */
@media (max-width: 992px) {
    .post-body .image-gallery > a,
    .post-body .image-gallery > img {
        flex: 0 1 calc(50% - 6px);
        min-width: calc(50% - 6px);
    }
}

/* 手机：单列 */
@media (max-width: 576px) {
    .post-body .image-gallery > a,
    .post-body .image-gallery > img {
        flex: 0 1 100%;
        min-width: 100%;
        max-height: 50vh;
    }
}


/* ============================================================
   图片灯箱弹窗
============================================================ */
#imageLightbox .modal-dialog {
    max-width: 100vw;
    margin: 0;
}

#imageLightbox .modal-content {
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.92);
    border: none;
}

/* 弹窗内图片 */
.lightbox-img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: default;
    user-select: none;
}

.lightbox-img.is-visible {
    opacity: 1;
}

/* 关闭按钮：圆形半透明底 + 白色图标 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1060;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.lightbox-close:active {
    transform: scale(0.95);
}






/* 结束 */

.post-body blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  background-color: var(--bg-page);
  border-left: 5px solid #d9dbe7;
  border-radius: 0 16px 16px 0;
  font-size: 15px;
  color: var(--text-muted);
}

.post-body blockquote p {
  margin: 0;
}

.post-body ul,
.post-body ol {
  margin: 22px 0;
  padding: 22px 22px 22px 44px;
  background-color: var(--bg-page);
  border-radius: var(--radius-card);
  font-size: 16px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body li::marker {
  color: var(--brand-primary);
}

.post-body pre {
  margin: 22px 0;
  padding: 20px 24px;
  background-color: var(--bg-page);
  border-radius: var(--radius-card);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: auto;
}

.post-body code {
  font-family: Consolas, Monaco, "Segoe UI", monospace;
  color: var(--brand-primary);
}

.post-body p {text-indent: 2em;}

.post-body p a,
.post-body li a {
  color: var(--brand-primary);
  border-bottom: 4px solid var(--brand-primary-soft);
  line-height: 1.2;
  margin: 0 2px;
  transition: border 0.25s ease;
}

.post-body p a:hover,
.post-body li a:hover {
  border-bottom: 2px dotted var(--brand-primary);
}

.post-body .table-wrap {
  margin: 22px 0;
  overflow-x: auto;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.post-body table th,
.post-body table td {
  padding: 10px 20px;
  border: 1px solid #e3e6f2;
}

.post-body table th {
  background-color: var(--bg-page);
  color: var(--text-heading);
}

/* 访问官网按钮（兼容帝国CMS编辑器重组后的结构）
   CMS 编辑器会将 HTML 重组为：
/* 访问官网按钮（兼容帝国CMS编辑器重组后的结构） */
.post-body blockquote:has(.side-btn) {
  padding: 0;
  background-color: transparent;
  border-left: none;
  border-radius: 0;
  margin: 22px 0;
}

.post-body blockquote .side-btn-text {
  display: flex;
  align-items: center;
  height: 58px;
  font-weight: bold;
  background-color: var(--brand-accent);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.2s linear;
  color: var(--text-heading);
  text-decoration: none;
}

.post-body blockquote .side-btn-text:hover {
  color: var(--brand-primary);
}

/* 左侧图标区（用伪元素模拟，因为 CMS 编辑器会丢掉 <i> 标签） */
.post-body blockquote .side-btn-text::before {
  content: "\f3ee";
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: normal;
  font-size: 20px;
  width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: stretch;
  background-color: rgba(0, 0, 0, 0.06);
  -webkit-font-smoothing: antialiased;
}

/* CMS 编辑器把 <a> 包进 .side-btn-text 里，让它填满容器 */
.post-body blockquote .side-btn-text .side-btn {
  display: flex;
  align-items: center;
  flex-grow: 1;
  height: 100%;
  padding: 0 10px;
  font-size: 17px;
  font-weight: bold;
  color: inherit;
  text-decoration: none;
  line-height: 1.4;
  word-break: break-all;
  overflow: hidden;
}

.post-body blockquote .side-btn-text .side-btn:hover {
  color: var(--brand-primary);
}




/* 上一篇 / 下一篇 */
/* 上一篇 / 下一篇 */
.post-nav {
  display: flex;
  gap: 20px;
  margin-top: 28px;
}

.post-nav-item {
  position: relative;
  flex: 1;
  height: 128px;
  border-radius: var(--radius-card);
  overflow: hidden;
  /* 核心：为所有属性添加平滑过渡，让悬停效果更丝滑 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停时：卡片微微上浮并增加阴影 */
.post-nav-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.post-nav-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 核心：图片过渡，实现悬停时的呼吸缩放效果 */
  transition: transform 0.4s ease;
}

/* 悬停时：背景图片平滑放大 */
.post-nav-item:hover img {
  transform: scale(1.08);
}

.post-nav-item .label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  font-size: 14px;
  color: #fff;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  /* 增加标签的过渡效果 */
  transition: background 0.3s ease;
  z-index: 2; /* 确保标签在遮罩层之上 */
}

/* 悬停时：标签背景色稍微加深 */
.post-nav-item:hover .label {
  background: rgba(0, 0, 0, 0.6);
}

.post-nav-item.is-next .label {
  left: auto;
  right: 12px;
}

.post-nav-item .nav-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  /* 增加标题的过渡效果 */
  transition: transform 0.3s ease;
  z-index: 2; /* 确保标题在遮罩层之上 */
}

/* 悬停时：标题微微向左/右滑动（根据上一篇/下一篇区分方向） */
.post-nav-item:hover .nav-title {
  transform: translateX(4px); 
}
.post-nav-item.is-next:hover .nav-title {
  transform: translateX(-4px); 
}

/* 上一篇 / 下一篇（帝国CMS info.pre / info.next 输出自带链接） */
.post-nav-slot {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  background-color: var(--bg-page);
  border-radius: var(--radius-card);
  font-size: 13px;
  color: var(--text-muted);
}

.post-nav-slot.is-next {
  text-align: right;
}

.post-nav-slot a {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.post-nav-slot a:hover {
  color: var(--brand-primary);
}

/* 上一篇 / 下一篇（帝国CMS info.pre / info.next 输出自带链接） */
.post-nav-slot {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  background-color: var(--bg-page);
  border-radius: var(--radius-card);
  font-size: 13px;
  color: var(--text-muted);
}

.post-nav-slot.is-next {
  text-align: right;
}

.post-nav-slot a {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-nav-slot a:hover {
  color: var(--brand-primary);
}

/* 目录 */
.toc {
  list-style: none;
  margin: 0;
  padding: 18px 22px;
  background-color: var(--bg-page);
  border-radius: var(--radius-card);
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.toc a:hover,
.toc a.active {
  color: var(--brand-primary);
}

.toc .toc-h3 {
  padding-left: 1em;
}

.toc .toc-h3 a {
  font-size: 13px;
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  width: 100%;
  max-width: 1440px;
  padding: 22px 24px 30px;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--brand-primary);
}

/* ---------- 13. 响应式 ---------- */
/* 笔记本 */
@media screen and (max-width: 1440px) {
  .site-aside {
    width: 340px;
  }

  .site-main {
    padding: 24px 44px 38px;
  }
}

/* 平板：隐藏右栏 */
@media screen and (max-width: 1180px) {
  .site-aside {
    display: none;
  }
}

/* 移动端 */
@media screen and (max-width: 768px) {
  body {
    min-width: 0;
  }

  .site-shell {
    flex-direction: column;
    width: 100%;
    margin-top: 0;
    border-radius: 0;
  }

  .site-sidebar {
    flex-direction: row;
    align-items: center;
    width: auto;
    height: auto;
    min-height: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    margin: 10px;
    padding: 8px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(49, 53, 70, 0.18);
  }

  .logo-wrap {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin: 0 0 0 4px;
  }

  .logo-wrap .logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    margin-bottom: 0;
  }

  .logo-wrap .site-name {
    font-size: 12px;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .logo-wrap .sub-title,
  .sidebar-foot {
    display: none;
  }

  .side-menu {
    flex-direction: row;
    justify-content: flex-end;
    margin: 0 0 0 auto;
  }

  .side-menu .menu-item {
    width: 42px;
    height: 42px;
    margin: 0 0 0 4px;
    border-radius: 10px;
    font-size: 0;
  }

  .side-menu .menu-item .bi {
    font-size: 18px;
    margin-bottom: 0;
  }

  .site-main {
    padding: 80px 14px 30px;
  }

  .hero-carousel {
    border-radius: 16px;
  }

  .hero-carousel .carousel-caption h3 {
    font-size: 16px;
  }

  .block-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .post-card-title h3 {
    font-size: 14px;
  }

  .post-card-summary {
    font-size: 12px;
  }

  .post-card-cat {
    font-size: 11px;
    padding: 4px 6px;
  }

  .post-card-meta {
    display: none;
  }

  .post-card-footer {
    justify-content: flex-start;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cat-tabs {
    gap: 14px;
    overflow-x: auto;
    top: 76px;
  }

  .post-title {
    font-size: 22px;
  }

  .post-body {
    font-size: 15px;
    text-align: left;
  }

  .post-nav {
    flex-direction: column;
  }

  .site-footer {
    padding: 18px 16px 26px;
    text-align: center;
  }
}


/* ========== 帝国CMS分页 → ========== */

/* 1. 容器：使用Flex布局，并复用你原有的.pagination样式 */
.ecms-pagination {
  display: flex;
  justify-content: center;
  margin-top: 38px;
  gap: 8px; /* 对应你原样式中的gap */
  flex-wrap: wrap;
}

/* 2. 隐藏不需要的文字信息，如 "页次：1/8 每页20 总数156" */
.ecms-pagination a[title="Total record"] {
  display: none;
}

/* 3. 基础样式：将所有的链接<a>和当前页<b>都变成“胶囊” */
.ecms-pagination a,
.ecms-pagination b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-body);
  background-color: var(--bg-page);
  border-radius: 40px; /* 胶囊形状的关键 */
  text-decoration: none;
  transition: all 0.25s ease;
}

/* 4. 鼠标悬停效果：复用你原有的:hover样式 */
.ecms-pagination a:hover {
  z-index: 2;
  color: var(--brand-primary);
  background-color: var(--brand-primary-soft);
  border-color: var(--brand-primary-soft);
}

/* 5. 当前页样式：专门针对 <b> 标签，复用你原有的.active样式 */
.ecms-pagination b {
  z-index: 3;
  color: #fff;
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  cursor: default;
}

/* 封面及列表页栏目名称 用于SEO优化  */
.channel-title{
  font-size:14px;
  font-weight:700;
  margin:18px 0 14px;
  color:#FFFFFF;
  text-align:right;
}

