/* 成功案例列表 + 文章详情（仅 /cases 加载） */
.page-hero--compact {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.35rem;
  background:
    radial-gradient(ellipse 50% 60% at 90% 0%, rgba(37, 99, 235, 0.1), transparent 55%),
    var(--bg-soft, #f5f7fb);
  border-bottom: 0;
}

.page-hero--compact h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.page-hero--compact p {
  max-width: 36rem;
  color: var(--ink-soft, #475569);
}

.section--tight {
  padding-top: 1.75rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  margin-bottom: 1rem;
}

.breadcrumb a:hover {
  color: var(--blue, #2c7af2);
}

/* —— 分类切换：浅底 + 下划线（对齐销售易/纷享式） —— */
.case-cat-bar {
  position: sticky;
  top: var(--nav-h, 64px);
  z-index: 35;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.case-cat-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
}

.case-cat-nav::-webkit-scrollbar {
  display: none;
}

.case-cat-nav button,
.case-cat-nav a {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s;
  text-decoration: none;
}

.case-cat-nav button:hover,
.case-cat-nav a:hover {
  color: var(--blue, #2c7af2);
}

.case-cat-nav button.is-active,
.case-cat-nav a.is-active {
  color: var(--blue, #2c7af2);
  background: rgba(44, 122, 242, 0.08);
  border-radius: 8px 8px 0 0;
}

.case-cat-nav button.is-active::after,
.case-cat-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 3px;
  background: var(--blue, #2563eb);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 0 1px rgba(44, 122, 242, 0.12);
}

.case-page {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(37, 99, 235, 0.05), transparent 70%),
    var(--bg-soft, #f5f7fb);
}

.case-story-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.case-story {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    opacity 0.28s ease,
    border-color 0.25s ease;
}

.case-story.is-hide,
.case-mix.is-hide {
  display: none;
}

.case-mix-list {
  gap: 1.15rem;
}

.case-mix .res-mix__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.case-story:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.14);
}

.case-story__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.case-story__cover--photo::before,
.case-story__cover--photo::after {
  display: none;
}

.case-story__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.case-story:hover .case-story__photo {
  transform: scale(1.04);
}

.case-story__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(155deg, var(--c1, #2563eb), var(--c2, #0f172a));
  z-index: -2;
}

.case-story__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.45;
  z-index: -1;
  transition: opacity 0.3s ease, transform 0.45s ease;
}

.case-story:hover .case-story__cover::after {
  opacity: 0.7;
  transform: scale(1.06);
}

.case-story__logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--c1, #2563eb);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.case-story:hover .case-story__logo {
  transform: translateY(-3px) scale(1.04);
}

.case-story__body {
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.case-story__body h3 {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
  color: #1f2937;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.case-story__tag {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  color: var(--tag-c, #2c7af2);
  background: color-mix(in srgb, var(--tag-c, #2c7af2) 14%, #ffffff);
}

.case-story__tag--blue { --tag-c: #2c7af2; }
.case-story__tag--teal { --tag-c: #0f766e; }
.case-story__tag--indigo { --tag-c: #4338ca; }
.case-story__tag--sky { --tag-c: #0284c7; }
.case-story__tag--amber { --tag-c: #b45309; }
.case-story__tag--orange { --tag-c: #c2410c; }
.case-story__tag--violet { --tag-c: #7c3aed; }
.case-story__tag--pink { --tag-c: #db2777; }
.case-story__tag--green { --tag-c: #15803d; }
.case-story__tag--rose { --tag-c: #e11d48; }

.case-story-grid .case-story:nth-child(1) { --d: 0.02s; }
.case-story-grid .case-story:nth-child(2) { --d: 0.06s; }
.case-story-grid .case-story:nth-child(3) { --d: 0.1s; }
.case-story-grid .case-story:nth-child(4) { --d: 0.14s; }
.case-story-grid .case-story:nth-child(5) { --d: 0.18s; }
.case-story-grid .case-story:nth-child(6) { --d: 0.22s; }
.case-story-grid .case-story:nth-child(7) { --d: 0.26s; }
.case-story-grid .case-story:nth-child(8) { --d: 0.3s; }
.case-story-grid .case-story:nth-child(9) { --d: 0.34s; }
.case-story-grid .case-story:nth-child(10) { --d: 0.38s; }
.case-story-grid .case-story:nth-child(11) { --d: 0.42s; }
.case-story-grid .case-story:nth-child(12) { --d: 0.46s; }

.case-story.reveal {
  transition-delay: var(--d, 0s);
}

.case-empty {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted, #64748b);
  font-size: 0.95rem;
}

.case-empty.is-show {
  display: block;
}

/* —— 文章详情（参考销售易文章页） —— */
.case-article-page {
  background: #fff;
  padding: 1.5rem 0 4rem;
  overflow-x: clip;
  overflow-x: hidden;
}

/* 外框与头部 .nav 同宽，右侧卡片对齐「免费预约诊断」；正文保持原位置与阅读宽度 */
.case-article-wrap {
  width: min(1280px, calc(100% - 2rem));
  max-width: 1280px;
  min-width: 0;
}

.case-article-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
}

.case-article-top .breadcrumb {
  margin-bottom: 0;
}

.case-article-pager {
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.case-article-pager a {
  color: var(--blue, #2c7af2);
}

.case-article-pager a:hover {
  text-decoration: underline;
}

.case-article-pager .is-disabled {
  color: #cbd5e1;
  cursor: default;
}

.case-article-layout {
  display: flex;
  align-items: start;
  gap: 2.5rem;
  margin-top: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.case-article-main {
  flex: 0 1 calc(1120px - 280px - 2.5rem);
  min-width: 0;
  max-width: calc(1120px - 280px - 2.5rem);
  /* 保持与原 1120 居中内容区相同的左缘 */
  margin-left: max(0px, calc((100% - 1120px) / 2));
  overflow-x: hidden;
}

.case-article-body,
.news-detail__body {
  min-width: 0;
  max-width: 100%;
}

.case-article-main h1,
.case-article-title {
  font-size: clamp(1.9rem, 3.8vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: #0b1220;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.case-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #eef2f7;
}

.case-article-lead {
  font-size: 1.06rem;
  line-height: 1.8;
  color: #475569;
  margin: 0 0 1.75rem;
}

/* 金句：彩色背景框 */
.case-article-body blockquote,
.case-article-body .case-quote,
.news-detail__body blockquote,
.news-detail__body .case-quote {
  margin: 1.65rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--blue-soft, #eaf2fe);
  border-left: 4px solid var(--blue, #2c7af2);
  border-radius: 0 12px 12px 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--blue-dark, #0d3a8a);
  quotes: none;
}

.case-article-body blockquote::before,
.case-article-body .case-quote::before,
.news-detail__body blockquote::before,
.news-detail__body .case-quote::before {
  content: none;
}

/* 正文短文穿插大图（非富文本容器时）；富文本见 .yice-editor-html */
.case-article-body:not(.yice-editor-html) img,
.news-detail__body:not(.yice-editor-html) img {
  max-width: 100% !important;
  width: 100%;
  height: auto !important;
  margin: 1.6rem auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.case-article-cover {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(145deg, var(--c1, #2563eb), var(--c2, #0f172a));
}

.case-article-cover--photo {
  background: #0f172a;
}

.case-article-cover__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-article-cover__logo {
  width: 5rem;
  height: 5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--c1, #2563eb);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
}

.case-article-body:not(.yice-editor-html) p {
  font-size: 1rem;
  line-height: 1.9;
  color: #334155;
  margin: 0 0 1.25rem;
  text-align: justify;
}

.case-article-body:not(.yice-editor-html) table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  table-layout: fixed;
  font-size: 0.92rem;
}

.case-article-body:not(.yice-editor-html) table th,
.case-article-body:not(.yice-editor-html) table td {
  border: 1px solid #d0d7de;
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  word-break: break-word;
  color: #334155;
  line-height: 1.7;
}

.case-article-body:not(.yice-editor-html) table th {
  background: #f5f7fa;
  font-weight: 700;
  text-align: center;
}

.case-article-body:not(.yice-editor-html) table tr:nth-child(even) td {
  background: #fafbfc;
}

.case-article-body video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
  background: #0f172a;
  border-radius: 8px;
}

.case-article-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eef2f7;
}

.case-article-tags__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.case-article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.case-article-tags__list span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

.case-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.case-article-nav__item {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.case-article-nav__item:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.case-article-nav__item--next {
  text-align: right;
}

.case-article-nav__item em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.case-article-nav__item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.45;
}

.case-article-nav__item.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.case-article-side {
  position: sticky;
  top: calc(var(--nav-h, 64px) + 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 0 0 280px;
  width: 280px;
  margin-left: auto;
}

.case-side-card {
  background: linear-gradient(165deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.35rem 1.25rem 1.4rem;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

.case-side-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.55rem;
  line-height: 1.4;
}

.case-side-card p {
  font-size: 0.86rem;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 1.1rem;
}

.case-side-card .btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 0.55rem;
}

.case-side-card .btn--primary {
  background: #fff;
  color: #1d4ed8;
  border-color: #fff;
}

.case-side-card .btn--primary:hover {
  background: #eff6ff;
}

.case-side-card .btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.case-side-card .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.case-side-card--soft {
  background: #f8fafc;
  color: inherit;
  box-shadow: none;
  border: 1px solid #e2e8f0;
}

.case-side-card--soft h4 {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: #1f2937;
}

.case-side-card--soft a,
.case-side-card--soft > span {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  padding: 0.45rem 0;
  border-bottom: 1px solid #eef2f7;
}

.case-side-card--soft a:last-child,
.case-side-card--soft > span:last-child {
  border-bottom: 0;
}

.case-side-card--soft a:hover {
  color: var(--blue, #2c7af2);
}

@media (max-width: 980px) {
  .case-article-layout {
    flex-direction: column;
  }

  .case-article-main {
    max-width: none;
    flex: 1 1 auto;
    margin-left: 0;
  }

  .case-article-side {
    position: static;
    flex: none;
    width: 100%;
    margin-left: 0;
    order: 2;
  }
}

@media (max-width: 1100px) {
  .case-story-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .case-article-page {
    padding: 1rem 0 3rem;
  }

  .case-article-wrap {
    width: 100%;
    max-width: 100%;
  }

  .case-article-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem 1rem;
  }

  .case-article-top .breadcrumb {
    font-size: 0.78rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .case-article-pager {
    width: 100%;
    justify-content: flex-end;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }

  .case-article-title {
    font-size: 1.35rem;
    line-height: 1.35;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .case-article-meta {
    font-size: 0.76rem;
    gap: 0.3rem 0.75rem;
  }

  .case-article-meta span,
  .case-article-meta time {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .case-article-nav__item strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .case-story-grid {
    grid-template-columns: 1fr;
  }

  .case-article-nav {
    grid-template-columns: 1fr;
  }

  .case-article-nav__item--next {
    text-align: left;
  }

  .case-article-cover {
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-story,
  .case-story__logo,
  .case-story__cover::after {
    transition: none;
  }

  .case-story:hover {
    transform: none;
  }
}
