/**
 * STL Prossimo evento-corso-contest — card centrate, larghezza configurabile.
 */

.elementor-widget-stl-prossimo-evento-corso-contest {
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

.stl-pecc {
	--stl-pecc-accent: var(--color-fifth, #2a9d8f);
	--stl-pecc-radius: 0 0 15px 0;
	--stl-pecc-gap: clamp(1rem, 2vw, 1.5rem);
	--stl-pecc-section-pad-x: clamp(1rem, 4vw, 2.75rem);
	--stl-pecc-section-pad-y: clamp(1.25rem, 3vw, 2rem);
	--stl-pecc-image-overlay: transparent;

	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--stl-pecc-gap);
	width: 100%;
	min-height: 0;
	padding: var(--stl-pecc-section-pad-y) var(--stl-pecc-section-pad-x);
	box-sizing: border-box;
}

.stl-pecc__title {
	margin: 0;
	font-family: BCGHenSans, sans-serif;
	font-size: clamp(1.75rem, 2.8vw, 2.5rem);
	font-weight: 100;
	line-height: 1.15;
	color: #111111;
}

.stl-pecc__cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: var(--stl-pecc-gap);
	width: 100%;
}

.stl-pecc__card {
	margin: 0;
	flex: 0 0 auto;
	width: var(--stl-pecc-card-width, auto);
	min-width: 0;
	max-width: 100%;
	height: auto;
}

.stl-pecc__card-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 0;
	overflow: hidden;
	border-radius: var(--stl-pecc-radius);
	background: #dadada;
	box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stl-pecc__card-link:hover,
.stl-pecc__card-link:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(17, 17, 17, 0.1);
	text-decoration: none;
	color: inherit;
}

.stl-pecc__card-media {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: var(--stl-pecc-image-ratio, 16 / 10);
	height: auto;
	overflow: hidden;
	background: linear-gradient(135deg, #f3ece8 0%, #e7ddd8 100%);
}

.stl-pecc__card-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--stl-pecc-image-overlay);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.stl-pecc__card-link:hover .stl-pecc__card-media::after,
.stl-pecc__card-link:focus-visible .stl-pecc__card-media::after {
	opacity: 1;
}

.stl-pecc__card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transition: transform 0.35s ease;
}

.stl-pecc__card-link:hover .stl-pecc__card-image,
.stl-pecc__card-link:focus-visible .stl-pecc__card-image {
	transform: scale(1.04);
}

.stl-pecc__card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--stl-pecc-accent) 28%, transparent), rgba(0, 0, 0, 0.04)),
		linear-gradient(135deg, #f3ece8 0%, #e7ddd8 100%);
}

.stl-pecc__card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.5rem;
	padding: clamp(1rem, 1.8vw, 1.35rem) clamp(1rem, 2vw, 1.5rem) clamp(1.1rem, 2vw, 1.45rem);
}

.stl-pecc__card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.65rem;
}

.stl-pecc__card-date {
	font-family: BCGHenSans, sans-serif;
	font-size: 0.75rem;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--stl-pecc-accent);
	font-weight: 400;
}

.stl-pecc__card-type {
	font-family: BCGHenSans, sans-serif;
	font-size: 0.75rem;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(17, 17, 17, 0.72);
	font-weight: 500;
}

.stl-pecc__card-location {
	font-family: BCGHenSans, sans-serif;
	font-size: 0.82rem;
	line-height: 1.3;
	color: rgba(17, 17, 17, 0.72);
}

.stl-pecc__card-title {
	margin: 0;
	font-family: BCGHenSans, sans-serif;
	font-size: clamp(1.15rem, 1.8vw, 1.75rem);
	font-weight: 100;
	line-height: 1.2;
	color: #111111;
	transition: color 0.2s ease;
}

.stl-pecc__card-excerpt {
	margin: 0;
	margin-top: auto;
	font-size: var(--text-sm, 0.95rem);
	line-height: 1.5;
	color: rgba(17, 17, 17, 0.72);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.stl-pecc--text-only .stl-pecc__card-link {
	border-top: 3px solid var(--stl-pecc-accent);
	box-shadow: none;
}

.stl-pecc--text-only .stl-pecc__card-link:hover,
.stl-pecc--text-only .stl-pecc__card-link:focus-visible {
	transform: none;
	box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--stl-pecc-accent) 55%, transparent);
}

.stl-pecc--text-only .stl-pecc__card-body {
	padding-top: clamp(1.1rem, 2vw, 1.4rem);
}

.stl-pecc__card-link--placeholder {
	cursor: default;
	background: #ececec;
	box-shadow: none;
	border: 1px dashed rgba(17, 17, 17, 0.18);
}

.stl-pecc__card-link--placeholder:hover,
.stl-pecc__card-link--placeholder:focus-visible {
	transform: none;
	box-shadow: none;
}

.stl-pecc__card-placeholder-text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: rgba(17, 17, 17, 0.72);
}
