.case-center-page {
  --case-container: 1720px;
  --case-gutter: clamp(48px, 6vw, 120px);
  --case-half-gutter: clamp(24px, 3vw, 60px);
}

.case-center-page main .container,
.case-center-page .site-footer .container {
  width: min(100% - var(--case-gutter), var(--case-container));
}

.case-center-page .stats-card.container {
  width: min(calc(100% - var(--case-gutter) - clamp(40px, 4vw, 140px)), 1560px);
}

.case-center-page .site-header {
  position: sticky;
  top: 0;
  z-index: 80;
}

.case-center-page .site-header .nav-shell {
  width: calc(100% - clamp(32px, 3.4vw, 56px));
  max-width: none;
  min-height: 82px;
  gap: clamp(24px, 3vw, 52px);
}

.case-center-page .brand img {
  width: 150px;
}

.case-center-page .primary-nav {
  gap: clamp(26px, 2.5vw, 46px);
  color: #27354a;
  font-size: 15px;
  font-weight: 500;
}

.case-center-page .round-action {
  width: 40px;
  height: 40px;
}

.cases-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, #f7fbff 0%, #f2f8ff 50%, rgba(235, 246, 255, 0.78) 100%),
    #f6fbff;
}

.cases-hero::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0), var(--background));
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(450px, 1.14fr);
  align-items: stretch;
  height: 420px;
}

@media (min-width: 901px) {
  .case-center-page main .hero-grid {
    width: calc(100% - max(var(--case-half-gutter), calc(50% - 860px)));
    max-width: none;
    margin-right: 0;
    margin-left: auto;
  }
}

.hero-copy {
  padding: 22px 0 66px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  color: #405777;
  font-size: 13px;
}

.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs span::before {
  margin-right: 8px;
  color: #91a4bd;
  content: "›";
}

.hero-kicker {
  margin: 0 0 8px;
  color: #102957;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
}

.cases-hero h1 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 39px;
  line-height: 1.18;
  font-weight: 800;
}

.cases-hero h1 span {
  color: var(--primary);
}

.hero-copy p {
  max-width: 470px;
  margin: 0;
  color: #3e506b;
  font-size: 16px;
  line-height: 1.75;
}

.hero-visual {
  position: relative;
  height: 420px;
  min-height: 0;
}

.hero-visual::before {
  position: absolute;
  inset: 0 auto 0 -1px;
  z-index: 1;
  width: 34%;
  background: linear-gradient(90deg, #f4f9ff 0%, rgba(244, 249, 255, 0.85) 46%, rgba(244, 249, 255, 0) 100%);
  content: "";
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 420px;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.stats-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: -38px auto 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 88px;
  padding: 18px 48px;
}

.stat-item p {
  flex: 0 0 auto;
  min-width: 92px;
  margin: 0;
  text-align: left;
}

.stat-item + .stat-item {
  border-left: 1px solid #e8f0fb;
}

.stat-item .icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  stroke-width: 1.6;
}

.stat-value {
  display: block;
  color: var(--primary);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
}

.stat-label {
  display: block;
  margin-top: 3px;
  color: #556985;
  font-size: 13px;
}

.cases-main {
  padding: 38px 0 32px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263c5f;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.tab-button .icon {
  width: 24px;
  height: 24px;
  color: #6480a4;
}

.tab-button .icon-img {
  filter: brightness(0) saturate(100%) invert(49%) sepia(15%) saturate(913%) hue-rotate(176deg) brightness(92%) contrast(89%);
}

.tab-button:hover,
.tab-button.is-active {
  background: linear-gradient(135deg, #3c96ff, #2176eb);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 128, 237, 0.2);
}

.tab-button:hover .icon,
.tab-button.is-active .icon {
  color: #fff;
}

.tab-button:hover .icon-img,
.tab-button.is-active .icon-img {
  filter: brightness(0) invert(1);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

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

.case-media {
  position: relative;
  aspect-ratio: 1.74 / 1;
  overflow: hidden;
}

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-badge {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.case-badge.green {
  background: #1ba96b;
}

.case-badge.blue {
  background: #4a93ff;
}

.case-badge.orange {
  background: #f27d35;
}

.case-badge.teal {
  background: #05a98a;
}

.case-badge.sky {
  background: #2e9ee9;
}

.case-badge.cyan {
  background: #259fcb;
}

.case-badge.violet {
  background: #5476db;
}

.case-badge.emerald {
  background: #16a169;
}

.case-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 16px 16px;
}

.case-card h2 {
  margin: 0 0 8px;
  color: #1a2c48;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.case-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: #65748a;
  font-size: 12px;
  line-height: 1.65;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: auto 0 0;
  overflow: hidden;
  border: 1px solid #e5effb;
  border-radius: 9px;
  background: #f7fbff;
}

.case-metrics div {
  min-width: 0;
  padding: 12px 13px 11px;
}

.case-metrics div + div {
  border-left: 1px solid #e5effb;
}

.case-metrics dt {
  color: #73849a;
  font-size: 12px;
  line-height: 1.45;
}

.case-metrics dd {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
}

.case-metrics .metric-text-only {
  grid-column: 1 / -1;
}

.detail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-top: 1px solid #edf3fb;
  background: #fbfdff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease;
}

.detail-link:hover {
  background: #f1f7ff;
  color: #176dd2;
}

.detail-link .icon {
  width: 15px;
  height: 15px;
}

.more-actions {
  display: flex;
  justify-content: center;
  margin: 22px 0 28px;
}

.testimonials {
  position: relative;
  padding-top: 2px;
}

.testimonial-shell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
}

.slider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe8f7;
  border-radius: 50%;
  background: #fff;
  color: #294467;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.slider-button:focus-visible {
  outline: 3px solid rgb(47 128 237 / 28%);
  outline-offset: 3px;
}

