.custom-blog-grid-item {
background-color: #fff;
width: 22.66%;
float: left;
margin: 0 3.12% 20px 0;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
-webkit-transition: all 400ms ease-in-out;
-moz-transition: all 400ms ease-in-out;
-o-transition: all 400ms ease-in-out;
transition: all 400ms ease-in-out;
}

.custom-blog-grid-item:hover {
-webkit-box-shadow:0 0 10px rgba(0, 0, 0, 0.5);
-moz-box-shadow:0 0 10px rgba(0, 0, 0, 0.5);
box-shadow:0 0 10px rgba(0, 0, 0, 0.5);
}

.custom-blog-grid-item img {
width: 100%;
height: auto;
}

.custom-blog-grid-item .filtered img {
filter: gray;
-webkit-filter: grayscale(1);
filter: grayscale(1);
-webkit-transition: all 400ms ease-in-out;
-moz-transition: all 400ms ease-in-out;
-o-transition: all 400ms ease-in-out;
transition: all 400ms ease-in-out;
}

.custom-blog-grid-item:hover .filtered img {
-webkit-filter: grayscale(0);
filter: none;
}

.custom-blog-grid-item .inner {
padding: 0 15px 15px;
}

.custom-blog-grid-item h2 {
font-size: 16px;
line-height: 1.4em;
text-align: center;
}

.custom-blog-grid-item .button-container {
display: block;
text-align: center;
}

.custom-blog-grid-item .button {
font-size: 12px;
}

.custom-blog-grid-item .button:after {
font-size: 18px;
}

@media only screen and ( min-width: 981px ) {

.custom-blog-grid-item:nth-of-type(4n) {
margin-right: 0;
}

.custom-blog-grid-item:nth-of-type(4n+1) {
clear: left;
}

}

@media only screen and ( min-width: 768px ) and ( max-width: 980px ) {

.custom-blog-grid-item {
width: 30%;
margin-right: 5%;
}

.custom-blog-grid-item:nth-of-type(3n) {
margin-right: 0;
}

.custom-blog-grid-item:nth-of-type(3n+1) {
clear: left;
}

}

@media only screen and ( min-width: 480px ) and ( max-width: 767px ) {

.custom-blog-grid-item {
width: 49%;
margin-right: 2%;
}

.custom-blog-grid-item:nth-of-type(2n) {
margin-right: 0;
}

.custom-blog-grid-item:nth-of-type(2n+1) {
clear: left;
}

}

/*-------------------[480px]------------------*/
@media only screen and ( max-width: 479px ) {

.custom-blog-grid-item {
width: 100%;
margin-right: 0;
}

}