.case-page {
  background-color: #ffffff;
  background-image: url("../images/honor-bg.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  padding: 28px 0 48px;
}

.case-container {
  width: 1200px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

.case-section {
  padding: 0;
}

.case-section + .case-section {
  position: relative;
  margin-top: 32px;
  padding-top: 32px;
}

.case-section + .case-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1200px;
  max-width: calc(100% - 32px);
  height: 1px;
  background: #e5e5e5;
  transform: translateX(-50%);
}

.case-panel {
  padding: 34px 58px 30px;
  border-radius: 2px;
  overflow: hidden;
}

.case-panel--school {
  position: relative;
}

.case-panel--school::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 190px;
  background: url("./images/banner.jpg") center top / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.case-title {
  display: block;
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 26px;
  background: #fff0;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0%);
}

.case-title--laundry {
  margin-bottom: 34px;
}

.case-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #222222;
  letter-spacing: 1px;
}

.case-title p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #666666;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 18px;
  position: relative;
  z-index: 1;
}

.case-card {
  margin: 0;
}

.case-card__media {
  overflow: hidden;
  background: #f3f5f7;
}

.case-card__media img {
  display: block;
  width: 100%;
  height: 142px;
  object-fit: cover;
}

.case-card--laundry .case-card__media img {
  height: auto;
}

.case-card__caption {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  text-align: center;
  color: #555555;
}

.case-pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.case-pager__btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #d8e3ec;
  border-radius: 50%;
  background: #ffffff;
  color: #7d94aa;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.case-pager__btn:hover {
  color: #3e6d97;
  border-color: #b7c8d8;
}

.case-carousel__viewport {
  overflow: hidden;
  position: relative;
}

.case-grid {
  display: flex;
  gap: 18px;
  position: relative;
  z-index: 1;
  will-change: transform;
}

.case-card {
  margin: 0;
  flex: 0 0 calc((100% - 54px) / 4);
}

.case-card--laundry {
  flex: 0 0 calc((100% - 54px) / 4);
}

/* 合作院校：整页 2 排轮播 */
.case-carousel__viewport--school {
  overflow: hidden;
}

.case-school-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.case-school-slide {
  flex: 0 0 100%;
  width: 100%;
}

.case-grid--school {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 18px;
}

.case-grid--school .case-card {
  min-width: 0;
}

.case-grid--school .case-card__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 下面两块：逐个轮播 */
.case-section[data-carousel-mode="step"] .case-grid--laundry {
  display: flex;
  gap: 18px;
  transition: transform 0.4s ease;
  will-change: transform;
}

.case-section[data-carousel-mode="step"] .case-grid--laundry .case-card {
  flex: 0 0 calc((100% - 36px) / 4);
  margin: 0;
}

.case-card__media {
  overflow: hidden;
  background: #f3f5f7;
}

.case-card__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.case-card__caption {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  text-align: center;
  color: #555555;
}

@media (max-width: 1024px) {
  .case-grid--school {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-section[data-carousel-mode="step"] .case-grid--laundry .case-card {
    flex: 0 0 calc((100% - 24px) / 3);
  }
}

@media (max-width: 768px) {
  .case-page {
    padding: 20px 0 32px;
    background-size: auto 100%;
  }

  .case-panel {
    padding: 20px 12px 24px;
  }

  .case-panel--school::before {
    height: 120px;
  }

  .case-carousel__viewport--school,
  .case-school-track,
  .case-school-slide {
    width: 100%;
  }

  .case-school-track {
    display: block;
    transform: none !important;
  }

  .case-school-slide {
    display: block;
  }

  .case-grid--school {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
    width: 100%;
  }

  .case-grid--school .case-card {
    display: block;
    width: 100%;
  }

  .case-section[data-carousel-mode="step"] .case-grid--laundry .case-card {
    flex: 0 0 calc((100% - 12px) / 2);
  }

  .case-card__media img,
  .case-card--laundry .case-card__media img {
    height: auto;
  }
}