/* ═══════════════════════════════════════════════════════════════
   Category Carousel Widget – Styles
   ═══════════════════════════════════════════════════════════════ */

.rd-cc {
	position: relative;
	overflow: visible;
}

/* ─── Filters ──────────────────────────────────────────────── */

.rd-cc__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	justify-content: center;
}

.rd-cc__filter {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	padding: 8px 18px;
	border-radius: 4px;
	transition: all 0.3s ease;
	color: #64748b;
}

.rd-cc__filter:hover {
	color: #1e293b;
}

.rd-cc__filter.is-active {
	color: #1e293b;
	font-weight: 600;
}

/* Filter: Pills */
.rd-cc__filters--pills .rd-cc__filter {
	border-radius: 50px;
	background: #f1f5f9;
}

.rd-cc__filters--pills .rd-cc__filter.is-active {
	background: #1e293b;
	color: #fff;
}

/* Filter: Tabs */
.rd-cc__filters--tabs {
	border-bottom: 2px solid #e2e8f0;
	gap: 0;
	border-radius: 0;
}

.rd-cc__filters--tabs .rd-cc__filter {
	border-radius: 0;
	padding: 10px 20px;
	margin-bottom: -2px;
	border-bottom: 2px solid transparent;
}

.rd-cc__filters--tabs .rd-cc__filter.is-active {
	border-bottom-color: #1e293b;
}

/* Filter: Underline */
.rd-cc__filters--underline .rd-cc__filter {
	border-radius: 0;
	position: relative;
	padding: 8px 16px;
}

.rd-cc__filters--underline .rd-cc__filter::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background: #1e293b;
	transition: all 0.3s ease;
	transform: translateX(-50%);
}

.rd-cc__filters--underline .rd-cc__filter.is-active::after {
	width: 100%;
}

/* ─── Swiper Container ─────────────────────────────────────── */

.rd-cc__swiper {
	overflow: hidden;
	position: relative;
}

.rd-cc__swiper .swiper-wrapper {
	align-items: stretch;
}

/* Editor fallback: display slides inline when Swiper not initialized */
.rd-cc__swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex;
	flex-wrap: nowrap;
	gap: 24px;
	overflow-x: auto;
}

.rd-cc__swiper:not(.swiper-initialized) .swiper-slide {
	flex: 0 0 calc(25% - 18px);
	max-width: calc(25% - 18px);
	min-width: 180px;
}

.rd-cc--equal-height .swiper-slide {
	height: auto;
}

.rd-cc--equal-height .rd-cc__card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* ─── Card ─────────────────────────────────────────────────── */

.rd-cc__card {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
	display: flex;
	flex-direction: column;
}

.rd-cc--hover-scale .rd-cc__card:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.rd-cc__card--link-card {
	cursor: pointer;
}

.rd-cc__link-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
}

/* Card Layout: Image Position */
.rd-cc__card--img-top {
	flex-direction: column;
}

.rd-cc__card--img-left {
	flex-direction: row;
}

.rd-cc__card--img-right {
	flex-direction: row-reverse;
}

.rd-cc__card--img-center {
	flex-direction: column;
	position: relative;
}

.rd-cc__card--img-center .rd-cc__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.rd-cc__card--img-center .rd-cc__img-wrap {
	height: 100%;
	border-radius: 0;
}

.rd-cc__card--img-center .rd-cc__body {
	background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
	padding: 30px 20px 20px;
	min-height: 200px;
	justify-content: flex-end;
}

.rd-cc__card--img-center .rd-cc__title {
	color: #fff;
}

.rd-cc__card--img-center .rd-cc__desc {
	color: rgba(255,255,255,0.85);
}

.rd-cc__card--img-left .rd-cc__media,
.rd-cc__card--img-right .rd-cc__media {
	flex: 0 0 40%;
	max-width: 40%;
}

.rd-cc__card--img-left .rd-cc__body,
.rd-cc__card--img-right .rd-cc__body {
	flex: 1;
}

/* ─── Media / Image ────────────────────────────────────────── */

.rd-cc__media {
	position: relative;
	overflow: hidden;
}

.rd-cc__media--shape-circle {
	overflow: visible;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 12px 0;
}

.rd-cc__img-link {
	display: block;
	position: relative;
}

.rd-cc__img-wrap {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 4 / 3;
}

.rd-cc__img-wrap--arch {
	border-radius: 50% 50% 0 0;
	aspect-ratio: 16 / 10;
}

.rd-cc__img-wrap--circle {
	border-radius: 50%;
	width: 150px;
	height: 150px;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	flex-shrink: 0;
}

.rd-cc__card--img-left .rd-cc__img-wrap--circle,
.rd-cc__card--img-right .rd-cc__img-wrap--circle {
	margin-left: 20px;
	margin-right: 20px;
}

.rd-cc__img-wrap--rounded {
	border-radius: 12px;
	aspect-ratio: 4 / 3;
}

