/* ═══════════════════════════════════════════════════════════════
   Houngnibo – Gallery Grid (Filters, Bento & Lightbox)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Sticky Filter Bar ─── */
.hgb-gfilter {
	background-color: rgba(247, 243, 234, 0.95);
	border-bottom: 1px solid rgba(211, 196, 185, 0.5);
	padding-block: 1.25rem;
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	font-family: "Montserrat", sans-serif;
}

.admin-bar .hgb-gfilter {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .hgb-gfilter {
		top: 46px;
	}
}

.hgb-gfilter__container {
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 3.5vw, 2.5rem);
	box-sizing: border-box;
}

.hgb-gfilter__row {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

@media (min-width: 1024px) {
	.hgb-gfilter__row {
		flex-direction: row;
	}
}

.hgb-gfilter__pills {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	overflow-x: auto;
	width: 100%;
	padding-bottom: 0.5rem;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

@media (min-width: 1024px) {
	.hgb-gfilter__pills {
		width: auto;
		padding-bottom: 0;
	}
}

.hgb-gfilter__pills::-webkit-scrollbar {
	display: none;
}

.hgb-gfilter__btn {
	padding: 0.5rem 1rem;
	border-radius: 0.25rem;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0.08em;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: #ffffff;
	border: 1px solid rgba(211, 196, 185, 0.8);
	color: #1c1c16;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
	font-family: inherit;
}

.hgb-gfilter__btn .material-symbols-outlined {
	font-size: 16px;
}

.hgb-gfilter__btn:hover {
	border-color: #825500;
	color: #825500;
}

.hgb-gfilter__btn.is-active {
	background-color: #825500;
	color: #ffffff;
	border-color: #825500;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.hgb-gfilter__btn.is-active .hgb-gfilter__count {
	background-color: rgba(50, 29, 8, 0.2);
	color: #ffffff;
	padding: 0.125rem 0.375rem;
	border-radius: 9999px;
}

.hgb-gfilter__count {
	font-size: 11px;
	color: rgba(79, 69, 61, 0.7);
}

.hgb-gfilter__controls {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
	align-self: flex-end;
}

@media (min-width: 1024px) {
	.hgb-gfilter__controls {
		align-self: center;
	}
}

.hgb-gfilter__view-label {
	font-size: 10px;
	line-height: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #4f453d;
	font-weight: 700;
	display: none;
}

@media (min-width: 640px) {
	.hgb-gfilter__view-label {
		display: inline;
	}
}

.hgb-gfilter__switcher {
	display: inline-flex;
	border-radius: 0.25rem;
	border: 1px solid #d3c4b9;
	padding: 0.125rem;
	background-color: #ffffff;
}

.hgb-gfilter__view-btn {
	padding: 0.375rem;
	border-radius: 0.125rem;
	border: none;
	background: transparent;
	color: #81756c;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
}

.hgb-gfilter__view-btn:hover {
	color: #321d08;
}

.hgb-gfilter__view-btn.is-active {
	background-color: #f1eee5;
	color: #321d08;
}

.hgb-gfilter__view-btn .material-symbols-outlined {
	font-size: 18px;
}

.hgb-gfilter__sep {
	width: 1px;
	height: 1rem;
	background-color: #d3c4b9;
	margin-inline: 0.25rem;
}

.hgb-gfilter__counter {
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #825500;
	font-weight: 700;
}

/* ─── Grid Section ─── */
.hgb-ggrid-wrap {
	background-color: #fdf9f0;
	color: #1c1c16;
	padding-top: 3rem;
	padding-bottom: 4rem;
	font-family: "Montserrat", sans-serif;
}

.hgb-ggrid-wrap__container {
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 3.5vw, 2.5rem);
	box-sizing: border-box;
}

.hgb-ggrid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.hgb-ggrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.hgb-ggrid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Uniform View Mode */
.hgb-ggrid.is-uniform .hgb-gcard--large {
	grid-column: span 1 !important;
	min-height: 380px !important;
}

/* ─── Card ─── */
.hgb-gcard {
	position: relative;
	overflow: hidden;
	border-radius: 0.25rem;
	border: 1px solid rgba(211, 196, 185, 0.7);
	background-color: #321d08;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 380px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.hgb-gcard:hover {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hgb-gcard--large {
	min-height: 440px;
}

@media (min-width: 1024px) {
	.hgb-gcard--large {
		grid-column: span 2;
	}
}

.hgb-gcard__img,
article.hgb-gcard img.hgb-gcard__img,
.elementor article.hgb-gcard img.hgb-gcard__img {
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
	display: block;
	transition: transform 0.7s ease;
}

.hgb-gcard:hover .hgb-gcard__img {
	transform: scale(1.05);
}

.hgb-gcard__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(50, 29, 8, 0.95) 0%,
		rgba(50, 29, 8, 0.65) 40%,
		rgba(50, 29, 8, 0.2) 70%,
		transparent 100%
	);
	opacity: 0.85;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.hgb-gcard:hover .hgb-gcard__overlay {
	opacity: 0.75;
}

