.wrapper {
  /*margin: 2em auto;
  max-width: 970px;*/
}

img {
  vertical-align: middle;
  max-width: 100%;
}

.masonry {
  display: flex;
}

.masonry--h {
  flex-flow: row wrap;
}

.masonry--v {
  flex-flow: column wrap;
  max-height: 1080px;
}

.masonry--h,
.masonry--v {
  margin-left: -8px;
  /* Adjustment for the gutter */
}

.masonry-brick {
  overflow: hidden;
  border-radius: 0px; /* Image Border Settings*/
  margin: 0 0 0px 0px; /* Some Gutter */
  background-color: #333;
  color: white;
  position: relative;
}

.masonry-brick:after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: font-size 0.25s, opacity 0.25s ease-in-out;
  font-weight: 700;
  opacity: 0;
  font-size: 1.25em;
}

.masonry-brick[data-caption]:after {
  content: attr(data-caption);
}

.masonry-brick:hover:after {
  font-size: 2.25em;
  opacity: 1;
}

.masonry-brick--h {
  /*flex: auto;*/
  flex: 0 0 32%;
    margin: 4px;
  height: 250px;
  min-width: 150px;
}

@media only screen and (min-width: 1024px) {
  /* Horizontal masonry bricks on desktop-sized screen */
  .masonry-brick--h:nth-child(4n + 1) {
    /*width: 250px;*/
  }
  .masonry-brick--h:nth-child(4n + 2) {
    /*width: 325px;*/
  }
  .masonry-brick--h:nth-child(4n + 3) {
    /*width: 180px;*/
  }
  .masonry-brick--h:nth-child(4n + 4) {
   /* width: 380px;*/
  }

  /* Adjusting vertical masonry height on desktop-sized screen */
  .masonry--v {
    max-height: 1600px;
  }

  /* Vertical masonry bricks on desktop-sized screen */
  .masonry-brick--v {
    width: 33.33333%;
  }
}
@media (max-width: 600px) {
  .masonry-brick--h {
    /* flex: auto; */
    flex: 0 0 100%;
    margin: 4px;
    height: 250px;
    min-width: 150px;
}
}
@media only screen and (max-width: 1023px) and (min-width: 768px) {
  /* Horizontal masonry bricks on tabled-sized screen */
  .masonry-brick--h:nth-child(4n + 1) {
    width: 200px;
  }
  .masonry-brick--h:nth-child(4n + 2) {
    width: 250px;
  }
  .masonry-brick--h:nth-child(4n + 3) {
    width: 120px;
  }
  .masonry-brick--h:nth-child(4n + 4) {
    width: 280px;
  }


  /* Adjusting vertical masonry height on tablet-sized screen */
  .masonry--v {
    max-height: 2000px;
  }

  /* Vertical masonry bricks on tablet-sized screen */
  .masonry-brick--v {
    width: 50%;
  }
}

.masonry-img {
  object-fit: cover;
  width: 100%;
  height: 250px;
}

.masonry-brick[data-caption]:hover .masonry-img {
  filter: brightness(50%);
}

.cursor {
  cursor: pointer;
}


.row > .column {
  padding: 0 8px;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

.column {
  float: left;
  width: 25%;
}

/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,.6);
}

/* Modal Content */
.modal-content {
  position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    top: 120px;
    width: 73%;
    max-width: 1200px;
}

/* The Close Button */

.close:hover,
.close:focus {
  color: #999;
  text-decoration: none;
  cursor: pointer;
}

.mySlides {
  display: none;
}

.cursor {
  cursor: pointer;
}

/* Next & previous buttons */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  height: 30px;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}
.prev {
    left: 0%;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

img {
  margin-bottom: -4px;
}

.caption-container {
  background-color: black;
  padding: 2px 16px;
  color: white;
}

.demo {
  opacity: 0.6;
}

.active,
.demo:hover {
  opacity: 1;
}

img.hover-shadow {
  transition: 0.3s;
}

.hover-shadow:hover {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.captionStyle {
  position: relative;
  display: inline;
  font-size: 2.11765em;
  line-height: 2;
  padding: 0 10px;
  background-color: #d8232f;
  color: #fff;
  -webkit-box-decoration-break: clone;
  -o-box-decoration-break: clone;
}
.top-left {
  position: fixed;
  top: 8px;
  left: 0;
}

.close {
  position: absolute;
  top: 8px;
  right: 16px;
  color: white;
  font-size: 35px;
  font-weight: bold;
}
figcaption {
  display: none;
}
figcaption :hover {
  display: block;
}