.rp-cards-widget {
	--rp-visible-cards: 4;
	--rp-grid-columns: 4;
	position: relative;
	width: 100%;
}

.rp-cards-empty {
	font-family: "Ubuntu Sans", sans-serif;
	color: #888;
	padding: 20px;
}

.rp-cards-nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 16px;
}

.rp-cards-arrow {
	width: 44px;
	height: 44px;
	border-radius: 0px !important;
	border: 1px solid #38B44A !important;
	background: #fff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
	padding: 0;
	outline: none !important;
	box-shadow: none !important;
}

.rp-cards-arrow img {
	width: 18px;
	height: 18px;
	display: block;
}

.rp-cards-arrow.rp-cards-prev,
.rp-cards-arrow.rp-ba-prev {
	background: #38B44A !important;
}

.rp-cards-arrow.rp-cards-next:hover,
.rp-cards-arrow.rp-cards-next:focus,
.rp-cards-arrow.rp-ba-next:hover,
.rp-cards-arrow.rp-ba-next:focus {
	background: #38B44A !important;
	border-color: #38B44A !important;
}

.rp-cards-arrow.rp-cards-prev:hover,
.rp-cards-arrow.rp-cards-prev:focus,
.rp-cards-arrow.rp-ba-prev:hover,
.rp-cards-arrow.rp-ba-prev:focus {
	background: #2e8f3a !important;
	border-color: #2e8f3a !important;
}

/* The green-right icon becomes invisible on a green hover background,
   so force it white on hover via filter (works regardless of source color) */
.rp-cards-arrow.rp-cards-next:hover img,
.rp-cards-arrow.rp-cards-next:focus img,
.rp-cards-arrow.rp-ba-next:hover img,
.rp-cards-arrow.rp-ba-next:focus img {
	filter: brightness(0) invert(1);
}

.rp-cards-arrow:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ---------- CAROUSEL layout: native horizontal scroll (robust, no card-count limit) ---------- */
.rp-layout-carousel .rp-cards-track-wrap {
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
}

.rp-layout-carousel .rp-cards-track-wrap::-webkit-scrollbar {
	display: none;
}

.rp-layout-carousel .rp-cards-track {
	display: flex;
	gap: 20px;
}

.rp-layout-carousel .rp-card {
	scroll-snap-align: start;
	flex: 0 0 calc((100% - (var(--rp-visible-cards) - 1) * 20px) / var(--rp-visible-cards));
}

/* ---------- GRID layout: static, wraps, no scrolling/arrows ---------- */
.rp-layout-grid .rp-cards-track-wrap {
	overflow: visible;
	width: 100%;
}

.rp-layout-grid .rp-cards-track {
	display: grid;
	grid-template-columns: repeat(var(--rp-grid-columns), 1fr);
	gap: 20px;
}

.rp-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border: 1px solid #ebebeb;
	border-radius: 0px;
	overflow: hidden;
	background: #fff;
}

.rp-card-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #e5e7eb;
	overflow: hidden;
}

.rp-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rp-card-badge {
	position: absolute;
	top: 0;
	left: 0;
	padding: 6px 12px;
	border-radius: 0px;
	font-size: 12px;
	font-weight: 500;
	color: #fff;
	font-family: "Ubuntu Sans", sans-serif;
	z-index: 2;
}

.rp-badge-green { background: rgba(56, 180, 74, 1); }
.rp-badge-blue  { background: rgba(0, 173, 238, 1); }
.rp-badge-grey  { background: rgba(69, 111, 130, 1); }

.rp-card-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 30px 16px 14px;
	background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0) 100%);
}

.rp-card-title {
	font-family: "Ubuntu", sans-serif;
	font-size: 16px;
	font-weight: 500;
	margin: 0 0 6px;
	color: #fff;
}

.rp-card-location {
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: "Ubuntu", sans-serif;
	font-weight: 400;
	font-size: 12px;
	color: rgba(255,255,255,0.9);
}

.rp-card-stats {
	display: flex;
	border-top: 1px solid rgba(192, 192, 192, 0.5);
	background-color: rgba(235, 235, 235, 0.3);
}

.rp-stat {
	flex: 1;
	text-align: center;
	padding: 12px 6px;
	border-right: 1px solid #ebebeb;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rp-stat:last-child {
	border-right: none;
}

.rp-stat-value {
	font-family: "Ubuntu Sans", sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: rgba(51, 51, 51, 1);
}

.rp-stat-label {
	font-family: "Ubuntu Sans", sans-serif;
	font-size: 12px;
	color: rgba(118, 118, 118, 1);
	font-weight: 400;
}

.rp-view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	float: right;
	color: #456F82;
	font-family: "Ubuntu Sans", sans-serif;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

.rp-view-all:hover {
	text-decoration: underline;
}

@media (max-width: 1024px) {
	.rp-layout-carousel .rp-cards-widget {
		--rp-visible-cards: 2 !important;
	}
	.rp-layout-grid .rp-cards-widget {
		--rp-grid-columns: 2 !important;
	}
}

@media (max-width: 600px) {
	.rp-cards-widget {
		--rp-visible-cards: 1.15 !important;
	}

	/* Per instruction: on mobile, even Grid layout behaves like a swipeable carousel */
	.rp-layout-grid .rp-cards-track-wrap {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}
	.rp-layout-grid .rp-cards-track-wrap::-webkit-scrollbar {
		display: none;
	}
	.rp-layout-grid .rp-cards-track {
		display: flex;
		gap: 20px;
	}
	.rp-layout-grid .rp-card {
		scroll-snap-align: start;
		flex: 0 0 85%;
	}
}
