/* Make carousel full-width and responsive */
.carousel,
.carousel .carousel-inner,
.carousel .carousel-item {
  width: 100%;
}

.carousel-item img {
  display: block;
  width: 100%;
  max-height: 600px; /* optional max height */
  object-fit: fill; /* cover the area, cropping if needed */
  height: auto; /* keep natural aspect ratio */
}

/* Smaller round indicators (active filled, others border-only) */
.carousel-indicators {
  bottom: 12px;
  margin-bottom: 0;
  align-items: center; /* guard against odd vertical alignment */
}
.carousel-indicators li {
  width: 8px !important;     /* smaller than before */
  height: 8px !important;    /* smaller than before */
  border-radius: 50% !important;

  border: 2px solid #fff !important;
  background: transparent !important;

  padding: 0 !important;
  margin: 0 6px !important;
  line-height: 0 !important;

  opacity: 1 !important;

  /* neutralize global list/flex rules */
  flex: 0 0 auto !important;
  box-sizing: content-box !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
.carousel-indicators .active {
  background-color: #fff !important;
}

/* Ensure the carousel is a positioned container for absolute children */
.carousel {
  position: relative; /* important for centering controls inside */
}

/* Controls: vertically center and restrict clickable area to the round button */
.carousel-control-prev,
.carousel-control-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  bottom: auto !important;
  width: auto !important;    /* avoid full overlay click area */
  height: auto !important;
  opacity: 1 !important;
  display: block !important; /* avoid flex/inline side-effects */
  text-decoration: none !important;
  pointer-events: auto !important; /* ensure clickable even if parent tweaks pointer-events */
  z-index: 5; /* above images and indicators */
}

/* Horizontal anchoring near edges */
.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }

/* Custom round arrow buttons */
.carousel-round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.carousel-round-btn:hover {
  background-color: rgba(0, 0, 0, 0.75);
  transform: scale(1.04);
}

/* CSS-only arrows */
.carousel-round-btn .arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.carousel-round-btn.prev .arrow {
  border-right: 10px solid #fff;
  margin-left: 2px;
}
.carousel-round-btn.next .arrow {
  border-left: 10px solid #fff;
  margin-right: 2px;
}

/* Button offsets from edges */
.carousel-control-prev .carousel-round-btn { margin-left: 12px; }
.carousel-control-next .carousel-round-btn { margin-right: 12px; }

/* Optional: if a parent has overflow hidden/auto that clips buttons, nudge inward */
@media (min-width: 576px) {
  .carousel-control-prev { left: 4px; }
  .carousel-control-next { right: 4px; }
}

/* Accessibility focus */
.carousel-control-prev:focus .carousel-round-btn,
.carousel-control-next:focus .carousel-round-btn,
.carousel-control-prev .carousel-round-btn:focus,
.carousel-control-next .carousel-round-btn:focus {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}
