/*------------------------------------*\
    Media Gallery
\*------------------------------------*/

.gallery-wrapper > ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.media-gallery__item {
    margin: 0;
    margin-bottom: 20px;
}

.media-gallery__item-link {
    display: block;
    position: relative;
}

.media-gallery__item-link:before,
.media-gallery__item-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.media-gallery__item-link:before {
    height: 30%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%);
}

.media-gallery__item-link:after {
    height: 100%;
    background-color: rgba(255, 255, 255, .2);
    opacity: 0;
    transition: all .3s ease;
}

.media-gallery__item-link:hover:after {
    opacity: 1;
}

.media-gallery__item-title {
    position: absolute;
    bottom: 0;
    left: 0;
}

.media-gallery__item-title p {
    margin: 0;
}

.media-gallery__item-img {
    display: block;
    height: auto;
    width: 100%;
}



/*
 * Filter
 */

.gallery-filter {
	text-align: center;
}

.gallery-filter__toggle {
	display: flex;
    align-items: center;
	justify-content: space-between;
	background-color: #ddd;
	padding: 8px 10px;
	cursor: pointer;
	text-align: left;
	position: relative;
}

.gallery-filter__toggle:after {
	content: '';
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 5px 5px 0 5px;
	border-color: #333333 transparent transparent transparent;
}

.gallery-filter__toggle.js-active:after {
	border-width: 0 5px 5px 5px;
	border-color: transparent transparent #333333 transparent;
}

.gallery-filter__select {
	display: none;
	padding: 10px;
}

.gallery-filter__select.js-active { display: block; }

.gallery-filter__pill {
	display: block;
	border: 0;
	opacity: .7;
	margin-top: 5px !important;
	width: 100%;
}

.gallery-filter__pill.js-active {
	opacity: 1;
}

.gallery-filter__pill.js-active:before {
	content: '✓';
	margin-right: 8px;
}

@media (min-width: 600px) {
	
	.gallery-filter__select { display: block; }
	
	.gallery-filter__pill {
		display: inline-block;
		width: auto;
	}
	
}
 



/*
 * Grid Layout
 */

@media (min-width: 600px) {
    
    .media-gallery--grid-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        
        /* gutter spacing to match main site gutter spacing */
        column-gap: 32px; 
        row-gap: 32px;
    }
    
    .media-gallery--grid-layout .media-gallery__item {
        margin-bottom: 0;
    }
    
    .media-gallery--grid-layout .media-gallery__item-link,
    .media-gallery--grid-layout .media-gallery__item-img {
        height: 100%;
    }

    .media-gallery--grid-layout .media-gallery__item-img {
        object-fit: cover;
    }
    
}

@media (min-width: 1025px) {
    
    .media-gallery--grid-layout {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
}

 
.media-gallery--grid-layout .no-result {
    width: 100%;
    text-align: center;
}



/*
 * Stacked Layout
 */

.grid:after {
    content: '';
    display: block;
    clear: both;
}

.grid-sizer,
.grid-item { width: 100%; }

@media (min-width: 600px) {
	
	/* gutter spacing to match main site gutter spacing */
	.media-gallery--stacked-layout {
		margin-left: -16px;
		margin-right: -16px;
	}
	
	.media-gallery--stacked-layout .media-gallery__item {
		padding: 16px;
	}
	
}

@media (min-width: 768px) {
    
    .grid-sizer,
    .grid-item { width: 50%; }
    
    .grid-item { float: left; }
    
    .media-gallery--stacked-layout .media-gallery__item {
        margin-bottom: 0;
    }
    
}

@media (min-width: 1200px) {
    
    .grid-sizer,
    .grid-item { width: 33.333%; }
    
}



/*
 * Popup - HTML5 Lightbox
 */

.html5-title-prefix {
    font-size: 13px !important;
    padding: 5px 8px;
    background-color: #efefef;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 5px
}



