/**
 * Design NI – CTA Card
 * Base layout & interaction. Colours, sizes, typography, radius and the
 * gradient are all overridden by Elementor controls (scoped inline styles),
 * so the values here are structural defaults / fallbacks only.
 */

.sccc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 0;
	padding-bottom: 95%;
	overflow: hidden;
	border-radius: 16px;
	background-color: #181422;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	/* Fixes rounded-corner clipping on WebKit when children are positioned. */
	-webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}

.sccc-card,
.sccc-card *,
.sccc-card *::before,
.sccc-card *::after {
	box-sizing: border-box;
}

.sccc-card:hover {
	color: #fff;
}

/* Background image ------------------------------------------------------ */
.sccc-card__image {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	overflow: hidden;
}

.sccc-card__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

/* Gradient overlay ------------------------------------------------------ */
.sccc-card:before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(358deg, #181422 20%, rgba(24, 20, 34, 0) 90%);
	pointer-events: none;
}

/* Content --------------------------------------------------------------- */
.sccc-card__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 20px;
}

.sccc-card__title {
	margin: 0;
	line-height: 1.25;
	font-weight: 600;
	transition: opacity 0.3s ease;
}

.sccc-card__desc-wrap {
	display: block;
}

.sccc-card__desc {
	display: block;
	margin: 0;
	line-height: 1.6;
}

.sccc-card__title + .sccc-card__desc-wrap > .sccc-card__desc {
	margin-top: 16px;
}

/* Tags ------------------------------------------------------------------ */
.sccc-tags {
	position: absolute;
	top: 16px;
	left: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sccc-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 100px;
	background-color: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
}

/* Arrow button ---------------------------------------------------------- */
.sccc-arrow {
	position: absolute;
	right: 20px;
	bottom: 20px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
}

.sccc-arrow:before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border: 1px solid #fff;
	border-radius: 50%;
	transition: all 0.3s linear;
}

.sccc-arrow i,
.sccc-arrow svg {
	position: relative;
	z-index: 1;
	font-size: 11px;
	width: 11px;
	height: 11px;
	color: #fff;
	fill: #fff;
	line-height: 1;
}

/* Hover reveal (desktop only) ------------------------------------------- */
/* The content block is pinned to the bottom of the card. Collapsing the
 * caption's height therefore pushes the title DOWN to the base; expanding it
 * on hover grows the block upward, so the title slides up and the caption
 * reveals beneath it. grid-template-rows 0fr -> 1fr animates the height. */
@media (min-width: 768px) {
	.sccc-card--reveal .sccc-card__desc-wrap {
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		pointer-events: none;
		transition: max-height 0.4s ease, opacity 0.35s ease;
	}

	.sccc-card--reveal:hover .sccc-card__desc-wrap {
		max-height: 12em;
		opacity: 1;
		pointer-events: auto;
	}
}
