/* ==========================================================
   案例详情页：项目简介 / 标书详情
   ========================================================== */

.case-detail {
  padding: 4px 0 60px;
  /* background: #F4F5F7; */
}
.case-content{
  margin-top: 20px;
}
/* ===================== 通用区块标题（红方块 + 粗标题） ===================== */
.block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: 1px;
}

.block-title::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  background: var(--red);
}

/* ===================== 项目简介卡片 ===================== */
.case-intro {
  display: flex;
  align-items: flex-start;
  gap: 58px;
  padding: 42px 44px 44px;
  background: #FAF8F8;
  
}

.intro-media {
  flex: 0 0 27%;
}

.intro-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
}

.intro-text {
  flex: 1;
  min-width: 0;
  padding-top: 6px;
}

.intro-name {
  margin-top: 26px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.intro-desc {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.95;
  color: #464646;
  text-align: justify;
}

/* ===================== 标书详情 ===================== */
.case-docs {
  margin-top: 38px;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  margin-top: 28px;
}

.docs-grid li {
  position: relative;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 3px 12px rgba(17, 24, 39, 0.07);
}

.docs-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 364 / 524;
  object-fit: cover;
}

/* 缩略图按钮：去掉默认样式，保留点击热区 */
.docs-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.docs-thumb img {
  transition: transform 0.35s ease;
}

.docs-thumb:hover img {
  transform: scale(1.03);
}

/* ==========================================================
   标书图片全屏查看
   ========================================================== */
.doc-viewer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* 移动端地址栏收起/展开会改变视口高度，dvh 跟随动态视口，
     旧内核不支持时回落到 vh，再回落到 100% */
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  /* 触摸滑动由 Swiper 接管，避免浏览器默认手势抢滚动 */
  touch-action: pan-y;
  overscroll-behavior: contain;
}

/* 支持动态视口高度的浏览器优先使用，避免移动端底部被裁掉 */
@supports (height: 100dvh) {
  .doc-viewer {
    height: 100dvh;
  }
}

.doc-viewer.is-open {
  display: flex;
}

/* 锁住背景滚动 */
body.doc-viewer-open {
  overflow: hidden;
  /* iOS Safari 上单靠 overflow:hidden 锁不住，配合 position:fixed 才能彻底阻止穿透；
     top 由 JS 按当前滚动位置写入，关闭时再还原 */
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.doc-viewer-stage {
  width: 100%;
  height: 100%;
  padding: 5vh 7vw;
  box-sizing: border-box;
}

/* 每屏撑满，图片按比例完整显示 */
.doc-viewer-stage .swiper-wrapper {
  align-items: center;
}

.doc-viewer-stage .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.doc-viewer-stage .swiper-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* ---- 移动端适配 ---- */
@media (max-width: 768px) {
  /* 手机上占据更大的可视区域，同时给上下留出按钮与分页的空间 */
  .doc-viewer-stage {
    padding: 64px 14px 68px;
  }

  .doc-viewer-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }

  .doc-viewer-close svg {
    width: 19px;
    height: 19px;
  }

  /* 手机上左右按钮缩小并贴近两侧，避免遮挡图片 */
  .doc-viewer-arrow {
    width: 38px;
    height: 38px;
  }

  .doc-viewer-arrow svg {
    width: 20px;
    height: 20px;
  }

  .doc-viewer-arrow.is-prev {
    left: 8px;
  }

  .doc-viewer-arrow.is-next {
    right: 8px;
  }

  .doc-viewer-pagination {
    bottom: 18px;
  }

  .doc-viewer-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
  }

  .doc-viewer-pagination .swiper-pagination-bullet-active {
    width: 16px;
  }
}

/* ---- 关闭按钮：右上角 ---- */
.doc-viewer-close {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.doc-viewer-close svg {
  width: 22px;
  height: 22px;
}

.doc-viewer-close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

/* ---- 左右切换按钮 ---- */
.doc-viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.doc-viewer-arrow svg {
  width: 26px;
  height: 26px;
}

.doc-viewer-arrow:hover {
  background: var(--red);
}

.doc-viewer-arrow.is-prev {
  left: 24px;
}

.doc-viewer-arrow.is-next {
  right: 24px;
}

/* ---- 底部分页器 ---- */
.doc-viewer-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Swiper 3 默认生成的圆点，按需覆写成浅色 */
.doc-viewer-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  opacity: 1;
}

.doc-viewer-pagination .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 4px;
  background: #fff;
}

/* ===================== 正文内容（富文本） ===================== */
.case-content {
  margin-top: 38px;
}

.case-content-body {
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.95;
  color: #464646;
  text-align: justify;
}

.case-content-body p + p {
  margin-top: 18px;
}

.case-content-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
}

.case-content-body h1,
.case-content-body h2,
.case-content-body h3,
.case-content-body h4 {
  margin: 26px 0 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.case-content-body ul,
.case-content-body ol {
  margin: 12px 0;
  padding-left: 1.5em;
}

.case-content-body li {
  margin: 6px 0;
}

.case-content-body blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
  background: #FAF8F8;
  color: #5A5A5A;
}

.case-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.case-content-body th,
.case-content-body td {
  padding: 10px 12px;
  border: 1px solid #E6E6EA;
  text-align: left;
}

.case-content-body th {
  background: #FAF8F8;
  font-weight: 700;
}

/* 正文里的标签词：与文章详情保持一致 */
.case-content-body a.article-tag {
  color: var(--red);
  text-decoration: none;
}

.case-content-body a.article-tag strong {
  font-weight: 700;
}

.case-content-body a.article-tag:hover {
  text-decoration: underline;
}
.links{
    background: #FAF8F8;
}
.links-inner{
    border: none;
}
/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1200px) {
  .case-intro {
    gap: 36px;
    padding: 32px 30px 34px;
  }

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

  .intro-name {
    font-size: 23px;
  }

  .intro-desc {
    font-size: 15px;
  }

  .docs-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .case-detail {
    padding-bottom: 34px;
  }

  .case-intro {
    flex-direction: column;
    gap: 24px;
    padding: 24px 18px 26px;
  }

  .intro-media {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .block-title {
    gap: 9px;
    font-size: 18px;
    letter-spacing: 0;
  }

  .block-title::before {
    width: 8px;
    height: 8px;
  }

  .intro-name {
    margin-top: 16px;
    font-size: 18px;
  }

  .intro-desc {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.85;
    text-align: left;
  }

  .case-docs {
    margin-top: 28px;
  }

  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
  }

  .case-content {
    margin-top: 28px;
  }

  .case-content-body {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.85;
    text-align: left;
  }

  .case-content-body h1,
  .case-content-body h2,
  .case-content-body h3,
  .case-content-body h4 {
    margin: 20px 0 10px;
  }
}
