.cases-page { background: #fff; }

.cases-hero {
  position: relative;
  height: 480px;
  color: #fff;
  background: #041b3e;
}

.cases-hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center;
}

.cases-hero-inner { position: relative; height: 480px; display: flex; align-items: center; }
.cases-hero-copy { width: 820px; margin-top: -4px; }
.cases-eyebrow { position: relative; margin: 0 0 30px; font-size: 20px; line-height: 1.5; }
.cases-eyebrow::after { content: ""; position: absolute; left: 0; bottom: -12px; width: 40px; height: 3px; background: #126bff; }
.cases-hero-copy h1 { margin: 0 0 24px; font-size: 48px; line-height: 1.5; letter-spacing: .02em; }
.cases-hero-copy > p:last-child { margin: 0; color: rgba(255,255,255,.82); font-size: 17px; line-height: 1.75; }

.customer-coverage {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -100px;
  height: 204px;
  padding: 48px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  color: var(--text);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,43,91,.1);
}

.customer-coverage article { display: flex; align-items: center; min-width: 0; gap: 15px; }
.customer-coverage img { width: 80px; height: 80px; flex: 0 0 auto; object-fit: contain; }
.coverage-icon { position: relative; width: 80px; height: 80px; flex: 0 0 auto; }
.coverage-icon img { position: absolute; inset: 0; }
.customer-coverage article > div { height: 108px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.customer-coverage h2 { width: 100%; margin: 0; font-size: 18px; line-height: 1.4; }
.customer-coverage p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.case-analysis { padding: 138px 0 64px; scroll-margin-top: 64px; background: #fafbfe; }
.cases-heading p { max-width: 920px; margin-inline: auto; }
.success-case-carousel { position: relative; margin-top: 40px; padding-bottom: 52px; }
.success-case-card { overflow: visible; border-radius: 16px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.08); will-change: transform, opacity; }

.case-summary { padding: 24px; display: grid; grid-template-columns: 450px minmax(0, 1fr); gap: 48px; align-items: center; border-radius: 16px 16px 0 0; transition: box-shadow .2s ease, background .2s ease; }
.case-building { position: relative; height: 338px; overflow: hidden; border-radius: 8px; background: #edf2f8; }
.case-building img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-building-vifa img { inset: auto; left: -.01%; top: -45.25%; width: 122.15%; height: 176.19%; max-width: none; }
.case-outcomes { min-width: 0; }
.case-brand-row { display: flex; align-items: center; gap: 16px; }
.case-logo-frame { position: relative; width: var(--logo-width); height: 96px; max-width: 100%; flex: 0 0 auto; overflow: hidden; }
.case-logo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.case-brand-row span { padding: 2px 10px; color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; font-size: 16px; line-height: 1.5; white-space: nowrap; }
.case-date { margin: 8px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.case-metrics { display: grid; grid-template-columns: repeat(4, 1fr); transition: box-shadow .2s ease, background .2s ease; border-radius: 10px; }
.case-metrics > div { min-width: 0; padding: 0 12px; text-align: center; }
.case-metrics strong { display: block; color: var(--blue); font-size: 36px; line-height: 1.8; }
.case-metrics span { display: block; color: var(--muted); font-size: 14px; line-height: 1.8; }

.case-details { margin: 0 24px; padding: 24px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid #eee; }
.case-detail { min-width: 0; padding: 0 6px; border-radius: 10px; }
.case-detail header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.case-detail header > span { width: 40px; height: 40px; flex: 0 0 40px; display: block; }
.case-detail header img { width: 40px; height: 40px; display: block; }
.case-detail h3 { margin: 0; color: var(--blue); font-size: 20px; line-height: 1.8; }
.case-detail p { margin: 0 0 16px; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.case-detail p > img { width: 16px; height: 16px; margin-top: 5px; flex: 0 0 auto; }
.case-detail p span { min-width: 0; }
.case-detail p strong { color: var(--muted); }
.case-carousel-arrow { position: absolute; z-index: 4; top: 193px; width: 64px; height: 64px; padding: 20px; display: grid; place-items: center; transform: translateY(-50%); border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.08); transition: transform .2s ease, box-shadow .2s ease; }
.case-carousel-arrow:hover { transform: translateY(calc(-50% - 2px)); box-shadow: 0 8px 18px rgba(0,0,0,.13); }
.case-carousel-arrow img { width: 24px; height: 24px; }
.case-carousel-arrow.prev { left: -32px; }
.case-carousel-arrow.next { right: -32px; }
.case-carousel-arrow.next img { transform: rotate(180deg); }
.case-carousel-dots { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.case-carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #d8d8d8; transition: width .2s ease, background .2s ease; }
.case-carousel-dots button.active { width: 12px; background: var(--blue); }

.recognition-section { padding: 64px 0; background: #fff; }
.recognition-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.recognition-grid article { min-width: 0; padding: 32px; border: 1px solid #e1e8f8; border-radius: 12px; box-shadow: 0 3px 12px rgba(20,43,91,.04); }
.recognition-image { width: 100%; height: 354px; overflow: hidden; background: #f1f3f6; }
.recognition-image img { width: 100%; height: 100%; object-fit: cover; }
.recognition-grid article:first-child .recognition-image img { object-position: center; }
.recognition-grid h3 { margin: 16px 0; color: var(--blue); text-align: center; font-size: 20px; line-height: 1.4; }
.recognition-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }

.cases-page .contact-section { padding-top: 64px; }

@media (max-width: 1200px) {
  .customer-coverage { height: auto; min-height: 204px; padding: 32px; gap: 22px; }
  .customer-coverage article { gap: 14px; }
  .customer-coverage article > div { height: auto; }
  .customer-coverage img { width: 68px; height: 68px; }
  .coverage-icon { width: 68px; height: 68px; }
  .case-summary { grid-template-columns: 40% minmax(0, 1fr); gap: 30px; }
  .case-logo-frame { max-width: 68%; }
  .case-carousel-arrow.prev { left: -18px; }
  .case-carousel-arrow.next { right: -18px; }
}

@media (max-width: 900px) {
  .case-analysis { scroll-margin-top: 60px; }
  .cases-hero { height: auto; padding-bottom: 24px; background: #fafbfe; }
  .cases-hero-background, .cases-hero-inner { height: 430px; }
  .cases-hero-background { object-position: 62% center; }
  .cases-hero-copy { width: 58%; }
  .cases-hero-copy h1 { font-size: 42px; }
  .cases-hero-copy > p:last-child br { display: none; }
  .customer-coverage { position: relative; left: auto; bottom: auto; margin-top: -42px; transform: none; grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .customer-coverage article { padding: 18px 0; }
  .customer-coverage article + article { border-top: 1px solid #edf1f7; }
  .case-analysis { padding-top: 64px; }
  .case-summary { grid-template-columns: 1fr; }
  .case-building { height: 380px; }
  .case-details { grid-template-columns: 1fr; }
  .case-detail { padding: 14px; }
  .case-carousel-arrow { top: 214px; width: 52px; height: 52px; padding: 14px; }
  .case-carousel-arrow.prev { left: -10px; }
  .case-carousel-arrow.next { right: -10px; }
  .recognition-image { height: 260px; }
}

@media (max-width: 600px) {
  .cases-hero-background, .cases-hero-inner { height: 410px; }
  .cases-hero-background { object-position: 68% center; }
  .cases-hero-background::after { content: ""; }
  .cases-hero-inner::before { content: ""; position: absolute; inset: 0 -16px; background: linear-gradient(90deg, rgba(2,18,43,.94) 0%, rgba(2,18,43,.62) 68%, rgba(2,18,43,.1) 100%); }
  .cases-hero-copy { position: relative; z-index: 1; width: 88%; }
  .cases-eyebrow { margin-bottom: 24px; font-size: 17px; }
  .cases-hero-copy h1 { margin-bottom: 20px; font-size: 36px; line-height: 1.42; }
  .cases-hero-copy > p:last-child { font-size: 14px; }
  .customer-coverage { padding: 18px 20px; }
  .customer-coverage img { width: 62px; height: 62px; }
  .coverage-icon { width: 62px; height: 62px; }
  .customer-coverage article > div { gap: 6px; }
  .customer-coverage h2 { font-size: 16px; }
  .customer-coverage p { font-size: 13px; line-height: 1.65; }
  .case-analysis, .recognition-section { padding: 48px 0; }
  .cases-heading p br { display: none; }
  .success-case-carousel { margin-top: 28px; }
  .case-summary { padding: 14px; gap: 22px; }
  .case-building { height: 250px; }
  .case-brand-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .case-logo-frame { max-width: 100%; }
  .case-brand-row span { font-size: 13px; }
  .case-metrics { grid-template-columns: repeat(2, 1fr); gap: 10px 0; }
  .case-metrics strong { font-size: 30px; }
  .case-metrics span { font-size: 12px; }
  .case-details { margin: 0 14px; padding: 14px 0; gap: 10px; }
  .case-detail h3 { font-size: 18px; }
  .case-detail p { font-size: 13px; }
  .case-carousel-arrow { top: 139px; width: 46px; height: 46px; padding: 12px; }
  .case-carousel-arrow.prev { left: -8px; }
  .case-carousel-arrow.next { right: -8px; }
  .recognition-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
  .recognition-grid article { padding: 16px; }
  .recognition-image { height: 220px; }
  .recognition-grid h3 { font-size: 18px; }
  .recognition-grid p { font-size: 13px; }
}
