/* Highlighted news source badge */
.utf_post_source {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: #1a1a1a;
	background: #ffd400;
	border: 1px solid #e6bf00;
	border-radius: 4px;
	padding: 0 8px;
	height: 20px;
	line-height: 20px;
	margin: 0;
	vertical-align: middle;
	position: static;
	z-index: 2;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
	white-space: nowrap;
	max-width: 130px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.utf_post_source i {
	margin-right: 4px;
	font-size: 10px;
}

/* Badge row: category + source side by side in text area only */
.utf_post_badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	position: relative;
	z-index: 3;
	width: 100%;
}

.utf_post_badges .utf_post_cat,
.utf_post_badges .utf_post_source,
a.utf_post_cat.utf_post_cat_inline {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	margin: 0 !important;
	float: none !important;
}

/* Fix list card float overlap: use flex instead of float */
.utf_list_post_block .utf_list_post > li,
.utf_list_post_block ul.utf_list_post > li.clearfix {
	max-height: none !important;
	height: auto !important;
	overflow: visible !important;
	margin-bottom: 18px;
}

.utf_post_block_style.post-float.utf_post_list_item,
.utf_post_block_style.post-float {
	display: flex !important;
	align-items: flex-start;
	gap: 14px;
	overflow: visible !important;
	clear: both;
}

.utf_post_block_style.post-float .utf_post_thumb {
	float: none !important;
	flex: 0 0 100px;
	width: 100px;
	max-width: 100px;
	margin: 0 !important;
	position: relative;
	z-index: 1;
}

.utf_post_block_style.post-float .utf_post_thumb img {
	width: 100%;
	max-width: 100px;
	min-height: 75px;
	height: 75px;
	object-fit: cover;
	display: block;
}

.utf_post_block_style.post-float .utf_post_content {
	float: none !important;
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	overflow: hidden;
	position: relative;
	z-index: 2;
}

.utf_post_block_style.post-float .utf_post_title {
	margin-top: 0;
	margin-bottom: 6px;
	line-height: 1.35;
}

.utf_post_block_style.post-float .utf_post_meta {
	margin: 0;
	position: static !important;
}

.utf_post_block_style.post-float .utf_post_meta span {
	display: inline-block;
	position: static !important;
}

/* Category on thumb stays absolute on image only */
.utf_post_block_style.post-float .utf_post_thumb .utf_post_cat {
	position: absolute !important;
	top: 6px !important;
	left: 6px !important;
	z-index: 2;
}

/* Overlay / featured: keep badges in content overlay, never absolute-stack */
.utf_post_overaly_style .utf_post_content .utf_post_badges .utf_post_cat,
.utf_featured_post .utf_post_content .utf_post_badges .utf_post_cat,
.utf_post_overaly_style .utf_post_content .utf_post_cat.utf_post_cat_inline,
.utf_featured_post .utf_post_content .utf_post_cat.utf_post_cat_inline {
	position: static !important;
	top: auto !important;
	left: auto !important;
}

.utf_post_overaly_style .utf_post_content,
.utf_featured_post .utf_post_content {
	z-index: 2;
}

.utf_post_overaly_style .utf_post_badges,
.utf_featured_post .utf_post_badges {
	margin-bottom: 10px;
}

/* Half / block cards: category on image, source in text */
.utf_post_block_style .utf_post_thumb {
	position: relative;
}

.utf_post_block_style > .utf_post_cat {
	/* legacy absolute cats moved into thumb in markup */
	display: none;
}

.utf_post_block_style .utf_post_thumb > .utf_post_cat {
	display: inline-block;
	position: absolute;
	top: 15px;
	left: 15px;
	z-index: 2;
}

/* More News half cards: flex so source never wraps under image */
.utf_post_block_style.utf_post_float_half.utf_post_half_item,
.utf_post_block_style.utf_post_float_half {
	display: flex !important;
	align-items: flex-start;
	gap: 24px;
	overflow: visible !important;
	margin-bottom: 30px;
}

.utf_post_block_style.utf_post_float_half .utf_post_thumb {
	float: none !important;
	flex: 0 0 280px;
	width: 280px;
	max-width: 280px;
	margin: 0 !important;
	position: relative;
	z-index: 1;
}

.utf_post_block_style.utf_post_float_half .utf_post_thumb img {
	width: 100%;
	max-width: 280px;
	min-height: 180px;
	height: 180px;
	object-fit: cover;
	display: block;
}

.utf_post_block_style.utf_post_float_half .utf_post_content {
	float: none !important;
	flex: 1 1 auto;
	min-width: 0;
	position: relative;
	z-index: 2;
	padding-top: 2px;
}

.utf_post_block_style.utf_post_float_half .utf_post_title {
	margin-top: 0;
	margin-bottom: 10px;
}

.utf_post_block_style.utf_post_float_half .utf_post_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
}

.utf_post_block_style.utf_post_float_half .utf_post_meta .utf_post_source,
.utf_post_block_style.post-float .utf_post_meta .utf_post_source,
.utf_post_block_item .utf_post_meta .utf_post_source {
	position: static !important;
	margin: 0 !important;
	vertical-align: middle;
}

/* Stacked block cards: keep content clearly below image */
.utf_post_block_item .utf_post_thumb {
	margin-bottom: 12px;
}

.utf_post_block_item .utf_post_content {
	padding-top: 0;
	position: relative;
	z-index: 2;
}

.utf_post_block_item .utf_post_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* List meta row with source */
.utf_post_block_style.post-float .utf_post_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* Footer recent posts */
.footer .utf_post_block_style.post-float {
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
}

.footer .utf_post_block_style.post-float .utf_post_thumb {
	float: none !important;
	flex: 0 0 80px;
	width: 80px;
	margin: 0 !important;
}

.footer .utf_post_block_style.post-float .utf_post_content {
	flex: 1 1 auto;
	min-width: 0;
}

.category-listing .utf_post_badges {
	margin-bottom: 8px;
}

.category-listing .utf_post_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

@media (max-width: 767px) {
	.utf_post_block_style.utf_post_float_half.utf_post_half_item,
	.utf_post_block_style.utf_post_float_half {
		flex-direction: column;
		gap: 12px;
	}

	.utf_post_block_style.utf_post_float_half .utf_post_thumb {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}

	.utf_post_block_style.utf_post_float_half .utf_post_thumb img {
		max-width: 100%;
		width: 100%;
		height: auto;
		min-height: 0;
	}
}
