/* =========================================================================
   Recommended Posts Block — front-end + editor styles
   All visual tweaks live here. Colors/sizes are grouped as CSS variables.
   ========================================================================= */
.rpb {
	--rpb-gap: 12px;
	--rpb-card-h: 118px;
	/*--rpb-radius: 4px;*/
	--rpb-accent: #0C4A7C;
	--rpb-title: #ffffff;

	display: flex;
	align-items: stretch;
	gap: var(--rpb-gap);
	width: 100%;
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
	flex-direction: column;

}

.rpb * {
	box-sizing: border-box;
}

/* ---------- Left CTA (vertical link) ---------- */
.rpb__cta {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 4px 2px;
	text-decoration: none;
	color: #6b6b6b;
	justify-content: flex-end;
}

.rpb__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--rpb-accent);
	color: #fff;
	flex: 0 0 auto;
}

.rpb__cta-text {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: none;
	white-space: nowrap;
	transition: color .2s ease;
}

.rpb__cta:hover .rpb__cta-text {
	color: var(--rpb-accent);
}

/* ---------- Cards grid ---------- */
.rpb__grid {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--rpb-gap);
	min-width: 0;
}

.rpb__card {
	position: relative;
	display: block;
	min-height: var(--rpb-card-h);
	border-radius: var(--rpb-radius);
	overflow: hidden;
	background-color: #2a2a2a;
	background-size: cover;
	background-position: center;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.rpb__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
}

.rpb__card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, .15) 0%,
		rgba(0, 0, 0, .55) 55%,
		rgba(0, 0, 0, .78) 100%
	);
}

.rpb__card-title {
	position: absolute;
	left: 14px;
	right: 14px;
	top: 16px;
	color: var(--rpb-title);
	font-size: 14px;
	line-height: 1.35;
	font-weight: 600;
	z-index: 1;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Editor placeholder ---------- */
.rpb--empty {
	display: block;
	padding: 20px;
	background: #f3f4f5;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	color: #50575e;
	font-size: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.rpb__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.rpb {
		flex-direction: column;
	}
	.rpb__cta {
		flex-direction: row;
		justify-content: center;
	}
	.rpb__cta-text {
		writing-mode: horizontal-tb;
		transform: none;
	}
	.rpb__grid {
		grid-template-columns: 1fr;
	}
	.rpb__card {
		min-height: 140px;
	}
}
