.gallery-filter-wrap{
    width:100%;
}


/* =========================
   FILTER BAR
========================= */

.gallery-filters{
    display:flex;
    gap:50px;
    align-items:flex-end;
    justify-content: space-between;
    padding:18px;
    margin-top: 50px;
    margin-bottom:40px;
    background:#fff;
    border:1px solid #eee;
    box-shadow:0 4px 8px rgba(0,0,0,.17);
}

.gallery-filters button{
    flex: 1;
    height:48px;
    padding:0 28px;
    border:none;
    background:#0399FF;
    color:#fff;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
    border-radius: 3px !important;
    width: 20%;
}

.gallery-filters button:hover{
    opacity:.9;
}


/* =========================
   RESULT COUNT
========================= */

.gallery-result-count{
    text-align:right;
    margin-bottom:14px;
    font-size:14px;
    font-weight:600;
    color:#444;
}


/* =========================
   GRID
========================= */

.gallery-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}


/* =========================
   CARD
========================= */

.gallery-card{
    position:relative;
    overflow:hidden;
    cursor:pointer;
    background:#f3f3f3;
}

.gallery-card img{
    width:100%;
    object-fit:cover;
    display:block;
    transition:transform .35s ease;
}

/* =========================
   INFO BUTTON
========================= */

.gallery-info-btn{
    position:absolute;
    top:10px;
    right:10px;
    width:24px;
    height:24px;
    border:none;
    color:#111;
    font-size:15px;
    font-weight:700;
    line-height:24px;
    text-align:center;
    cursor:pointer;
    z-index:5;
    padding:0;
}


/* =========================
   BOTTOM OVERLAY
========================= */

.gallery-overlay-bottom{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    padding:10px 12px;
    background:rgba(0,0,0,.5);
    z-index:3;
}

.gallery-overlay-bottom h3.gallery-item-title{
    margin:0;
    color:#fff;
    font-size:18px;
    font-weight:600;
    line-height:1.3;
}


/* =========================
   MATERIAL BADGE
========================= */

.material-badge{
    background:#fff;
    color:#222;
    font-size:11px;
    font-weight:700;
    padding:4px 8px;
    border-radius:3px;
    line-height:1;
    white-space:nowrap;
    margin-left:10px;
}


/* =========================
   POPUP CONTENT
========================= */

.gallery-popup{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.88);
    color:#fff;
    padding:18px;
    opacity:0;
    visibility:hidden;
    transition:.3s ease;
    z-index:20;
}

.gallery-popup.active{
    opacity:1;
    visibility:visible;
}


/* CLOSE BUTTON */

.gallery-close-btn{
    position:absolute;
    top:10px;
    right:10px;
    width:24px;
    height:24px;
    border:none;
    color:#111;
    font-size:20px;
    line-height:24px;
    text-align:center;
    cursor:pointer;
    padding:0;
}


/* POPUP TEXT */

.gallery-popup h3.gallery-item-title{
    margin:0 0 18px;
    color:#fff;
    font-size:18px;
    font-weight:700;
    line-height:1.3;
    padding-right:30px;
}

.popup-content{
    font-size:14px;
    line-height:1.6;
}

.popup-content p{
    margin:0 0 10px !important;
}

.popup-content strong{
    display:block;
    font-weight:700;
}

/* =========================
   IMAGE CLICKABLE
========================= */

.gallery-thumb{
	cursor:pointer;
}


/* =========================
   LIGHTBOX WRAP
========================= */

#gallery-image-lightbox{
	position:fixed;
	inset:0;

	display:flex;
	justify-content:center;
	align-items:center;

	padding:30px;

	background:rgba(0,0,0,0);

	opacity:0;
	visibility:hidden;

	transition:
		background .45s ease,
		opacity .45s ease,
		visibility .45s ease;

	z-index:99999;
}


/* OPEN */

#gallery-image-lightbox.active{
	background:rgba(0,0,0,.48);
	opacity:1;
	visibility:visible;
}


/* CLOSE PHASE */

#gallery-image-lightbox.closing{
	background:rgba(0,0,0,0);
	opacity:0;
	visibility:visible;
}


/* =========================
   INNER
========================= */

.lightbox-inner{
	position:relative;
	display:inline-block;

	transform:
		translateY(30px)
		scale(.92);

	opacity:0;

	transition:
		transform .55s cubic-bezier(.22,1,.36,1),
		opacity .45s ease;
}


/* OPEN */

#gallery-image-lightbox.active .lightbox-inner{
	transform:
		translateY(0)
		scale(1);

	opacity:1;
}


/* CLOSE */

#gallery-image-lightbox.closing .lightbox-inner{
	transform:
		translateY(20px)
		scale(.94);

	opacity:0;
}


/* =========================
   IMAGE
========================= */

#gallery-image-lightbox img{
	display:block;

	max-width:min(900px, 92vw);
	max-height:82vh;

	width:auto;
	height:auto;

	object-fit:contain;

	border-radius:6px;

	box-shadow:
		0 20px 50px rgba(0,0,0,.28);
}


/* =========================
   CLOSE BUTTON
========================= */

.lightbox-close{
	position:absolute;
	top:10px;
	right:10px;

	width:30px;
	height:30px;

	border:none;
	border-radius:50%;

	background:#fff;
	color:#111;

	font-size:18px;
	line-height:30px;
	text-align:center;

	cursor:pointer;
	padding:0;

	z-index:10;

	opacity:.95;

	transition:
		transform .25s ease,
		opacity .25s ease;
}

