/* 客户案例列表页 — 主色 #00A85A / 深绿 #05763a */
body.case-studies-page {
  background: var(--home-color-surface, #f9fafb);
}

.case-studies-page main.site-main {
  padding-bottom: 0;
  padding-top: 0;
}

.cs-page {
  --cs-primary: #00a85a;
  --cs-primary-dark: #05763a;
  --cs-primary-soft: #e8f7ef;
  --cs-text: #101828;
  --cs-text-soft: #4a5565;
  --cs-text-muted: #6a7282;
  --cs-border: #e5e7eb;
  --cs-surface: #f3f4f6;
  --cs-white: #fff;
  --cs-shell: var(--site-page-shell);
  color: var(--cs-text);
}

/* 顶部 Banner — 与解决方案页共用 page-hero--centered */
.cs-hero.page-banner {
  background: #eef2f6;
}

/* 精选轮播 */
.cs-featured {
  width: var(--cs-shell);
  margin: 32px auto 24px;
}

@media (max-width: 767px) {
  .cs-featured {
    margin-top: 24px;
  }
}

.cs-featured__shell {
  display: none;
  grid-template-columns: 1fr;
  background: var(--cs-white);
  box-shadow: var(--home-shadow-soft, 0 20px 50px rgba(16, 24, 40, 0.08));
  overflow: hidden;
}

.cs-featured__shell.is-active {
  display: grid;
}

@media (min-width: 960px) {
  .cs-featured__shell {
    grid-template-columns: 1.35fr 1fr;
    min-height: 420px;
  }
}

.cs-featured__media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--cs-surface);
}

@media (min-width: 960px) {
  .cs-featured__media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

.cs-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-featured__bar {
  background: var(--cs-primary);
  color: var(--cs-white);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cs-featured__bar h2 {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}

.cs-featured__nav {
  display: flex;
  gap: 8px;
}

.cs-featured__nav button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--cs-white);
  cursor: pointer;
  border-radius: 4px;
}

.cs-featured__nav button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cs-featured__panel {
  padding: 24px;
  background: var(--cs-surface);
}

@media (min-width: 960px) {
  .cs-featured__panel {
    padding: 40px;
  }
}

.cs-featured__panel p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--cs-text);
}

.cs-featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--cs-text-muted);
  margin-bottom: 16px;
}

.cs-featured__meta span + span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--cs-text-muted);
  margin-right: 12px;
  vertical-align: middle;
}

.cs-featured__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-featured__tags span {
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 4px;
  background: var(--cs-white);
  color: var(--cs-text-soft);
}

.cs-featured__dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.cs-featured__dot {
  width: 16px;
  height: 4px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.cs-featured__dot.is-active {
  background: var(--cs-white);
}

/* 筛选 + 列表 */
.cs-list-wrap {
  background: var(--cs-surface);
  padding: 36px 0 80px;
}

.cs-list-inner {
  width: var(--cs-shell);
  margin: 0 auto;
}

.cs-filters {
  position: sticky;
  top: 80px;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 24px;
  margin: 0 0 8px;
  background: var(--cs-surface);
  scrollbar-width: none;
}

.cs-filters::-webkit-scrollbar {
  display: none;
}

.cs-filters a {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--cs-text-soft);
  background: var(--cs-white);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.cs-filters a:hover {
  color: var(--cs-primary);
}

.cs-filters a.is-active {
  background: var(--cs-primary);
  color: var(--cs-white);
  font-weight: 500;
}

.cs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .cs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cs-card {
  display: flex;
  flex-direction: column;
  background: var(--cs-white);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s, transform 0.25s;
  overflow: hidden;
}

.cs-card:hover {
  box-shadow: var(--home-shadow-card);
  transform: translateY(-2px);
}

.cs-card__media {
  aspect-ratio: 16 / 10;
  background: var(--cs-surface);
  overflow: hidden;
}

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

.cs-card__body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

@media (min-width: 960px) {
  .cs-card__body {
    min-height: 208px;
    padding: 20px 24px 24px;
  }
}

.cs-card__body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--cs-text-muted);
  margin-bottom: auto;
}

.cs-card__meta .cs-divider {
  width: 1px;
  height: 14px;
  background: var(--cs-text-muted);
}

.cs-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cs-card__tags span {
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--cs-border);
  border-radius: 4px;
  color: var(--cs-text-soft);
}

.cs-card__arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: opacity 0.2s;
}

.cs-card {
  position: relative;
}

.cs-card:hover .cs-card__arrow {
  opacity: 1;
}

.cs-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.cs-pagination nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.cs-pagination a,
.cs-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--cs-text-soft);
}

.cs-pagination a:hover {
  background: var(--cs-white);
  color: var(--cs-primary);
}

.cs-pagination span[aria-current="page"] span,
.cs-pagination .active span {
  background: var(--cs-primary);
  color: var(--cs-white);
}

.cs-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--cs-text-muted);
  background: var(--cs-white);
}

/* 详情页框架 */
.cs-detail {
  width: var(--cs-shell);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.cs-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--cs-primary);
  text-decoration: none;
  font-size: 14px;
}

.cs-detail__cover {
  border-radius: var(--home-radius-md, 18px);
  overflow: hidden;
  margin-bottom: 32px;
  aspect-ratio: 16 / 9;
  background: var(--cs-surface);
}

.cs-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-detail h1 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0 0 16px;
}

.cs-detail__content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--cs-text-soft);
}

.cs-detail__content :first-child {
  margin-top: 0;
}

.cs-detail__content img {
  max-width: 100%;
  height: auto;
}

/* 响应式见 public/css/site-responsive.css */
