/* FoodMamy Hero – apertura di pagina che sostituisce Revolution Slider. */

.fmh {
	--fmh-panel: #18240A;
	--fmh-shade: .7;
	--fmh-green: #7FB951;
	--fmh-green-dark: #6AA53E;
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--fmh-h, 100vh);
	overflow: hidden;
	background: var(--fmh-panel);
	color: #fff;
	isolation: isolate;
}

.fmh__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
}

.fmh__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: var(--fmh-fx, 50%) var(--fmh-fy, 50%);
}

/* Lato testo più scuro + fascia alta per leggere il menu in sovrimpressione. */
.fmh__shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(24, 36, 10, .38) 0%, rgba(24, 36, 10, 0) 24%),
		linear-gradient(90deg,
			rgba(24, 36, 10, var(--fmh-shade)) 0%,
			rgba(24, 36, 10, calc(var(--fmh-shade) * .6)) 36%,
			rgba(24, 36, 10, 0) 64%);
}

.fmh__inner {
	width: 100%;
	max-width: 1370px;
	margin: 0 auto;
	padding: 150px 40px 100px;
	box-sizing: border-box;
}

.fmh__content {
	max-width: min(1000px, 66%);
}
.fmh__media picture {
	display: block;
	width: 100%;
	height: 100%;
}

.fmh__kicker {
	margin: 0 0 18px;
	color: #fff;
	font-family: var(--theme-font-h1_font-family, semplicitapro, sans-serif);
}
.fmh__kicker--caps {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 2px;
	text-transform: uppercase;
}
.fmh__kicker--text {
	max-width: 36em;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	opacity: .95;
}

.fmh .fmh__title {
	margin: 0 0 30px;
	padding: 0;
	color: #fff !important;
	font-family: var(--theme-font-h1_font-family, semplicitapro, sans-serif);
	font-size: clamp(44px, 6.1vw, 88px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -1px;
	text-transform: none;
}
.fmh--title-l .fmh__title {
	font-size: clamp(38px, 4.2vw, 62px);
	line-height: 1.12;
}
.fmh__line {
	display: block;
}

.fmh__text {
	max-width: 36em;
	margin: -6px 0 30px;
	color: #fff;
	font-size: 17px;
	line-height: 1.6;
	opacity: .95;
}

/* Distanza con margini (non "gap"): funziona anche sui Safari/iPhone meno recenti. */
.fmh .fmh__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0 -10px -14px;
}
.fmh .fmh__buttons > .fmh__btn {
	margin: 0 10px 14px;
}

.fmh .fmh__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 68px;
	padding: 0 58px;
	border: 2px solid transparent;
	border-radius: 100px;
	font-family: var(--theme-font-h1_font-family, semplicitapro, sans-serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-sizing: border-box;
	transition: background-color .25s, color .25s, border-color .25s, opacity 1s cubic-bezier(.45, 0, .55, 1), transform 1s cubic-bezier(.45, 0, .55, 1);
}
.fmh .fmh__btn--solid {
	background: var(--fmh-green);
	border-color: var(--fmh-green);
	color: #fff !important;
}
.fmh .fmh__btn--solid:hover,
.fmh .fmh__btn--solid:focus-visible {
	background: var(--fmh-green-dark);
	border-color: var(--fmh-green-dark);
}
.fmh .fmh__btn--outline {
	background: transparent;
	border-color: #fff;
	color: #fff !important;
}
.fmh .fmh__btn--outline:hover,
.fmh .fmh__btn--outline:focus-visible {
	background: #fff;
	color: var(--fmh-panel) !important;
}

.fmh-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Mobile e tablet verticale ---- */
@media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
	.fmh__inner {
		padding: 120px 24px 56px;
	}
	.fmh__content {
		max-width: 640px;
	}
	.fmh .fmh__title {
		font-size: clamp(36px, 8.4vw, 64px);
		line-height: 1.1;
		margin-bottom: 24px;
	}
	.fmh--title-l .fmh__title {
		font-size: clamp(30px, 6.6vw, 48px);
		line-height: 1.15;
	}
	.fmh .fmh__btn {
		min-height: 56px;
		padding: 0 30px;
		font-size: 16px;
	}

	/* Foto sopra, testo sotto: il soggetto resta intero e il testo non lo copre. */
	.fmh--stack {
		display: block;
		min-height: 0;
	}
	.fmh--stack .fmh__media {
		position: relative;
		height: var(--fmh-stack-h, 56svh);
		min-height: 300px;
		z-index: 0;
	}
	.fmh--stack .fmh__shade {
		inset: 0 0 auto 0;
		/* +2px: copre l'ultima riga di pixel della foto (arrotondamenti). */
		height: calc(var(--fmh-stack-h, 56svh) + 2px);
		min-height: 302px;
		z-index: 1;
		background: linear-gradient(180deg,
			rgba(24, 36, 10, .45) 0%,
			rgba(24, 36, 10, 0) 26%,
			rgba(24, 36, 10, 0) 66%,
			var(--fmh-panel) 100%);
	}
	.fmh--stack .fmh__inner {
		position: relative;
		z-index: 2;
		margin-top: -64px;
		padding: 0 24px 48px;
	}

	/* Variante "testo sulla foto": sfumatura dal basso. */
	.fmh--overlay {
		align-items: flex-end;
		min-height: 100svh;
	}
	.fmh--overlay .fmh__shade {
		background: linear-gradient(180deg,
			rgba(24, 36, 10, .45) 0%,
			rgba(24, 36, 10, 0) 25%,
			rgba(24, 36, 10, .25) 50%,
			rgba(24, 36, 10, calc(var(--fmh-shade) + .2)) 100%);
	}
}