.rd-cc__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.rd-cc--img-zoom .rd-cc__card:hover .rd-cc__img {
	transform: scale(1.08);
}

.rd-cc__overlay {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.rd-cc__card:hover .rd-cc__overlay {
	opacity: 1;
}

/* ─── Body ─────────────────────────────────────────────────── */

.rd-cc__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.rd-cc__card--img-center .rd-cc__body {
	position: relative;
	z-index: 2;
}

.rd-cc__title {
	font-size: 18px;
	font-weight: 600;
	color: #1e293b;
	margin: 0;
	line-height: 1.3;
	transition: color 0.3s ease;
}

.rd-cc__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.rd-cc__title a:hover {
	color: #3b82f6;
}

.rd-cc__desc {
	font-size: 14px;
	color: #64748b;
	margin: 8px 0 0;
	line-height: 1.5;
}

/* ─── Navigation: Arrows ───────────────────────────────────── */

.rd-cc .swiper-button-prev,
.rd-cc .swiper-button-next {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	color: #1e293b;
	transition: all 0.3s ease;
}

.rd-cc .swiper-button-prev::after,
.rd-cc .swiper-button-next::after {
	font-size: 14px;
	font-weight: 700;
}

.rd-cc .swiper-button-prev:hover,
.rd-cc .swiper-button-next:hover {
	background: #1e293b;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Arrow Position: Outside */
.rd-cc--arrows-outside {
	padding: 0 50px;
}

.rd-cc--arrows-outside .swiper-button-prev {
	left: 0;
}

.rd-cc--arrows-outside .swiper-button-next {
	right: 0;
}

/* Arrow Position: Bottom */
.rd-cc--arrows-bottom {
	padding-bottom: 60px;
}

.rd-cc--arrows-bottom .swiper-button-prev,
.rd-cc--arrows-bottom .swiper-button-next {
	top: auto;
	bottom: 0;
}

.rd-cc--arrows-bottom .swiper-button-prev {
	left: calc(50% - 50px);
}

.rd-cc--arrows-bottom .swiper-button-next {
	right: calc(50% - 50px);
}

/* ─── Navigation: Dots ─────────────────────────────────────── */

.rd-cc .swiper-pagination {
	position: relative;
	margin-top: 20px;
	bottom: auto;
}

.rd-cc .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #cbd5e1;
	opacity: 1;
	transition: all 0.3s ease;
}

.rd-cc .swiper-pagination-bullet-active {
	background: #1e293b;
	width: 24px;
	border-radius: 4px;
}

/* ─── Navigation: Scrollbar ────────────────────────────────── */

.rd-cc .swiper-scrollbar {
	position: relative;
	margin-top: 20px;
	bottom: auto;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
}

.rd-cc .swiper-scrollbar-drag {
	background: #1e293b;
	border-radius: 2px;
}

/* ─── Slide Pool (hidden, for filter animation) ────────────── */

.rd-cc__slide-pool {
	display: none !important;
	visibility: hidden;
	height: 0;
	overflow: hidden;
}

/* ─── Empty State ──────────────────────────────────────────── */

.rd-cc__empty {
	padding: 40px;
	text-align: center;
	color: #94a3b8;
	font-size: 14px;
	border: 2px dashed #e2e8f0;
	border-radius: 12px;
}

/* ─── Accessibility ────────────────────────────────────────── */

.rd-cc__filter:focus-visible,
.rd-cc .swiper-button-prev:focus-visible,
.rd-cc .swiper-button-next:focus-visible,
.rd-cc__title a:focus-visible,
.rd-cc__img-link:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 1024px) {
	.rd-cc--arrows-outside {
		padding: 0 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rd-cc__card,
	.rd-cc__img,
	.rd-cc__filter,
	.rd-cc .swiper-button-next,
	.rd-cc .swiper-button-prev {
		transition: none;
	}
}

@media (max-width: 767px) {
	.rd-cc--arrows-outside {
		padding: 0;
	}

	.rd-cc .swiper-button-prev,
	.rd-cc .swiper-button-next {
		width: 32px;
		height: 32px;
	}

	.rd-cc .swiper-button-prev::after,
	.rd-cc .swiper-button-next::after {
		font-size: 12px;
	}

	.rd-cc__body {
		padding: 14px;
	}

	.rd-cc__title {
		font-size: 15px;
	}

	.rd-cc__desc {
		font-size: 13px;
	}

	.rd-cc__filters {
		gap: 6px;
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}

	.rd-cc__filter {
		font-size: 12px;
		padding: 6px 12px;
		flex-shrink: 0;
	}

	.rd-cc__card--img-left,
	.rd-cc__card--img-right {
		flex-direction: column;
	}

	.rd-cc__card--img-left .rd-cc__media,
	.rd-cc__card--img-right .rd-cc__media {
		flex: none;
		max-width: 100%;
	}
}