/* Top Badge & Zoom */
.hgb-gcard__top {
	position: absolute;
	top: 1rem;
	left: 1rem;
	right: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 10;
}

.hgb-gcard__badge {
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: 10px;
	line-height: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
	backdrop-filter: blur(4px);
}

.hgb-gcard__badge--secondary {
	background-color: rgba(130, 85, 0, 0.9);
	color: #ffffff;
}

.hgb-gcard__badge--dark {
	background-color: rgba(57, 55, 51, 0.9);
	color: #ffffff;
}

.hgb-gcard__zoom-btn {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 9999px;
	background-color: rgba(255, 255, 255, 0.9);
	color: #321d08;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: all 0.2s ease;
}

.hgb-gcard__zoom-btn:hover {
	color: #825500;
	transform: scale(1.05);
}

.hgb-gcard__zoom-btn .material-symbols-outlined {
	font-size: 20px;
}

/* Body */
.hgb-gcard__body {
	position: relative;
	z-index: 10;
	padding: 1.5rem;
	color: #ffffff;
}

@media (min-width: 640px) {
	.hgb-gcard--large .hgb-gcard__body {
		padding: 2rem;
	}
}

.hgb-gcard__location {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #ffddb2;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.hgb-gcard__location .material-symbols-outlined {
	font-size: 16px;
}

.hgb-gcard__title {
	font-family: "Montserrat Alternates", "Montserrat", sans-serif;
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 0.5rem 0;
	transition: color 0.2s ease;
}

.hgb-gcard--large .hgb-gcard__title {
	font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.hgb-gcard:hover .hgb-gcard__title {
	color: #ffddb2;
}

.hgb-gcard__desc {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #ece8df;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 36rem;
}

/* ─── Bottom Action ─── */
.hgb-ggrid-wrap__action {
	margin-top: 3rem;
	text-align: center;
}

.hgb-ggrid-wrap__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 2rem;
	border-radius: 0.25rem;
	background-color: #ffffff;
	border: 2px solid #825500;
	color: #321d08;
	font-family: "Montserrat", sans-serif;
	font-size: 0.875rem;
	line-height: 1.25;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.hgb-ggrid-wrap__btn .material-symbols-outlined {
	font-size: 20px;
	color: #825500;
	transition: all 0.2s ease;
}

.hgb-ggrid-wrap__btn:hover {
	background-color: #825500;
	color: #ffffff;
}

.hgb-ggrid-wrap__btn:hover .material-symbols-outlined {
	color: #ffffff;
	transform: translateY(2px);
}

.hgb-ggrid-wrap__subtext {
	font-size: 10px;
	line-height: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #81756c;
	margin: 0.75rem 0 0 0;
}

/* ─── Lightbox Modal ─── */
.hgb-glbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.hgb-glbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.hgb-glbox__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(29, 27, 24, 0.88);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hgb-glbox__dialog {
	position: relative;
	z-index: 10;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hgb-glbox__close {
	position: absolute;
	top: -2.5rem;
	right: 0;
	background: transparent;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 0.25rem;
}

.hgb-glbox__close .material-symbols-outlined {
	font-size: 30px;
}

.hgb-glbox__img {
	max-width: 85vw;
	max-height: 75vh;
	object-fit: contain;
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 221, 178, 0.3);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hgb-glbox__caption {
	margin-top: 1rem;
	text-align: center;
}

.hgb-glbox__title {
	font-family: "Montserrat Alternates", "Montserrat", sans-serif;
	font-size: 1.125rem;
	color: #ffffff;
	margin: 0;
}
