/*
 * Electronic Service Italia - CSS della home (template tpl-home.php).
 * Valori copiati da Elementor post-146 (home originale).
 */

/* ---------- Hero con slideshow ---------- */
.es-hero {
	position: relative;
	overflow: hidden;
	padding: 0 0 60px;
	background-color: var(--es-navy);
	color: var(--es-white);
}

.es-hero__slides,
.es-hero__slide,
.es-hero__overlay {
	position: absolute;
	inset: 0;
}

.es-hero__slide {
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.es-hero__slide.is-active {
	opacity: 1;
}

.es-hero__overlay {
	background-color: #000000;
	opacity: 0.5;
}

.es-hero__inner {
	position: relative;
	z-index: 5;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	max-width: var(--es-boxed);
	min-height: 475px;
	margin: 0 auto;
}

.es-hero__title {
	max-width: 750px;
	margin-bottom: 30px;
	color: var(--es-white);
	font-size: clamp(3rem, 4.5rem, 5vw);
	font-weight: 600;
	line-height: 1;
	/* l'originale ha -1px ma con un grassetto piu' largo: 0 rende la stessa larghezza */
	letter-spacing: 0.6px;
}

.es-hero__text {
	max-width: 960px;
	margin: 0 0 31px;
	color: var(--es-white);
	font-size: clamp(1.6rem, 2rem, 2.55vw);
	line-height: 1.2;
	text-align: justify;
}

.es-hero__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
}

/* ---------- Partner: Bizerba e loghi ---------- */
.es-partners__main {
	max-width: 1120px;
	margin: 40px auto;
	padding: 10px;
	text-align: center;
}

.es-partners__main img {
	width: 25%;
	height: auto;
}

.es-partners__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 700px;
	margin: 40px auto;
	padding: 10px;
}

.es-partners__row img {
	width: 100%;
	max-width: 150px;
	height: auto;
}

/* ---------- Card servizi e brand (struttura comune) ---------- */

/* Servizi: sfondo sfumato blu */
.es-services {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 35px;
	margin-bottom: 100px;
	padding: 5%;
	background-image: linear-gradient(135deg, var(--es-blue) 0%, var(--es-navy) 100%);
}

.es-services .es-card {
	width: 30%;
}

.es-services .es-card__foot {
	align-items: flex-start;
}

/* ---------- Chi siamo ---------- */

/* ---------- Prodotti distribuiti (card brand) ---------- */
.es-brands {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-bottom: 100px;
	padding: calc(5% + 10px);
	background-image: linear-gradient(180deg, var(--es-steel) 0%, var(--es-mist) 100%);
}

.es-brands .es-card__body {
	align-items: stretch;
}

.es-card__logo {
	display: block;
	width: 80%;
	max-width: 150px;
	height: auto;
	margin: 0 auto;
	/* Logo in negativo (bianco) come la classe "immagine-negativo" dell'originale */
	filter: invert(100%) sepia(76%) saturate(0%) hue-rotate(124deg) brightness(109%) contrast(101%);
	transition: filter 600ms;
}

.es-card__logo:hover {
	filter: none;
}

.es-brands .es-card__foot {
	align-items: center;
}

/* ---------- Politica della Qualita' ---------- */
.es-quality {
	overflow: hidden;
	margin-bottom: 85px;
	padding: 0 30px;
}

.es-quality__inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	max-width: 600px;
	min-height: 320px;
	margin: 0 auto;
	padding-right: 15px;
	text-align: center;
}

.es-quality__title {
	margin-bottom: 19px;
	font-size: 48px;
	font-weight: 700;
	line-height: 1.2;
}

.es-quality__text {
	margin-bottom: 20px;
	font-size: 20px;
	line-height: 1.5;
}

/* ---------- Desktop tra 1025 e 1339px: piccolo margine laterale per hero ---------- */
@media (min-width: 1025px) and (max-width: 1339px) {
	.es-hero__inner {
		padding-left: 30px;
		padding-right: 30px;
	}
}

/* ---------- Tablet (max 1024px) ---------- */
@media (max-width: 1024px) {
	.es-hero {
		margin-top: 30px;
		padding: 45px 20px;
	}

	.es-hero__inner {
		align-items: center;
		min-height: 300px;
	}

	.es-hero__title {
		align-self: stretch;
		padding-right: 20%;
		font-size: clamp(2rem, 4.5rem, 4.5vw);
	}

	.es-hero__text {
		font-size: 20px;
	}

	.es-hero__btns {
		justify-content: center;
	}

	.es-partners__main,
	.es-partners__row {
		padding: 15px;
	}

	.es-services {
		flex-direction: column;
		gap: 20px;
	}

	.es-services .es-card {
		width: 100%;
	}

	.es-services .es-card__icon {
		width: 15%;
		margin: 0 auto;
	}

	.es-services .es-card__foot {
		align-items: center;
	}

	.es-brands {
		grid-template-columns: repeat(2, 1fr);
		padding: calc(5% + 10px);
	}

	.es-quality {
		margin-bottom: 80px;
	}

	.es-quality__inner {
		padding-right: 30px;
	}
}

/* ---------- Mobile (max 767px) ---------- */
@media (max-width: 767px) {
	.es-hero {
		margin-top: 40px;
	}

	.es-hero__inner {
		justify-content: flex-start;
		align-items: stretch;
		min-height: 400px;
	}

	.es-hero__title {
		margin-bottom: 30px;
		padding-right: 0;
		letter-spacing: 0;
		font-size: 30px;
		line-height: 1;
		text-align: center;
	}

	.es-hero__text {
		margin-bottom: 31px;
		font-size: 18px;
	}

	.es-hero__btns {
		flex-direction: column;
		align-items: center;
		gap: 15px;
	}

	.es-partners__main {
		margin: 40px 0 0;
		padding: 0;
	}

	.es-partners__main img {
		width: 75%;
	}

	.es-partners__row {
		flex-direction: column;
		gap: 20px;
		margin: 0 0 40px;
		padding: 15px;
	}

	.es-services {
		padding: 5%;
	}

	.es-services .es-card__icon {
		width: 25%;
	}

	.es-card__title {
		font-size: 23px;
	}

	.es-brands .es-card__logo {
		margin-bottom: -9px;
	}

	.es-brands {
		grid-template-columns: 1fr;
		padding: calc(5% + 10px);
	}

	.es-quality {
		margin-bottom: 60px;
		padding: 0 20px;
	}

	.es-quality__inner {
		padding-right: 0;
	}

	.es-quality__title {
		margin-bottom: 15px;
		font-size: 30px;
		line-height: 1.3;
	}
}
