/*
 * Post Filter Widget
 * Version 2.3.0
 *
 * Reusable for Posts, public CPTs, custom taxonomies and ACF-backed content.
 */

.pf-c5e70245-wrapper {
	--pf-c5e70245-accent: #879039;
	--pf-c5e70245-accent-dark: #697126;
	--pf-c5e70245-text: #34342f;
	--pf-c5e70245-border: rgba(50, 52, 40, 0.16);
	--pf-c5e70245-surface: #ffffff;
	--pf-c5e70245-primary-pill-bg: #879039;
	--pf-c5e70245-primary-pill-text: #ffffff;
	--pf-c5e70245-secondary-pill-bg: rgba(245, 247, 236, 0.14);
	--pf-c5e70245-secondary-pill-text: #f7f8f1;

	width: 100%;
	max-width: 100%;
	font-family: inherit;
}

.pf-c5e70245-wrapper,
.pf-c5e70245-wrapper *,
.pf-c5e70245-wrapper *::before,
.pf-c5e70245-wrapper *::after {
	box-sizing: border-box;
}

/* =========================================================
   Filter fields
   ========================================================= */

.pf-c5e70245-filters {
	display: grid;
	grid-template-columns:
		repeat(
			auto-fit,
			minmax(
				min(100%, 220px),
				1fr
			)
		);
	gap: 12px;
	width: 100%;
	margin: 0 0 22px;
}

.pf-c5e70245-search,
.pf-c5e70245-category,
.pf-c5e70245-sort {
	display: block;
	width: 100%;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--pf-c5e70245-border);
	border-radius: 5px;
	outline: none;
	background-color: var(--pf-c5e70245-surface);
	box-shadow:
		0 1px 2px rgba(26, 29, 18, 0.025),
		inset 0 1px 0 rgba(255, 255, 255, 0.72);
	color: var(--pf-c5e70245-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		background-color 180ms ease;
}

.pf-c5e70245-category,
.pf-c5e70245-sort {
	cursor: pointer;
}

.pf-c5e70245-search::placeholder {
	color: currentColor;
	opacity: 0.52;
}

.pf-c5e70245-search:hover,
.pf-c5e70245-category:hover,
.pf-c5e70245-sort:hover {
	border-color: rgba(135, 144, 57, 0.55);
}

.pf-c5e70245-search:focus,
.pf-c5e70245-category:focus,
.pf-c5e70245-sort:focus {
	border-color: var(--pf-c5e70245-accent);
	background-color: #ffffff;
	box-shadow:
		0 0 0 3px rgba(135, 144, 57, 0.14),
		0 5px 16px rgba(43, 48, 26, 0.055);
}

/* =========================================================
   Results grid
   Elementor's responsive Columns control overrides these
   fallback values per widget instance.
   ========================================================= */

.pf-c5e70245-results {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	align-items: stretch;
	gap: 20px;
	width: 100%;
	min-width: 0;
	min-height: 80px;
}

.pf-c5e70245-results.is-loading {
	cursor: progress;
}

/* =========================================================
   Post card
   ========================================================= */

.pf-c5e70245-card {
	position: relative;
	display: block;
	width: 100%;
	height: 300px;
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 9px;
	isolation: isolate;
	background-color: #34372c;
	box-shadow:
		0 8px 24px rgba(35, 39, 24, 0.1),
		0 2px 6px rgba(35, 39, 24, 0.05);
	color: inherit;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition:
		transform 220ms ease,
		box-shadow 220ms ease,
		border-color 220ms ease;
}

.pf-c5e70245-card:hover {
	border-color: rgba(135, 144, 57, 0.46);
	box-shadow:
		0 15px 34px rgba(35, 39, 24, 0.15),
		0 4px 10px rgba(35, 39, 24, 0.07);
	color: inherit;
	text-decoration: none;
	transform: translateY(-3px);
}

.pf-c5e70245-card:focus {
	color: inherit;
	text-decoration: none;
}

.pf-c5e70245-card:focus-visible {
	outline: 3px solid rgba(135, 144, 57, 0.72);
	outline-offset: 3px;
}

.pf-c5e70245-card-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: 100%;
	height: 100%;
	min-height: 100%;
	overflow: hidden;
	border-radius: inherit;
	background:
		linear-gradient(
			145deg,
			#3c402f 0%,
			#697126 100%
		);
	background-color: #34372c;
}

