/* Root: hide until JS initialises to avoid flash of big images */
.stumpcarousel {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  margin: 2rem 0;
  padding-bottom: 1.75rem; /* extra room so dots aren't clipped */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stumpcarousel.is-ready {
  opacity: 1;
}

/* Track */


/* Items */
.stumpcarousel-item {
  position: relative;
  box-sizing: border-box;
  padding: 0 0.5rem;     /* doubled gap between images */
}

.stumpcarousel-item a {
  display: block;
  text-decoration: none;
}

/* Images: fixed height, cropped, rounded corners */
.stumpcarousel-item img {
  display: block;
  width: 100%;
  height: 331px;
  object-fit: cover;
  border-radius: 5px;
}

/* Alt-text label overlay */
.stumpcarousel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  max-width: 80%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.stumpcarousel-item:hover .stumpcarousel-label,
.stumpcarousel-item:focus-within .stumpcarousel-label {
  opacity: 1;
}

/* Dots */
.stumpcarousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-bottom: 0.5rem;
  padding-top: .75rem;
}

.stumpcarousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.stumpcarousel-dot.is-active, .stumpcarousel-dot:hover{
  background: #20835c;
  transform: scale(1.15);
}

.stumpcarousel-track {
  display: flex;
  will-change: transform;
  cursor: grab;
  transition: transform 0.9s ease-in-out;
}

.stumpcarousel.is-dragging .stumpcarousel-track {
  cursor: grabbing;
}



.stumpcarousel img {
  -webkit-user-drag: none;
  user-select: none;
}

.stumpcarousel-arrow {
  position: absolute;
  top: auto;
  bottom: 0.6rem;              /* roughly level with dots */
  transform: translateY(0);    /* no vertical centering */
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;             /* similar to dot size */
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: all .5s ease-in;
}

/* Left/right positions */
.stumpcarousel-arrow--prev {
  left: 5px;
}

.stumpcarousel-arrow--next {
  right: 5px;
}

.stumpcarousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
  transition: all .2s ease-in;
}

/* Optional side-mode arrows: data-arrows="side" */
.stumpcarousel[data-arrows="side"] .stumpcarousel-arrow {
  top: calc(50% - 0.75rem);    /* nudged up a bit from exact centre */
  bottom: auto;
  transform: translateY(-50%); /* centre around that top line */
  width: 20px;
  height: 40px;
  font-size: 20px;
  border-radius: 999px;
}

/* positions stay the same in side mode */
.stumpcarousel[data-arrows="side"] .stumpcarousel-arrow--prev {
  left: 20px;
}

.stumpcarousel[data-arrows="side"] .stumpcarousel-arrow--next {
  right: 20px;
}



