/* 案例详情模板 — 仅作用于 .case-detail-page */
.case-detail-page {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.case-detail-subnav {
  background: #fff;
  padding: 16px 0;
}

.case-detail-subnav .w1520 {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 60px;
}

.case-detail-subnav a {
  color: #777;
  font-size: 14px;
  line-height: normal;
  white-space: nowrap;
}

.case-detail-subnav a:hover,
.case-detail-subnav a.is-current {
  color: #333;
}

.case-detail-hero {
  position: relative;
  width: 100%;
  height: 689px;
  overflow: hidden;
}

.case-detail-hero-media {
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  bottom: -12%;
}

.case-detail-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.case-detail-hero-mask {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
}

.case-detail-hero-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 158px;
}

.case-detail-hero-title h1 {
  margin: 0;
  color: #fff;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
}

.case-detail-hero-title h1:after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-top: 32px;
  background: #fff;
}

.case-detail-card {
  background: #fff;
  padding: 50px;
  margin-bottom: 16px;
}

.case-detail-page .public-list {
  padding-top: 60px;
}

.case-detail-overview {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: auto;
}

.case-detail-overview h2 {
  margin: 0;
  color: #000;
  font-size: 28px;
  font-weight: 500;
  line-height: normal;
}

.case-detail-overview .lead {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.case-detail-meta {
  display: flex;
  align-items: center;
  gap: 40px;
  color: #777;
  font-size: 18px;
  line-height: normal;
}

.case-detail-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.case-detail-meta-item .label {
  flex-shrink: 0;
  white-space: nowrap;
  opacity: 0.7;
  font-weight: 400;
}

.case-detail-meta-item .value {
  min-width: 0;
  font-weight: 500;
}

.case-detail-divider {
  height: 0;
  margin: 24px 0;
  border: 0;
  border-top: 1px solid #e5e5e5;
}

/* 正文：标题 + 富文本 + 后台图片，可重复 */
.case-detail-body {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.case-detail-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.case-detail-block h3 {
  margin: 0 0 12px;
  color: #000;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
}

.case-detail-text {
  color: #333;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.case-detail-text p {
  margin: 0 0 12px;
}

.case-detail-text p:last-child {
  margin-bottom: 0;
}

.case-detail-text .subhead {
  font-size: 18px;
  font-weight: 500;
}

.case-detail-images {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.case-detail-figure {
  margin: 0;
  overflow: hidden;
}

.case-detail-figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* 后台富文本 Content */
.case-detail-richtext {
  color: #333;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  word-wrap: break-word;
}

.case-detail-richtext h1,
.case-detail-richtext h2,
.case-detail-richtext h3,
.case-detail-richtext h4 {
  margin: 50px 0 12px;
  color: #000;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
}

.case-detail-richtext h1:first-child,
.case-detail-richtext h2:first-child,
.case-detail-richtext h3:first-child,
.case-detail-richtext h4:first-child {
  margin-top: 0;
}

.case-detail-richtext h4 {
  font-size: 28px;
  font-weight: 500;
}

.case-detail-richtext p {
  margin: 0 0 12px;
}

.case-detail-richtext p:last-child {
  margin-bottom: 0;
}

.case-detail-richtext strong {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

.case-detail-richtext img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 28px 0 40px;
  border: 0;
}

.case-detail-richtext p img {
  margin: 28px 0 12px;
}

.case-detail-richtext a {
  color: #0f79ff;
}

.case-detail-richtext ul,
.case-detail-richtext ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.case-detail-richtext ul {
  list-style: disc;
}

.case-detail-richtext ol {
  list-style: decimal;
}

.case-detail-richtext li {
  margin: 0 0 6px;
}

@media (max-width: 1440px) {
  .case-detail-hero {
    height: 520px;
  }

  .case-detail-hero-title {
    top: 120px;
  }
}

@media (max-width: 1200px) {
  .case-detail-subnav .w1520 {
    gap: 32px;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .case-detail-subnav {
    display: none;
  }

  .case-detail-hero {
    height: 280px;
  }

  .case-detail-hero-title {
    top: 80px;
  }

  .case-detail-hero-title h1 {
    font-size: 24px;
  }

  .case-detail-hero-title h1:after {
    margin-top: 16px;
  }

  .case-detail-card {
    padding: 24px 16px;
  }

  .case-detail-page .public-list {
    padding-top: 40px;
  }

  .case-detail-overview h2 {
    font-size: 20px;
  }

  .case-detail-overview .lead {
    font-size: 15px;
    line-height: 24px;
  }

  .case-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
  }

  .case-detail-block h3 {
    font-size: 24px;
  }

  .case-detail-block {
    gap: 24px;
  }

  .case-detail-body,
  .case-detail-images {
    gap: 32px;
  }

  .case-detail-richtext h1,
  .case-detail-richtext h2,
  .case-detail-richtext h3 {
    font-size: 24px;
    margin-top: 32px;
  }

  .case-detail-richtext h4 {
    font-size: 20px;
  }

  .case-detail-richtext img,
  .case-detail-richtext p img {
    margin: 20px 0 24px;
  }
}

/* 滚动动效：仅在 JS 启用且未开系统「减少动态效果」时生效 */
.case-detail-js .case-detail-hero-title h1 {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1) 0.18s,
    transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.18s;
}

.case-detail-js.case-detail-ready .case-detail-hero-title h1 {
  opacity: 1;
  transform: none;
}

.case-detail-js .case-detail-hero-title h1:after {
  width: 0;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s;
}

.case-detail-js.case-detail-ready .case-detail-hero-title h1:after {
  width: 40px;
}

.case-detail-js .js-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-detail-js .js-reveal.is-in {
  opacity: 1;
  transform: none;
}

.case-detail-js .js-reveal-media {
  transform: translateY(48px);
  clip-path: inset(6% 0 6% 0);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-detail-js .js-reveal-media.is-in {
  clip-path: inset(0);
}

.case-detail-js .case-detail-divider.js-reveal {
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 1;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-detail-js .case-detail-divider.js-reveal.is-in {
  transform: scaleX(1);
}

.case-detail-js .case-detail-figure.js-reveal {
  opacity: 0;
  transform: translateY(48px);
  clip-path: inset(6% 0 6% 0);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-detail-js .case-detail-figure.js-reveal.is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0);
}

.case-detail-js .case-detail-figure img {
  transform: scale(1.06);
  transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.case-detail-js .case-detail-figure.is-in img {
  transform: scale(1);
}

.case-detail-js .case-detail-hero-title,
.case-detail-js .case-detail-hero-mask {
  will-change: opacity, transform;
}

@media (max-width: 768px) {
  .case-detail-js .js-reveal {
    transform: translateY(24px);
  }

  .case-detail-js .case-detail-figure.js-reveal {
    transform: translateY(28px);
    clip-path: inset(4% 0 4% 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-detail-js .case-detail-hero-img,
  .case-detail-js .case-detail-hero-title,
  .case-detail-js .case-detail-hero-title h1,
  .case-detail-js .case-detail-hero-title h1:after,
  .case-detail-js .js-reveal,
  .case-detail-js .case-detail-figure img {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
    width: auto;
  }

  .case-detail-js .case-detail-hero-title h1:after {
    width: 40px;
  }
}
