/* Carousel component (see carousel.js). Slides stack and cross-fade; a slim control row sits under the viewport.
   .ctrl-btn is the site's standard small control (32 px round icon button, 44 px hit area) and is reused by other
   controls on the page, e.g. the research carousel's previous / next / pause buttons. */

/* Slides: without JS they simply stack; with JS they share one grid cell and cross-fade. */
.carousel__viewport { position: relative; }
.js .carousel--ready .carousel__viewport { display: grid; }
.js .carousel--ready .carousel__slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease, ease), visibility 0s .6s; }
.js .carousel--ready .carousel__slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease, ease); }

/* Control row */
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px 4px; }
.carousel__dots { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.carousel__dot { position: relative; width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 999px; transform: translate(-50%, -50%); background: color-mix(in srgb, var(--blue-950, #0b1f3a) 25%, transparent); transition: width .3s var(--ease, ease), background-color .3s; }
.carousel__dot:hover::after { background: color-mix(in srgb, var(--blue-950, #0b1f3a) 50%, transparent); }
.carousel__dot[aria-current="true"]::after { width: 22px; background: var(--green, var(--primary, #168550)); }
.carousel__dot:focus-visible { outline: 2px solid var(--focus, #4891ee); outline-offset: 0; border-radius: 999px; }

/* Standard small control */
.ctrl-btn { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border-strong, #c7d2e0); border-radius: 999px; background: var(--surface, #fff); color: var(--ink, #0b1f3a); cursor: pointer; box-shadow: 0 1px 2px rgb(7 30 58 / .08); transition: background-color .2s, border-color .2s, color .2s, transform .1s; }
.ctrl-btn::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; }   /* 44 px touch target */
.ctrl-btn svg { width: 16px; height: 16px; }
.ctrl-btn:hover { border-color: var(--primary, #1559b4); background: var(--primary-soft, #eaf2fd); color: var(--primary, #1559b4); }
.ctrl-btn:active { transform: scale(.94); }
.ctrl-btn:focus-visible { outline: 2px solid var(--focus, #4891ee); outline-offset: 2px; }
.ctrl-btn[aria-disabled="true"], .ctrl-btn:disabled { background: var(--disabled-bg, #f2f4f7); border-color: var(--disabled-border, #e2e7ee); color: var(--disabled-text, #9aa6b5); cursor: not-allowed; transform: none; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .js .carousel--ready .carousel__slide, .js .carousel--ready .carousel__slide.is-active, .carousel__dot::after, .ctrl-btn { transition: none; }
}

/* Counter: a compact "3 / 13" that stands in for the dots on phones (13 dots would be too small to tap). */
.carousel__counter { display: none; margin: 0; min-width: 4.5em; text-align: center; font-size: .9375rem; font-variant-numeric: tabular-nums; color: var(--muted, #5b6b80); }
.carousel__counter b { color: var(--ink, #0b1f3a); font-weight: 700; }
@media (max-width: 767px) {
  .carousel__controls { gap: 16px; padding: 10px 20px 2px; }
  .carousel__dots { display: none; }
  .carousel__counter { display: block; }
  /* Phones: every standard small control becomes a full 44px touch target. */
  .ctrl-btn { width: 44px; height: 44px; }
  .ctrl-btn svg { width: 18px; height: 18px; }
}