/*
 * Full-card image layer. Elementor's Image Fit and Image Position controls
 * can override object-fit/object-position independently for every website.
 */
.pf-c5e70245-card-image {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	min-width: 100%;
	min-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	object-fit: cover;
	object-position: center center;
	transform: scale(1.001);
	transition:
		transform 500ms ease,
		filter 300ms ease;
}

.pf-c5e70245-card:hover .pf-c5e70245-card-image {
	transform: scale(1.04);
}

/* =========================================================
   Image overlay
   ========================================================= */

.pf-c5e70245-card-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	pointer-events: none;
	background:
		linear-gradient(
			to bottom,
			rgba(15, 18, 11, 0.02) 0%,
			rgba(15, 18, 11, 0.1) 34%,
			rgba(15, 18, 11, 0.67) 72%,
			rgba(15, 18, 11, 0.94) 100%
		);
}

.pf-c5e70245-card.has-no-image .pf-c5e70245-card-overlay {
	background:
		radial-gradient(
			circle at 78% 16%,
			rgba(255, 255, 255, 0.16),
			transparent 34%
		),
		linear-gradient(
			145deg,
			rgba(62, 67, 44, 0.18),
			rgba(20, 24, 14, 0.72)
		);
}

/* =========================================================
   Card content
   ========================================================= */

.pf-c5e70245-card-content {
	position: relative;
	z-index: 2;
	width: 100%;
	min-width: 0;
	padding: 20px;
	color: #ffffff;
}

/* =========================================================
   Dynamic taxonomy / ACF label pills
   ========================================================= */

.pf-c5e70245-card-categories {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-width: 0;
	margin: 0 0 10px;
}

.pf-c5e70245-card-categories:empty {
	display: none;
}

.pf-c5e70245-card-category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-height: 24px;
	padding: 5px 9px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 999px;
	font-family: inherit;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.075em;
	line-height: 1;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	-webkit-backdrop-filter: blur(8px) saturate(125%);
	backdrop-filter: blur(8px) saturate(125%);
}

/* Primary: the strong brand anchor. */
.pf-c5e70245-card-category--primary {
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.1),
			rgba(255, 255, 255, 0) 58%
		),
		var(--pf-c5e70245-primary-pill-bg);
	border-color: rgba(255, 255, 255, 0.24);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.2),
		0 4px 12px rgba(19, 23, 10, 0.16);
	color: var(--pf-c5e70245-primary-pill-text);
}

/*
 * Secondary: warm liquid glass that complements the olive primary pill.
 * It stays visually lighter so the two labels have a clear hierarchy.
 */
.pf-c5e70245-card-category--secondary {
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.24) 0%,
			rgba(255, 255, 255, 0.1) 46%,
			rgba(255, 255, 255, 0.04) 100%
		),
		var(--pf-c5e70245-secondary-pill-bg);
	border-color: rgba(255, 255, 255, 0.38);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.34),
		inset 0 -1px 0 rgba(255, 255, 255, 0.06),
		0 5px 16px rgba(16, 20, 10, 0.14);
	color: var(--pf-c5e70245-secondary-pill-text);
	-webkit-backdrop-filter: blur(12px) saturate(138%);
	backdrop-filter: blur(12px) saturate(138%);
}

/* =========================================================
   Card typography
   ========================================================= */

.pf-c5e70245-card-title {
	display: -webkit-box;
	margin: 0 0 8px;
	overflow: hidden;
	color: #ffffff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.pf-c5e70245-card-excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.84);
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.pf-c5e70245-card:hover .pf-c5e70245-card-title,
.pf-c5e70245-card:hover .pf-c5e70245-card-excerpt,
.pf-c5e70245-card:focus .pf-c5e70245-card-title,
.pf-c5e70245-card:focus .pf-c5e70245-card-excerpt {
	text-decoration: none;
}

/* =========================================================
   Pagination
   ========================================================= */

.pf-c5e70245-results {
	scroll-margin-top: 96px;
}

.pf-c5e70245-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 24px 0 0;
	padding: 0;
}

.pf-c5e70245-pagination[hidden] {
	display: none !important;
}

