/* =========================================================
   Servizi Carousel — stile
   Colori e proporzioni ricavati dallo screenshot fornito.
   ========================================================= */

.scsrv-section {
	--scsrv-bg: #111111;
	--scsrv-red: #9d4f4c;
	--scsrv-yellow: #f8d483;
	--scsrv-white: #ffffff;
	--scsrv-dark-text: #141414;
	--scsrv-card-w: 380px;
	--scsrv-gap: 32px;
	--scsrv-gutter: clamp(24px, 9vw, 160px);

	background-color: var(--scsrv-bg);
	/* zero a destra: il blocco arriva esattamente a filo del bordo schermo */
	padding: 100px 0 100px var(--scsrv-gutter);
	box-sizing: border-box;
	/* Nessun font-family impostato di proposito: eredita il font Gilroy
	   già configurato globalmente in Divi (Divi > Impostazioni Tema >
	   Font personalizzati). Se serve forzarlo, imposta qui il nome
	   esatto usato da Divi, es: font-family: 'Gilroy-Regular', sans-serif; */
	overflow: hidden;
}

.scsrv-section * {
	box-sizing: border-box;
}

.scsrv-header {
	max-width: 720px;
	margin: 0 0 64px auto;
	text-align: right;
}

.scsrv-title {
	color: var(--scsrv-white);
	font-weight: 400;
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
	line-height: 1.15;
	margin: 0 0 22px;
	letter-spacing: 0.3px;
}

.scsrv-subtitle {
	color: #9b9b9b;
	font-size: 1rem;
	line-height: 1.8;
	margin: 0;
}

/* ---------- carosello ---------- */

.scsrv-carousel {
	position: relative;
	/* larghezza calcolata per mostrare ESATTAMENTE 3 schede intere,
	   mai una quarta parziale */
	width: calc(var(--scsrv-card-w) * 3 + var(--scsrv-gap) * 2);
	max-width: 100%;
	margin: 0 0 0 auto;
}

.scsrv-track {
	display: flex;
	align-items: center; /* schede di altezza diversa centrate fra loro */
	gap: var(--scsrv-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	width: 100%;
	padding: 12px 0 8px;
	list-style: none;
	margin: 0;

	-ms-overflow-style: none;
	scrollbar-width: none;
}

.scsrv-track::-webkit-scrollbar {
	display: none;
	height: 0;
}

.scsrv-card {
	flex: 0 0 auto;
	width: var(--scsrv-card-w);
	border-radius: 18px;
	overflow: hidden;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.scsrv-card--white {
	background-color: var(--scsrv-white);
	color: var(--scsrv-dark-text);
}

.scsrv-card--red {
	background-color: var(--scsrv-red);
	color: var(--scsrv-white);
}

/* Colori del testo impostati ESPLICITAMENTE (con !important) su ogni
   elemento, invece di affidarsi solo all'ereditarietà dal genitore:
   molti temi/page builder (Divi compreso) impostano un colore di
   default su h3/p a livello globale, che altrimenti vincerebbe sul
   colore ereditato e farebbe apparire il testo grigio invece che
   bianco sulle schede rosse. */
.scsrv-card--white .scsrv-card-category,
.scsrv-card--white .scsrv-card-title {
	color: var(--scsrv-dark-text) !important;
}

.scsrv-card--white .scsrv-card-desc {
	color: rgba(20, 20, 20, 0.72) !important;
}

.scsrv-card--red .scsrv-card-category,
.scsrv-card--red .scsrv-card-title {
	color: #ffffff !important;
}

.scsrv-card--red .scsrv-card-desc {
	color: rgba(255, 255, 255, 0.85) !important;
}

.scsrv-card-content {
	/* stesso spazio sopra la categoria e sotto l'ultimo paragrafo (~35px),
	   così il testo resta vicino all'immagine sottostante */
	padding: 35px 36px;
}

.scsrv-card-category {
	display: inline-block;
	font-size: 0.95rem;
	margin: 0 0 12px;
	opacity: 0.92;
}

.scsrv-card-underline {
	display: block;
	width: 42px;
	height: 2px;
	margin-bottom: 22px;
	background-color: var(--scsrv-red);
}

.scsrv-card--red .scsrv-card-underline {
	background-color: var(--scsrv-yellow);
}

.scsrv-card-title {
	font-size: 1.55rem;
	font-weight: 400;
	line-height: 1.3;
	margin: 0 0 18px;
}

.scsrv-card-desc {
	font-size: 0.96rem;
	line-height: 1.75;
	margin: 0 0 14px;
	/* colore reale impostato più sopra, per variante, con !important */
}

.scsrv-card-desc:last-child {
	margin-bottom: 0;
}

.scsrv-card-image {
	position: relative;
	margin-top: auto;
	height: 280px;
	overflow: hidden;
	clip-path: polygon(0% 14%, 100% 0%, 100% 100%, 0% 100%);
	background-color: rgba(0, 0, 0, 0.08);
}

.scsrv-card--red .scsrv-card-image {
	background-color: rgba(0, 0, 0, 0.15);
}

.scsrv-card-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.scsrv-card-image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
}

.scsrv-card-image--placeholder svg {
	width: 34%;
	height: 34%;
	opacity: 0.35;
}

/* ---------- frecce ---------- */

.scsrv-arrow {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	width: 84px;
	height: 84px;
	padding: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #ffffff;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.scsrv-arrow svg {
	width: 100%;
	height: 100%;
	stroke: #ffffff;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.scsrv-arrow:hover {
	transform: translateY(-50%) scale(1.08);
}

.scsrv-arrow:focus-visible {
	outline: 1px solid rgba(255, 255, 255, 0.6);
	outline-offset: 4px;
}

.scsrv-arrow[disabled] {
	opacity: 0.6;
	cursor: default;
}

.scsrv-arrow--prev {
	/* molto più staccata dalla card, ma senza mai uscire dal margine
	   disponibile a sinistra della sezione (si adatta su schermi più stretti) */
	left: calc(-1 * min(150px, var(--scsrv-gutter) - 10px));
}

@media (max-width: 780px) {
	.scsrv-section {
		padding: 64px 0 64px 16px;
		--scsrv-card-w: 82vw;
	}

	.scsrv-header {
		margin-bottom: 40px;
	}

	.scsrv-arrow {
		display: none;
	}

	.scsrv-carousel {
		/* su mobile lo scroll naturale mostra quante schede ci stanno */
		width: 100%;
	}

	.scsrv-track {
		scroll-snap-type: x mandatory;
	}

	.scsrv-card {
		scroll-snap-align: center;
	}
}

.scsrv-admin-notice {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
	color: #9b9b9b;
	border: 1px dashed #444;
	border-radius: 12px;
	padding: 28px;
	font-size: 0.95rem;
	line-height: 1.7;
}

.scsrv-admin-notice a {
	color: var(--scsrv-yellow);
}
