body { margin: 0; margin-top: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; display: flex; justify-content: center; align-items: center; background: #fff; }

.carousel {
  --carousel-width: 300px;
  --cccccccccarousel-height: 300px;
  --navdots-height: 10px;
  --active-index: 0;
  position: relative;  display: flex; flex-direction: column; width: var(--carousel-width); height: var(--carousel-height);
}
.carousel .slides {
  display: flex;
  padding: 0; margin: 0;
  overflow: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  list-style-type: none;
}
.carousel .slides img {
  width: var(--carousel-width);
  height: calc(var(--carousel-height) - var(--navdots-height));
  scroll-snap-align: start;
}
.carousel .nav-dots {
  display: flex;
  justify-content: space-around;
  height: var(--navdots-height);
  padding: 5px 0 0 0; margin: 0;
  list-style-type: none;
}
.carousel .nav-dots .dot a {
  position: relative;
  display: block;
  width: calc(var(--navdots-height) / 2);
  height: 50%;
}
.carousel .nav-dots .dot a::before {
  position: absolute;
  content: "";
  width: 100%;  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}
.carousel .nav-dots .dot a:hover::before {
  background: rgba(0, 0, 0, 0.4);
}
.carousel .nav-dots .dot a.active::before {
  background: rgba(0, 0, 0, 0.6);
}
.carousel .nav-arrows { margin: 0; list-style-type: none;
}
.carousel .nav-arrows li {
  position: absolute;
  bottom: calc(50%);
  width: 15px;
  height: 15px;
  border: 3px solid black;
  cursor: pointer;
}
.carousel .nav-arrows li.arrow-left {
  left: -15px;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
  transition: 1s cubic-bezier(0.2, 1, 0.3, 1);
}
.carousel .nav-arrows li.arrow-right {
  right: -15px;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
  transition: 1s cubic-bezier(0.2, 1, 0.3, 1);
}
.carousel .nav-arrows li.arrow-left::before {
  position: absolute;
  content: "";
  top: calc(-13%);
  left: calc(-15%);
  width: inherit;
  height: inherit;
  border: inherit;
}
.carousel .nav-arrows li.arrow-left:hover {
  border-left-color: deeppink;
  border-top-color: deeppink;
}
.carousel .nav-arrows li.arrow-left:hover::before {
  border-left-color: deeppink;
  border-top-color: deeppink;
  animation: fadeToLeft 2.5s cubic-bezier(0.2, 1, 0.3, 1) infinite;
}
.carousel .nav-arrows li.arrow-right::before {
  position: absolute;
  content: "";
  top: calc(-13%);
  left: calc(-15%);
  width: inherit;
  height: inherit;
  border: inherit;
}
.carousel .nav-arrows li.arrow-right:hover {
  border-right-color: deeppink;
  border-top-color: deeppink;
}
.carousel .nav-arrows li.arrow-right:hover::before {
  border-right-color: deeppink;
  border-top-color: deeppink;
  animation: fadeToRight 2.5s cubic-bezier(0.2, 1, 0.3, 1) infinite;
}

@keyframes fadeToLeft {
  5% { transform: translate(10%, 10%); }
  to { transform: translate(-100%, -100%); opacity: 0; }
}
@keyframes fadeToRight {
  5% { transform: translate(-10%, 10%); }
  to { transform: translate(100%, -100%); opacity: 0; }
}