
.gallery-items { font-size: 0; }

.gallery-item {
  display: inline-block;
  vertical-align: top;
  -webkit-transition: height 500ms ease;
  -o-transition: height 500ms ease;
  transition: height 500ms ease;
}

.gallery-expander {
  position: relative;
  left: -85px;
  right: 0;
  overflow: hidden;
  max-height: 0;
  z-index: 1000;
  -webkit-transition: max-height 500ms ease;
  -o-transition: max-height 500ms ease;
  transition: max-height 500ms ease;
  width: 300px;
}

.gallery-contents { position: relative; cursor: pointer; }

.gallery-expander-contents hr {
    margin: 0;
}

.gallery-expander-contents h3 {
    font-weight:600;
}

.gallery-contents:after {
  display: block;
  position: absolute;
  bottom: -40px;
  left: 50%;
  margin-left: -15px;
  width: 0;
  height: 0;
  content: '';
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid transparent;
  -webkit-transition: border-bottom-width 500ms ease;
  -o-transition: border-bottom-width 500ms ease;
  transition: border-bottom-width 500ms ease;
  opacity: 0;
}

.gallery-item.active .gallery-contents:after { border-bottom-width: 15px; opacity: 1;}

ul.gallery-items {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.gallery-item {
  text-align: left;
  font-size: 25px;
  margin: 0 10px;
  padding: 10px 0;
  width: 12%
}

.gallery-item .thumbnail {
  position: relative;
  /*width: 300px;*/
  height: auto;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item .thumbnail > img {
  position: relative;
  max-width: 100%;
}

.gallery-item .title {
  text-align: center;
  padding-bottom: 20px;
  background: #FFF;
  background-image: none;
  color: #5f5f5f;
  font-size: 20px;
}

.gallery-item .title:hover {
    color: #FFF;
    background: #0043a1;
}

.gallery-contents:after { border-bottom-color: #f3f3f3; }

.gallery-expander { background: transparent; }

.gallery-expander-contents {
  margin: 0 auto;
  width: 300px;
  padding: 20px 0;
}

.gallery-expander .box-item {
   float: left;
}

.gallery-expander .media {
   width: 40%;
}

.gallery-expander .media img,
.gallery-expander .media video{
   width: 100%;
   max-width: 100%;
}

.gallery-item .testo {
   width:58%;
   margin-left: 2%;
   margin-top: 30px;
}

@media (min-width: 640px) and (max-width: 999px) {

.gallery-expander-contents { width: 640px; }
}
@media (max-width: 639px) {

.gallery-expander-contents { width: 80%; }
}

.gallery-expander-contents:after {
  clear: both;
  display: table;
  content: '';
}

.gallery-expander-contents > div.col {
  float: left;
  width: 480px;
}
@media (min-width: 640px) and (max-width: 999px) {

.gallery-expander-contents > div.col { width: 310px; }
}
@media (max-width: 639px) {

.gallery-expander-contents > div.col {
  float: none;
  padding: 25px 20px 0;
  width: auto;
}
}

.gallery-expander-contents > div.col + div.col { margin-left: 40px; }
@media (min-width: 640px) and (max-width: 999px) {

.gallery-expander-contents > div.col + div.col { margin-left: 20px; }
}
@media (max-width: 639px) {

.gallery-expander-contents > div.col + div.col { margin-left: 0px; }
}

.gallery-expander-contents div.close {
  position: absolute;
  top: 30px;
  right: 0px;
  cursor: pointer;
  color:#da001a;
  opacity: 1;
  text-shadow: none;
}

.gallery-expander-contents div.title {
  font-weight: 500;
  color: #D28A3C;
}

.gallery-expander-contents div.contents {
  margin-top: 10px;
  padding: 30px 0;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  padding-bottom: 80px;
  width: 300px;
}

.gallery-expander-contents div.image > img {
  width: 100%;
  display: block;
}

.thumbnail {
    border: none;
    padding: 0;
    background: none;
}


@media (max-width: 767px) {

    .gallery-item {
        float: none;
        width: 100%;
        margin: 0;
    }

    .gallery-expander {
        left: 0;
        width: 100%;
    }

    .gallery-expander-contents div.contents {
        width: 100%;
    }

}

/*@media (min-width: 768px) and (max-width: 1199px){
    .gallery-item {
        width: 24%;
    }
}*/