/*
 * Content card (Site_Core\Content\Content_Card), shared by every content listing.
 * Customisable through CSS variables on any ancestor:
 *   --cc-radius, --cc-bg, --cc-ratio, --cc-title-color, --cc-text-color,
 *   --cc-badge-bg, --cc-badge-color, --cc-padding.
 */

.cc-card {
	height: 100%;
	overflow: hidden;
	border-radius: var( --cc-radius, 14px );
	background: var( --cc-bg, #fff );
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.06 ), 0 6px 20px rgba( 0, 0, 0, 0.05 );
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media ( hover: hover ) {
	.cc-card:hover {
		transform: translateY( -4px );
		box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.08 ), 0 14px 32px rgba( 0, 0, 0, 0.1 );
	}

	.cc-card:hover .cc-img {
		transform: scale( 1.04 );
	}
}

.cc-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.cc-link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: -3px;
}

.cc-media {
	position: relative;
	aspect-ratio: var( --cc-ratio, 4 / 3 );
	overflow: hidden;
	background: #eee;
}

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

.cc-img--empty {
	background: linear-gradient( 135deg, #e9e9e9, #f6f6f6 );
}

.cc-play {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.6 );
	color: #fff;
	backdrop-filter: blur( 4px );
}

.cc-play svg {
	width: 45%;
	height: 45%;
	margin-left: 8%;
	fill: currentColor;
}

.cc-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: var( --cc-padding, 18px 18px 22px );
}

.cc-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.8em;
	color: var( --cc-text-color, #666 );
}

.cc-badge {
	padding: 0.25em 0.75em;
	border-radius: 999px;
	background: var( --cc-badge-bg, #f1f1f1 );
	color: var( --cc-badge-color, #222 );
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* !important: Astra's heading colors and margins win otherwise. */
.cc-card .cc-title {
	margin: 0 !important;
	color: var( --cc-title-color, #111 ) !important;
	font-size: 1.15em;
	line-height: 1.3;
}

.cc-excerpt {
	margin: 0;
	color: var( --cc-text-color, #666 );
	font-size: 0.92em;
	line-height: 1.55;
}
