/* Thumbnail carousel that replaces the Elementor photo galleries on blog posts. */
.cbp-car {
  --c-navy: #161B4D;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: "Geologica", sans-serif;
}
.cbp-car *, .cbp-car *::before, .cbp-car *::after { box-sizing: border-box; }

.cbp-car__stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #eef0f5;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}
.cbp-car__stage:focus-visible { box-shadow: 0 0 0 3px rgba(40, 50, 143, .45); }
.cbp-car__track { display: flex; will-change: transform; }
.cbp-car__track.is-animating { transition: transform .45s cubic-bezier(.22, .9, .3, 1); }
.cbp-car__slide {
  flex: 0 0 100%;
  height: clamp(280px, 58vw, 540px);
  overflow: hidden;
}
/* contain, not cover: the galleries mix portrait and landscape photos. */
.cbp-car .cbp-car__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}
.cbp-car__stage.is-dragging { cursor: grabbing; }
.cbp-car__stage { cursor: grab; }

.cbp-car .cbp-car__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  opacity: .8;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.cbp-car .cbp-car__nav:hover { opacity: 1; transform: translateY(-50%) scale(1.08); }
.cbp-car .cbp-car__nav[disabled] { opacity: .35; cursor: not-allowed; transform: translateY(-50%); }
.cbp-car .cbp-car__nav:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 2px; }
.cbp-car__nav svg { width: 22px; height: 22px; }
.cbp-car__nav--prev { left: 16px; }
.cbp-car__nav--next { right: 16px; }

.cbp-car__count {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.cbp-car__thumbs {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cbp-car__thumbs::-webkit-scrollbar { display: none; }
.cbp-car__strip { display: flex; gap: 2px; height: 80px; padding-bottom: 8px; width: max-content; }
.cbp-car .cbp-car__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 35px;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #e3e6ee;
  cursor: pointer;
  opacity: .75;
  transition: width .3s ease-out, margin .3s ease-out, opacity .2s;
}
.cbp-car .cbp-car__thumb:hover { opacity: 1; }
.cbp-car .cbp-car__thumb.is-active { width: 120px; margin: 0 2px; opacity: 1; }
.cbp-car .cbp-car__thumb:focus-visible { outline: 2px solid var(--c-navy); outline-offset: -2px; }
.cbp-car .cbp-car__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

@media (max-width: 767px) {
  .cbp-car__slide { height: clamp(260px, 92vw, 460px); }
  .cbp-car .cbp-car__nav { width: 36px; height: 36px; }
  .cbp-car__nav--prev { left: 10px; }
  .cbp-car__nav--next { right: 10px; }
  .cbp-car__strip { height: 64px; }
  .cbp-car .cbp-car__thumb.is-active { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .cbp-car__track.is-animating, .cbp-car .cbp-car__thumb { transition: none; }
}
