/* 案例页专用样式 */
.cases-page {
  padding: 40px 0 80px;
  background:
    radial-gradient(900px 420px at 8% -20%, rgba(12,124,111,.1), transparent 55%),
    radial-gradient(720px 360px at 92% 0%, rgba(201,133,44,.08), transparent 50%),
    #f7faf9;
}
.cases-head {
  width: 100%;
  max-width: none;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(12, 124, 111, .12);
}
.cases-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  width: 100%;
  margin-bottom: 24px;
}
.cases-head-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.cases-eyebrow {
  display: inline-flex;
  margin: 0 0 10px;
  color: #0a5f55;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
}
.cases-head h1 {
  margin: 0 0 12px;
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f2f2a;
  line-height: 1.08;
}
.cases-lead {
  margin: 0;
  color: #5b716c;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 36em;
}
.cases-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 2px;
}
.cases-head-actions .btn {
  white-space: nowrap;
  min-height: 46px;
  padding: 12px 20px;
  justify-content: center;
}
.cases-toolbar {
  width: 100%;
}
.cases-search {
  width: 100%;
  max-width: none;
  margin: 0;
}
.cases-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cases-search-box {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 52px;
  padding: 5px 5px 5px 16px;
  border: 1px solid #d5e6e1;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 47, 42, .06);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cases-search-box:focus-within {
  border-color: #0c7c6f;
  box-shadow: 0 0 0 3px rgba(12, 124, 111, .12);
}
.cases-search-ico {
  flex: 0 0 auto;
  color: #7a908a;
  margin-right: 8px;
}
.cases-search-box input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: .96rem;
  color: #0f2f2a;
  padding: 8px 4px;
}
.cases-search-box input::placeholder {
  color: #93a6a1;
}
.cases-search-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #0c7c6f;
  color: #fff;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease;
}
.cases-search-btn:hover {
  filter: brightness(1.06);
}
.cases-search-hint,
.cases-search-tip {
  margin: 12px 0 0;
  font-size: .86rem;
  line-height: 1.5;
}
.cases-search-hint {
  color: #0c7c6f;
}
.cases-search-tip {
  color: #7a908a;
}
.cases-search-hint a {
  margin-left: 8px;
  color: #5b716c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cases-search-hint a:hover {
  color: #0c7c6f;
}

.cases-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin: 8px auto 0;
  padding: 48px 20px;
  max-width: 480px;
  border: 1px dashed rgba(12, 124, 111, .28);
  border-radius: 20px;
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(12, 124, 111, .08), transparent 70%),
    #fff;
}
.cases-empty-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(12, 124, 111, .1);
  color: #0c7c6f;
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.cases-empty-title {
  margin: 0;
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f2f2a;
  letter-spacing: -.01em;
}
.cases-empty-desc {
  margin: 0;
  color: #5b716c;
  font-size: .95rem;
  line-height: 1.65;
  max-width: 28em;
}
.cases-empty-cta {
  margin-top: 10px;
  min-width: 168px;
  justify-content: center;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}
.cases-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 32px;
}
.cases-pager-btn,
.cases-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d5e6e1;
  background: #fff;
  color: #0f2f2a;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
}
.cases-pager-btn:hover,
.cases-pager-num:hover {
  border-color: #0c7c6f;
  color: #0c7c6f;
}
.cases-pager-btn.is-disabled {
  opacity: .4;
  pointer-events: none;
  cursor: default;
}
.cases-pager-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.cases-pager-num.is-current {
  background: #0c7c6f;
  border-color: #0c7c6f;
  color: #fff;
}
.cases-pager-meta {
  margin: 12px 0 0;
  text-align: center;
  font-size: .82rem;
  color: #80948f;
}
.case-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #d9e5e1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.case-card:hover,
.case-card:focus-visible {
  border-color: #0c7c6f;
  box-shadow: 0 14px 32px rgba(15, 47, 42, .12);
  transform: translateY(-3px);
  outline: none;
}
.case-card .case-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #d7ebe6 0%, #e8f3f0 55%, #cfe3de 100%);
  border-bottom: 1px solid #d5e6e1;
}
.case-card .case-cover.has-photo {
  background: #1a2422;
}
.case-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.02);
  transition: transform .45s ease;
}
.case-card:hover .case-cover-img {
  transform: scale(1.06);
}
.case-cover-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 20, 18, .18) 0%, rgba(8, 20, 18, .12) 42%, rgba(8, 20, 18, .72) 100%),
    linear-gradient(90deg, rgba(8, 20, 18, .35) 0%, transparent 55%);
  pointer-events: none;
}
.case-cover-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  box-sizing: border-box;
}
.case-card .case-tag {
  position: static;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-card .case-cover:not(.has-photo) .case-tag {
  background: rgba(12, 124, 111, .12);
  color: #0c7c6f;
  border-color: transparent;
}
.case-card .case-title {
  display: block;
  margin: 0;
  max-width: 100%;
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  word-break: break-word;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}
.case-card .case-cover:not(.has-photo) .case-title {
  color: #0f2f2a;
  text-shadow: none;
}
.case-card .case-cover:not(.has-photo) .case-cover-content {
  position: relative;
  padding: 18px 16px;
}
.case-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px 16px;
  background: #fff;
}
.case-desc {
  margin: 0;
  min-height: 2.6em;
  font-size: .84rem;
  color: #667a75;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-cta {
  margin-top: auto;
  font-size: .82rem;
  font-weight: 600;
  color: #0c7c6f;
}
.case-card:hover .case-cta {
  text-decoration: underline;
}