/* Tablet in orizzontale: layout desktop, quindi anche punto focale desktop. */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
	.fmh__img {
		object-position: var(--fmh-fx-d, 50%) var(--fmh-fy-d, 50%);
	}
	.fmh__inner {
		padding: 130px 40px 80px;
	}
	.fmh .fmh__btn {
		min-height: 58px;
		padding: 0 36px;
		font-size: 16px;
	}
}

@media (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
	.fmh--stack .fmh__inner {
		padding: 0 48px 64px;
	}
}

@media (max-width: 480px) {
	.fmh .fmh__buttons {
		flex-direction: column;
		align-items: stretch;
		margin: 0 0 -14px;
	}
	.fmh .fmh__buttons > .fmh__btn {
		width: 100%;
		margin: 0 0 14px;
	}
	.fmh__kicker--text,
	.fmh__text {
		font-size: 16px;
	}
}

/* ---- Animazioni d'ingresso (stessi tempi dello slider originale) ---- */
@keyframes fmh-failsafe {
	to { opacity: 1; transform: none; }
}

.fmh-js .fmh--anim .fmh-a {
	opacity: 0;
	transform: scale(.9);
	transition: opacity 1s cubic-bezier(.45, 0, .55, 1), transform 1s cubic-bezier(.45, 0, .55, 1), background-color .25s, color .25s, border-color .25s;
}
.fmh-js .fmh--anim .fmh-a--kicker { transition-delay: .54s, .54s, 0s, 0s, 0s; }
.fmh-js .fmh--anim .fmh-a--btn1   { transition-delay: 1.11s, 1.11s, 0s, 0s, 0s; }
.fmh-js .fmh--anim .fmh-a--btn2   { transition-delay: 1.64s, 1.64s, 0s, 0s, 0s; }
.fmh-js .fmh--anim .fmh-a--text   { transition-delay: 1.4s, 1.4s, 0s, 0s, 0s; }

.fmh-js .fmh--anim .fmh__title:not(.fmh-split) .fmh__line {
	opacity: 0;
}
.fmh-js .fmh--anim .fmh__w {
	display: inline-block;
	white-space: nowrap;
}
.fmh-js .fmh--anim .fmh__c {
	display: inline-block;
	opacity: 0;
	transform: translateY(50%) rotate(5deg);
	transform-origin: 50% 50%;
	transition: opacity 1.2s cubic-bezier(.22, 1, .36, 1), transform 1.2s cubic-bezier(.22, 1, .36, 1);
	transition-delay: calc(.71s + var(--i, 0) * 18ms);
}

.fmh-js .fmh--anim .fmh__img {
	transform: scale(1.06);
	transition: transform 2.6s cubic-bezier(.22, 1, .36, 1);
}

.fmh-js .fmh--anim.is-in .fmh-a,
.fmh-js .fmh--anim.is-in .fmh__c,
.fmh-js .fmh--anim.is-in .fmh__img {
	opacity: 1;
	transform: none;
}

/* Se lo script non parte, dopo 4 secondi mostra comunque tutto. */
.fmh-js .fmh--anim:not(.is-in) .fmh-a,
.fmh-js .fmh--anim:not(.is-in) .fmh__title:not(.fmh-split) .fmh__line {
	animation: fmh-failsafe .01s 4s forwards;
}

@media (prefers-reduced-motion: reduce) {
	.fmh-js .fmh--anim .fmh-a,
	.fmh-js .fmh--anim .fmh__c,
	.fmh-js .fmh--anim .fmh__img,
	.fmh-js .fmh--anim .fmh__title .fmh__line {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		animation: none !important;
	}
}
