
/* masonryGallery */

.masonryGallery.wait {
	opacity: 0.75;
	pointer-events: none;
	cursor: wait;
}

.masonryGallery:not(.loaded) .masonryGrid {
    visibility: hidden;
}

.masonryGallery:not(.loaded) .masonryPagination {
	opacity: 0.5;
	pointer-events: none;
}

.masonryGallery:not(.loaded):before {
	display: block;
	content: url('../img/loading.svg');
	padding: 10px;
	margin: auto;
	text-align: center;
	transform: scale(0.5);
}

.masonryGallery .hidden {
    visibility: hidden;
}

.masonryGrid {
    margin: 0 auto;
	padding-top: 20px;
}

.masonryGrid.wait {
    opacity: 0.8;
    pointer-events: none;
}

.masonrySizer {
    width: calc(25% - 14px + 14px / 4);
}

.masonryItem {
    width: calc(25% - 14px + 14px / 4);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.masonryItem img {
    height: 100%;
    transition: 0.2s;
}

.masonryItem:hover,
.masonryItem:active {
    text-decoration: none;
}

.masonryItem:hover img {
    transform: scale(1.1);
}

/*
.masonryItem {
    height: 300px;
    width: calc(25% - 10px);
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    display: inline-block;
}

.masonryItem img {
    position: absolute;
    top: -100%;
    bottom: -100%;
    right: -100%;
    left: -100%;
    margin: auto;
    max-width: 10000px;
    width: 100%;
}
*/

.masonryItem--height4 {
    height: 200px;
}
.masonryItem--height1 {
    height: 220px;
}
.masonryItem--height2 {
    height: 235px;
}
.masonryItem--height3 {
    height: 275px;
}

.masonryGrid + .button {
    padding: 15px 30px;
    display: inline-block;
    margin: 20px auto;
    background-color: var(--primary-color);
    color: #FFF;
    text-decoration: none;
    transition: 0.3s;
    text-transform: uppercase;
}

.masonryGrid + .button:hover {
    background-color: var(--border-color);
    color: #333;
    transition: 0s;
}

.masonryItem__keywords {
    z-index: 1;
    position: absolute;
    top: 0;
}

.masonryItem__caption {
    line-height: 1em;
    padding: 3px 8px 5px 8px;
    background-color: #8a3e27;
    color: #FFF;
    text-decoration: none;
    position: relative;
    font-size: 14px;
    letter-spacing: -0.4px;
}

a:hover .masonryItem__caption {
    text-decoration: none;
}

.masonryItem__keywords span {
    color: #FFF;
    cursor: pointer;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    text-decoration: underline;
}

.masonryItem__keywords span:before {
    content: '#';
}

.masonryItem__keywords span:last-child {
    border-bottom-right-radius: 5px;
}

.masonryItem__keywords span:hover {
    color: rgb(184, 178, 124);
}

.masonryPagination {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin: 26px 0;
}

.masonryPagination a {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: solid 1px var(--c-gray);
	background-color: var(--c-white);
	color: var(--c-gray);
	font-size: 14px;
	font-weight: bold;
	text-decoration: none;
}

.masonryPagination a:hover {
	color: var(--c-black);
	background-color: var(--c-yellow);
	border-color: var(--c-yellow);
	text-decoration: none;
}

.masonryPagination a.active {
	color: var(--c-main-accent);
	border-color: var(--c-main-accent);
	background-color: var(--c-bg-gray);
	pointer-events: none;
}

@media (max-width: 500px) {
    .masonrySizer,
    .masonryItem {
        width: calc(50% - 14px + 14px / 4);
    }

	.masonryItem--height4 {
		height: 130px;
	}
	.masonryItem--height1 {
		height: 140px;
	}
	.masonryItem--height2 {
		height: 150px;
	}
	.masonryItem--height3 {
		height: 160px;
	}
}