.slider-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.slider-button .icon {
  width: 18px;
  height: 18px;
}

.testimonial-list {
  --testimonial-gap: 18px;
  display: flex;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--testimonial-gap) * 2)) / 3);
  min-height: 148px;
  padding: 22px 22px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 300ms ease;
  will-change: transform;
}

.testimonial-list.is-moving-next .testimonial-card,
.testimonial-list.is-preparing-prev .testimonial-card {
  transform: translateX(calc(-100% - var(--testimonial-gap)));
}

.testimonial-list.is-preparing-prev .testimonial-card,
.testimonial-list.is-resetting .testimonial-card {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    transition: none;
  }
}

.quote-mark {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  color: #d7e9ff;
}

.quote-mark.icon-img {
  filter: brightness(0) saturate(100%) invert(91%) sepia(11%) saturate(1715%) hue-rotate(180deg) brightness(101%) contrast(104%);
}

.testimonial-card p {
  min-height: 52px;
  margin: 0 0 18px;
  color: #334761;
  font-size: 13px;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.testimonial-author strong {
  display: block;
  color: #1c3760;
  font-size: 13px;
}

.testimonial-author span {
  display: block;
  color: #7a899d;
  font-size: 11px;
}

.stars {
  margin-left: auto;
  color: var(--gold);
  font-size: 13px;
  white-space: nowrap;
}

.cta-panel {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 186px;
  margin: 38px auto 0;
  padding: 38px 56px;
  border-radius: 10px;
  background: #eaf6ff;
  overflow: hidden;
  isolation: isolate;
}

.cta-panel::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(231, 245, 255, 0.98) 0%,
    rgba(231, 245, 255, 0.95) 34%,
    rgba(231, 245, 255, 0.72) 46%,
    rgba(231, 245, 255, 0.12) 62%,
    rgba(231, 245, 255, 0) 100%
  );
  content: "";
}

.cta-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.cta-copy h2 {
  margin: 0 0 29px;
  color: var(--primary);
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
}

.cta-copy p {
  margin: 0 0 22px;
  color: #556a86;
  font-size: 15px;
}

.cta-actions {
  display: flex;
  gap: 14px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 28px;
  border: 1px solid #d0e0f4;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #33516f;
  font-size: 14px;
  font-weight: 700;
}

.cta-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-visual::before,
.cta-visual::after {
  display: none;
}

.cta-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  }

  .stat-item {
    padding-right: 28px;
    padding-left: 28px;
  }

  .category-tabs {
    gap: 12px;
  }

  .case-grid {
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-visual {
    order: -1;
    height: 240px;
    min-height: 0;
    margin-top: 18px;
  }

  .hero-visual::before {
    display: none;
  }

  .hero-visual img {
    height: 240px;
    min-height: 0;
    border-radius: var(--radius);
  }

  .hero-copy {
    padding: 18px 0 54px;
  }

  .stats-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #e8f0fb;
  }

  .stat-item:nth-child(4) {
    border-top: 1px solid #e8f0fb;
  }

  .category-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-shell {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .slider-button {
    display: inline-flex;
  }

  .testimonial-card {
    flex-basis: 100%;
  }

  .testimonial-card p {
    min-height: auto;
  }

  .cta-panel {
    min-height: 170px;
    padding: 30px 36px;
  }

  .cta-visual {
    min-height: 0;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .case-center-page .site-header .nav-shell {
    flex-wrap: nowrap;
    gap: 22px;
    min-height: 70px;
    padding: 0;
  }

  .case-center-page .brand img {
    width: 118px;
  }

  .case-center-page .primary-nav {
    order: initial;
    justify-content: center;
    width: auto;
    gap: 24px;
    overflow: visible;
    font-size: 15px;
  }

  .case-center-page .round-action {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .case-center-page {
    --case-gutter: 28px;
  }

  .case-center-page .site-header .nav-shell {
    min-height: 70px;
  }

  .case-center-page .brand img {
    width: 118px;
  }

  .case-center-page .primary-nav {
    gap: 18px;
    overflow-x: auto;
    font-size: 15px;
    scrollbar-width: none;
  }

  .case-center-page .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .case-center-page .stats-card.container {
    width: min(100% - var(--case-gutter), var(--case-container));
  }

  .hero-copy {
    padding-bottom: 46px;
  }

  .breadcrumbs {
    margin-bottom: 18px;
  }

  .hero-kicker {
    font-size: 20px;
  }

  .cases-hero h1 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .stats-card {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .stat-item,
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    min-height: 74px;
    padding: 14px 22px;
    border-left: 0;
    border-top: 1px solid #e8f0fb;
  }

  .stat-item:first-child {
    border-top: 0;
  }

  .cases-main {
    padding-top: 30px;
  }

  .category-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tab-button {
    justify-content: flex-start;
    padding: 0 14px;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .case-card p {
    min-height: auto;
  }

  .case-metrics dd {
    font-size: 18px;
  }

  .more-actions {
    margin-bottom: 22px;
  }

  .cta-panel {
    min-height: 188px;
    margin-top: 24px;
    padding: 28px 22px;
  }

  .cta-copy h2 {
    max-width: 260px;
    font-size: 24px;
  }

  .cta-actions {
    flex-direction: row;
    align-items: center;
  }

  .cta-visual img {
    object-position: 64% center;
  }
}
