/* BaniPress Category News Widget - sample-matched RTL layout */
.bpcnw-box {
	width: 100%;
	padding: 0 0 14px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
	direction: rtl;
}

.bpcnw-heading-wrap {
	display: flex;
	justify-content: flex-start;
	height: 52px;
	position: relative;
	padding-right: 12px;
	background: #fff;
}

.bpcnw-heading {
	position: relative;
	align-self: flex-start;
	margin: 0;
	padding: 7px 18px 8px;
	min-width: 118px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	color: #fff;
	background: #ff6a00;
	box-shadow: none;
}

/* Decorative corner shown in the reference design. */
.bpcnw-heading::before {
	content: '';
	position: absolute;
	top: -7px;
	left: -7px;
	width: 10px;
	height: 10px;
	border-top: 2px solid #ff6a00;
	border-left: 2px solid #ff6a00;
	background: transparent;
}

.bpcnw-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px 42px;
	width: 100%;
	padding: 0 28px 8px;
	box-sizing: border-box;
	direction: rtl;
}

.bpcnw-grid *,
.bpcnw-grid *::before,
.bpcnw-grid *::after {
	box-sizing: border-box;
}

.bpcnw-item {
	display: flex;
	/* RTL: image on the right, text block immediately to its left. */
	flex-direction: row !important;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	min-width: 0;
	text-align: right;
	direction: rtl;
}

.bpcnw-thumb {
	order: 0;
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
	display: block;
	border-radius: 50%;
	overflow: hidden;
	text-decoration: none;
	background: #eee;
}

.bpcnw-image,
.bpcnw-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.bpcnw-placeholder {
	background: linear-gradient(135deg, #e7e7e7, #cfcfcf);
}

.bpcnw-content {
	order: 1;
	text-align: right;
	flex: 1 1 auto;
	min-width: 0;
}

.bpcnw-title {
	margin: 0 0 3px;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.85;
	overflow-wrap: anywhere;
}

.bpcnw-title a {
	color: #222;
	text-decoration: none;
	background: transparent !important;
	transition: color .2s ease;
}

.bpcnw-title a:hover,
.bpcnw-title a:focus {
	color: #ff6a00;
	background: transparent !important;
}

.bpcnw-author {
	margin: 0;
	font-size: 10px;
	font-weight: 400;
	line-height: 1.6;
	color: #ff6a00;
}

.bpcnw-author a {
	color: inherit;
	text-decoration: none;
	background: transparent !important;
}

.bpcnw-author a:hover,
.bpcnw-author a:focus {
	text-decoration: underline;
	background: transparent !important;
}

.bpcnw-empty {
	padding: 18px;
	text-align: center;
	font-size: 14px;
	color: #777;
	background: #fafafa;
	border: 1px solid #eee;
}

.bpcnw-columns-1 { grid-template-columns: 1fr; }
.bpcnw-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bpcnw-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bpcnw-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
	.bpcnw-grid,
	.bpcnw-columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.bpcnw-grid,
	.bpcnw-columns-2,
	.bpcnw-columns-3,
	.bpcnw-columns-4 {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 0 16px 8px;
	}

	.bpcnw-heading-wrap {
		padding-right: 8px;
	}

	.bpcnw-thumb {
		flex-basis: 68px;
		width: 68px;
		height: 68px;
	}

	.bpcnw-title {
		font-size: 13px;
	}
}
