/* =========================================================================
   Creative Category Showcase – base styles
   Layout / shape / template rules live in ccs-devices.css and are compiled
   per device (desktop / tablet / mobile) by PHP.
   ========================================================================= */

.ccs {
	--ccs-radius: 18px;
	--ccs-accent: #111;
	--ccs-speed: 30s;
	--ccs-arrow-size: 42px;
	--ccs-track-pad: 14px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}
.ccs *,
.ccs *::before,
.ccs *::after { box-sizing: border-box; }

.ccs-viewport { position: relative; }

.ccs .ccs-track {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ccs .ccs-item {
	margin: 0;
	padding: 0;
	min-width: 0;
	list-style: none;
}
.ccs .ccs-item::before,
.ccs .ccs-item::marker { content: none; }

.ccs .ccs-clone { display: none !important; }

/* ---- Card -------------------------------------------------------------- */
.ccs .ccs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none !important;
	outline-offset: 4px;
	transform: perspective(900px) rotateX(var(--ccs-rx, 0deg)) rotateY(var(--ccs-ry, 0deg)) translateY(var(--ccs-lift, 0px)) rotate(var(--ccs-rot, 0deg));
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease, background-color .3s ease;
}
.ccs .ccs-card:focus-visible { outline: 2px solid var(--ccs-accent); }

.ccs .ccs-media {
	position: relative;
	display: block;
	width: 100%;
	flex: 0 0 auto;
	aspect-ratio: var(--ccs-ratio, 1/1);
	overflow: hidden;
	isolation: isolate;
	background: #eef0f3;
	transition: border-radius .6s ease, box-shadow .35s ease;
}
.ccs .ccs-media .ccs-img,
.ccs .ccs-media img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}
.ccs .ccs-shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	background: linear-gradient(to top, var(--ccs-shade-color, rgba(0, 0, 0, .72)) 0%, rgba(0, 0, 0, 0) 72%);
	transition: opacity .4s ease;
}

.ccs .ccs-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: 14px 6px 2px;
}
.ccs .ccs-title {
	margin: 0;
	padding: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
	transition: color .3s ease, transform .3s ease, background-color .3s ease, background-size .4s ease;
}
.ccs .ccs-count { font-size: .85rem; opacity: .75; }
.ccs .ccs-desc {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--ccs-desc-lines, 3);
	overflow: hidden;
	font-size: .88rem;
	line-height: 1.5;
	opacity: .85;
}
.ccs .ccs-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-size: .85rem;
	font-weight: 600;
	transition: gap .3s ease, background-color .3s ease, color .3s ease;
}
.ccs .ccs-btn svg { width: 1em; height: 1em; }
.ccs .ccs-card:hover .ccs-btn { gap: 10px; }

.ccs .ccs-badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	z-index: 4;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ccs-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .04em;
	text-transform: uppercase;
	pointer-events: none;
}

.ccs-rtl .ccs-btn svg,
.ccs-rtl .ccs-arrow svg { transform: scaleX(-1); }

/* ---- Hover effects ----------------------------------------------------- */
.ccs-hover-zoom .ccs-card:hover .ccs-img { transform: scale(1.08); }

.ccs-hover-lift .ccs-card:hover { --ccs-lift: -8px; }
.ccs-hover-lift .ccs-card:hover .ccs-media { box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35); }

.ccs-hover-tilt .ccs-card { transition: transform .18s ease-out, box-shadow .45s ease; }
.ccs-hover-tilt .ccs-card:hover .ccs-img { transform: scale(1.06); }

.ccs-hover-grayscale .ccs-img { filter: grayscale(1); }
.ccs-hover-grayscale .ccs-card:hover .ccs-img { filter: none; transform: scale(1.04); }

.ccs-hover-shine .ccs-media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
	transform: translateX(-120%);
	transition: transform .9s ease;
}
.ccs-hover-shine .ccs-card:hover .ccs-media::after { transform: translateX(120%); }

.ccs-hover-ring .ccs-card:hover .ccs-media { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ccs-accent); }

/* ---- Carousel navigation ---------------------------------------------- */
.ccs .ccs-arrow {
	display: none;
	position: absolute;
	top: 50%;
	z-index: 6;
	width: var(--ccs-arrow-size);
	height: var(--ccs-arrow-size);
	min-height: 0;
	margin: calc(var(--ccs-arrow-size) / -2) 0 0;
	padding: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--ccs-arrow-bg, #fff);
	color: var(--ccs-arrow-color, #111);
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
	transition: opacity .3s ease, transform .3s ease, background-color .3s ease, color .3s ease;
}
.ccs .ccs-arrow svg { width: 45%; height: 45%; }
.ccs .ccs-arrow:hover { transform: scale(1.08); }
.ccs .ccs-arrow:disabled { opacity: .35; cursor: default; transform: none; }
.ccs .ccs-prev { inset-inline-start: 10px; }
.ccs .ccs-next { inset-inline-end: 10px; }
.ccs-arrows-outside .ccs-prev { inset-inline-start: calc(var(--ccs-arrow-size) * -1 - 12px); }
.ccs-arrows-outside .ccs-next { inset-inline-end: calc(var(--ccs-arrow-size) * -1 - 12px); }

.ccs .ccs-dots {
	display: none;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}
.ccs .ccs-dot {
	width: 8px;
	height: 8px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--ccs-dot-color, rgba(0, 0, 0, .2));
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}
.ccs .ccs-dot.is-active { width: 24px; background: var(--ccs-dot-active, #111); }
.ccs.ccs-nav-static .ccs-arrow,
.ccs.ccs-nav-static .ccs-dots { display: none !important; }

/* ---- Marquee keyframes ------------------------------------------------- */
@keyframes ccs-marquee { to { transform: translateX(-50%); } }
@keyframes ccs-marquee-rtl { to { transform: translateX(50%); } }

/* ---- Entrance animations ---------------------------------------------
   Done in JS with the Web Animations API so items are NEVER hidden by CSS:
   if JS is delayed, blocked or CSS is "optimized", items stay visible. */

/* ---- Editor notice ----------------------------------------------------- */
.ccs-empty {
	padding: 18px;
	border: 2px dashed #c7cbd1;
	border-radius: 10px;
	color: #555;
	text-align: center;
	font-size: 14px;
}

/* ---- Accessibility: reduced motion ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.ccs *,
	.ccs *::before,
	.ccs *::after { animation: none !important; transition: none !important; }
	.ccs .ccs-track { scroll-behavior: auto !important; }
	.ccs[class*="-marquee"] .ccs-viewport { overflow-x: auto !important; }
}
