.gallery {
  display: flex;
  flex-wrap: wrap;
  margin:1em 0;
}

.gallery a {
  text-decoration:none;
}

.gallery .gallery__item {
  width: 300px; height: 300px; overflow: hidden;
  border: 10px solid #FFF;
  margin: 10px;
  box-shadow: 0 8px 6px -6px gray;
}


.gallery .gallery__item a { 
  overflow: hidden;
}

.gallery .gallery__item a img {
  display: block;
  width: 100%;
  height: 100%; 
  /*align-self: center;*/
  object-position: top center;
  object-fit: cover;
}

.lightbox {
  /** Hide the lightbox */
  width: 0;
  height: 0;
  overflow: hidden;

  /** Apply basic lightbox styling */
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  color:#333333;
  transition: width .5s ease-in-out, height .5s ease-in-out;
  background: rgba(0,0,0,.2);
}

/** Show lightbox when it is target */
.lightbox:target {
  width: 100%;
  height: 100%;
  transition: width .5s ease-in-out, height .5s ease-in-out;
}

.lightbox .box {
  width: -webkit-min-content;
  width: -moz-min-content;
  width: min-content;
  min-width:500px;
  margin: 2% auto;
  padding:10px 20px 10px 20px;
  background-color:#FFF;
  box-shadow: 0px 1px 26px -3px #777777; 
  position: relative;
  z-index: 2;
}

.lightbox .title {
  margin:0;
  padding:0 0 10px 0px;
  /*border-bottom:1px #ccc solid;*/
  font-size:22px;
}

.lightbox .content {
  display:block;
  position:relative;
}


.lightbox .content .desc {
  z-index:99;
  bottom:0;
  position:absolute;
  padding:10px;
  margin:0 0 4px 0;
  background:rgba(0,0,0,0.8);

  color:#fff;
  font-size:17px;
  opacity:0;
  text-align: left;
  transition: opacity ease-in-out 0.5s;
}	

.lightbox .content:hover .desc	{
  opacity:1;
}

.lightbox .next,
.lightbox .prev,
.lightbox .close {
  display:block;
  text-decoration:none;
  font-size:32px;
  font-weight: bold;
  color:#595959;
}

.close{
  font-size: 22px;
}
.prev {
  float:left;
}

.next, .close {
  float:right;
}

.clear {
  display:block;
  clear:both;
}

.close_out {
  display: block;
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
