.mesonaryItem {
    float: left;
    position: relative;
    line-height: 1em;
}


.grid-sizer { width: 20%; }
.mesonaryItem { width: 20%; }

section.photogallery.second-variation .grid-sizer { width: 25% !important; }
section.photogallery.second-variation .mesonaryItem { width: 25% !important; }

@media screen and (max-width: 1224px) {
  /* 10 columns for larger screens */
  .grid-sizer { width: 33.33%; }
  .mesonaryItem { width: 33.33%; }
}

@media screen and (max-width: 720px) {
  /* 10 columns for larger screens */
  .grid-sizer { width: 50%; }
  .mesonaryItem { width: 50%; }
}

@media screen and (max-width: 480px) {
  /* 10 columns for larger screens */
  .grid-sizer { width: 100%; }
  .mesonaryItem { width: 100%; }
}

.image{
    max-width: 100%;
    margin: 0;
    display: block;
}

.image:after {
    clear:both;
}

.overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    position: absolute;
    top: 0;
    left: 0;
    text-decoration: none;
    color: #fff;
    display: none;
}

.overlay .title {
    text-align: center;
    font-size: 30px;
}

.overlay .description {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(0,0,0,0.80);
    width: 100%;
    margin: 0;
}

.overlay .description p {
    margin: 20px;
}

.mesonaryItem:hover .overlay {
    display: block;
}


/* custom photo gallery css */
.photogallery.second-variation .mesonaryItem {
    border: 2px solid white;
}
.photogallery.third-variation .mesonaryItem {
    border: 10px solid white;
}