/*
 * Categories page style for villa template.
 */

#category {
    width: 94%;
    margin: auto;
    padding: 2em 0 4em 0;
    text-align: center;
    overflow: hidden;
}

#category h2 {
    color: #00662C;
    font-weight: 400;
    margin-bottom: 1em;
}

a.categoryPreview {
    display: inline-block;
    width: 30%;
    margin: 1em 1.3% 1em 1.3%;
    text-align: left;
    vertical-align: top;
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 7px;
    overflow: hidden;
    color: #575756;
    transition: box-shadow .25s ease, transform .25s ease;
}

a.categoryPreview:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
    color: #575756;
}

a.categoryPreview .bg {
    width: 100%;
    padding-top: 60%;
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

a.categoryPreview .bg .cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 102, 44, 0);
    transition: background-color .25s ease;
    display: table;
    opacity: 0;
}

a.categoryPreview:hover .bg .cover {
    background-color: rgba(0, 102, 44, 0.55);
    opacity: 1;
}

a.categoryPreview .bg .cover > div {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

a.categoryPreview .bg .cover > div > div {
    display: inline-block;
    border: 2px solid #FFFFFF;
    border-radius: 7px;
    padding: 0.4em 1.2em;
}

a.categoryPreview .bg .cover h3 {
    color: #FFFFFF;
    font-size: 1.4em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2em;
    font-weight: 400;
}

a.categoryPreview > h3 {
    padding: 0.8em 1em 0.2em 1em;
    font-size: 1.4em;
    color: #00662C;
    font-weight: 400;
    line-height: 1.2em;
}

a.categoryPreview > h3 b {
    font-weight: 400;
}

a.categoryPreview > p {
    padding: 0 1em 1.4em 1em;
    margin: 0;
    font-size: 1em;
    line-height: 1.45em;
    color: #58595B;
}

@media screen and (max-width: 980px) {
    a.categoryPreview {
        width: 46%;
        margin: 1em 1.5% 1em 1.5%;
    }
}

@media screen and (max-width: 600px) {
    a.categoryPreview {
        width: 96%;
        margin: 0.7em 2% 0.7em 2%;
    }

    a.categoryPreview .bg .cover {
        display: none;
    }
}
