.gallery-block {
    font-size: 0;
}

.gallery-block a,
.gallery-block a:hover,
.gallery-block a:focus
{
    outline: none;
}

/* Common */

.gallery-block a {
    display: inline-block;
    margin: 0 1.5% 2% 0;
    width: 0;
    height: 0;
    padding-top: 17%;
    padding-left: 23.5%;
    background-color: #C2C2C2;
    vertical-align: top;
    position: relative;
    overflow: hidden;
}

a.gallery-categories__separator {
    width: 40px;
    height: 40px;
    font-size: 32px;
    line-height: 40px;
    vertical-align: top;
    position: relative;
    z-index: 10;
    padding: 0 !important;
    overflow: visible;
    margin-right: 0;
    text-transform: uppercase;
    color: #EEE;
    background: transparent;
    cursor: default;
    text-shadow: 1px 2px 6px #000;
    opacity: .5;
}

a.gallery-categories__separator:hover {
    color: #FFF;
}

a.gallery-categories__separator::after {
    content: attr(data-letter);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
}

a.gallery-categories__separator + a {
    margin-left: -40px;
}

@media (max-width: 1200px) {
    .gallery-block a {
        padding-top: 24%;
        padding-left: 31%;
    }
}

@media (max-width: 1024px) {
    .gallery-block a {
        padding-top: 36%;
        padding-left: 48%;
    }
}

@media (max-width: 480px) {
    .gallery-block a {
        padding-top: 75%;
        padding-left: 100%;
        margin-bottom: 5%;
    }

    a.gallery-categories__separator {
        margin: 0;
    }

    a.gallery-categories__separator + a {
        margin-left: 0;
        margin-top: -40px;
    }

}

.gallery-block a > .background {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: .7;
    transition:
        opacity 1s ease,
        transform 1s ease;
}

.gallery-block a:hover > .background
{
    opacity: 1;
    transform: scale(1.1);
}

/* Categories */

.gallery-categories {
    margin: 1em 0;
}

.gallery-categories > a {
    text-align: center;
    transition: background-color 1s ease;
}

.gallery-categories > a > .text {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    vertical-align: middle;
    white-space: normal;
    font-size: 11pt;
    color: #FFF;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    padding: 6px 10px;
}

.gallery-categories > a[data-count]::after {
    content: attr(data-count);
    position: absolute;
    display: block;
    right: 5px;
	top: 5px;
	padding: 2px 8px;
	font-size: 9pt;
    line-height: 12px;
    height: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
	color: #777;
}

/* Pictures */

.gallery-pictures {
    margin: 1em 0;
}

.gallery-pictures > a {
    padding-top: 23%;
}

@media (max-width: 1200px) {
    .gallery-pictures a {
        padding-top: 31%;
    }
}

@media (max-width: 1024px) {
    .gallery-pictures a {
        padding-top: 48%;
    }
}

@media (max-width: 480px) {
    .gallery-pictures a {
        padding-top: 100%;

    }
}

.gallery-pictures > a[data-caption]::after {
    content: attr(data-caption);
    position: absolute;
    display: block;
    background: rgba(0, 0, 0, 0.8);
    color: #FFF;
    font-size: 11px;
    padding: 6px 10px;
    left: 0;
    bottom: 0;
    width: 100%;
    transition: bottom 1s linear;
}

.gallery-pictures.hide-caption > a[data-caption]::after {
    display: none;
}

.gallery-pictures > a[data-caption]:hover::after {
    bottom: -50%;
}

/* Random Picture */

.gallery-rand-picture p {
    text-align: center;
}
.gallery-rand-picture img {
    max-width: 100%;
    max-height: 320px;
    height: auto;
    margin-top: 1.2rem;
}
