.slideshow {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.slideshow figure {
  font-size: 0;
  margin: 0;
  background: #DDD;
  text-align: center;
  position: absolute;
  z-index: -1;
  width: 100%;
}
.slideshow figure.current {
  z-index: 1;
}

.hasMask .slideshow .showing {
  z-index: 2;
  -webkit-mask: url(../img/mask.png);
  -webkit-mask-size: 3000% 100%;
  -webkit-animation: mask-playzero 2s steps(29) infinite;
  mask: url(../img/mask.png);
  mask-size: 3000% 100%;
  animation: mask-playzero 2s steps(29) infinite;
}

.slideshow img {
  min-width: 100%;
  min-height: 100%;
  max-width: initial;
  max-height: 100%;
  width: initial;
  height: initial;
  position: absolute;
  left: 50%;
  top: 0;
}

.slideshow figcaption {
  max-width: 50%;
  color: #FFF;
  position: absolute;
  z-index: 2;
}

.slideshow figcaption p {
  background: #212722;
  font-size: 60px;
  line-height: 1;
  margin: 13px 0 0;
  padding: 10px 20px;
  font-family: "GarageGothic", sans-serif;
  text-transform: uppercase;
}

.slideshow figcaption p:first-child {
  margin-top: 0;
}

figcaption.top-left {
  top: 18%;
  left: 5%;
  text-align: left;
}

figcaption.top-right {
  top: 18%;
  right: 5%;
  text-align: right;
}

figcaption.bottom-left {
  bottom: 18%;
  left: 5%;
  text-align: left;
}

figcaption.bottom-right {
  top: 18%;
  right: 5%;
  text-align: right;
}

/* Pagination */
.pages {
  float: left;
  position: absolute;
  bottom: 20px;
  left: 50%;
}

.pages>div {
  float: left;
  position: relative;
  left: -50%;
  z-index: 3;
  opacity: 1;
  -webkit-transition: opacity 1s linear;
  -moz-transition: opacity 1s linear;
  -ms-transition: opacity 1s linear;
  -o-transition: opacity 1s linear;
  transition: opacity 1s linear;
}

.pages ul {
  list-style: none;
}

.pages li:first-child {
  margin-left: 0;
}

.pages li {
  float: left;
  margin-left: 10px;
  width: 16px;
  height: 16px;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  background: #CCC;
  cursor: pointer;
  -webkit-transition: background 2s linear;
  -moz-transition: background 2s linear;
  -ms-transition: background 2s linear;
  -o-transition: background 2s linear;
  transition: background 2s linear;
}

.pages li.current {
  background: #333;
}


/* Animation */
@-webkit-keyframes mask-playzero {
  from {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
  to {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
}

@keyframes mask-playzero {
  from {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
  to {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
}


/* Fall back */
html:not(.hasMask) .slideshow figure {
  opacity: 0;
  -webkit-transition: opacity 2s;
  -moz-transition: opacity 2s;
  -ms-transition: opacity 2s;
  -o-transition: opacity 2s;
  transition: opacity 2s;
}

html:not(.hasMask) .slideshow .showing, html:not(.hasMask) .slideshow .current {
  opacity: 1;
}

html:not(.hasMask) .slideshow .showing {
  z-index: 2;
}


/* Responsive */
@media all and (max-width: 1290px) {
  .slideshow figcaption p {
    font-size: 45px;
  }
}

@media all and (max-width: 980px) {
  .slideshow figcaption p {
    font-size: 40px;
  }
}

@media all and (max-width: 880px) {
  .slideshow figcaption p {
    font-size: 30px;
    letter-spacing: 1px;
  }
}

@media all and (max-width: 745px) {
  .slideshow figcaption p {
    font-size: 26px;
  }
}

@media all and (max-width: 666px) {
  .slideshow figcaption {
    max-width: 75%;
  }

  .slideshow figcaption p {
    font-size: 26px;
  }
}

@media all and (max-width: 566px) {
  .slideshow figcaption {
    bottom: 11%;
    left: 5%;
    text-align: left;
    max-width: 90%;
    top: initial;
    right: initial;
  }
}