gallery {
  position: relative;
  display: block;
  margin: auto;
  overflow: hidden;
  user-select: none;
}

gallery img {
  display: none;
  width: 100%;
  height: auto;
}

gallery img.active {
  display: block;
}

gallery button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 20px;
  cursor: pointer;
  font-size: 25px;
  border-radius: 3px;
  z-index: 20;
}

gallery .prev {
  left: 10px;
}

gallery .next {
  right: 10px;
}

gallery .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  box-sizing: border-box;
  padding: 20px 10%;
  background: #000;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.25) 100%);
  color: #fff;
  font-size: 16px;
  text-align: center;
  z-index: 10;
  max-height: 25%;
  overflow-y: auto;
  word-wrap: break-word;
}
