/* ==========================================================================
   Cudd Well Control — Image Carousel styles
   Shows multiple slides at once (3 desktop / 2 tablet / 1 mobile) —
   itemsPerPage breakpoints are set in carousel.js, keep them in sync
   with the widths implied below if you change either.
   ========================================================================== */

.carousel-wrap {
  position: relative;
  margin: 2em 0;
  outline: none;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.35s ease;
}

.carousel-track.dragging {
  transition: none;
  cursor: grabbing;
}

.carousel-slide {
  position: relative;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75em 1em;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: 0.9rem;
}

/* Arrows overlap the viewport edges, like a half-circle button floating
   over the images. */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  color: #333;
  cursor: pointer;
  padding: 0;
}

.carousel-arrow:hover {
  background: #f3f2ef;
}

.carousel-arrow.prev {
  left: -22px;
}

.carousel-arrow.next {
  right: -22px;
}

@media (max-width: 640px) {
  /* keep arrows on-screen once slides go edge-to-edge on mobile */
  .carousel-arrow.prev { left: 8px; }
  .carousel-arrow.next { right: 8px; }
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin-top: 0.9em;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  padding: 0;
  cursor: pointer;
}

.carousel-dot.active {
  background: #333;
}
