
/* 全站列表分页：显示总条数/当前页，并保留前十页、首页、末页导航 */
.page-bar:has(.page-summary) { flex-wrap: wrap; gap: 10px; }
.page-summary { flex: 0 0 100%; width: 100%; text-align: center; color: #9e1822; font-size: 15px; line-height: 30px; }
@media (max-width: 639px) {
  .page-summary { font-size: 14px; }
}


/* 资讯列表：无图新闻采用统一紧凑行布局，日期始终保持右侧 */
.news-list-items .news-row { min-height: 82px; }
.news-list-items .news-title { overflow-wrap: anywhere; }
.news-list-items .news-date { white-space: nowrap; }
.news-list-items .news-row:hover { padding-left: 22px; }
.news-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; width: 100%; }
.news-pagination .page-summary { flex: 0 0 auto; width: auto; color: #333; font-size: 15px; line-height: 40px; white-space: nowrap; }
.news-pagination .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.news-pagination .pagination li { display: inline-flex; }
.news-pagination .pagination li a, .news-pagination .pagination li span { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid #bebebe; border-radius: 4px; background: #fff; color: #333; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 38px; white-space: nowrap; }
.news-pagination .pagination li a:hover { border-color: #9e1822; color: #9e1822; }
.news-pagination .pagination li.active a, .news-pagination .pagination li.active span { background: #9e1822; border-color: #9e1822; color: #fff; }
@media (max-width: 900px) {
  .news-pagination { gap: 10px; }
  .news-pagination .page-summary { flex-basis: 100%; width: 100%; text-align: center; line-height: 28px; }
}
@media (max-width: 639px) {
  .news-list-items .news-row { min-height: 72px; padding: 14px 16px; }
  .news-list-items .news-title { font-size: 16px; line-height: 25px; }
  .news-list-items .news-date { gap: 5px; font-size: 13px; }
  .news-list-items .news-date svg { width: 16px; height: 16px; }
  .news-pagination { gap: 8px; }
  .news-pagination .pagination { gap: 4px; }
  .news-pagination .pagination li a, .news-pagination .pagination li span { min-width: 32px; height: 34px; padding: 0 7px; font-size: 14px; line-height: 32px; }
  .news-pagination .pagination li:first-child a, .news-pagination .pagination li:nth-child(2) a, .news-pagination .pagination li:nth-last-child(2) a, .news-pagination .pagination li:last-child a { padding: 0 8px; }
}

a, button, [role="button"], .nav-item, .banner-dot, #menuBtn { cursor: pointer; }
a:focus-visible, button:focus-visible, .nav-item:focus-visible, .banner-dot:focus-visible, #menuBtn:focus-visible {
  outline: 2px solid #9e1822; outline-offset: 2px; border-radius: 4px;
}

/* 导航下拉：贴轮播图交界处、宽度贴合内容并居中，hover/键盘展开，进出平滑 */
.nav-item .dropdown {
  display: flex;
  /* 一级项 100% + nav 底部 pb-3(0.75rem) + header 红色底边 3px：
     跟随 rem 缩放，面板顶边始终等于红色 banner 顶边，不留白缝 */
  top: calc(100% + 0.75rem + 3px);
  left: 50%; /* 居中于一级菜单文字 */
  width: max-content;
  max-width: 120px; /* 只比一级文字略宽，超长项自动换行 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 0);
  transition: opacity .18s ease-out, visibility 0s linear .18s;
  will-change: opacity;
}
/* 二级项文字居中 */
.nav-item .dropdown a { text-align: center; }
/* 透明热区覆盖一级项与面板间的空隙，鼠标下移不闪退 */
.nav-item .dropdown::before {
  content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 17px;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .18s ease-out, visibility 0s linear 0s;
}
/* 下拉展开时一级标题保持品牌色 */
.nav-item:hover > .nav-underline,
.nav-item:focus-within > .nav-underline { color: #9e1822; }

/* 导航 hover 下划线（居中生长，克制） */
.nav-underline { position: relative; }
.nav-underline::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; height: 2px; width: 0;
  background: #9e1822; transform: translateX(-50%); transition: width .25s ease;
}
.nav-item:hover .nav-underline::after,
.nav-item:focus-within .nav-underline::after,
.nav-item.is-active .nav-underline::after { width: 60%; }

/* 滚动导航：回到顶部透明无阴影，下滚加阴影 */
#siteHeader { transition: box-shadow .3s ease, background-color .3s ease; }
#siteHeader.is-scrolled { box-shadow: 0 4px 16px rgba(0,0,0,0.16); }

/* 卡片 hover 上浮 + 柔和阴影 */
.card-hover { transition: transform .28s ease, box-shadow .28s ease; will-change: transform; }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(158,24,34,0.15); }

/* 通用按钮/链接 hover 过渡 */
.btn-soft { transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease; }
.btn-soft:hover { background-color: #8a141d; }

/* 区块进入视口淡入（时长加长，位移加大，效果更明显） */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* 图片加载占位 + 完成淡入（仅 JS 启用时，保证无 JS 也能显示） */
html.js img:not(.banner-slide) { opacity: 0; background-color: #eceae6; }
html.js img:not(.banner-slide).loaded { opacity: 1; background-color: transparent; transition: opacity .35s ease; }

/* Banner 淡入轮播（top/right/bottom/left 为老浏览器保留，inset 不支持时仍能铺满）
   object-position 左移：图中文案偏左，窄屏 cover 裁切时保证「悦读恩施」标题不被裁掉 */
.banner-slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 36% 50%;
  opacity: 0; transition: opacity .35s ease; }
.banner-slide.active { opacity: 1; }
.banner-dot { width: 10px; height: 10px; border-radius: 9999px; background: rgba(255,255,255,.55);
  transition: background-color .25s ease, transform .25s ease; }
.banner-dot.active { background: #fff; transform: scale(1.25); }
.banner-dot:hover { background: rgba(255,255,255,.85); }

/* 移动端菜单平滑展开/收起 */
#mobileMenu { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
#mobileMenu.open { max-height: 520px; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 图片悬停放大（容器需 overflow-hidden） */
.img-zoom { transition: transform .35s ease; }
.card-hover:hover .img-zoom, .zoom-wrap:hover .img-zoom { transform: scale(1.07); }

/* 新闻列表行 hover：底色 + 轻微右移 + 标题变色 */
.news-row { transition: background-color .25s ease, padding-left .25s ease; }
.news-row:hover { background-color: #f8f1f2; padding-left: 10px; }
.news-row:hover .news-title { color: #9e1822; }

/* 恩图资讯：推荐位图片新闻轮播 */
.feature-carousel { position: relative; }
.feature-slide { display: none; }
.feature-slide.active { display: flex; animation: news-fade .45s ease; }
.feature-title { min-height: 52px; }
#newsDots { position: absolute; right: 20px; bottom: 27px; z-index: 10; }
@keyframes news-fade { from { opacity: 0; } to { opacity: 1; } }
.feature-dot { width: 10px; height: 10px; border-radius: 9999px; background: rgba(255,255,255,.6);
  transition: background-color .25s ease, transform .25s ease; }
.feature-dot.active { background: #cfc195; transform: scale(1.25); }
.feature-dot:hover { background: rgba(255,255,255,.9); }

/* 恩图资讯：栏目切换 tab */
.news-tab { padding: 7px 15px; border-radius: 8px; font-size: 16px; line-height: 1.5; color: #333;
  transition: color .2s ease, background-color .2s ease; }
.news-tab:hover { color: #9e1822; }
.news-tab.is-active { background: #cfc195; color: #fff; font-weight: 700; }
.news-tab.is-active:hover { color: #fff; }
.news-pane { display: none; flex: 1; flex-direction: column; justify-content: space-between; }
.news-pane.is-active { display: flex; }
@media (prefers-reduced-motion: reduce) {
  .feature-slide.active { animation: none; }
}

/* Banner 缓慢推近（Ken Burns，氛围动画，非交互时长） */
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.banner-slide.active { animation: kenburns 6s ease forwards; }

/* 右侧悬浮工具条 */
.tool-btn {
  position: relative; display: flex; height: 48px; width: 48px; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #e3d9da; color: #9e1822; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(158,24,34,0.10);
  transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.tool-btn:hover { background: #f8f1f2; border-color: #9e1822; color: #9e1822; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(158,24,34,0.22); }
.tool-qr {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%) translateX(8px);
  width: 122px; padding: 8px; background: #fff; border: 1px solid #e3d9da; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14); text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.tool-btn:hover .tool-qr { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
#backTop { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease, visibility .3s; }
#backTop.show { opacity: 1; visibility: visible; transform: none; }

/* ============ 内页通用 ============ */

/* 子页 Banner 二级栏目分隔点（第一项前不显示） */
.subtab-dot:first-child { display: none; }
.subtab { transition: color .2s ease; }

/* 内页正文排版（后台编辑器输出的富文本） */
.article-content { font-size: 18px; line-height: 36px; color: #333; word-break: break-word; }
.article-content p { margin: 0 0 16px; }
.article-content img { max-width: 100%; height: auto; display: block; margin: 16px auto; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { font-weight: 700; margin: 20px 0 12px; line-height: 1.5; }
.article-content ul, .article-content ol { margin: 0 0 16px; padding-left: 2em; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content table { margin: 16px auto; border-collapse: collapse; max-width: 100%; }
.article-content table td, .article-content table th { border: 1px solid #666; padding: 8px 12px; }
.article-content a { color: #9e1822; text-decoration: underline; }
@media screen and (min-width: 1024px) {
  .article-content { font-size: clamp(15px, 0.945vw, 18px); line-height: 2; }
}
@media screen and (max-width: 640px) {
  .article-content { font-size: 16px; line-height: 32px; }
  .article-content img { width: 100% !important; height: auto !important; }
  .article-content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-content table td, .article-content table th { white-space: nowrap; }
}

/* 顶部手机/微信图书馆二维码悬浮提示 */
.header-qr-btn { position: relative; }
.header-qr-pop {
  position: absolute; right: 0; top: 46px; z-index: 60;
  width: 132px; padding: 10px; background: #fff; border: 1px solid #e3d9da; border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14); text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.header-qr-btn:hover .header-qr-pop,
.header-qr-btn:focus-within .header-qr-pop { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============ 重庆大学官网效果移植（主页） ============ */

/* 平滑滚轮启用时关闭原生平滑，交由 JS 接管 */
html.smooth-wheel { scroll-behavior: auto; }
html.overlay-open, html.overlay-open body { overflow: hidden; }

/* 区块标题金色下划线：进入视口后由左向右展开 */
.sec-title { position: relative; }
.sec-title::after {
  content: ""; position: absolute; left: 0; bottom: -10px; height: 2px; width: 100%;
  background: linear-gradient(90deg, #c9a45c, rgba(201,164,92,0));
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1) .15s;
}
.reveal.in-view .sec-title::after { transform: scaleX(1); }

/* 快捷入口：hover 品牌色填充 + 金色底线 */
.quick-card {
  position: relative; overflow: hidden;
  transition: background-color .3s ease, transform .28s ease, box-shadow .28s ease;
}
.quick-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, #c9a45c, #f3e2b6);
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.quick-card:hover { background-color: #9e1822; }
.quick-card:hover > span:last-child { color: #fff; }
.quick-card:hover > span:first-child { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.65); }
.quick-card:hover > span:first-child img { filter: brightness(0) invert(1); }
.quick-card:hover::after { transform: scaleX(1); }

/* 图片新闻大卡：底部金色渐变线 */
.feature-card { position: relative; }
.feature-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #c9a45c, #f6e7c1);
  border-radius: 0 0 12px 12px;
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.feature-card:hover::after { transform: scaleX(1); }

/* 资讯列表：标题下划线由左向右 */
.news-title {
  background-image: linear-gradient(#9e1822, #9e1822);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px;
  transition: color .25s ease, background-size .45s ease;
  padding-bottom: 2px;
}
.news-row:hover .news-title { background-size: 100% 1px; }

/* 活动卡：底部金色线 */
.activity-card { position: relative; }
.activity-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #c9a45c, #f3e2b6);
  transform: scaleX(0); transform-origin: left; transition: transform .5s ease;
}
.activity-card:hover::after { transform: scaleX(1); }

/* 顶部二维码浮层：由下往上淡入 */
.header-qr-pop { transform: translateY(10px); transition: opacity .35s ease, transform .35s ease, visibility .35s; }

/* 首页检索双标签：选中品牌色，切换平滑 */
.search-tab {
  border: 0; padding: 0; cursor: pointer;
  background-color: rgba(255, 255, 255, .8); color: #333;
  transition: background-color .2s ease, color .2s ease;
}
.search-tab[aria-selected="true"] { background-color: #9e1822; color: #fff; }
.search-tab[aria-selected="false"]:hover { background-color: #fff; color: #9e1822; }
.search-tab:focus-visible { outline: 2px solid #9e1822; outline-offset: 2px; }

/* 全屏搜索浮层 */
.search-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0,0,0,.8);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-panel { display: flex; width: min(720px, 100%); height: 56px; }
.search-panel input {
  flex: 1; min-width: 0; padding: 0 20px; border: 0; outline: none;
  font-size: 16px; color: #333; background: #fff; border-radius: 8px 0 0 8px;
}
.search-panel button {
  width: 120px; border: 0; background: #9e1822; color: #fff;
  font-size: 18px; letter-spacing: 4px; border-radius: 0 8px 8px 0;
  transition: background-color .25s ease;
}
.search-panel button:hover { background: #8a141d; }
.search-close {
  position: absolute; right: 28px; top: 24px; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%; transition: transform .3s ease, border-color .3s ease;
}
.search-close:hover { transform: rotate(90deg); border-color: #fff; }

/* 移动端手风琴菜单 */
#mobileMenu { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
#mobileMenu.open { max-height: calc(100vh - 84px); overflow-y: auto; }
.mnav-link, .mnav-toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-size: 16px; color: #333; background: none; border: 0;
  border-top: 1px solid #efe4e4; text-align: left;
}
.mnav-home { color: #9e1822; font-weight: 700; border-top: 0; }
.mnav-toggle { cursor: pointer; }
.mnav-row { display: flex; align-items: center; border-top: 1px solid #efe4e4; }
.mnav-row .mnav-link { flex: 1; border-top: 0; }
.mnav-row .mnav-toggle { width: auto; flex: none; border-top: 0; padding-left: 10px; padding-right: 14px; }
.mnav-toggle .mnav-chevron { flex: none; transition: transform .3s ease; }
.mnav-item.open .mnav-chevron { transform: rotate(180deg); }
.mnav-item.open .mnav-toggle { color: #9e1822; }
.mnav-sub { max-height: 0; overflow: hidden; background: #faf6f3; transition: max-height .35s ease; }
.mnav-item.open .mnav-sub { max-height: 720px; }
.mnav-sublink {
  display: block; padding: 10px 14px 10px 30px; font-size: 15px; color: #555;
  border-top: 1px solid #f1e7e7; transition: color .2s ease, background-color .2s ease;
}
.mnav-sublink:hover { color: #9e1822; background: #f8f1f2; }
#menuBtn .icon-close { display: none; }
#menuBtn[aria-expanded="true"] .icon-menu { display: none; }
#menuBtn[aria-expanded="true"] .icon-close { display: block; }

/* 活动日历 */
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-grid { gap: 6px 0; }
.cal-empty { height: 34px; }
.cal-day {
  position: relative; height: 34px; width: 34px; margin: 0 auto; border: 0; border-radius: 50%;
  background: transparent; color: #9e1822; font-size: 16px; line-height: 34px;
  transition: background-color .2s ease, color .2s ease;
}
.cal-day:hover { background: #f3e6e7; }
.cal-day.is-today { background: #9e1822; color: #fff; }
.cal-day.has-event { font-weight: 700; }
.cal-day.has-event::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px;
  margin-left: -2.5px; border-radius: 50%; background: #c9a45c;
}
.cal-day.is-today.has-event::after { background: #fff; }
.cal-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; background: none;
}
.cal-arrow:hover { opacity: .7; }
.cal-tip {
  position: absolute; z-index: 90; width: 230px; padding: 14px 16px;
  background: #fff; border: 1px solid #e3d9da; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.cal-tip.open { opacity: 1; visibility: visible; transform: translateY(0); }
.cal-tip-date { font-size: 13px; color: #999; margin-bottom: 8px; }
.cal-tip-item { padding: 6px 0; border-top: 1px solid #f3eeee; }
.cal-tip-item:first-of-type { border-top: 0; }
.cal-tip-item a, .cal-tip-item span { font-size: 14px; line-height: 22px; color: #333; }
.cal-tip-item a:hover { color: #9e1822; }

/* 月历弹层 */
.cal-pop {
  position: absolute; top: 66px; left: 0; right: 0; z-index: 40;
  padding: 14px 16px 16px; background: #fff; border: 1px solid #e3d9da;
  border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.cal-pop.open { opacity: 1; visibility: visible; transform: translateY(0); }
.cal-pop-head {
  display: grid; grid-template-columns: 32px 1fr 32px; align-items: center;
  gap: 4px; padding-right: 26px; margin-bottom: 10px;
}
.cal-pop-close {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: #9e1822; font-size: 20px; line-height: 1;
}
.cal-pop-close:hover { opacity: .7; }
.cal-pop .cal-week { margin-bottom: 4px; }
.cal-pop .cal-week span { font-size: 12px; }
.cal-pop .cal-grid { gap: 2px 0; }
.cal-pop .cal-day { width: 32px; height: 30px; line-height: 30px; font-size: 15px; }
.cal-pop .cal-empty { height: 30px; }

@media (max-width: 640px) {
  .search-panel { height: 48px; }
  .search-panel button { width: 88px; font-size: 16px; letter-spacing: 2px; }
  .search-close { right: 16px; top: 16px; }
  .cal-day { font-size: 14px; }
  .cal-pop { padding: 12px; }
  .cal-pop .cal-day { width: 30px; font-size: 14px; }
}

/* 尊重"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
/* 特色活动：白底品牌切换条（悦读恩施 / 知行之星 / 童阅清江绘本故事会） */
.brand-tabbar { background: #fff; }
.brand-tabbar-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  min-height: 62px;
}
.brand-tab {
  display: block; padding: 20px 26px; font-size: 16px; line-height: 22px;
  color: #555; transition: color .2s ease;
}
.brand-tab:hover { color: #9e1822; }
.brand-tab.is-active { color: #9e1822; }
.brand-tabsep { width: 1px; height: 14px; background: #d8d8d8; flex: none; }
@media (max-width: 640px) {
  .brand-tabbar-inner { min-height: 52px; }
  .brand-tab { padding: 14px 12px; font-size: 15px; line-height: 20px; }
}
.books-arrow:disabled { opacity: .35; cursor: default; }
.books-arrow:disabled:hover { background: #fff; }
.books-arrow-prev { left: -24px; }
.books-arrow-next { right: -24px; }
@media (min-width: 1536px) {
  .books-arrow-prev { left: -56px; }
  .books-arrow-next { right: -56px; }
}
/* 好书荐读轮播：预留悬浮上移+阴影空间，避免卡片顶部被横向滚动容器裁切 */
#booksTrack { padding-top: 28px; margin-top: -28px; }

/* 页头/页脚 logo 等比缩放，避免固定高宽被挤压变形 */
.site-logo { width: auto; max-width: 100%; max-height: 40px; }
@media (min-width: 640px) { .site-logo { max-height: 48px; } }
@media (min-width: 1024px) { .site-logo { max-height: 58px; } }
.footer-logo { width: auto; max-width: 100%; max-height: 48px; }
@media (min-width: 1280px) { .footer-logo { max-height: 58px; } }

/* 页脚主区域：lg 起横向三栏，窄屏保持纵向居中 */
@media (min-width: 1024px) {
  .footer-main { flex-direction: row; justify-content: space-between; gap: 24px; text-align: left; }
}
@media (min-width: 1280px) {
  .footer-main { gap: 105px; }
}

/* 图片默认按原始比例完整显示（object-cover 图片不受影响） */
.object-contain { object-fit: contain; }

/* 活动预告列表：手机纵向堆叠，≥640 单列横向卡，≥1280 双列，避免图片挤压文字列 */
.act-grid { display: grid; grid-template-columns: 1fr; row-gap: 24px; }
.act-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #bebebe; background: #fff; }
.act-card-media { flex: none; width: 100%; height: 180px; overflow: hidden; }
.act-card-body { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.act-card-meta { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) {
  .act-grid { row-gap: 32px; }
  .act-card { flex-direction: row; align-items: center; gap: 30px; padding-right: 30px; }
  .act-card-media { width: 300px; height: 200px; }
  .act-card-body { gap: 20px; padding: 20px 0; }
  .act-card-meta { font-size: 16px; }
}
@media (min-width: 1024px) { .act-card-body { gap: 30px; } }
@media (min-width: 1280px) {
  .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 50px; row-gap: 40px; }
}

/* 正文中的对话作家装饰条：容器变窄时按高度裁切，不再横向压扁 */
img[src*="experts-deco"] { object-fit: cover; }

/* 联系我们：地图与联系卡在 ≥1024 按 55/45 分栏，避免固定大内边距把文字挤出视口 */
.contact-hero-logo { display: block; width: auto; height: auto; max-width: 100%; max-height: 58px; }
@media (min-width: 1024px) {
  .contact-hero-map { width: 55%; }
  .contact-hero-card { width: 45%; margin-left: -70px; }
  .contact-hero-panel { padding: 60px; }
}

/* 补齐 main.css 未编译、但模板/正文已在使用的工具类 */
.gap-\[40px\] { gap: 40px; }
.py-\[60px\] { padding-top: 60px; padding-bottom: 60px; }
.tracking-\[2px\] { letter-spacing: 2px; }
@media (min-width: 640px) {
  .sm\:px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
  .sm\:text-\[17px\] { font-size: 17px; }
}
@media (min-width: 1024px) {
  .lg\:text-\[18px\] { font-size: 18px; }
}
@media (min-width: 1280px) {
  .xl\:mt-\[30px\] { margin-top: 30px; }
}

/* 响应式字号：1920 = 设计稿原尺寸；桌面（>=1024）严格按视口等比缩放，
   与顶部导航 clamp(14px,1.05vw,20px) 同系数；<1024 保持移动/平板固定字号 */
.fs-sec-title { font-size: 20px; }
.fs-search-tab { font-size: 16px; }
.fs-search-btn { font-size: 18px; }
.fs-quick { font-size: 16px; }
.fs-feature { font-size: 17px; }
.fs-date-day { font-size: 20px; }
.fs-week { font-size: 15px; }
.fs-act-time { font-size: 14px; }
.fs-list-title { font-size: 16px; }
.fs-banner { font-size: 22px; }
.fs-card-title { font-size: 17px; }
.fs-cal-month { font-size: 18px; }
.sec-icon { width: 70px; height: 48px; }
@media (min-width: 1024px) {
  .fs-sec-title { font-size: clamp(24px, 1.875vw, 36px); }
  .fs-search-tab { font-size: clamp(14px, 1.05vw, 20px); }
  .fs-search-btn { font-size: clamp(15px, 1.155vw, 22px); }
  .fs-quick { font-size: clamp(14px, 1.05vw, 20px); }
  .fs-feature { font-size: clamp(14px, 1.05vw, 20px); }
  .fs-date-day { font-size: clamp(18px, 1.365vw, 26px); }
  .fs-week { font-size: clamp(13px, 0.945vw, 18px); }
  .fs-act-time { font-size: clamp(12px, 0.84vw, 16px); }
  .fs-list-title { font-size: clamp(14px, 0.945vw, 18px); }
  .fs-banner { font-size: clamp(20px, 1.575vw, 30px); }
  .fs-card-title { font-size: clamp(14px, 1.05vw, 20px); }
  .fs-cal-month { font-size: clamp(15px, 1.155vw, 22px); }
  .news-tab { font-size: clamp(14px, 1.05vw, 20px); }
  .sec-icon { width: clamp(52px, 3.646vw, 70px); height: clamp(36px, 2.5vw, 48px); }
}

/* 内页通用响应式字号：<640 移动值 / 640-1023 平板值 / >=1024 按 1920 设计稿等比 */
.fs-pagehead-title { font-size: 24px; }
.fs-bannertitle { font-size: 24px; }
.fs-crumb { font-size: 14px; }
.fs-subnav { font-size: 15px; }
.fs-page-title { font-size: 20px; }
.fs-section-h3 { font-size: 24px; }
.fs-subpage-title { font-size: 22px; }
.fs-entry-title { font-size: 18px; }
.fs-entry-title-sm { font-size: 17px; }
.fs-body { font-size: 16px; }
.fs-body-sm { font-size: 14px; }
@media (min-width: 640px) {
  .fs-pagehead-title, .fs-bannertitle { font-size: 30px; }
  .fs-crumb { font-size: 16px; }
  .fs-subnav { font-size: 18px; }
  .fs-page-title { font-size: 24px; }
  .fs-section-h3 { font-size: 28px; }
  .fs-subpage-title { font-size: 26px; }
  .fs-entry-title { font-size: 22px; }
  .fs-entry-title-sm { font-size: 20px; }
  .fs-body { font-size: 18px; }
  .fs-body-sm { font-size: 16px; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .fs-list-title { font-size: 18px; }
}
@media (min-width: 1024px) {
  .fs-pagehead-title, .fs-bannertitle { font-size: clamp(22px, 1.875vw, 36px); }
  .fs-crumb { font-size: clamp(13px, 0.945vw, 18px); }
  .fs-subnav { font-size: clamp(14px, 1.146vw, 22px); }
  .fs-page-title { font-size: clamp(20px, 1.458vw, 28px); }
  .fs-section-h3 { font-size: clamp(22px, 1.5625vw, 30px); }
  .fs-subpage-title { font-size: clamp(20px, 1.354vw, 26px); }
  .fs-entry-title { font-size: clamp(15px, 1.146vw, 22px); }
  .fs-entry-title-sm { font-size: clamp(15px, 1.042vw, 20px); }
  .fs-body { font-size: clamp(15px, 0.945vw, 18px); }
  .fs-body-sm { font-size: clamp(13px, 0.835vw, 16px); }
}

/* ============ 视差滚动 ============ */
/* 首页 Hero：图片层上下各多出 10%，为滚动下移预留边缘，避免露底。
   溢出让量不宜过大：cover 会按层高放大图片，140% 时窄屏左右裁掉约 25%，标题会被切 */
#bannerCarousel {
  top: -10%; right: 0; bottom: auto; left: 0; height: 120%;
  width: auto; /* 老浏览器不支持 inset/Tailwind inset-0 时兜底 */
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* 区块背景：伪元素承载背景并随滚动位移（不用 background-attachment:fixed，iOS Safari 不支持且会和惯性滚动打架） */
[data-parallax-bg] { overflow: hidden; }
[data-parallax-bg]::before {
  content: ""; position: absolute; left: 0; right: 0; top: -15%; height: 130%; z-index: 0;
  background: inherit; background-size: cover; background-position: center;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  pointer-events: none; will-change: transform;
}

/* 图片媒体：wrap 上下各多出 18px，滚动时轻微位移；hover 放大仍作用在内部 img 上，互不冲突 */
[data-parallax-media] {
  height: calc(100% + 36px); margin-top: -18px;
  transform: translate3d(0, var(--parallax-media-y, 0px), 0);
  will-change: transform;
}

/* 减少动态效果：还原尺寸与位移 */
@media (prefers-reduced-motion: reduce) {
  #bannerCarousel { top: 0; bottom: 0; height: 100%; transform: none !important; }
  [data-parallax-bg]::before { top: 0; height: 100%; transform: none !important; }
  [data-parallax-media] { height: 100%; margin-top: 0; transform: none !important; }
}

/* ============ 滚动渐显 ============ */

/* 资讯列表：首次进入视口及切换栏目时，行级错峰浮现 */
@keyframes newsRowIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.reveal.in-view .news-pane.is-active .news-row { animation: newsRowIn .55s cubic-bezier(.22,.61,.36,1) both; }
.reveal.in-view .news-pane.is-active .news-row:nth-child(2) { animation-delay: .07s; }
.reveal.in-view .news-pane.is-active .news-row:nth-child(3) { animation-delay: .14s; }
.reveal.in-view .news-pane.is-active .news-row:nth-child(4) { animation-delay: .21s; }

