/* === Category Posts Alternating Widget === */

.cpa-posts-wrapper {
	width: 100%;
}

.cpa-post-item {
	display: flex;
	align-items: stretch;
	gap: 0;
}

/* Image Left (odd items: 1st, 3rd, ...) */
.cpa-row-image-left {
	flex-direction: row;
}

/* Image Right (even items: 2nd, 4th, ...) */
.cpa-row-image-right {
	flex-direction: row-reverse;
}

/* === Image === */
.cpa-image-wrap {
	width: 45%;
	flex-shrink: 0;
	overflow: hidden;
	background-color: #f5f5f5;
	min-height: 300px;
	position: relative;
}

.cpa-image-wrap a {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

.cpa-posts-wrapper .cpa-image-wrap img {
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
	display: block;
	transition: transform 0.5s ease;
}

.cpa-image-wrap:hover img {
	transform: scale(1.08);
}

/* === Content === */
.cpa-content-wrap {
	width: 55%;
	display: flex;
	align-items: center;
}

.cpa-content-inner {
	padding: 10px 30px;
	width: 100%;
}

/* Title */
.cpa-title {
	margin: 0 0 5px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
}

.cpa-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cpa-title a:hover {
	color: #555;
}

/* Date */
.cpa-date {
	font-size: 14px;
	color: #666;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
}

.cpa-date svg {
	flex-shrink: 0;
}

/* Excerpt — multi-line clamp */
.cpa-excerpt {
	font-size: 15px;
	line-height: 1.7;
	color: #555;
	margin-bottom: 20px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	/* -webkit-line-clamp is set inline via widget settings */
}

/* Button */
.cpa-button-wrap {
	margin-top: 0;
}

.cpa-button {
	display: inline-block;
	padding: 12px 30px;
	background-color: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.cpa-button:hover {
	background-color: #333;
	color: #ffffff;
}

/* === Pagination === */
.cpa-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 40px;
	flex-wrap: wrap;
}

.cpa-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	line-height: 40px;
	text-align: center;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	color: #333;
	background-color: transparent;
	border: none;
	transition: background-color 0.3s ease, color 0.3s ease;
	cursor: pointer;
}

.cpa-pagination .page-numbers.current,
.cpa-pagination .page-numbers:hover {
	background-color: #5A3F00;
	color: #ffffff;
}

.cpa-pagination .page-numbers.dots {
	pointer-events: none;
	background: transparent;
	color: #333;
}

.cpa-pagination .page-numbers.prev,
.cpa-pagination .page-numbers.next {
	width: 40px;
	height: 40px;
	background: transparent;
}

.cpa-pagination .page-numbers.prev svg,
.cpa-pagination .page-numbers.next svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* === Responsive === */
@media (max-width: 768px) {
	.cpa-post-item {
		flex-direction: column !important;
	}

	.cpa-image-wrap,
	.cpa-content-wrap {
		width: 100% !important;
	}

	.cpa-image-wrap {
		height: 250px !important;
	}

	.cpa-content-inner {
		padding: 20px 0;
	}
}
