/*
 * Industry pages: "Review cards over case boxes" row (template-parts/ex2-casecards.php, inc/experts-v2-casecards.php).
 * Mock: artifact 3d3e7CDaCWNkjPMopQgTe5 (navy variant). Portrait case-study box image, frosted white review panel,
 * 4-up scroll-snap row with peeking edges (about 1.4 cards on phones). Loaded only on pages that show the row.
 * No fades, nothing hidden by default, fixed card aspect ratio (no layout shift).
 */

.ex2-rc {
  container-type: inline-size;
  --rc-inner: calc(100cqw - 32px);
  --rc-gap: 20px;
  --rc-per: 4.35;
}

@media (min-width: 576px) { .ex2-rc { --rc-inner: 510px; } }
@media (min-width: 768px) { .ex2-rc { --rc-inner: 690px; --rc-per: 2.6; } }
@media (min-width: 992px) { .ex2-rc { --rc-inner: 930px; --rc-per: 3.4; } }
@media (min-width: 1200px) { .ex2-rc { --rc-inner: 1170px; --rc-per: 4.35; } }

.ex2-rc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* centred over the full-bleed rail (alignment rule, Mike 2026-09-28) */
  text-align: center;
  flex-direction: column; /* stacked heading + intro (Mike 2026-09-27: no 2-column heading) */
  gap: 16px 40px;
  margin-bottom: 32px;
}

.ex2 .ex2-rc__h2 {
  max-width: 24ch;
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

.ex2-rc__hl {
  color: var(--gold);
}

.ex2 .ex2-rc__lede {
  max-width: 44ch;
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

/* full-bleed scroller; first card lines up with the container's content edge */
.ex2-rc__view {
  position: relative;
  margin-inline: calc(50% - 50cqw);
}

.ex2-rc__track {
  --rc-edge: max(16px, calc((100cqw - var(--rc-inner)) / 2));
  display: grid;
  grid-auto-columns: calc((var(--rc-inner) - 3 * var(--rc-gap)) / var(--rc-per));
  grid-auto-flow: column;
  gap: var(--rc-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 6px var(--rc-edge) 14px;
  scroll-padding-inline: var(--rc-edge);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ex2-rc__track::-webkit-scrollbar {
  display: none;
}

.ex2-rc__track:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.ex2-rc__card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1160 / 1400;
  border-radius: 18px;
  background: var(--navy-light);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  color: var(--ss-ink);
  text-decoration: none;
  scroll-snap-align: start;
}

.ex2-rc__card:hover,
.ex2-rc__card:focus {
  color: var(--ss-ink);
  text-decoration: none;
}

.ex2-rc__card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.ex2-rc .ex2-rc__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease-out;
}

.ex2-rc__card:hover .ex2-rc__bg {
  transform: scale(1.03);
}

.ex2-rc .ex2-rc__logo {
  position: absolute;
  top: 16px;
  left: 16px;
  width: auto;
  max-width: 55%;
  height: auto;
  max-height: 40px;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .45));
}

.ex2-rc__wm {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: 70%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

.ex2-rc__panel {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  gap: 9px;
  padding: 13px 14px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.ex2-rc__quote {
  display: block;
  color: var(--ss-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.42;
}

.ex2-rc__by {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ss-ink-2);
  font-size: 12.5px;
  line-height: 1.25;
}

.ex2-rc__by b {
  color: var(--ss-ink);
  font-weight: 700;
}

.ex2-rc .ex2-rc__ic {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 50%;
  background: #fff;
}

/* arrows on the view's (= viewport's) edges, vertically centred on the cards, shown on hover / focus (the homepage rail) */
.ex2-rc__ctl {
  position: absolute;
  inset: 6px 16px 14px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.ex2-rc__ctl .ex2-rc__arr {
  width: 48px;
  height: 48px;
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  opacity: 0;
  transition: opacity .15s, border-color .15s;
}

.ex2-rc__view:hover .ex2-rc__arr,
.ex2-rc__view:focus-within .ex2-rc__arr {
  opacity: 1;
}

.ex2-rc__ctl .ex2-rc__arr:disabled {
  opacity: 0;
  pointer-events: none;
}

@media (hover: none) {
  .ex2-rc__ctl {
    display: none;
  }
}

.ex2-rc__arr {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--card-line-strong);
  border-radius: 50%;
  background: var(--card);
  color: #fff;
  cursor: pointer;
}

.ex2-rc__arr:hover:not(:disabled) {
  border-color: var(--gold);
}

.ex2-rc__arr:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.ex2-rc--fits .ex2-rc__ctl {
  visibility: hidden;
}

.ex2-rc__arr:disabled {
  opacity: .4;
  cursor: default;
}

@container (max-width: 759px) {
  .ex2-rc__track {
    --rc-edge: 16px;
    grid-auto-columns: 72%;
    gap: 12px;
  }

  .ex2-rc__ctl {
    display: none;
  }

  .ex2 .ex2-rc__lede {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .ex2-rc__head {
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ex2-rc .ex2-rc__bg {
    transition: none;
  }

  .ex2-rc__card:hover .ex2-rc__bg {
    transform: none;
  }
}

/* Standalone use (services v2 templates: outside the industry page's .ex2 wrapper, which normally supplies these
   tokens, the eyebrow pill and the heading type). Markup: ss_cc_service_block() adds .ex2-rc--standalone. */
.ex2-rc--standalone {
  --gold: var(--ss-gold);
  --text-2: var(--ss-mist);
  --card: var(--ss-navy);
  --card-line-strong: rgba(255, 255, 255, .14);
  --navy-light: var(--ss-navy);
  padding: 88px 0;
  background: var(--ss-navy-deep);
  color: var(--ss-snow);
  font-family: "Proxima Nova", sans-serif;
  line-height: 1.55;
}

/* on the services v2 pages the row sits between .sv2-w (1312px, 64px gutters) bands: same content edge, and no second
   band padding under a dark .sv2-sec of the same navy (was 104 + 88 = 192px of empty navy; Matt 2026-09-28) */
.sv2-dark + .ex2-rc--standalone,
.sv2-sec.sv2-dark + .ex2-rc--standalone {
  padding-top: 0;
}

@media (min-width: 1200px) {
  .ex2-rc--standalone {
    --rc-inner: min(1184px, calc(100cqw - 128px));
  }

  .ex2-rc--standalone > .container {
    max-width: 1312px;
    padding-inline: 64px;
  }
}

.ex2-rc--standalone .ex2-rc__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(var(--ss-gold-rgb),.25);
  border-radius: 999px;
  background: rgba(var(--ss-gold-rgb),.10);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ex2-rc--standalone .ex2-rc__h2 {
  max-width: 24ch;
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.12;
  text-align: center;
  text-wrap: balance;
}

.ex2-rc--standalone .ex2-rc__lede {
  max-width: 44ch;
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

@media (max-width: 980px) {
  .ex2-rc--standalone {
    padding: 64px 0;
  }

  .ex2-rc--standalone .ex2-rc__h2 {
    font-size: 28px;
  }
}
