/* WP Loop HQ — widget.css */

/* Filter bar */
.wglhq-filter-bar {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 32px;
}

.wglhq-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	/* Follow the bar's Alignment. Once the pills wrap, this row is full width, so
	   aligning the bar alone left every line starting at the left. */
	justify-content: inherit;
}

.wglhq-filter-pill {
	display: inline-block;
	font-size: 15px;
	line-height: 1.2;
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	border-radius: 40px;
	background: #f3f4f6;
	color: #374151;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.wglhq-filter-pill:hover {
	border-color: #cca128;
}

.wglhq-filter-pill.is-active {
	background: #cca128;
	border-color: #cca128;
	color: #ffffff;
}

.wglhq-filter-select,
.wglhq-anchor-select {
	font-size: 15px;
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #ffffff;
	color: #374151;
	cursor: pointer;
}

.wglhq-hidden {
	display: none;
}

.wglhq-term-group {
	width: 100%;
}

.wglhq-term-heading {
	margin-top: 0;
}

.wglhq-grid {
	width: 100%;
	display: grid;
	grid-template-columns: repeat( var( --wglhq-cols, 3 ), 1fr );
}

@media ( max-width: 1024px ) {
	.wglhq-grid {
		grid-template-columns: repeat( var( --wglhq-cols-tablet, 2 ), 1fr );
	}
}

@media ( max-width: 767px ) {
	.wglhq-grid {
		grid-template-columns: repeat( var( --wglhq-cols-mobile, 1 ), 1fr );
	}
}

.wglhq-grid-item {
	min-width: 0; /* prevent grid blowout */
}

/* Card alignment: a grid cannot centre a short last row, so these switch to
   wrapping flex with each card exactly one column wide. */
.wglhq-grid.wglhq-align-center,
.wglhq-grid.wglhq-align-end {
	display: flex;
	flex-wrap: wrap;
	--wglhq-cols-now: var( --wglhq-cols, 3 );
}

.wglhq-grid.wglhq-align-center {
	justify-content: center;
}

.wglhq-grid.wglhq-align-end {
	justify-content: flex-end;
}

.wglhq-grid.wglhq-align-center > .wglhq-grid-item,
.wglhq-grid.wglhq-align-end > .wglhq-grid-item {
	flex: 0 0 calc( ( 100% - ( var( --wglhq-cols-now ) - 1 ) * var( --wglhq-gap, 24px ) ) / var( --wglhq-cols-now ) );
}

@media ( max-width: 1024px ) {
	.wglhq-grid.wglhq-align-center,
	.wglhq-grid.wglhq-align-end {
		--wglhq-cols-now: var( --wglhq-cols-tablet, 2 );
	}
}

@media ( max-width: 767px ) {
	.wglhq-grid.wglhq-align-center,
	.wglhq-grid.wglhq-align-end {
		--wglhq-cols-now: var( --wglhq-cols-mobile, 1 );
	}
}

.wglhq-empty-message {
	color: #6b7280;
	font-style: italic;
	margin: 0;
}

/* Equalize card height */
.wglhq-equalize {
	align-items: stretch;
}

.wglhq-equalize .wglhq-grid-item {
	display: flex;
	flex-direction: column;
}

/* Push height through Elementor's template wrapper chain */
.wglhq-equalize .wglhq-grid-item > .elementor,
.wglhq-equalize .wglhq-grid-item .elementor-section-wrap,
.wglhq-equalize .wglhq-grid-item .elementor-element.e-flex.e-con-boxed.e-con.e-parent {
	height: 100%;
}

/* Make image widget fill and crop to fit */
.wglhq-equalize .wglhq-grid-item .elementor-widget-image,
.wglhq-equalize .wglhq-grid-item .elementor-widget-image .elementor-widget-container,
.wglhq-equalize .wglhq-grid-item .elementor-widget-image a,
.wglhq-equalize .wglhq-grid-item .elementor-widget-image figure {
	display: block;
	height: 100%;
}

.wglhq-equalize .wglhq-grid-item .elementor-widget-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}
