ul {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.gallery-items { 
  font-size: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
 }

.gallery-item .thumbnail {
  padding: 35px;
  cursor: pointer;
  /* custom: */
  margin: 0;
  background: transparent;
  border-radius: 0;
  border: 0;
}

.gallery-item {
  -ms-flex: 1 1 365px;
  flex: 1 1 365px;
  min-height: 300px;
  display: inline-block;
  vertical-align: top;
  text-align: left;
  font-size: 25px;
  margin: 0;/*0 10px*/
  padding: 0; /*10px 0;*/
  -webkit-transition: height 500ms ease;
  -o-transition: height 500ms ease;
  transition: height 500ms ease;
  -ms-word-break: break-all;
      word-break: break-all;
      /* Non standard for webkit */
      word-break: break-word;
  -webkit-hyphens: auto;
     -moz-hyphens: auto;
          hyphens: auto; 
}

@media (min-width: 600px) {
  .gallery-item {
    /*width: 50%;*/
    min-height: 450px;
  }
}

@media (min-width: 768px) {
  .gallery-item {
    min-height: 385px;
  }
}

@media (min-width: 992px) {
  .gallery-item {
    /*width: 33.3333%;*/
    min-height: 385px;
  }
}

@media (min-width: 1170px) {
  .gallery-item {
    min-height: 445px;
  }
}

@media (min-width: 1200px) {
  .gallery-item {
    min-height: 385px;
  }
}

.gallery-expander {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  max-height: 0;
  -webkit-transition: max-height 500ms ease;
  -o-transition: max-height 500ms ease;
  transition: max-height 500ms ease;
}

.gallery-contents { 
  position: relative;
}

.gallery-contents:after {
  display: block;
  position: absolute;
  bottom: 0px;
  left: 50%;
  margin-left: -30px;
  width: 0;
  height: 0;
  content: '';
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom-style: solid;
  border-bottom-width: 0px;
  -webkit-transition: border-bottom-width 500ms ease;
  -o-transition: border-bottom-width 500ms ease;
  transition: border-bottom-width 500ms ease;
}

.gallery-item.active .gallery-contents:after { 
  border-bottom-width: 30px;
}

.gallery-contents:after { 
  border-bottom-color: #414042; 
}

.gallery-expander { 
  background: #F6F3ED;
  z-index: 2000; /* new */
}

.gallery-expander-contents {
  margin: 0 auto;
  width: auto;
  padding: 20px 35px;
}

.gallery-expander-contents div.close {
  position: absolute;
  top: 20px;
  right: 20px; 
}

@media (min-width: 992px) {
  .gallery-expander-contents div.close {
    top: 20px;
    right: 38px; 
  }
}

.gallery-trigger-close {
  font-weight: 400;
  border: 1px solid #000;
  padding: 5px 8px 5px 8px;
  line-height: 1;
  opacity: 1;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
  text-shadow: none;
}

.gallery-trigger-close:hover {
  border: 1px solid #FFF;
  background: #FFF;
  opacity: 1;
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
}