.clearfix:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}
.clearfix {
    display: inline-block;
}
html[xmlns] .clearfix {
    display: block;
}
* html .clearfix {
    height: 1%;
}

/** page structure **/
#pic_gallery {
  display: block;
}
 
#pic_gallery li {
  display: block;
  float: left;
  width: 30%;
  max-width: 400px;
  margin-right: 20px;
  margin-bottom: 20px;
}
 
#pic_gallery li a {
  display: block;
  padding-top: 7px;
  padding-left: 7px;
  padding-right: 7px;
  padding-bottom: 1px;
  background: #fff;
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  -webkit-box-shadow: 1px 2px 2px rgba(0,0,0,0.25);
  -moz-box-shadow: 1px 2px 2px rgba(0,0,0,0.25);
  box-shadow: 1px 2px 2px rgba(0,0,0,0.25);
}
 
.mfp-title {
  font-size: 1.2em;
  color: #fff !important;
  font-weight: 700;
}

/** media queries **/
@media only screen and (min-width: 800px) { 
  #pic_gallery li { margin-right: 15px; }
  #pic_gallery li a img { width:100%; }
}

@media only screen and (max-device-width: 800px), only screen and (device-height: 600px), only screen and (orientation: landscape) { 
  #pic_gallery li { margin-right: 15px; }
  #pic_gallery li a img { width:100%; }
}

@media screen and (max-width: 799px) {
  #pic_gallery li { width: 45%; }
  #pic_gallery li a { display:inline-block; }
  #pic_gallery li a img { width:100%;height:auto !important; }
}
 
@media screen and (max-width: 480px) {
  #pic_gallery { 
    text-align: center;
  }
 
  #pic_gallery li {
    float: none;
    width: 100% !important;
    margin-bottom: 20px;
  }
}