/* ═══════════════════════════════════════════════════════════════════════════
   Custom Carousel — multi-instance, configurable visible slides
   ═══════════════════════════════════════════════════════════════════════════ */

/* Outer wrapper — flex column so stage + dots stack with a gap */
.cs-wrap {
  position: relative;
  width: 100%;
  user-select: none;
  padding: 0 var(--pad-x);
  box-sizing: border-box;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Stage — position:relative so prev/next buttons centre against the track */
.cs-stage {
  position: relative;
  width: 100%;
}

.cs-track-outer {
  overflow: hidden;
}

.cs-track {
  display: flex;
  will-change: transform;
}

/* --cs-visible is set on .cs-wrap by the JS (read from data-visible) */
.cs-slide {
  flex: 0 0 calc(100% / var(--cs-visible, 3));
  min-width: 0;
  padding-right: clamp(5px, 1vw, calc(var(--pad-x) / 3));
  padding-left: clamp(5px, 1vw, calc(var(--pad-x) / 3));
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cs-slide-inner {
  border-radius: 1.25rem;
  overflow: hidden;
  max-height: calc(100vh - var(--header-h) * 1.5);
}

.cs-slide-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-slide-inner video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Prev / next — absolute inside .cs-stage, centred on the track height */
.cs-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-blue-dark);
  border: 1px solid var(--color-white-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream);
  font-size: 0.875rem;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
  padding: 0;
}

.cs-btn:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

/* Buttons sit at ±1.25rem (half their width) outside the track,
   inside the cs-wrap padding area — always visible, never clipped */
.cs-btn.prev { left:  -1.25rem; }
.cs-btn.next { right: -1.25rem; }

/* Dot navigation */
.cs-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.cs-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(217, 217, 217, 0.7);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.cs-dot.active {
  background: var(--color-gold);
  transform: scale(1.25);
}

/* ── Generic child sizing ────────────────────────────────────────────────── */
/* Any direct child of a slide fills its slot horizontally.
   Heights, aspect-ratios and other project-specific styles
   belong in the project's own stylesheet, not here.          */
.cs-slide > * {
  width: 100%;
  flex-shrink: 1;
}