.pf-c5e70245-page-button {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--pf-c5e70245-border);
	border-radius: 8px;
	outline: none;
	background-color: #ffffff;
	box-shadow:
		0 1px 2px rgba(26, 29, 18, 0.035),
		inset 0 1px 0 rgba(255, 255, 255, 0.7);
	color: var(--pf-c5e70245-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition:
		border-color 180ms ease,
		background-color 180ms ease,
		color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

.pf-c5e70245-page-button--previous,
.pf-c5e70245-page-button--next {
	min-width: max-content;
	padding-inline: 14px;
}

.pf-c5e70245-page-button:hover:not(:disabled):not(.is-current) {
	border-color: rgba(135, 144, 57, 0.55);
	background-color: rgba(135, 144, 57, 0.075);
	color: var(--pf-c5e70245-accent-dark);
	transform: translateY(-1px);
}

.pf-c5e70245-page-button:focus-visible {
	border-color: var(--pf-c5e70245-accent);
	box-shadow: 0 0 0 3px rgba(135, 144, 57, 0.16);
}

.pf-c5e70245-page-button.is-current {
	border-color: var(--pf-c5e70245-accent);
	background-color: var(--pf-c5e70245-accent);
	box-shadow:
		0 5px 14px rgba(77, 84, 31, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	color: #ffffff;
	cursor: default;
}

.pf-c5e70245-page-button:disabled {
	opacity: 0.38;
	cursor: not-allowed;
	transform: none;
}

.pf-c5e70245-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	min-height: 40px;
	color: var(--pf-c5e70245-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	opacity: 0.58;
	user-select: none;
}

.pf-c5e70245-wrapper.is-loading .pf-c5e70245-pagination {
	pointer-events: none;
	opacity: 0.68;
}

/* =========================================================
   Loading, empty and error messages
   ========================================================= */

.pf-c5e70245-message {
	grid-column: 1 / -1;
	width: 100%;
	margin: 0;
	padding: 24px;
	border: 1px solid var(--pf-c5e70245-border);
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.58);
	color: var(--pf-c5e70245-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.pf-c5e70245-message--loading {
	opacity: 0.72;
}

.pf-c5e70245-message--error {
	border-color: rgba(142, 62, 47, 0.25);
	background-color: rgba(142, 62, 47, 0.045);
}

/* =========================================================
   Tablet fallbacks
   ========================================================= */

@media (max-width: 1024px) {
	.pf-c5e70245-results {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pf-c5e70245-card {
		height: 290px;
	}

	.pf-c5e70245-card-content {
		padding: 18px;
	}
}

/* =========================================================
   Mobile fallbacks
   ========================================================= */

@media (max-width: 767px) {
	.pf-c5e70245-filters {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		margin-bottom: 18px;
	}

	.pf-c5e70245-search,
	.pf-c5e70245-category,
	.pf-c5e70245-sort {
		height: 45px;
	}

	.pf-c5e70245-results {
		grid-template-columns: minmax(0, 1fr);
		gap: 15px;
	}

	.pf-c5e70245-card {
		width: 100%;
		height: 280px;
		border-radius: 8px;
	}

	.pf-c5e70245-card-content {
		padding: 17px;
	}

	.pf-c5e70245-card-categories {
		gap: 5px;
		margin-bottom: 9px;
	}

	.pf-c5e70245-card-category {
		min-height: 23px;
		padding: 5px 8px;
		font-size: 9px;
	}

	.pf-c5e70245-card-title {
		font-size: 17px;
	}

	.pf-c5e70245-card-excerpt {
		font-size: 12.5px;
	}

	.pf-c5e70245-pagination {
		gap: 6px;
		margin-top: 20px;
	}

	.pf-c5e70245-page-button {
		min-width: 36px;
		min-height: 36px;
		padding: 7px 9px;
		font-size: 12px;
	}

	.pf-c5e70245-page-button--previous,
	.pf-c5e70245-page-button--next {
		flex: 0 1 auto;
		padding-inline: 10px;
	}

	.pf-c5e70245-page-ellipsis {
		min-width: 14px;
		min-height: 36px;
	}
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.pf-c5e70245-card,
	.pf-c5e70245-card-image,
	.pf-c5e70245-search,
	.pf-c5e70245-category,
	.pf-c5e70245-sort,
	.pf-c5e70245-page-button {
		scroll-behavior: auto;
		transition: none;
	}

	.pf-c5e70245-card:hover,
	.pf-c5e70245-card:hover .pf-c5e70245-card-image {
		transform: none;
	}
}
