/* ==========================================================
   夺标标书 客户案例详情页专属样式
   公共头部 / 公共底部 / 面包屑 / 基础重置 见 common.css
   ========================================================== */

/* ============ 案例标题区 ============ */
.case-detail-head {
  background: #fff;
  padding: 50px 0 30px;
}

.detail-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0;
}

/* ============ 案例描述（图集上方） ============ */
.case-desc-section {
  background: #fff;
  padding: 0 0 34px;
}

.case-desc {
  max-width: 100%;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.95;
  color: #333;
  text-indent: 2em;
  text-align: justify;
  word-break: break-word;
  white-space: pre-line;
}

/* ============ 案例详情正文区（图集下方，后台富文本） ============ */
.case-detail-body {
  background: #fff;
  padding: 30px 0 60px;
}

.detail-content {
  max-width: 100%;
  margin: 0 auto;
  font-size: 15px;
  color: #333;
  line-height: 1.95;
  word-break: break-word;
}

.detail-content p {
  margin: 18px 0;
  text-indent: 2em;
  text-align: justify;
}

/* 富文本常用标签兜底 */
.detail-content h2,
.detail-content h3,
.detail-content h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 14px;
  text-indent: 0;
}

.detail-content ul,
.detail-content ol {
  margin: 16px 0;
  padding-left: 2em;
}

.detail-content li { margin: 8px 0; }

.detail-content blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
  background: #fafafa;
  color: #555;
}

.detail-content img,
.detail-content table,
.detail-content iframe,
.detail-content video {
  max-width: 100%;
  height: auto;
}

.detail-content img {
  display: block;
  margin: 16px auto;
}

.detail-content table {
  border-collapse: collapse;
  margin: 18px 0;
}

.detail-content table td,
.detail-content table th {
  border: 1px solid #e6e6e6;
  padding: 8px 12px;
}

.detail-content a { color: var(--red); }

/* ============ 案例详情图片画廊 ============ */
.gallery-section {
  background: #f7f7f8;
  padding: 26px 0 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.gallery-item {
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
  background: #eee;
  border: 1px solid transparent;
  transition: border-color .2s;
}

.gallery-item:hover { border-color: var(--red); }

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.gallery-item:hover img { transform: scale(1.04); }

/* 网格下方通栏分隔线 */
.gallery-divider {
  border-top: 1px solid var(--line);
  margin-top: 44px;
}

/* 友情链接浅灰底 */
.friend-links { background: #F8F8F8; }

/* ==========================================================
   图片放大预览弹窗（Lightbox + Swiper）
   ========================================================== */
.case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.case-lightbox.open { display: block; }

.lightbox-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .88);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 5;
  width: 44px;
  height: 44px;
  line-height: 40px;
  text-align: center;
  color: #fff;
  font-size: 34px;
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  transition: background .2s, border-color .2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, .22);
  border-color: #fff;
}

.lightbox-swiper {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.lightbox-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-swiper .swiper-slide img {
  max-width: 86%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  line-height: 44px;
  text-align: center;
  color: #fff;
  font-size: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  transition: background .2s;
}

.lightbox-arrow:hover { background: rgba(255, 255, 255, .3); }

.lightboxPrev { left: 26px; }
.lightboxNext { right: 26px; }

/* 分页指示点 */
.lightbox-pagination {
  position: absolute;
  bottom: 26px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 4;
}

.lightbox-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: rgba(255, 255, 255, .45);
  opacity: 1;
}

.lightbox-pagination .swiper-pagination-bullet-active {
  background: #fff;
}

/* 弹窗打开时锁定背景滚动 */
body.lightbox-open { overflow: hidden; }

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

@media (max-width: 768px) {
  .case-detail-head { padding: 30px 0 20px; }
  .case-detail-body { padding: 20px 0 40px; }
  .detail-title { font-size: 20px; margin-bottom: 0; }
  .detail-content { font-size: 14px; line-height: 1.9; }

  .gallery-section { padding: 26px 0 20px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .gallery-divider { margin-top: 30px; }

  .lightbox-arrow { width: 38px; height: 38px; line-height: 36px; font-size: 24px; }
  .lightboxPrev { left: 12px; }
  .lightboxNext { right: 12px; }
  .lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; line-height: 34px; font-size: 28px; }

  /* WAP 端本页友情链接照常显示 */
  .friend-links .section-head,
  .friend-links .link-list { display: block; }
  .friend-links .link-list { margin-top: 18px; font-size: 12px; line-height: 2.2; }
  .friend-logo { margin-top: 22px; }
  .friend-logo img { width: 260px; }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
