/* Case Show page — card gallery */

.cs-page {
  background: #fff;
  padding-bottom: 72px;
}

.cs-hero {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2a2a2a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
}

.cs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.cs-hero__inner {
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.cs-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.cs-hero h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.cs-wrap {
  max-width: 1280px;
  width: 96%;
  margin: 0 auto;
  padding: 0 12px;
}

.cs-intro {
  text-align: center;
  padding: 28px 16px 22px;
}

.cs-intro__tag {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.4;
  color: #f08300;
  font-style: italic;
}

.cs-intro h2 {
  margin: 0 auto;
  max-width: 720px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: #666;
}

.cs-intro__line {
  display: block;
  width: 48px;
  height: 2px;
  margin: 18px auto 0;
  background: #f08300;
}

/* Card grid */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
  list-style: none;
  margin: 0;
  padding: 8px 0 12px;
}

.cs-gallery > li {
  min-width: 0;
}

.cs-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(40, 40, 50, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-align: left;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.cs-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(40, 40, 50, 0.16);
}

.cs-card__media {
  display: block;
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* 方正卡片，图片 cover 裁切 */
  background: #f3f3f3;
  overflow: hidden;
}

.cs-card__media img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.cs-card:hover .cs-card__media img {
  transform: scale(1.04);
}

.cs-card__label {
  display: block;
  padding: 14px 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom note + CTA */
.cs-note {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 28px;
  align-items: center;
  margin-top: 40px;
  padding: 32px 36px;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
}

.cs-note__copy h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #222;
  font-weight: 600;
}

.cs-note__copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: #666;
}

.cs-note__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.cs-btn {
  display: block;
  text-align: center;
  padding: 12px 22px;
  font-size: 14px;
  text-decoration: none !important;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cs-btn--primary {
  background: #f08300;
  color: #fff !important;
}

.cs-btn--primary:hover {
  background: #d96f00;
  color: #fff !important;
}

.cs-btn--ghost {
  background: #fff;
  color: #333 !important;
  border: 1px solid #ddd;
}

.cs-btn--ghost:hover {
  border-color: #f08300;
  color: #f08300 !important;
}

/* Lightbox */
body.cs-lb-open {
  overflow: hidden;
}

.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 24, 0.88);
  padding: 48px 72px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cs-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.cs-lightbox[hidden] {
  display: none !important;
}

.cs-lightbox.is-open[hidden] {
  display: flex !important;
}

.cs-lightbox__figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  text-align: center;
}

.cs-lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background: #111;
}

.cs-lightbox__figure figcaption {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.cs-lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
}

.cs-lightbox__close:hover {
  background: #f08300;
}

.cs-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 48px;
  cursor: pointer;
}

.cs-lightbox__nav:hover {
  background: #f08300;
}

.cs-lightbox__nav.prev { left: 18px; }
.cs-lightbox__nav.next { right: 18px; }

@media (max-width: 1199px) {
  .cs-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .cs-hero {
    height: 180px;
  }

  .cs-hero h1 {
    font-size: 30px;
  }

  .cs-intro {
    padding: 28px 12px 20px;
  }

  .cs-intro__tag {
    font-size: 17px;
  }

  .cs-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .cs-note {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 18px;
  }

  .cs-note__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cs-lightbox {
    padding: 56px 16px 24px;
  }

  .cs-lightbox__nav {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 22px;
  }

  .cs-lightbox__nav.prev { left: 8px; }
  .cs-lightbox__nav.next { right: 8px; }
}

@media (max-width: 420px) {
  .cs-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cs-card__label {
    font-size: 12px;
    padding: 10px 8px 12px;
  }
}
