/* Category Filter buttons wrapper */
.kbp-filters-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 40px;
}

.kbp-filter-btn {
	display: inline-block;
	background-color: #ffffff;
	color: #2b2b2b;
	border: 1px solid #2b2b2b;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: inherit;
}

.kbp-filter-btn:hover {
	background-color: #2b2b2b;
	color: #ffffff;
}

.kbp-filter-btn.active {
	background-color: #2b2b2b;
	color: #ffffff;
	border-color: #2b2b2b;
}

/* Posts grid / stack */
.kbp-posts-grid {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Post card container */
.kbp-post-card {
	display: flex;
	flex-direction: row;
	width: 100%;
	border: 1px solid #2b2b2b;
	background-color: #ffffff;
	box-sizing: border-box;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Content block inside card */
.kbp-card-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	width: 55%;
	padding: 40px;
	box-sizing: border-box;
}

/* Meta date / category */
.kbp-card-meta {
	font-size: 12px;
	font-weight: 500;
	color: #757575;
	letter-spacing: 0.05em;
	margin-bottom: 15px;
	text-transform: uppercase;
}

.kbp-meta-divider {
	margin: 0 8px;
	color: #2b2b2b;
}

/* Post card title */
.kbp-card-title {
	font-family: Georgia, serif;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 400;
	margin: 0 0 15px 0;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.kbp-card-title a {
	color: #2b2b2b;
	text-decoration: none;
	transition: color 0.2s ease;
}

.kbp-card-title a:hover {
	color: #C19992;
}

/* Post excerpt */
.kbp-card-excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: #555555;
	margin-bottom: 20px;
}

.kbp-card-excerpt p {
	margin: 0;
}

/* Read More link */
.kbp-card-readmore {
	display: inline-block;
}

.kbp-card-readmore a {
	font-size: 13px;
	font-weight: 700;
	color: #2b2b2b;
	text-decoration: none;
	letter-spacing: 0.1em;
	border-bottom: 2px solid #2b2b2b;
	padding-bottom: 3px;
	transition: all 0.2s ease;
	text-transform: uppercase;
}

.kbp-card-readmore a:hover {
	color: #C19992;
	border-bottom-color: #C19992;
}

/* Featured image block */
.kbp-card-image {
	width: 45%;
	background-size: cover;
	background-position: center;
	position: relative;
	min-height: 250px;
}

.kbp-image-link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 1;
}

/* AJAX Loader overlay */
.kbp-posts-widget-container {
	position: relative;
}

.kbp-loader-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.kbp-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(43, 43, 43, 0.1);
	border-radius: 50%;
	border-top-color: #2b2b2b;
	animation: kbp-spin 1s ease-in-out infinite;
}

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

/* Fade animation for newly loaded cards */
.kbp-posts-grid.kbp-loading-fade {
	opacity: 0.3;
	transition: opacity 0.2s ease;
}

.kbp-posts-grid.kbp-loaded-fade {
	opacity: 1;
	transition: opacity 0.3s ease;
}

/* Responsive grid rules */
@media (max-width: 767px) {
	.kbp-filters-wrapper {
		flex-direction: column;
		width: 100%;
		align-items: stretch;
	}
	
	.kbp-filter-btn {
		width: 100%;
		text-align: center;
	}
	
	.kbp-post-card {
		flex-direction: column; /* Places text on top, image at the bottom */
	}
	
	.kbp-card-content {
		width: 100%;
		padding: 30px;
	}
	
	.kbp-card-image {
		width: 100%;
		height: 300px; /* Force image height on mobile */
		min-height: 200px;
	}
	
	.kbp-card-title {
		font-size: 22px;
	}
}
