:root {
  --footer-link: #fff;
  --footer-hover: #f7ad00;
  --page-max: 1920px;
  --content-max: 1600px;
}

/* 全局统一宽度限制：页面主体块（section、footer）最大宽度 1920px 并水平居中。
 * 固定导航栏保持全宽背景，其内部 .head 限制 1200px 居中。
 * 页脚 footer ul 同样限制 1200px 居中，与头部对齐。
 * >1920px: 主体块保持 1920px 居中，两侧留白。
 * 1366-1920px: 主体块随视口宽度自适应并居中。
 * <1366px: 通过首页内联脚本动态缩放 viewport，保证无横向滚动条。 */
html {
  min-width: 320px;
}

/* 首页内容区最小宽度 1366px，小屏时允许横向滚动查看完整设计稿 */
body.landing {
  overflow-x: auto;
  min-width: 1366px;
}

/* 其他页面（子页）最大宽度 1920px 并居中，防止超宽屏幕下内容无限拉伸 */
body.subpage {
  max-width: var(--page-max);
  margin: 0 auto;
}

/* <1366px 时固定按 1366px 渲染，section/footer/menu 保持设计稿比例 */
@media (max-width: 1365px) {
  html,
  body {
    overflow-x: auto;
  }
}

/* 固定导航栏：与页面主体块一致，最大宽度 1920px 居中
 * 背景图在 1920px 内 repeat-x，内容在 .head 内 1200px 居中 */
.menu {
  max-width: var(--page-max);
  left: 0;
  right: 0;
  margin: 0 auto;
  transform: none;
}

/* 主体内容块统一限制最大宽度并居中（首页 + 子页统一应用） */
.section,
footer {
  max-width: var(--page-max);
  margin: 0 auto;
}

/* 标题文字区限制在内容宽度 1600px 内，避免绝对定位撑开视口 */
body.landing .idx-bt {
  max-width: var(--content-max);
  left: 0;
  right: 0;
  margin: 0 auto;
}

/* 精彩图集区需要相对定位，作为 .idx-bt 的包含块 */
.pic_banner {
  position: relative;
}

/* 页脚基础样式 — 用 body footer 提高特异度，覆盖 base.css 的 reset
 * (base.css 在 @section Styles 里晚于 common.css 加载，其 reset 把 footer 的
 *  padding/background 清零，导致 common.css 的 footer 规则失效) */
body footer {
  padding: 40px 0 40px 0;
  background: #333946;
}

/* 页脚链接颜色匹配设计稿 */
footer ul li p a,
footer ul li p a:hover {
  text-decoration: none;
}

footer ul li p a {
  color: var(--footer-link);
}

footer ul li p a:hover {
  color: var(--footer-hover);
}

/* ICP 链接颜色 */
footer ul li p > a[href*="beian"] {
  color: var(--footer-link);
}

/* 页脚 <p> 行高匹配原型 (base.css 的 p { line-height: 18px } 在线上被 Tailwind 覆盖) */
footer ul li p {
  line-height: 18px;
}

/* 视频/图集区覆盖文字链接颜色 */
.idx-bt p a,
.idx-bt p a:hover {
  color: #fff;
  text-decoration: none;
}

/*
 * 首页不针对 <1366px 做响应式收紧。
 * 视口 <1366px 时 layout viewport 固定为 1366px，所有元素保持原设计尺寸，
 * 超出部分横向滚动，避免任何元素被压缩或换行。
 */

/* ===== 首页赞助商 ===== */
.sponsor_zi {
  width: 100%;
  text-align: center;
  padding: 40px 0 60px;
  background: #fff;
}

.sponsor_zi .name_bt {
  text-align: center;
  line-height: 60px;
  margin: 0 auto 30px;
}

.sponsor_zi .name_bt_a {
  text-transform: uppercase;
  font-size: 48px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 2px;
}

.sponsor_zi .name_bt_a:hover {
  color: #f7ad00;
}

.sponsor-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

.sponsor-scroll {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.sponsor-list {
  display: inline-flex;
  align-items: stretch;
  white-space: nowrap;
  will-change: transform;
}

.sponsor-list dl.pic {
  width: 384px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  margin: 0 12px 0 0;
  text-align: center;
  white-space: normal;
}

.sponsor-list dl.pic dd {
  width: 384px;
  height: 128px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.sponsor-list dl.pic dd a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #666;
  text-decoration: none;
}

.sponsor-list dl.pic dd img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.sponsor-list dl.pic:hover dd img {
  transform: scale(1.05);
}

.sponsor-list dl.pic dt {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
}

.sponsor-list dl.pic dt a {
  color: #666;
  text-decoration: none;
}

.sponsor-list dl.pic dt a:hover {
  color: #f7ad00;
}

.sponsor-name-placeholder {
  font-size: 18px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  padding: 0 20px;
}

.sponsor-empty {
  width: 100%;
  text-align: center;
  padding: 60px 0;
  font-size: 16px;
  color: #999;
}

/* 赞助商横向滚动动画 */
.sponsor-list.is-animated {
  animation: sponsorScroll 40s linear infinite;
}

.sponsor-list.is-animated:hover {
  animation-play-state: paused;
}

@keyframes sponsorScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/*
 * 赞助商区块不单独做 <1366px 的缩小适配。
 * 首页 _Layout.cshtml 中的 viewport 脚本会在视口 <1366px 时
 * 固定 layout viewport 为 1366px，保持设计稿 1:1 比例，
 * 超出部分允许横向滚动。
 */

/* ===== Hero 背景视频层 =====
 * 由 Video.IsHero=true 标记的视频作为首页头屏视频背景。
 * 视频层 position: absolute 铺满 .section.head-top，z-index:0；
 * .bannerBox 等前景内容通过 z-index 自然叠加在视频之上。
 * hero-video-overlay 是半透明黑色遮罩，保证前景文字可读。
 * 视频加载失败时 JS 给 .hero-video-layer 加 .failed 类，整体隐藏。 */
.hero-video-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color: #000;
}

.hero-video-layer .hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.hero-video-layer .hero-video.is-ready {
  opacity: 1;
}

.hero-video-layer .hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* 视频加载失败 / 移动端 / 节省流量 → JS 加 .failed 整体隐藏 */
.hero-video-layer.failed,
.hero-video-layer.is-hidden {
  display: none !important;
}

/* 移动端不展示视频，避免自动播放限制、流量消耗与 iOS Safari 体验问题 */
@media (max-width: 768px) {
  .hero-video-layer {
    display: none !important;
  }
}

/* 当存在 hero 视频层时，把前景内容提到 z-index: 2 以上 */
.section.head-top:has(.hero-video-layer) .bannerBox {
  position: relative;
  z-index: 2;
}

.section.head-top:has(.hero-video-layer) .shub {
  position: relative;
  z-index: 3;
}
