section {
  -moz-column-width: 100%;
       column-width: 100%;
  -moz-column-gap: 5px;
       column-gap: 5px;
  padding: 5px;
}

.photo-gallery {
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 40px;
}

.photo-gallery img {
  width: 100%;
  cursor: pointer;
    transition: .2s;
}

.photo-gallery:has(img:hover) img:not(:hover) { /* fades non-hovered images */
  filter: grayscale(0.8);
}

.lightbox {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    display: none;
    background: #7f8c8d;
    perspective: 1000;
    z-index: 10;
}

.lightbox .filter {
  position: absolute;
  width: 100%;
  height: 100%;
  filter: blur(20px);
  opacity: 0.5;
  background-position: center;
  background-size: cover;
}

.lightbox img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateY(0deg);
  max-height: 95vh;
  max-width: calc(95vw - 100px);
  transition: 0.8s cubic-bezier(0.7, 0, 0.4, 1);
  transform-style: preserve-3d;
}


/*.lightbox:hover img{
  transform: translate(-50%, -50%) rotateY(180deg);
}*/

[class^="arrow"] {
  height: 200px;
  width: 50px;
  background-color: rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
    transition: background-color .2s;
}
[class^="arrow"]:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

[class^="arrow"]:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 15px;
  height: 15px;
}

.lightbox .arrowr {
  right: 0px;
}

.lightbox .arrowr:after {
  border-right: 2px solid white;
  border-bottom: 2px solid white;
}

.lightbox .arrowl {
  left: 0;
}

.lightbox .arrowl:after {
  border-left: 2px solid white;
  border-top: 2px solid white;
}

.lightbox .close {
  position: absolute;
  right: 0;
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  margin: 20px;
  cursor: pointer;
    transition: background-color .2s;
}

.close:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox .close:after,
.lightbox .close:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 80%;
  background: #fff;
}

.lightbox .close:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox .close:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox .title {
  font-size: 20px;
  color: #000;
  z-index: 1000;
  position: absolute;
  top: 0;
  left: 0;
}


/* Large screen properties */
@media only screen and (min-width : 540px) {	
    section {
      -moz-column-width: 240px;
           column-width: 240px;
      -moz-column-gap: 5px;
           column-gap: 5px;
      padding: 5px;
    }
}
