.photoSlides {display: none}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0); /* Fallback */
  background-color: rgba(0,0,0,0.8);
  /*overflow: hidden;*/
  page-break-inside: avoid;
}

.modal-content {
  position: relative;
  margin: auto;
  width: 80%;
  height: 80%;
  top: 10%;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /*overflow: auto;*/
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: auto;
}

.modal-content p, h3 {
  position: relative;
  color: #fff;
  padding: 0 10%;
  line-height: 1.1em;
}

.modal-content span {
  color: #fff;
}

.close {
  position: fixed;
  right: 10%;
  top: 0;
  font-family: sans-serif;
  color: #f1f1f1;
  font-size: 4em;
  line-height: 0.5em;
  font-weight: bold;
  padding: 0.25em;
  transition: 0.6s ease;
}

.close:hover, .close:focus {
  color: #bfbfbf;
  text-decoration: none;
  cursor: pointer;
}

.prev, .next {
  position: fixed;
  top: calc(50% - 0.8em);
  width: auto;
  padding: 0.25em;
  margin-top: auto;
  color: #f1f1f1;
  font-weight: bold;
  font-size: 3em;
  transition: 0.6s ease;
  border: none;
  outline: none;
  user-select: none;
  background: none;
}

.next {
  right: 10%;
}

.prev:hover, .next:hover {
  color: #bfbfbf;
  cursor: pointer;
}

.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@media screen and (max-width: 900px) {
  .next {
    right: 0;
  }

  .close {
    right: 0;
    z-index: 1;
  }

  .modal-content {
    width: 100%;
    height: 95%;
    margin: 0;
    border: 0;
    padding: 0;
    top: 2.5%;
  }

  .modal-content p {
    position: absolute;
    padding: 10%;
    top: 0;
  }
}