html.case-modal-open,
html.case-modal-open body {
  overflow: hidden;
}
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.case-modal[hidden] {
  display: none !important;
}
.case-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 22, .45);
}
.case-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}
.case-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 47, 42, .08);
  color: #0f2f2a;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.case-modal-close:hover {
  background: rgba(15, 47, 42, .14);
}
.case-modal-top {
  width: 100%;
  box-sizing: border-box;
  padding: 28px 28px 22px;
  background: #e8f3f0;
  border-bottom: 1px solid #d5e6e1;
  background-repeat: no-repeat;
}
.case-modal-top.has-photo {
  min-height: 168px;
  color: #fff;
  border-bottom: 0;
}
.case-modal-top.has-photo .case-tag {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.case-modal-top.has-photo h2,
.case-modal-top.has-photo .case-host {
  color: #fff;
}
.case-modal-top .case-tag {
  margin-bottom: 12px;
}
.case-modal-top h2 {
  margin: 0 0 8px;
  padding-right: 36px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f2f2a;
  line-height: 1.3;
}
.case-modal-bottom {
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-modal-bottom p {
  margin: 0;
  color: #4d635e;
  font-size: .95rem;
  line-height: 1.6;
}
.case-modal-bottom .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

@media (max-width: 1100px) {
  .cases-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .cases-page { padding: 20px 0 56px; }
  .cases-head {
    margin-bottom: 20px;
    padding-bottom: 18px;
  }
  .cases-head-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 16px;
  }
  .cases-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    justify-content: stretch;
    width: 100%;
  }
  .cases-head-actions .btn {
    width: 100%;
    padding: 12px 10px;
    font-size: .9rem;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .cases-lead {
    font-size: .95rem;
    max-width: none;
  }
  .cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (max-width: 520px) {
  .cases-page { padding: 16px 0 48px; }
  .cases-head { margin-bottom: 16px; padding-bottom: 14px; }
  .cases-eyebrow { font-size: .8rem; margin-bottom: 6px; }
  .cases-head h1 { font-size: 1.7rem; }
  .cases-lead { font-size: .9rem; line-height: 1.55; margin-bottom: 14px; }
  .cases-head-actions .btn {
    min-height: 42px;
    font-size: .86rem;
    padding: 10px 8px;
  }
  .cases-search-box {
    min-height: 44px;
    padding-left: 12px;
  }
  .cases-search-btn {
    padding: 0 14px;
    font-size: .84rem;
    min-height: 36px;
  }
  .cases-search-tip,
  .cases-search-hint {
    font-size: .8rem;
  }
  /* 手机端固定一行 2 个 */
  .cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .case-card {
    border-radius: 12px;
  }
  .case-card:hover,
  .case-card:focus-visible {
    transform: none;
  }
  .case-cover-content {
    padding: 10px;
    gap: 6px;
  }
  .case-card .case-title {
    font-size: .86rem;
    line-height: 1.3;
  }
  .case-card .case-tag {
    font-size: .58rem;
    padding: 2px 6px;
  }
  .case-body {
    padding: 10px 10px 12px;
    gap: 6px;
  }
  .case-desc {
    font-size: .72rem;
    min-height: 2.3em;
    -webkit-line-clamp: 2;
  }
  .case-cta {
    font-size: .72rem;
  }
  .cases-empty-box {
    padding: 32px 14px;
    border-radius: 16px;
  }
  .cases-empty-title {
    font-size: 1.2rem;
  }
  .cases-empty-desc {
    font-size: .88rem;
  }
  .cases-pager {
    margin-top: 22px;
    gap: 8px;
  }
  .cases-pager-btn,
  .cases-pager-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: .84rem;
  }
}
