.slider {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  height: 400px;
  background: black;
}

/* Slides */
.slides {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 1s ease;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Active slide */
.slide.active {
  opacity: 1;
   transform: translateX(0);
  z-index: 1;
}

/* Buttons */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Dots */
.dots {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 4px;
  display: inline-block;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: white;
}