/* ==========================================================================
   Converted Post Filter — Stylesheet v1.2
   ========================================================================== */

.cpf-wrapper {
	--cpf-cols: 3;
	--cpf-gap: 28px;
	--cpf-radius: 10px;
	--cpf-accent: #0073aa;
	--cpf-accent-dark: #005a87;
	--cpf-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	--cpf-shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.14);
	--cpf-transition: 0.25s ease;
	--cpf-text: #1a1a1a;
	--cpf-muted: #5a5a5a;
	--cpf-meta: #888;
	--cpf-bg: #ffffff;
	--cpf-border: #e8e8e8;

	font-family: inherit;
	box-sizing: border-box;
}

.cpf-wrapper *,
.cpf-wrapper *::before,
.cpf-wrapper *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------------------
   Filter Bar
--------------------------------------------------------------------------- */

.cpf-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
	justify-content: center;
}

.cpf-filter-btn {
	display: inline-block;
	padding: 7px 18px;
	border-radius: 0;
	border: none;
	background: #e1e1e1;
	color: #000;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1;
	transition:
		background var(--cpf-transition),
		color var(--cpf-transition),
		box-shadow var(--cpf-transition);
}

.cpf-filter-btn:hover:not(.is-active) {
	background: #525252;
	color: #fff;
}

.cpf-filter-btn.is-active {
	background: #525252;
	color: #ffffff;
}

.cpf-filter-btn:focus-visible {
	outline: 2px solid var(--cpf-accent);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   Grid
--------------------------------------------------------------------------- */

.cpf-grid {
	display: grid;
	grid-template-columns: repeat(var(--cpf-cols), 1fr);
	gap: var(--cpf-gap);
}

@media (max-width: 900px) {
	.cpf-wrapper { --cpf-cols: 2; }
}

@media (max-width: 580px) {
	.cpf-wrapper {
		--cpf-cols: 1;
		--cpf-gap: 20px;
	}

	.cpf-filter-bar {
		justify-content: center;
	}
}

/* ---------------------------------------------------------------------------
   Card
--------------------------------------------------------------------------- */

.cpf-card {
	background: var(--cpf-bg);
	border-radius: 0;
	box-shadow: var(--cpf-shadow);
	border: 1px solid var(--cpf-border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition:
		transform var(--cpf-transition),
		box-shadow var(--cpf-transition);
}

.cpf-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--cpf-shadow-hover);
}

/* Featured image */

.cpf-card__image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	flex-shrink: 0;
}

.cpf-card__image a {
	display: block;
	width: 100%;
	height: 100%;
}

.cpf-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.cpf-card:hover .cpf-card__img {
	transform: scale(1.05);
}

/* No-image variant — add a subtle top accent line instead */

.cpf-card--no-image {
	border-top: 3px solid var(--cpf-accent);
}

/* Body */

.cpf-card__body {
	padding: 22px 24px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Category label */

.cpf-card__category {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--cpf-accent);
	margin-bottom: 8px;
}

/* Title */

.cpf-card__title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--cpf-text);
}

.cpf-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color var(--cpf-transition);
}

.cpf-card__title a:hover {
	color: inherit;
}

/* Date */

.cpf-card__date {
	display: block;
	font-size: 0.78rem;
	color: var(--cpf-meta);
	margin-bottom: 12px;
	letter-spacing: 0.01em;
}

/* Author */

.cpf-card__author {
	font-size: 0.8rem;
	color: var(--cpf-muted);
	margin: 0 0 10px;
}

/* Excerpt */

.cpf-card__excerpt {
	font-size: 0.9rem;
	color: var(--cpf-muted);
	line-height: 1.65;
	margin: 0 0 20px;
	flex: 1;
}

/* Read More */

.cpf-card__read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: flex-start;
	margin-top: auto;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	padding-bottom: 1px;
	transition:
		color var(--cpf-transition),
		border-color var(--cpf-transition);
}

.cpf-card__read-more::after {
	content: '\2192';
	display: inline-block;
	transition: transform var(--cpf-transition);
}

.cpf-card__read-more:hover {
	color: #1a1a1a;
	border-bottom-color: #1a1a1a;
}

.cpf-card__read-more:hover::after {
	transform: translateX(3px);
}

/* ---------------------------------------------------------------------------
   Empty state
--------------------------------------------------------------------------- */

.cpf-no-posts {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	color: var(--cpf-muted);
	font-size: 0.95rem;
}

/* ---------------------------------------------------------------------------
   Load More
--------------------------------------------------------------------------- */

.cpf-load-more-wrapper {
	text-align: center;
	margin-top: 44px;
}

.cpf-load-more-btn {
	display: inline-block;
	background: #525252;
	color: #ffffff;
	border: none;
	padding: 13px 36px;
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 0.02em;
	transition:
		background var(--cpf-transition),
		transform var(--cpf-transition),
		box-shadow var(--cpf-transition);
}

.cpf-load-more-btn:hover:not(:disabled) {
	background: #333333;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cpf-load-more-btn:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: none;
}

.cpf-load-more-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Spinner */

.cpf-load-more-btn.is-loading {
	position: relative;
	color: transparent;
	pointer-events: none;
}

.cpf-load-more-btn.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: cpf-spin 0.65s linear infinite;
}

@keyframes cpf-spin {
	to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------------------
   Grid loading overlay (used during filter switch)
--------------------------------------------------------------------------- */

.cpf-grid.is-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ---------------------------------------------------------------------------
   Card enter animation
--------------------------------------------------------------------------- */

.cpf-card-enter {
	animation: cpf-fade-up 0.35s ease both;
}

@keyframes cpf-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