.lightbox-close:hover{
	transform:scale(1.08);
	opacity:1;
}


/* =========================
   MOBILE
========================= */

@media (max-width:767px){

	#gallery-image-lightbox{
		padding:14px;
	}

	#gallery-image-lightbox img{
		max-width:100%;
		max-height:75vh;
	}

}
/* =========================
   LOADING
========================= */

#gallery-results.loading{
    opacity:.55;
    pointer-events:none;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width:991px){

    .gallery-filters{
        flex-wrap:wrap;
        gap:20px;
    }

    .filter-select,.gallery-filters select,.gallery-filters button{
        width:100%;
        min-width:100%;
    }

    .gallery-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width:767px){
    .gallery-filters{
        flex-direction: column;
        gap: 12px;
        padding: 14px;
        align-items: stretch;
    }

    .gallery-filters select{
        width:100%;
        min-width:0;
        max-width:100%;
        box-sizing:border-box;
        height: 44px;
        padding: 0 40px 0 12px;
        font-size: 14px;
        background-position: right 12px center;
        background-size: 18px;
    }
    .gallery-filters select option{
        max-width:100%;
        white-space:normal;
        word-break:break-word;
    }
    .gallery-filters button{
        width: 100%;
        height: 44px;
        padding: 0 16px;
        font-size: 14px;
    }
    .gallery-grid{
        grid-template-columns:1fr;
    }
}
/* =========================
   CHOICES
========================= */

.choices__list--dropdown, .choices__list[aria-expanded]{
	margin-top: 10px;
	border-radius: 4px;
}

.gallery-filters .choices{
	min-width: 350px;
	max-width: 400px;
    margin:0;
}

.gallery-info-btn{
	z-index: 0
}
.gallery-filters .choices__inner{
    min-height:48px;
    padding:10px 40px 10px 14px;
    border:none;
    border-radius:3px;
    background:#E1F3FF;
    font-size:16px;
    color:#57667E;
}

.gallery-filters .choices__list--single{
    padding:0;
}
.gallery-filters .choices__item--selectable{
    color:#57667E !important;
}
.gallery-filters .choices[data-type*="select-one"]::after{
    border:none;
    width:20px;
    height:20px;
    margin-top:-10px;
    right:12px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23222' d='M5.5 7.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");
    background-size:contain;
    background-repeat:no-repeat;
    transform:none;
}
/*Selected*/
.gallery-filters .choices.has-value .choices__inner{
    background:#0399FF !important;
    color:#ffffff !important;
}

.gallery-filters .choices.has-value .choices__item{
    color:#ffffff !important;
}
.gallery-filters .choices.has-value::after{
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23ffffff' d='M5.5 7.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");

}
/* DROPDOWN */

.gallery-filters .choices__list--dropdown{
    border:none !important;
    border-radius:0;
    background:#1796ea !important;
    box-shadow:0 4px 12px rgba(0,0,0,.12);
}


/* OPTION */

.gallery-filters .choices__item--choice{
    padding:12px 14px;
    background:#1796ea;
    color:#ffffff !important;
    border-bottom:1px solid rgba(255,255,255,.15);
}

.gallery-filters .choices__item--choice.is-selected{
    background:#2F4FD0 !important;
    color:#ffffff !important;
}
/* HOVER OPTION */

.gallery-filters .choices__item--choice.is-highlighted{
    background:#2F4FD0 !important;
    color:#ffffff !important;
}

/* =========================
   SCROLLBAR IN SELECT DROPDOWN
========================= */
.gallery-filters .choices__list--dropdown .choices__list{
    max-height: 160px;
    overflow-y: hidden;
    scrollbar-width: thin;                 /* Firefox */
    scrollbar-color: #000 #E1F3FF;
}


/* Chrome / Edge / Safari */
.gallery-filters .choices__list--dropdown .choices__list::-webkit-scrollbar{
    width: 6px;
}
.gallery-filters .choices__list--dropdown .choices__list::-webkit-scrollbar-button{
    display: none;
    width: 0;
    height: 0;
}

.gallery-filters .choices__list--dropdown .choices__list::-webkit-scrollbar-track{
    background: #E1F3FF;
    border-radius: 999px;
}

.gallery-filters .choices__list--dropdown .choices__list::-webkit-scrollbar-thumb{
    background: #000;
    border-radius: 999px;
    transition: background .25s ease;
}

.gallery-filters .choices__list--dropdown .choices__list::-webkit-scrollbar-thumb:hover{
    background: rgba(255,255,255,.55);
}
/* MOBILE */

@media (max-width:767px){

    .gallery-filters .choices{
        width:100%;
        min-width:100%;
    }
     .gallery-filters .choices{
        position: relative;
        z-index: 1;
    }

    .gallery-filters .choices.is-open{
        z-index: 2;
    }

}
.gallery-loadmore-wrap{
	text-align:center;
	margin-top:30px;
}

#gallery-load-more{
	height:48px;
	padding:0 34px;
	border:none;
	background:#0399FF;
	color:#fff;
	font-weight:600;
	cursor:pointer;
	transition:.3s;
    border-radius: 3px;
    box-shadow:0 4px 8px rgba(0,0,0,.17);
    margin-bottom: 50px;
}

#gallery-load-more:hover{
	opacity:.9;
}