/* Category Cards Widget — base structural styles.
   Colors, typography, spacing, shadows, radii etc. are all controlled
   from the Elementor Style tab and injected as inline CSS rules. */

.ccw-wrapper {
	width: 100%;
}

.ccw-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 24px;
	row-gap: 24px;
	align-items: stretch;
}

.ccw-card {
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	background: #ffffff;
	border-radius: 12px;
	padding: 24px;
	transition-property: transform, box-shadow, background-color, border-color;
	transition-duration: 300ms;
	transition-timing-function: ease;
	overflow: hidden;
}

a.ccw-card {
	cursor: pointer;
}

/* Hover effects (toggled via prefix_class ccw-hover-*) */
.ccw-hover-lift .ccw-card:hover {
	transform: translateY(-6px);
}
.ccw-hover-grow .ccw-card:hover {
	transform: scale(1.03);
}
.ccw-hover-shrink .ccw-card:hover {
	transform: scale(0.97);
}

/* Image wrapper */
.ccw-image-wrap {
	position: relative;
	width: 64px;
	height: 64px;
	overflow: hidden;
	flex-shrink: 0;
}

.ccw-image-wrap img,
.ccw-image-wrap .ccw-real-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ccw-shape-circle {
	border-radius: 50%;
}
.ccw-shape-circle img,
.ccw-shape-circle .ccw-fallback {
	border-radius: 50%;
}

.ccw-shape-rounded,
.ccw-shape-rounded img,
.ccw-shape-rounded .ccw-fallback {
	border-radius: 16px;
}

.ccw-shape-square,
.ccw-shape-square img,
.ccw-shape-square .ccw-fallback {
	border-radius: 0;
}

.ccw-shape-banner {
	width: 100% !important;
	height: auto;
	aspect-ratio: 16 / 9;
}
.ccw-shape-banner img,
.ccw-shape-banner .ccw-fallback {
	width: 100%;
	height: 100%;
}

/* Fallback (no image available) */
.ccw-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #6c5ce7;
	color: #ffffff;
	font-weight: 700;
	font-size: 1.4em;
	text-transform: uppercase;
}

.ccw-fallback-icon svg,
.ccw-fallback-icon i {
	font-size: 1.4em;
	width: 1em;
	height: 1em;
}

/* Overlay */
.ccw-image-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 1;
	transition: opacity 300ms ease;
}

.ccw-overlay-hover-yes .ccw-image-overlay {
	opacity: 0;
}
.ccw-overlay-hover-yes .ccw-card:hover .ccw-image-overlay {
	opacity: 1;
}

/* Content */
.ccw-content {
	flex: 1;
}

.ccw-title {
	margin: 0 0 8px 0;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ccw-description {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.5;
}

/* Post count badge */
.ccw-count {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: #6c5ce7;
	color: #fff;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1;
}

/* Arrow / icon */
.ccw-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: #6c5ce7;
	flex-shrink: 0;
}

.ccw-arrow svg,
.ccw-arrow i {
	width: 1em;
	height: 1em;
}

.ccw-arrow-bottom-right {
	position: absolute;
	right: 16px;
	bottom: 16px;
}

.ccw-arrow-bottom-left {
	position: absolute;
	left: 16px;
	bottom: 16px;
}

.ccw-arrow-top-right {
	position: absolute;
	right: 16px;
	top: 16px;
}

.ccw-arrow-inline {
	width: auto;
	height: auto;
}

/* Responsive fallback (in case a theme doesn't respect Elementor's own breakpoint CSS order) */
@media (max-width: 1024px) {
	.ccw-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 767px) {
	.ccw-grid {
		grid-template-columns: repeat(1, 1fr);
	}
}
