/* =========================================================
   Search & Filter Grid — Styles
   Colors: heading/title #0d397c | button #058bdd | white #ffffff | text #7a7a7a
   ========================================================= */

.sfp-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	box-sizing: border-box;
}
.sfp-wrapper *,
.sfp-wrapper *::before,
.sfp-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Section 1: Search Filters (flex row) ---------- */
.sfp-search-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	background: #ffffff;
	padding: 18px;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(13, 57, 124, 0.08);
	margin-bottom: 32px;
}

.sfp-field {
	flex: 1 1 220px;
	min-width: 180px;
}

.sfp-field-button {
	flex: 0 0 auto;
}

.sfp-input,
.sfp-select {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font-size: 15px;
	color: #7a7a7a;
	background: #ffffff;
	border: 1px solid #d8dee7;
	border-radius: 6px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sfp-input:focus,
.sfp-select:focus {
	border-color: #058bdd;
	box-shadow: 0 0 0 3px rgba(5, 139, 221, 0.15);
}

.sfp-search-button {
	height: 46px;
	padding: 0 28px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	background-color: #058bdd;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.sfp-search-button:hover {
	background-color: #0472b8;
}

.sfp-search-button:active {
	transform: translateY(1px);
}

/* ---------- Section 2: Results List ---------- */
.sfp-results {
	position: relative;
	min-height: 120px;
}

.sfp-results.sfp-loading {
	opacity: 0.5;
	pointer-events: none;
}

.sfp-grid {
	display: flex !important;
	flex-direction: column !important;
	column-count: initial !important;
	-moz-column-count: initial !important;
	-webkit-column-count: initial !important;
	columns: initial !important;
}

.sfp-no-results {
	text-align: center;
	color: #7a7a7a;
	font-size: 16px;
	padding: 40px 0;
}

/* ---------- List Row (no featured image) ---------- */
.sfp-grid .sfp-list-item {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	gap: 18px;
	padding: 30px 32px;
	background: #f4f4f46b;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	margin-bottom: 20px;
    border-radius: 12px;
}

/* Alternating stripe background, like the reference design. */


.sfp-grid .sfp-list-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.4;
	font-weight: 700;
}

.sfp-grid .sfp-list-title a {
	color: #0d397c !important;
	text-decoration: none !important;
}

.sfp-grid .sfp-list-title a:hover {
	text-decoration: underline !important;
}

.sfp-grid .sfp-list-btn {
	display: inline-flex !important;
	align-items: center;
	align-self: flex-start;
	font-size: 14px;
	font-weight: 600 !important;
	color: #ffffff !important;
	background-color: #058bdd !important;
	padding: 12px 22px !important;
	border-radius: 4px !important;
	text-decoration: none !important;
	border: none !important;
	transition: background-color 0.2s ease;
}

.sfp-grid .sfp-list-btn:hover {
	background-color: #0472b8 !important;
	color: #ffffff !important;
}

/* ---------- Pagination ---------- */
.sfp-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 34px;
}

.sfp-page-btn {
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #0d397c;
	background: #ffffff;
	border: 1px solid #d8dee7;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sfp-page-btn:hover {
	border-color: #058bdd;
	color: #058bdd;
}

.sfp-page-btn.active {
	background-color: #058bdd;
	border-color: #058bdd;
	color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
	.sfp-search-filters {
		gap: 12px;
		padding: 16px;
	}
	.sfp-field {
		flex: 1 1 auto;
		min-width: 160px;
	}
}

@media (max-width: 600px) {
	.sfp-wrapper {
		padding: 14px;
	}

	.sfp-search-filters {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	/* In column direction the flex-basis shorthand controls HEIGHT, not
	   width, so every field must be reset to auto height / full width
	   here to avoid the large vertical gaps between filters. */
	.sfp-field,
	.sfp-field-button {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
	}

	.sfp-input,
	.sfp-select,
	.sfp-search-button {
		width: 100%;
		height: 44px;
	}

	.sfp-grid .sfp-list-item {
		padding: 22px 18px;
		gap: 14px;
	}

	.sfp-grid .sfp-list-title {
		font-size: 19px;
	}

	.sfp-pagination {
		gap: 6px;
	}

	.sfp-page-btn {
		min-width: 36px;
		height: 36px;
		font-size: 13px;
	}
}