/* ============================================
   应用案例详情页面样式
   ============================================ */

/* ============================================
   Hero Banner 模块
   ============================================ */
.case-detail__hero {
  position: relative;
  width: 100%;
  height: 267px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
}

.case-detail__hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #D0021B 0%, #8B0000 100%);
}

.case-detail__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.case-detail__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.case-detail__hero-title {
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin: 0 0 20px 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.case-detail__hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  letter-spacing: 0.1em;
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  background: #f8f8f8;
  padding: 16px 0;
}

.breadcrumb__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.breadcrumb__link {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb__link:hover {
  color: var(--color-primary);
}

.breadcrumb__separator {
  color: #999999;
}

.breadcrumb__current {
  color: var(--color-primary);
  font-weight: 500;
}

/* ============================================
   案例详情内容区域
   ============================================ */
.case-detail__content {
  padding: 60px 0;
  background: #ffffff;
}

.case-detail__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 案例主图 */
.case-detail__main-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.case-detail__main-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 案例信息 */
.case-detail__info {
  background: #ffffff;
}

.case-detail__title {
  font-size: 32px;
  font-weight: 700;
  color: #333333;
  line-height: 1.4;
  margin: 0 0 30px 0;
}

/* 元数据 */
.case-detail__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.case-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #666666;
}

.case-detail__meta-item i {
  font-size: 16px;
  color: var(--color-primary);
  width: 20px;
}

.case-detail__meta-label {
  color: #999999;
}

.case-detail__meta-value {
  color: #333333;
  font-weight: 500;
}

/* 分隔线 */
.case-detail__divider {
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #e5e5e5 30%, #e5e5e5 100%);
  margin: 30px 0;
}

/* 内容区块 */
.case-detail__section {
  margin-bottom: 40px;
}

.case-detail__section:last-child {
  margin-bottom: 0;
}

.case-detail__section-title {
  font-size: 22px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 20px 0;
  padding-left: 16px;
  border-left: 4px solid var(--color-primary);
}

.case-detail__section-content {
  font-size: 15px;
  color: #666666;
  line-height: 1.8;
}

.case-detail__section-content p {
  margin: 0 0 16px 0;
}

.case-detail__section-content p:last-child {
  margin-bottom: 0;
}

/* 列表 */
.case-detail__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-detail__list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #666666;
  line-height: 1.7;
}

.case-detail__list li:last-child {
  margin-bottom: 0;
}

.case-detail__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* ============================================
   项目图片展示
   ============================================ */
.case-detail__gallery {
  margin-top: 50px;
  padding-top: 50px;
  border-top: 1px solid #e5e5e5;
}

.case-detail__gallery-title {
  font-size: 22px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 30px 0;
  padding-left: 16px;
  border-left: 4px solid var(--color-primary);
}

.case-detail__gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-detail__gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  cursor: pointer;
}

.case-detail__gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.case-detail__gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.case-detail__gallery-item:hover img {
  transform: scale(1.05);
}

/* 图片放大图标 */
.case-detail__gallery-zoom {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.case-detail__gallery-item:hover .case-detail__gallery-zoom {
  opacity: 1;
}

.case-detail__gallery-zoom i {
  font-size: 28px;
  color: #ffffff;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.case-detail__gallery-item:hover .case-detail__gallery-zoom i {
  transform: scale(1);
}

/* ============================================
   图片弹窗 Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox--active {
  opacity: 1;
  visibility: visible;
}

.lightbox__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  width: 95vw;
  height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox--active .lightbox__image {
  transform: scale(1);
}

.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lightbox__close:hover {
  color: var(--color-primary);
  transform: rotate(90deg);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav:hover {
  background: var(--color-primary);
}

.lightbox__nav--prev {
  left: 20px;
}

.lightbox__nav--next {
  right: 20px;
}

.lightbox__counter {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 20px;
  border-radius: 20px;
}

/* ============================================
   相关案例推荐
   ============================================ */
.case-detail__related {
  padding: 60px 0 80px;
  background: #f5f5f5;
}

.case-detail__related-title {
  font-size: 28px;
  font-weight: 700;
  color: #333333;
  text-align: center;
  margin: 0 0 40px 0;
}

.case-detail__related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

/* 相关案例卡片 */
.case-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s ease;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.case-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.case-card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-card:hover .case-card__image img {
  transform: scale(1.08);
}

.case-card__content {
  padding: 20px;
}

.case-card__title {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 12px 0;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.case-card:hover .case-card__title {
  color: var(--color-primary);
}

.case-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999999;
  margin: 0;
}

.case-card__meta i {
  font-size: 12px;
  color: var(--color-primary);
}

/* 返回列表按钮 */
.case-detail__back {
  text-align: center;
}

.case-detail__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #ffffff;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.case-detail__back-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.case-detail__back-btn i {
  font-size: 14px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 960px) {
  .case-detail__hero {
    height: 220px;
    padding-top: 60px;
  }

  .case-detail__hero-title {
    font-size: 32px;
  }

  .case-detail__content {
    padding: 40px 0;
  }

  .case-detail__title {
    font-size: 26px;
  }

  .case-detail__meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-detail__gallery-grid {
    gap: 16px;
  }

  .case-detail__gallery-item img {
    height: 160px;
  }

  .case-detail__related {
    padding: 40px 0 60px;
  }

  .case-detail__related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .case-detail__hero {
    height: 180px;
  }

  .case-detail__hero-title {
    font-size: 26px;
  }

  .case-detail__hero-subtitle {
    font-size: 14px;
  }

  .case-detail__title {
    font-size: 22px;
  }

  .case-detail__section-title {
    font-size: 18px;
  }

  .case-detail__gallery-grid {
    grid-template-columns: 1fr;
  }

  .case-detail__gallery-item img {
    height: 180px;
  }

  .case-detail__related-title {
    font-size: 22px;
  }

  .case-detail__related-grid {
    grid-template-columns: 1fr;
  }

  .case-card__image {
    height: 180px;
  }
}

/* ============================================
   Lightbox 响应式
   ============================================ */
@media (max-width: 768px) {
  .lightbox__nav--prev {
    left: 10px;
  }

  .lightbox__nav--next {
    right: 10px;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .lightbox__close {
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
  }

  .lightbox__counter {
    bottom: 20px;
  }

  .lightbox__image {
    max-width: 98vw;
    max-height: 88vh;
  }
}
