﻿
@media screen and (max-width: 767px) {
    .polaroids li:nth-child(n+5) {
        display: none;
    }
}

ul.polaroids li {
    display: inline;
}

ul.polaroids a {
    background: #fff;
    display: inline;
    float: left;
    /*margin: 0 0 27px 30px;*/
    margin-left: -1px; /*I added*/
    width: auto;
    padding: 10px 10px 15px;
    text-align: center;
    font-family: "Marker Felt", sans-serif;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    -webkit-box-shadow: 0 3px 6px rgba(0,0,0,.25);
    -moz-box-shadow: 0 3px 6px rgba(0,0,0,.25);
    -webkit-transform: rotate(-2deg);
    -webkit-transition: -webkit-transform .15s linear;
    -moz-transform: rotate(-2deg);
}

ul.polaroids li {
    padding-left: 0;
}

@media screen and (max-width: 768px) {
    ul.polaroids li a {
        margin-left: 0;
    }
}

@media screen and (max-width: 1024px) {

    ul.polaroids li:nth-child(3n) a {
        display: none;
    }
}

ul.polaroids img {
    display: block;
    width: 190px;
    margin-bottom: 12px;
}

ul.polaroids a:after {
    content: attr(title);
}

ul.polaroids li:nth-child(1n) a {
    -webkit-transform: rotate(-5deg);
    -moz-transform: rotate(-5deg);
}

ul.polaroids li:nth-child(2n) a {
    -webkit-transform: rotate(5deg);
    -moz-transform: rotate(5deg);
}

ul.polaroids li:nth-child(3n) a {
    -webkit-transform: rotate(-5deg);
    -moz-transform: rotate(-5deg);
    position: relative;
    top: -5px;
    -moz-transform: none;
}

/*ul.polaroids li:nth-child(5n) a {
            -webkit-transform: rotate(5deg);
            position: relative;
            right: 5px;
            -moz-transform: rotate(5deg);
        }

        ul.polaroids li:nth-child(8n) a {
            position: relative;
            right: 5px;
            top: 8px;
        }

        ul.polaroids li:nth-child(11n) a {
            position: relative;
            left: -5px;
            top: 3px;
        }

        ul.polaroids li.messy a {
            margin-top: -400px;
            position: relative;
            left: 160px;
        }*/

ul.polaroids li a:hover {
    -webkit-transform: scale(1.25);
    -moz-transform: scale(1.25);
    -webkit-box-shadow: 0 3px 6px rgba(0,0,0,.5);
    -moz-box-shadow: 0 3px 6px rgba(0,0,0,.5);
    position: relative;
    z-index: 5;
}
