/* ==========================================================
   Basic Posts – Frontend Filter Bar
   Uses Astra global CSS variables for consistent theming.
   ========================================================== */

   .hfe-posts-filter-bar {
	display: flex;
	justify-content: space-between;
	flex-direction: row-reverse;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 24px;
}

/* --- Search input (visually on the right via row-reverse) - */
.hfe-posts-search-input {
	width: 30%;
	min-width: 180px;
}

/* --- Controls group (category dropdown + sort button) ---- */
.hfe-posts-controls-group {
	display: flex;
	column-gap: 10px;
	align-items: center;
}

/* --- Category dropdown ----------------------------------- */
.hfe-posts-category-select {
	cursor: pointer;
	min-width: 160px;
}

/* --- Tag dropdown ---------------------------------------- */
.hfe-posts-tag-select {
	cursor: pointer;
	min-width: 140px;
}

/* --- Sort toggle button ---------------------------------- */
.hfe-posts-sort-btn {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	white-space: nowrap;
}

/* --- Post featured image (16:9 / 1280×720) --------------- */
.hfe-post-image {
	position: relative;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.hfe-post-image img,
.hfe-post-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.hfe-post-image img {
	object-fit: cover;
	object-position: center;
}

/* --- ACF customer image (above card title) --------------- */
.hfe-post-customer-image {
	margin-bottom: 12px;
}

.hfe-post-customer-image img {
	display: block;
	max-width: 70%;
	height: auto;
}

/* --- Card hide / show transition ------------------------- */
.hfe-posts-filter-wrapper .hfe-post-card {
	transition: opacity 0.2s ease;
}

.hfe-posts-filter-wrapper .hfe-post-card.hfe-posts-card-hidden {
	display: none !important;
}

/* --- No-results message ---------------------------------- */
.hfe-posts-no-results {
	display: none;
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 20px;
}

/* ==========================================================
   Pagination
   ========================================================== */

.hfe-posts-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.hfe-posts-pagination:empty {
	display: none;
}

/* --- Numbered page buttons ------------------------------- */
.hfe-posts-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	cursor: pointer;
}

.hfe-posts-page-btn:disabled {
	cursor: not-allowed;
}

.hfe-posts-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
}

a.hfe-posts-page-link {
	text-decoration: none;
}

.hfe-posts-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 40px;
	user-select: none;
}

/* --- Prev / Next arrows ---------------------------------- */
.hfe-posts-page-prev,
.hfe-posts-page-next {
	font-size: 16px;
}

/* --- Load More button ------------------------------------ */
.hfe-posts-load-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	min-width: 140px;
	min-height: 40px;
	padding: 0 16px;
}

/* --- Responsive ------------------------------------------ */
@media (max-width: 767px) {
	.hfe-posts-filter-bar {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.hfe-posts-search-input {
		width: 100%;
	}

	.hfe-posts-controls-group {
		flex-wrap: wrap;
		width: 100%;
	}

	.hfe-posts-category-select {
		flex: 1;
		min-width: 0;
	}

	.hfe-posts-sort-btn {
		flex-shrink: 0;
	}

	.hfe-posts-pagination {
		margin-top: 24px;
		gap: 4px;
	}

	.hfe-posts-page-btn {
		min-width: 36px;
		height: 36px;
	}
}

/* ==========================================================
   Button alignment
   ========================================================== */

.hfe-post-card.hfe-btn-align-left .hfe-read-more {
	align-self: flex-start !important;
	width: auto !important;
}

.hfe-post-card.hfe-btn-align-center .hfe-read-more {
	align-self: center !important;
	width: auto !important;
}

.hfe-post-card.hfe-btn-align-right .hfe-read-more {
	align-self: flex-end !important;
	width: auto !important;
}

.hfe-post-card.hfe-btn-align-stretch .hfe-read-more {
	align-self: stretch !important;
	width: 100% !important;
	text-align: center !important;
	box-sizing: border-box !important;
}
