/* ======================
   CASES.CSS — 成功案例页
   ====================== */

.page-hero.cases-hero,
.cases-page .page-hero {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(212, 175, 55, 0.12), transparent 55%),
    linear-gradient(165deg, #1a2332 0%, #0f1825 100%);
}

/* 案例筛选 */
.cases-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 40px;
  justify-content: center;
  padding: 6px;
  max-width: 820px;
}

.filter-tag {
  padding: 9px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.04);
}
.filter-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-1px);
}
.filter-tag.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--text-white);
  box-shadow: 0 6px 18px rgba(26, 35, 50, 0.22);
}

/* 案例网格 */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* 案例卡片 */
a.case-card,
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 100%;
}
a.case-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-accent), transparent 80%);
  opacity: 0;
  transition: opacity 0.25s;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 35, 50, 0.1);
  border-color: rgba(212, 175, 55, 0.35);
}
a.case-card:hover::before {
  opacity: 1;
}

.case-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.case-tag {
  flex-shrink: 0;
}

.case-result-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
  max-width: 100%;
}
.case-result-badge:empty {
  display: none;
}
.case-result-badge.success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.case-result-badge.normal {
  background: rgba(26, 35, 50, 0.06);
  color: #475569;
}
.case-result-badge.good {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}
.case-result-badge.better {
  background: rgba(212, 175, 55, 0.14);
  color: #8b6914;
}
.case-result-badge.best {
  background: rgba(26, 35, 50, 0.08);
  color: var(--color-primary);
}

.case-title {
  font-size: 18px;
  color: var(--text-title);
  margin: 0 0 10px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.01em;
}
a.case-card:hover .case-title {
  color: var(--color-primary);
}

.case-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-body {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-defense h4,
.outcome-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.case-defense h4::before,
.outcome-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.case-defense p,
.case-outcome p {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-outcome {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(26, 35, 50, 0.03));
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.case-outcome .outcome-label {
  color: #8b6914;
}
.case-outcome p {
  font-weight: 600;
  color: var(--text-title);
  -webkit-line-clamp: 2;
}

.case-more {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}
a.case-card:hover .case-more {
  transform: translateX(4px);
}

/* 空状态 */
.cases-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.cases-empty p {
  margin-top: 16px;
  font-size: 15px;
}

/* 分页样式已下沉到 common.css，此处仅保留间距兜底 */
.pagination-wrap {
  margin-top: 40px;
}

.cases-swipe-hint { display: none; }

@media (max-width: 768px) {
  .cases-grid { grid-template-columns: 1fr; }

  .cases-filter {
    position: sticky;
    top: calc(68px + var(--liuzhi-banner-h, 0px));
    z-index: 40;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    gap: 8px;
    max-width: none;
    margin: 0 0 20px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 10px 16px 12px;
    width: 100vw;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.04);
  }
  .cases-filter::-webkit-scrollbar { display: none; }
  .filter-tag {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 13px;
  }

  .cases-swipe-hint {
    display: block;
    margin: 0 0 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
  }
  .cases-swipe-area {
    touch-action: pan-y;
  }

  .case-card { padding: 22px 20px 20px; }
  .case-title { font-size: 16px; }
}

/* ====================== 案例详情页 ====================== */
.case-detail {
  padding-bottom: 48px;
  background: linear-gradient(180deg, #f5f6f8 0%, #fff 140px);
}
.case-detail-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}
.case-crumb {
  margin: 0;
  font-size: 13px;
}
.case-crumb .breadcrumb-current {
  max-width: min(420px, 50vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-detail-shell {
  padding-top: 24px;
}
.case-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.case-detail-header {
  margin: 0 0 20px;
  max-width: none;
}
.case-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.case-detail-header h1 {
  font-size: 28px;
  line-height: 1.35;
  color: var(--text-title);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.case-detail-summary {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-body);
  margin: 0 0 12px;
}
.case-detail-header .geo-cite-box {
  margin: 0 0 12px;
  padding: 12px 14px;
}
.case-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.case-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.04);
}
.case-block-outcome {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(26, 35, 50, 0.03));
  border-color: rgba(212, 175, 55, 0.28);
}
.case-block-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #8b6914;
  margin-bottom: 8px;
}
.case-block-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}
.case-outcome-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.5;
}
.case-outcome-text p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.case-block-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--color-accent);
}
.case-stage-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 600;
}
.case-thinking-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-body);
  white-space: normal;
}
.case-block-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.lawyer-actions-list {
  margin: 0;
  padding-left: 1.25em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-body);
}
.lawyer-actions-list li {
  margin-bottom: 6px;
}
.case-defense-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-body);
}
.case-defense-text p {
  margin: 0 0 12px;
}
.case-defense-text p:last-child {
  margin-bottom: 0;
}
.case-block-note {
  background: #f8fafc;
  padding: 14px 18px;
  box-shadow: none;
}
.case-block-note p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
.case-detail-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: #fff;
}
.case-detail-cta h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #fff;
}
.case-detail-cta p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}
.case-detail-cta .btn-solid {
  flex-shrink: 0;
}

.case-detail-side {
  position: sticky;
  top: 88px;
}
.case-side-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.04);
}
.case-side-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-title);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.case-side-facts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.case-side-facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 13px;
}
.case-side-facts li:last-child {
  border-bottom: 0;
}
.case-side-facts em {
  font-style: normal;
  color: var(--text-muted);
  flex-shrink: 0;
}
.case-side-facts strong {
  text-align: right;
  color: var(--text-title);
  font-weight: 600;
}
.case-side-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}
.case-side-link:hover {
  text-decoration: underline;
}
.case-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.case-related-list li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}
.case-related-list a {
  display: block;
  text-decoration: none;
}
.case-related-list strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-title);
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 4px;
}
.case-related-list a:hover strong {
  color: var(--color-primary);
}
.case-related-list em {
  font-style: normal;
  font-size: 12px;
  color: #8b6914;
}
.case-side-tools {
  display: flex;
  flex-direction: column;
}
.case-side-tools a {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}
.case-side-tools a:last-child {
  border-bottom: 0;
}
.case-side-tools a:hover {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .case-detail-layout {
    grid-template-columns: 1fr;
  }
  .case-detail-side {
    position: static;
  }
  .case-detail-header h1 {
    font-size: 24px;
  }
  .case-outcome-text {
    font-size: 17px;
  }
  .case-block {
    padding: 18px;
  }
}

