.ccp-carousel-wrap {
	position: relative;
	max-width: 100%;
	width: 100%;
	margin: 0 auto;
	padding: 0 36px;
	box-sizing: border-box;

	/* Local theme tokens - scoped to this component only, matching the
	   reference design. They never touch the rest of the site. */
	--ccp-card-bg: #f5f5f7;
	--ccp-text: #1a1a1a;
	--ccp-muted: #6b6b6f;
}
.ccp-carousel-wrap * {
	box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
	.ccp-carousel-wrap:not([data-ccp-theme="light"]) {
		--ccp-card-bg: #1c1c1f;
		--ccp-text: #f2f2f2;
		--ccp-muted: #a3a3a8;
	}
}
.ccp-carousel-wrap[data-ccp-theme="dark"] {
	--ccp-card-bg: #1c1c1f;
	--ccp-text: #f2f2f2;
	--ccp-muted: #a3a3a8;
}

.ccp-carousel-viewport {
	overflow-x: hidden;
	overflow-y: visible;
	width: 100%;
	/* Breathing room so a lifted card's hover shadow isn't clipped */
	padding: 4px 0 20px;
	margin: -4px 0 -20px;
	cursor: grab;
	touch-action: pan-y;
}
.ccp-carousel-viewport.ccp-dragging {
	cursor: grabbing;
}

.ccp-carousel-track {
	display: flex;
	will-change: transform;
	transition: transform 0.45s ease;
	user-select: none;
}
.ccp-carousel-track img {
	-webkit-user-drag: none;
	user-drag: none;
	pointer-events: none;
}

/* Card width is pure CSS (percentage of the track), so it never depends on
   JS running at the right time or on clientWidth being available yet. */
.ccp-slide {
	flex: 0 0 calc(100% / var(--ccp-items-desktop, 4));
	max-width: calc(100% / var(--ccp-items-desktop, 4));
	padding: 9px;
}

.ccp-carousel-wrap.ccp-no-nav {
	padding-left: 4px;
	padding-right: 4px;
}

@media (max-width: 992px) {
	.ccp-slide {
		flex-basis: calc(100% / var(--ccp-items-tablet, 2));
		max-width: calc(100% / var(--ccp-items-tablet, 2));
	}
}

@media (max-width: 600px) {
	.ccp-slide {
		flex-basis: calc(100% / var(--ccp-items-mobile, 1));
		max-width: calc(100% / var(--ccp-items-mobile, 1));
	}
	.ccp-carousel-wrap {
		padding: 0 28px;
	}
}

.ccp-card {
	display: flex;
	flex-direction: column;
	text-align: center;
	background: var(--ccp-card-bg);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: inherit;
	height: 100%;
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.ccp-card:hover,
.ccp-card:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 10px 18px rgba(20, 20, 30, 0.1), 0 2px 6px rgba(20, 20, 30, 0.08);
}

.ccp-card-image {
	position: relative;
	width: 100%;
	height: 170px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px 10px 0 0;
	/* Gentle fallback background so a card never looks like a blank black
	   box before an image is uploaded. Tinted with the icon color. */
	background: radial-gradient(circle at 35% 20%, color-mix(in srgb, var(--ccp-circle-color, #e53935) 45%, #1a2b52) 0%, #12131c 75%);
}

.ccp-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	position: relative;
	z-index: 1;
	transition: transform 0.35s ease;
}
.ccp-card:hover .ccp-card-image img {
	transform: scale(1.07);
}

.ccp-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 10, 20, 0) 40%, rgba(10, 10, 20, 0.45) 100%);
	pointer-events: none;
}

/* The badge sits between the image block and the text body, as a sibling
   of both (not clipped by .ccp-card-image's own overflow:hidden), so it
   always renders as a full circle straddling the boundary. Only margin-top
   is negative (pulling it up over the image) - the space below it is left
   to normal flow so it can never overlap the title underneath. */
.ccp-card-icon {
	position: relative;
	margin: -24px auto 0;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--ccp-circle-color, #e53935);
	background: linear-gradient(160deg, var(--ccp-circle-color, #e53935), color-mix(in srgb, var(--ccp-circle-color, #e53935) 70%, black));
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	z-index: 2;
	transition: transform 0.28s ease;
}
.ccp-card:hover .ccp-card-icon {
	transform: scale(1.1);
}

.ccp-card-icon img {
	width: var(--ccp-icon-size, 26px);
	height: var(--ccp-icon-size, 26px);
	object-fit: contain;
}

.ccp-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 14px 20px;
}

.ccp-card-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--ccp-text);
}

.ccp-card-subtitle {
	margin: 0;
	font-size: 0.78rem;
	color: var(--ccp-muted);
	line-height: 1.4;
}

.ccp-card-link {
	margin-top: 4px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ccp-circle-color, #e53935);
	text-decoration: none;
	position: relative;
}
.ccp-card-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -2px;
	height: 1px;
	background: currentColor;
	transition: right 0.25s ease;
}
.ccp-card:hover .ccp-card-link::after {
	right: 0;
}

/* Nav arrows */
.ccp-nav {
	position: absolute;
	top: 45%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	color: #333;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
}
.ccp-nav:hover {
	background: #f5f5f5;
}
.ccp-nav-prev {
	left: -6px;
}
.ccp-nav-next {
	right: -6px;
}
.ccp-nav[disabled] {
	opacity: 0.35;
	cursor: default;
}
.ccp-nav.ccp-nav-hidden {
	display: none;
}

@media (max-width: 782px) {
	.ccp-nav {
		width: 32px;
		height: 32px;
		font-size: 12px;
	}
}

/* ---------------------------------------------------------------------
   Mobile compact mode: an alternate "app-style" row of rounded icon
   tiles, shown only under 600px, replacing the full card carousel.
   Off by default; enabled per the "Mode compact mobile" setting.
   ------------------------------------------------------------------- */
.ccp-mobile-tiles {
	display: none;
	box-sizing: border-box;
}
.ccp-mobile-tiles * {
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.ccp-has-mobile-compact .ccp-carousel-wrap {
		display: none;
	}
	.ccp-has-mobile-compact .ccp-mobile-tiles {
		display: flex;
		gap: 16px;
		overflow-x: auto;
		max-width: 100%;
		padding: 8px 16px 14px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.ccp-has-mobile-compact .ccp-mobile-tiles::-webkit-scrollbar {
		display: none;
	}
}

.ccp-tile {
	flex: 0 0 calc((100% - (var(--ccp-compact-items, 4) - 1) * 16px) / var(--ccp-compact-items, 4));
	max-width: calc((100% - (var(--ccp-compact-items, 4) - 1) * 16px) / var(--ccp-compact-items, 4));
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.ccp-tile-box {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* Fallback color (tinted per tile via --i), isolated on its own layer so
   the hue-rotate used for variety never distorts the real photo above it. */
.ccp-tile-box::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(
		120% 120% at 30% 20%,
		color-mix(in srgb, var(--ccp-circle-color, #e53935) 55%, white) 0%,
		color-mix(in srgb, var(--ccp-circle-color, #e53935) 85%, black) 75%
	);
	filter: hue-rotate(calc(var(--i, 0) * 35deg));
	z-index: 0;
}
.ccp-tile:active .ccp-tile-box {
	transform: translateY(-1px) scale(0.97);
}

.ccp-tile-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	position: relative;
	z-index: 1;
}

.ccp-tile-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--ccp-tile-title-color, #1c1c1e);
	letter-spacing: 0.1px;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
