/*
 * MF Elementor Kit – stili dei widget.
 * Regola d'oro: nessun !important e specificità bassa. I controlli dei widget scrivono
 * variabili CSS (--mf-*) o regole generate da Elementor, che vincono sempre su questo file.
 */

:where(.mf-hero, .mf-nav, .mf-cards, .mf-breadcrumb, .mf-login) { box-sizing: border-box; }
:where(.mf-hero, .mf-nav, .mf-cards, .mf-breadcrumb, .mf-login) *,
:where(.mf-hero, .mf-nav, .mf-cards, .mf-breadcrumb, .mf-login) *::before,
:where(.mf-hero, .mf-nav, .mf-cards, .mf-breadcrumb, .mf-login) *::after { box-sizing: inherit; }

:where(.mf-svg) { display: block; width: 1em; height: 1em; }
:where(.mf-empty, .mf-cards-empty) { padding: 16px 20px; border: 1px dashed #c9c9c9; color: #696969; font-size: 14px; }

.screen-reader-text:not(:focus) {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
	overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}

/* ============================================================== HERO SLIDER */
:where(.mf-hero) {
	--mf-hero-h: 650px;
	--mf-hero-speed: 1400ms;
	--mf-hero-delay: 6500ms;
	--mf-hero-nav: #fff;
	--mf-hero-active: var(--e-global-color-primary, #F7C51E);
	--mf-accent: var(--e-global-color-primary, #F7C51E);
	position: relative;
	height: var(--mf-hero-h);
	min-height: 280px;
	overflow: hidden;
	background-color: #1E1E1E;
	color: #fff;
	isolation: isolate;
	touch-action: pan-y;
}
:where(.mf-hero__track) {
	position: absolute; inset: 0;
	transform: translate3d(0, var(--mf-hero-py, 0px), 0);
	will-change: transform;
}
:where(.mf-hero__slide) {
	position: absolute; inset: 0; z-index: 0;
	opacity: 0; visibility: hidden;
	transition: opacity var(--mf-hero-speed) var(--mf-ease-std, ease), visibility 0s linear var(--mf-hero-speed);
}
:where(.mf-hero__slide.is-prev) { visibility: visible; z-index: 1; }
:where(.mf-hero__slide.is-active) { opacity: 1; visibility: visible; z-index: 2; transition-delay: 0s; }

/* Transizione "Sipario" */
:where(.mf-hero--curtain .mf-hero__slide) { opacity: 1; clip-path: inset(0 0 0 100%); transition: clip-path var(--mf-hero-speed) var(--mf-ease-io, ease), visibility 0s linear var(--mf-hero-speed); }
:where(.mf-hero--curtain .mf-hero__slide.is-prev) { clip-path: inset(0 0 0 0); }
:where(.mf-hero--curtain .mf-hero__slide.is-active) { clip-path: inset(0 0 0 0); }
/* Transizione "Dissolvenza con zoom" */
:where(.mf-hero--zoom .mf-hero__slide) { transform: scale(1.06); transition: opacity var(--mf-hero-speed) var(--mf-ease-std, ease), transform var(--mf-hero-speed) var(--mf-ease-out, ease), visibility 0s linear var(--mf-hero-speed); }
:where(.mf-hero--zoom .mf-hero__slide.is-active) { transform: scale(1); }

:where(.mf-hero__media) { position: absolute; inset: 0; overflow: hidden; }
:where(.mf-hero__media) img,
:where(.mf-hero__img) {
	display: block; width: 100%; height: 100%; max-width: none;
	object-fit: cover; object-position: center center;
	transform-origin: 50% 50%;
}
:where(.mf-hero__slide:is(.is-active, .is-prev)[data-kb="zoom-in"]) .mf-hero__img { animation: mfKbZoomIn calc(var(--mf-hero-delay) + var(--mf-hero-speed) * 2) linear both; }
:where(.mf-hero__slide:is(.is-active, .is-prev)[data-kb="zoom-out"]) .mf-hero__img { animation: mfKbZoomOut calc(var(--mf-hero-delay) + var(--mf-hero-speed) * 2) linear both; }
:where(.mf-hero__slide:is(.is-active, .is-prev)[data-kb="pan-left"]) .mf-hero__img { animation: mfKbPanLeft calc(var(--mf-hero-delay) + var(--mf-hero-speed) * 2) linear both; }
:where(.mf-hero__slide:is(.is-active, .is-prev)[data-kb="pan-right"]) .mf-hero__img { animation: mfKbPanRight calc(var(--mf-hero-delay) + var(--mf-hero-speed) * 2) linear both; }
:where(.mf-hero.is-paused) .mf-hero__img { animation-play-state: paused; }

@keyframes mfKbZoomIn { from { transform: scale(1); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
@keyframes mfKbZoomOut { from { transform: scale(1.16) translate3d(1%, 1%, 0); } to { transform: scale(1); } }
@keyframes mfKbPanLeft { from { transform: scale(1.14) translate3d(3.5%, 0, 0); } to { transform: scale(1.14) translate3d(-3.5%, 0, 0); } }
@keyframes mfKbPanRight { from { transform: scale(1.14) translate3d(-3.5%, 0, 0); } to { transform: scale(1.14) translate3d(3.5%, 0, 0); } }

:where(.mf-hero__overlay) { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%); }

:where(.mf-hero__caption) {
	position: absolute; inset: 0; z-index: 3;
	display: flex; pointer-events: none;
	padding: 48px 64px 64px;
	opacity: var(--mf-hero-fade, 1);
	transform: translate3d(0, var(--mf-hero-cy, 0px), 0);
}
:where(.mf-hero__caption[data-h="start"]) { justify-content: flex-start; text-align: left; }
:where(.mf-hero__caption[data-h="center"]) { justify-content: center; text-align: center; }
:where(.mf-hero__caption[data-h="end"]) { justify-content: flex-end; text-align: right; }
:where(.mf-hero__caption[data-v="start"]) { align-items: flex-start; }
:where(.mf-hero__caption[data-v="center"]) { align-items: center; }
:where(.mf-hero__caption[data-v="end"]) { align-items: flex-end; }
:where(.mf-hero__caption-inner) { max-width: var(--mf-caption-w, 620px); pointer-events: auto; }
:where(.mf-hero__caption-inner)::before {
	content: ""; display: block; width: 48px; height: 3px; margin-bottom: 20px;
	background: var(--mf-accent); transform-origin: 0 50%;
}
:where(.mf-hero__caption[data-h="center"]) .mf-hero__caption-inner::before { margin-inline: auto; transform-origin: 50% 50%; }
:where(.mf-hero__caption[data-h="end"]) .mf-hero__caption-inner::before { margin-left: auto; transform-origin: 100% 50%; }
:where(.mf-hero__text) { color: #fff; font-size: clamp(1.25rem, 1rem + 1.2vw, 2.25rem); line-height: 1.35; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
:where(.mf-hero__text) p { margin: 0 0 .5em; }
:where(.mf-hero__text) p:last-child { margin-bottom: 0; }
:where(.mf-hero__credit) { margin-top: 16px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.85); letter-spacing: .02em; }
:where(.mf-hero__credit) p { margin: 0; }

:where(.mf-hero__slide.is-active) .mf-hero__caption-inner::before { animation: mfHeroLine 900ms var(--mf-ease-out, ease) 300ms backwards; }
:where(.mf-hero__slide.is-active) .mf-hero__text { animation: mfHeroText 1100ms var(--mf-ease-out, ease) 450ms backwards; }
:where(.mf-hero__slide.is-active) .mf-hero__credit { animation: mfHeroText 900ms var(--mf-ease-out, ease) 750ms backwards; }
@keyframes mfHeroLine { from { transform: scaleX(0); } }
@keyframes mfHeroText { from { opacity: 0; filter: blur(8px); transform: translate3d(0, 24px, 0); } }

:where(.mf-hero__link) { position: absolute; inset: 0; z-index: 2; }

:where(.mf-hero__arrow) {
	position: absolute; top: 50%; z-index: 4;
	display: grid; place-items: center;
	width: 52px; height: 52px; margin-top: -26px; padding: 0;
	border: 1px solid rgba(255,255,255,.45); border-radius: 50%;
	background: rgba(0,0,0,.25); color: var(--mf-hero-nav);
	font-size: 22px; cursor: pointer;
	opacity: .75;
	transition: opacity .3s, background-color .3s, border-color .3s, color .3s, transform .3s var(--mf-ease-out, ease);
}
:where(.mf-hero__arrow--prev) { left: 24px; }
:where(.mf-hero__arrow--next) { right: 24px; }
:where(.mf-hero:hover) .mf-hero__arrow { opacity: 1; }
:where(.mf-hero__arrow:hover, .mf-hero__arrow:focus-visible) { background: var(--mf-hero-active); border-color: var(--mf-hero-active); color: #000; }
:where(.mf-hero__arrow--prev:hover) { transform: translateX(-3px); }
:where(.mf-hero__arrow--next:hover) { transform: translateX(3px); }

:where(.mf-hero__dots) {
	position: absolute; left: 50%; bottom: 22px; z-index: 4; transform: translateX(-50%);
	display: flex; gap: 4px;
}
:where(.mf-hero__dot) {
	position: relative; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer;
}
:where(.mf-hero__dot)::before {
	content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
	border-radius: 50%; background: var(--mf-hero-nav); opacity: .55;
	transition: transform .3s var(--mf-ease-out, ease), opacity .3s, background-color .3s;
}
:where(.mf-hero__dot.is-active)::before { background: var(--mf-hero-active); opacity: 1; transform: scale(1.35); }

:where(.mf-hero__counter) {
	position: absolute; right: 28px; bottom: 26px; z-index: 4;
	display: flex; align-items: center; gap: 10px;
	font-family: var(--e-global-typography-primary-font-family, "Montserrat"), sans-serif;
	font-weight: 700; font-size: 13px; letter-spacing: 2px; color: var(--mf-hero-nav);
}
:where(.mf-hero__counter-sep) { width: 28px; height: 1px; background: currentColor; opacity: .6; }
:where(.mf-hero__counter-current) { color: var(--mf-hero-active); }

:where(.mf-hero__timer) { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 3px; background: rgba(255,255,255,.15); }
:where(.mf-hero__timer) span { display: block; height: 100%; background: var(--mf-hero-active); transform: scaleX(0); transform-origin: 0 50%; }
:where(.mf-hero.is-running) .mf-hero__timer span { animation: mfHeroTimer var(--mf-hero-delay) linear forwards; }
:where(.mf-hero.is-paused) .mf-hero__timer span { animation-play-state: paused; }
@keyframes mfHeroTimer { to { transform: scaleX(1); } }

:where(.mf-hero__pause) {
	position: absolute; left: 24px; bottom: 18px; z-index: 4;
	display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
	border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(0,0,0,.35);
	color: var(--mf-hero-nav); cursor: pointer; transition: background-color .3s, color .3s;
}
:where(.mf-hero__pause:hover, .mf-hero__pause:focus-visible) { background: var(--mf-hero-active); color: #000; }
:where(.mf-hero__pause) svg { width: 14px; height: 14px; }
:where(.mf-hero__pause) .mf-i-play { display: none; }
:where(.mf-hero__pause[aria-pressed="true"]) .mf-i-play { display: block; }
:where(.mf-hero__pause[aria-pressed="true"]) .mf-i-pause { display: none; }

:where(.mf-hero__scroll) {
	position: absolute; left: 50%; bottom: 56px; z-index: 4; width: 26px; height: 42px; margin-left: -13px;
	border: 2px solid rgba(255,255,255,.8); border-radius: 14px;
}
:where(.mf-hero__scroll) span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--mf-hero-active); animation: mfScrollHint 1600ms ease-in-out 3; }
@keyframes mfScrollHint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 767px) {
	:where(.mf-hero__arrow) { display: none; }
	:where(.mf-hero__caption) { padding: 24px 24px 64px; }
	:where(.mf-hero__counter) { right: 16px; bottom: 22px; }
	:where(.mf-hero__dots), :where(.mf-hero__scroll) { display: none; }
	:where(.mf-hero__pause) { left: 16px; }
}

/* ============================================================== NAV MENU */
:where(.mf-nav) {
	--mf-nav-h: 90px;
	--mf-nav-px: 12px;
	--mf-nav-color: #000;
	--mf-nav-bg: transparent;
	--mf-nav-color-hover: #000;
	--mf-nav-bg-hover: #EAEAEA;
	--mf-nav-color-active: #000;
	--mf-nav-bg-active: #EAEAEA;
	--mf-nav-sep: #696969;
	--mf-nav-line: var(--e-global-color-primary, #F7C51E);
	--mf-dd-w: 240px;
	--mf-dd-bg: #fff;
	--mf-dd-color: #000;
	--mf-dd-accent: var(--e-global-color-primary, #F7C51E);
	--mf-toggle: #000;
	--mf-toggle-hover: var(--e-global-color-primary, #F7C51E);
	--mf-panel-bg: #111;
	--mf-panel-color: #fff;
	--mf-panel-accent: var(--e-global-color-primary, #F7C51E);
	position: relative;
	display: flex; align-items: center; justify-content: var(--mf-nav-justify, flex-end);
}
:where(.mf-nav__desktop) { display: flex; justify-content: var(--mf-nav-justify, flex-end); width: 100%; }
:where(.mf-nav__menu) { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: var(--mf-nav-justify, flex-end); margin: 0; padding: 0; list-style: none; }
:where(.mf-nav--vertical .mf-nav__menu) { flex-direction: column; align-items: stretch; }
:where(.mf-nav__menu) li { position: relative; margin: 0; list-style: none; }
:where(.mf-nav__menu > li) { display: flex; align-items: center; }
:where(.mf-nav__menu > li > a) {
	position: relative;
	display: flex; align-items: center;
	height: var(--mf-nav-h);
	padding: 0 var(--mf-nav-px);
	color: var(--mf-nav-color);
	background-color: var(--mf-nav-bg);
	font-size: 12px; text-transform: uppercase; letter-spacing: 1px; line-height: 1;
	text-decoration: none; white-space: nowrap;
	transition: color .25s, background-color .25s, height .3s var(--mf-ease-std, ease);
}
:where(.mf-nav--vertical .mf-nav__menu > li > a) { height: auto; min-height: 44px; }
:where(.mf-site-header.is-scrolled) .mf-nav__menu > li > a { height: var(--mf-nav-h-scrolled, var(--mf-nav-h)); }
:where(.mf-nav__menu > li > a:hover, .mf-nav__menu > li > a:focus-visible, .mf-nav__menu > li:focus-within > a) { color: var(--mf-nav-color-hover); background-color: var(--mf-nav-bg-hover); }
:where(.mf-nav__menu > li:is(.current-menu-item, .current-menu-ancestor, .current_page_item, .current_page_parent, .current_page_ancestor) > a) { color: var(--mf-nav-color-active); background-color: var(--mf-nav-bg-active); }

/* Separatore "|" tra le voci (decorativo, ignorato dagli screen reader) */
:where(.mf-nav--sep .mf-nav__menu > li:not(:last-child))::after {
	content: var(--mf-nav-sep-text, "|");
	content: var(--mf-nav-sep-text, "|") / "";
	color: var(--mf-nav-sep); font-size: 12px; line-height: 1; padding: 0 2px; opacity: .8;
}

/* Sottolineatura animata */
:where(.mf-nav--underline .mf-nav__menu > li > a)::after {
	content: ""; position: absolute; left: var(--mf-nav-px); right: var(--mf-nav-px); bottom: 0;
	height: 3px; background: var(--mf-nav-line);
	transform: scaleX(0); transform-origin: 50% 50%;
	transition: transform .3s var(--mf-ease-out, ease);
}
:where(.mf-nav--underline .mf-nav__menu > li > a:hover, .mf-nav--underline .mf-nav__menu > li > a:focus-visible, .mf-nav--underline .mf-nav__menu > li:focus-within > a, .mf-nav--underline .mf-nav__menu > li:is(.current-menu-item, .current-menu-ancestor, .current_page_item, .current_page_parent, .current_page_ancestor) > a)::after { transform: scaleX(1); }

/* Freccia sottomenu */
:where(.mf-nav--carets .mf-nav__menu > .menu-item-has-children > a) { padding-right: calc(var(--mf-nav-px) + 14px); }
:where(.mf-nav--carets .mf-nav__menu > .menu-item-has-children > a)::before {
	content: ""; position: absolute; right: var(--mf-nav-px); top: 50%;
	width: 6px; height: 6px; margin-top: -5px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg); transition: transform .25s var(--mf-ease-out, ease);
}
:where(.mf-nav--carets .mf-nav__menu > .menu-item-has-children:hover > a)::before { transform: translateY(2px) rotate(45deg); }

/* Dropdown */
:where(.mf-nav__menu .sub-menu) {
	position: absolute; top: 100%; left: 0; z-index: 50;
	min-width: var(--mf-dd-w); margin: 0; padding: 6px 0; list-style: none;
	background: var(--mf-dd-bg); border-bottom: 3px solid var(--mf-dd-accent);
	box-shadow: 0 3px 5px rgba(0,0,0,.2);
	opacity: 0; visibility: hidden; transform: translate3d(0, 8px, 0);
	transition: opacity .2s var(--mf-ease-out, ease), transform .2s var(--mf-ease-out, ease), visibility 0s linear .2s;
}
:where(.mf-nav__menu > li:nth-last-child(-n+2) > .sub-menu) { left: auto; right: 0; }
:where(.mf-nav__menu .sub-menu .sub-menu) { top: -6px; left: 100%; right: auto; }
:where(.mf-nav__menu li:hover > .sub-menu, .mf-nav__menu li:focus-within > .sub-menu) { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
:where(.mf-nav__menu li.is-closed > .sub-menu) { opacity: 0; visibility: hidden; transform: translate3d(0, 8px, 0); }
:where(.mf-nav__menu .sub-menu a) {
	display: block; padding: 12px 20px; color: var(--mf-dd-color);
	font-size: 12px; text-transform: uppercase; letter-spacing: 1px; line-height: 1.4; text-decoration: none;
	transition: padding-left .2s var(--mf-ease-out, ease), color .2s, background-color .2s;
}
:where(.mf-nav__menu .sub-menu a:hover, .mf-nav__menu .sub-menu a:focus-visible) { padding-left: 26px; color: var(--mf-dd-color-hover, #000); background: var(--mf-dd-bg-hover, #fafafa); box-shadow: inset 3px 0 0 var(--mf-dd-accent); }
:where(.mf-nav--vertical .mf-nav__menu .sub-menu) { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 12px; background: transparent; }

/* Hamburger */
:where(.mf-nav__toggle) {
	display: none; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--mf-toggle);
}
:where(.mf-nav__toggle:hover, .mf-nav__toggle:focus-visible) { color: var(--mf-toggle-hover); }
:where(.mf-nav__burger) { position: relative; display: block; width: 24px; height: 16px; }
:where(.mf-nav__burger) span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .3s var(--mf-ease-out, ease), opacity .2s, top .3s; }
:where(.mf-nav__burger) span:nth-child(1) { top: 0; }
:where(.mf-nav__burger) span:nth-child(2) { top: 7px; width: 70%; left: auto; right: 0; }
:where(.mf-nav__burger) span:nth-child(3) { top: 14px; }
:where(.mf-nav__toggle:hover) .mf-nav__burger span:nth-child(2) { width: 100%; }
:where(.mf-nav__toggle[aria-expanded="true"]) .mf-nav__burger span:nth-child(1) { top: 7px; transform: rotate(45deg); }
:where(.mf-nav__toggle[aria-expanded="true"]) .mf-nav__burger span:nth-child(2) { opacity: 0; }
:where(.mf-nav__toggle[aria-expanded="true"]) .mf-nav__burger span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Breakpoint del menu mobile (valore scelto nel widget) */
@media (max-width: 1366px) { :where(.mf-nav[data-mf-nav="1366"]) .mf-nav__desktop { display: none; } :where(.mf-nav[data-mf-nav="1366"]) .mf-nav__toggle { display: inline-flex; } }
@media (max-width: 1200px) { :where(.mf-nav[data-mf-nav="1200"]) .mf-nav__desktop { display: none; } :where(.mf-nav[data-mf-nav="1200"]) .mf-nav__toggle { display: inline-flex; } }
@media (max-width: 1024px) { :where(.mf-nav[data-mf-nav="1024"]) .mf-nav__desktop { display: none; } :where(.mf-nav[data-mf-nav="1024"]) .mf-nav__toggle { display: inline-flex; } }
@media (max-width: 880px) { :where(.mf-nav[data-mf-nav="880"]) .mf-nav__desktop { display: none; } :where(.mf-nav[data-mf-nav="880"]) .mf-nav__toggle { display: inline-flex; } }
@media (max-width: 767px) { :where(.mf-nav[data-mf-nav="767"]) .mf-nav__desktop { display: none; } :where(.mf-nav[data-mf-nav="767"]) .mf-nav__toggle { display: inline-flex; } }
@media (max-width: 1366px) and (min-width: 1025px) { :where(.mf-nav) { --mf-nav-px: 9px; } }

/* Pannello mobile: <dialog> aperto con showModal() → livello superiore della pagina,
   non viene mai "intrappolato" dall'header (sticky, transform, filtri). */
:where(.mf-nav__panel) {
	position: fixed; inset: 0; z-index: 99999;
	width: 100%; height: 100%; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: hidden;
}
:where(.mf-nav__panel)::backdrop { background: transparent; }
:where(.mf-nav__backdrop) { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; }
:where(.mf-nav__drawer) {
	position: absolute; top: 0; bottom: 0; right: 0;
	display: flex; flex-direction: column;
	width: min(340px, 86vw); padding: 0 0 32px;
	background: var(--mf-panel-bg); color: var(--mf-panel-color);
	overflow-y: auto; overscroll-behavior: contain;
	transform: translate3d(100%, 0, 0);
	transition: transform .45s var(--mf-ease-drawer, cubic-bezier(.7,0,.3,1));
}
:where(.mf-nav__panel--left) .mf-nav__drawer { right: auto; left: 0; transform: translate3d(-100%, 0, 0); }
:where(.mf-nav__panel.is-open) .mf-nav__backdrop { opacity: 1; }
:where(.mf-nav__panel.is-open) .mf-nav__drawer { transform: none; }
:where(.mf-nav__drawer-head) { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 12px 0 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
:where(.mf-nav__drawer-title) { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--mf-panel-accent); font-weight: 700; }
:where(.mf-nav__close) { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--mf-panel-color); cursor: pointer; }
:where(.mf-nav__close) span::before, :where(.mf-nav__close) span::after { content: ""; position: absolute; left: 11px; top: 21px; width: 22px; height: 2px; background: currentColor; transition: transform .3s var(--mf-ease-out, ease); }
:where(.mf-nav__close) span::before { transform: rotate(45deg); }
:where(.mf-nav__close) span::after { transform: rotate(-45deg); }
:where(.mf-nav__close:hover) span::before { transform: rotate(135deg); }
:where(.mf-nav__close:hover) span::after { transform: rotate(45deg); }
:where(.mf-nav__close:hover, .mf-nav__close:focus-visible) { color: var(--mf-panel-accent); }
:where(.mf-nav__panel-menu) { margin: 8px 0 0; padding: 0; list-style: none; }
:where(.mf-nav__panel-menu li) { position: relative; list-style: none; margin: 0; }
:where(.mf-nav__panel-menu > li) { border-bottom: 1px solid rgba(255,255,255,.08); }
:where(.mf-nav__panel-menu a) {
	display: flex; align-items: center; min-height: 52px; padding: 8px 64px 8px 24px;
	color: var(--mf-panel-color); text-decoration: none;
	font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
	transition: color .2s, padding-left .25s var(--mf-ease-out, ease);
}
:where(.mf-nav__panel-menu a:hover, .mf-nav__panel-menu a:focus-visible) { color: var(--mf-panel-accent); padding-left: 30px; }
:where(.mf-nav__panel-menu li:is(.current-menu-item, .current_page_item, .current-menu-ancestor) > a) { color: var(--mf-panel-accent); }
:where(.mf-nav__panel-menu .sub-menu) { margin: 0; padding: 0 0 8px 12px; list-style: none; }
:where(.mf-nav__panel-menu .sub-menu a) { min-height: 44px; font-size: 13px; opacity: .85; }
:where(.mf-nav__panel-menu .sub-menu:not([hidden])) { animation: mfFadeDown .3s var(--mf-ease-out, ease); }
:where(.mf-nav__sub-toggle) {
	position: absolute; top: 4px; right: 8px; width: 44px; height: 44px; padding: 0;
	border: 0; background: transparent; color: var(--mf-panel-color); cursor: pointer;
}
:where(.mf-nav__sub-toggle)::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -6px 0 0 -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--mf-ease-out, ease); }
:where(.mf-nav__sub-toggle[aria-expanded="true"])::before { transform: translateY(4px) rotate(225deg); }
:where(.mf-nav__drawer-text) { padding: 24px; font-size: 14px; color: rgba(255,255,255,.75); }
:where(.mf-nav__panel.is-open .mf-nav__panel-menu > li) { animation: mfPanelItem .4s var(--mf-ease-out, ease) backwards; animation-delay: calc(150ms + var(--mf-i, 0) * 45ms); }
@keyframes mfPanelItem { from { opacity: 0; transform: translate3d(18px, 0, 0); } }
@keyframes mfFadeDown { from { opacity: 0; transform: translate3d(0, -6px, 0); } }
:where(html.mf-nav-open) { overflow: hidden; }

/* ============================================================== CARDS */
:where(.mf-cards) {
	--mf-cols: 3;
	--mf-gap: 30px;
	--mf-ratio: 3 / 2;
	--mf-fit: cover;
	--mf-accent: var(--e-global-color-primary, #F7C51E);
	--mf-nav-c: #000;
	--mf-nav-a: var(--e-global-color-primary, #F7C51E);
	position: relative;
}
:where(.mf-cards--grid .mf-cards__track) { display: grid; grid-template-columns: repeat(var(--mf-cols), minmax(0, 1fr)); gap: var(--mf-gap); }
:where(.mf-cards--carousel .mf-cards__track) {
	display: grid; grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--mf-cols) - 1) * var(--mf-gap)) / var(--mf-cols));
	gap: var(--mf-gap);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding-bottom: 8px;
}
:where(.mf-cards--carousel .mf-cards__track)::-webkit-scrollbar { display: none; }
:where(.mf-cards--carousel .mf-card) { scroll-snap-align: start; }
:where(.mf-cards--list .mf-cards__track) { display: flex; flex-direction: column; gap: var(--mf-gap); }

:where(.mf-card) {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	transition: transform .4s var(--mf-ease-out, ease), box-shadow .4s var(--mf-ease-out, ease);
}
:where(.mf-card__head) { padding-bottom: 14px; }
:where(.mf-card__media) { position: relative; overflow: hidden; aspect-ratio: var(--mf-ratio); background: #f1f1f1; }
:where(.mf-card__media) a { display: block; height: 100%; }
:where(.mf-card__media) img,
:where(.mf-card__img) { display: block; width: 100%; height: 100%; max-width: none; object-fit: var(--mf-fit); transition: transform .7s var(--mf-ease-out, ease); }
:where(.mf-card__media)::after { content: ""; position: absolute; inset: 0; background: var(--mf-accent); mix-blend-mode: multiply; opacity: 0; transition: opacity .4s; pointer-events: none; }
:where(.mf-card__body) { display: flex; flex-direction: column; flex: 1 1 auto; gap: 10px; padding-top: 18px; }
:where(.mf-card__title) { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 700; color: #000; }
:where(.mf-card__title) a { color: inherit; text-decoration: none; background: linear-gradient(var(--mf-accent), var(--mf-accent)) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--mf-ease-out, ease), color .25s; }
:where(.mf-card__meta) { font-size: 13px; line-height: 1.5; color: #737373; }
:where(.mf-card__text) { font-size: 15px; line-height: 1.6; color: var(--e-global-color-text, #696969); }
:where(.mf-card__text) p { margin: 0 0 .6em; }
:where(.mf-card__text) p:last-child { margin-bottom: 0; }
:where(.mf-card__button) {
	display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: auto; padding: 6px 0;
	color: var(--e-global-color-mfgoldtx, #8C6A00);
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-decoration: none;
	background: linear-gradient(var(--mf-accent), var(--mf-accent)) 0 100% / 0 2px no-repeat;
	transition: background-size .35s var(--mf-ease-out, ease), color .25s;
}
:where(.mf-card__button) .mf-svg { font-size: 16px; transition: transform .3s var(--mf-ease-out, ease); }
:where(.mf-card__button:hover, .mf-card__button:focus-visible) { background-size: 100% 2px; }
:where(.mf-card__button:hover, .mf-card__button:focus-visible) .mf-svg { transform: translateX(4px); }

@media (hover: hover) {
	:where(.mf-cards--hover-lift .mf-card:hover) { transform: translateY(-6px); box-shadow: 0 18px 36px -12px rgba(0,0,0,.25); }
	:where(.mf-cards--hover-lift, .mf-cards--hover-zoom, .mf-cards--hover-gold) .mf-card:hover .mf-card__media img { transform: scale(1.06); }
	:where(.mf-cards--hover-gold) .mf-card:hover .mf-card__media::after { opacity: .35; }
	:where(.mf-card:hover) .mf-card__title a { background-size: 100% 2px; }
}
:where(.mf-card:focus-within) .mf-card__title a { background-size: 100% 2px; }

/* Elenco con miniatura (es. footer "Pubblicazioni") */
:where(.mf-cards--list .mf-card) { flex-direction: row; align-items: center; gap: 14px; }
:where(.mf-cards--list .mf-card__media) { flex: 0 0 56px; width: 56px; aspect-ratio: 1 / 1; border-radius: 50%; }
:where(.mf-cards--list .mf-card__body) { padding-top: 0; gap: 4px; }
:where(.mf-cards--list .mf-card__title) { font-size: 13px; }

/* Facciata YouTube: l'iframe si carica solo al clic */
:where(.mf-card__media--video) { aspect-ratio: 16 / 9; background: #000; }
:where(.mf-yt) { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
:where(.mf-yt) img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .6s var(--mf-ease-out, ease), opacity .3s; }
:where(.mf-yt__play) { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0,0,0,.65); box-shadow: 0 0 0 2px rgba(255,255,255,.8) inset; transition: transform .4s var(--mf-ease-out, ease), background-color .3s; }
:where(.mf-yt__play)::before { content: ""; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
:where(.mf-yt:hover, .mf-yt:focus-visible) img { transform: scale(1.04); opacity: 1; }
:where(.mf-yt:hover, .mf-yt:focus-visible) .mf-yt__play { transform: scale(1.1); background: var(--mf-accent); }
:where(.mf-yt-frame) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Carosello: frecce e punti */
:where(.mf-cards__arrows) { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
:where(.mf-cards__arrow) {
	display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0;
	background: var(--mf-nav-c); color: var(--mf-nav-a); font-size: 20px; cursor: pointer;
	transition: background-color .25s, color .25s, opacity .25s;
}
:where(.mf-cards__arrow:hover, .mf-cards__arrow:focus-visible) { background: var(--mf-nav-a); color: var(--mf-nav-c); }
:where(.mf-cards__arrow[disabled]) { opacity: .35; cursor: default; }
:where(.mf-cards__arrow[hidden]) { display: none; }
:where(.mf-cards__dots) { display: flex; justify-content: center; gap: 2px; margin-top: 14px; }
:where(.mf-cards__dot) { position: relative; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
:where(.mf-cards__dot)::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 5px; background: #8A8A8A; transition: width .3s var(--mf-ease-out, ease), margin .3s var(--mf-ease-out, ease), background-color .3s; }
:where(.mf-cards__dot.is-active)::before { width: 24px; margin-left: -12px; background: var(--mf-nav-c); }

/* Comparsa a cascata (attivata dal JS solo se il blocco è fuori schermo al caricamento) */
:where(.mf-reveal-group.mf-pending) .mf-card { opacity: 0; transform: translate3d(0, var(--mf-shift, 40px), 0); }
:where(.mf-reveal-group.mf-reveal) .mf-card { transition: opacity .7s var(--mf-ease-out, ease), transform .7s var(--mf-ease-out, ease); transition-delay: calc(var(--mf-ri, 0) * 110ms); }

:where(.mf-pagination) { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
:where(.mf-pagination) .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid #EAEAEA; color: #000; text-decoration: none; font-size: 13px; transition: background-color .25s, border-color .25s; }
:where(.mf-pagination) .page-numbers.current, :where(.mf-pagination) a.page-numbers:hover { background: var(--e-global-color-primary, #F7C51E); border-color: var(--e-global-color-primary, #F7C51E); }

/* ============================================================== BREADCRUMB */
:where(.mf-breadcrumb) { font-size: 13px; line-height: 1.5; color: #000; }
:where(.mf-breadcrumb ol) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
:where(.mf-breadcrumb li) { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
:where(.mf-breadcrumb a) { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--mf-ease-out, ease), color .2s; }
:where(.mf-breadcrumb a:hover, .mf-breadcrumb a:focus-visible) { background-size: 100% 1px; }
:where(.mf-breadcrumb__home) { flex: 0 0 auto; }
:where(.mf-breadcrumb__sep) { opacity: .6; }

/* ============================================================== LOGIN */
:where(.mf-login) { --mf-accent: var(--e-global-color-primary, #F7C51E); --mf-login-btn-text: #000; padding: 32px; background: #F6F6F6; border-top: 3px solid var(--mf-accent); }
:where(.mf-login__title) { margin: 0 0 16px; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; color: #000; }
:where(.mf-login__intro) { margin-bottom: 16px; }
:where(.mf-login) form p { margin: 0 0 14px; }
:where(.mf-login) label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: #000; }
:where(.mf-login) input[type="text"], :where(.mf-login) input[type="password"], :where(.mf-login) input[type="email"] {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #8A8A8A; border-radius: 0; background: #fff; font-size: 16px;
	transition: border-color .2s, box-shadow .2s;
}
:where(.mf-login) input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px var(--mf-accent); }
:where(.mf-login) .login-remember label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
:where(.mf-login) input[type="submit"] {
	min-height: 48px; padding: 12px 28px; border: 0; border-radius: 0; cursor: pointer;
	background: var(--mf-accent); color: var(--mf-login-btn-text);
	font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
	transition: background-color .25s, transform .15s;
}
:where(.mf-login) input[type="submit"]:hover { background: var(--e-global-color-accent, #DAAA08); }
:where(.mf-login) input[type="submit"]:active { transform: translateY(1px); }
:where(.mf-login__links, .mf-login__logged) { margin: 12px 0 0; font-size: 14px; }

/* ============================================================== PARALLAX + STAGGER */
:where(.mf-parallax__layer) {
	position: absolute; left: 0; right: 0; top: calc(var(--mf-par-range, 80px) * -1); bottom: calc(var(--mf-par-range, 80px) * -1);
	z-index: -1; pointer-events: none;
	transform: translate3d(0, var(--mf-py, 0px), 0); will-change: transform;
}
:where(.mf-parallax.mf-parallax--ready) { isolation: isolate; }

@media (prefers-reduced-motion: reduce) {
	:where(.mf-hero) .mf-hero__img,
	:where(.mf-hero) .mf-hero__text,
	:where(.mf-hero) .mf-hero__credit,
	:where(.mf-hero) .mf-hero__caption-inner::before,
	:where(.mf-hero) .mf-hero__scroll span { animation: none; }
	:where(.mf-cards--carousel) .mf-cards__track { scroll-behavior: auto; }
	:where(.mf-hero__slide, .mf-hero__slide *) { transition-duration: 1ms; animation-duration: 1ms; }
	:where(.mf-card, .mf-card *, .mf-nav *, .mf-nav__drawer) { transition-duration: 1ms; animation-duration: 1ms; }
	:where(.mf-reveal-group.mf-pending) .mf-card { opacity: 1; transform: none; }
}

/* ============================================================== PULSANTI INTERNI DEI WIDGET
 * Le Impostazioni sito di Elementor (Pulsanti) colpiscono ogni <button> con specificità (0,1,1).
 * Frecce, punti, pausa, hamburger ecc. sono controlli dei widget MF: qui riportiamo il loro aspetto
 * con specificità (0,2,0). I colori restano modificabili dai controlli del widget (variabili --mf-*).
 */
.mf-hero .mf-hero__arrow,
.mf-hero .mf-hero__dot,
.mf-hero .mf-hero__pause,
.mf-nav .mf-nav__toggle,
.mf-nav .mf-nav__close,
.mf-nav .mf-nav__sub-toggle,
.mf-cards .mf-cards__arrow,
.mf-cards .mf-cards__dot,
.mf-card .mf-yt {
	padding: 0; margin: 0; min-width: 0; min-height: 0;
	border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: normal;
	font-size: 16px; line-height: 1; font-weight: 400;
}
.mf-hero .mf-hero__arrow { width: 52px; height: 52px; font-size: 22px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(0,0,0,.25); color: var(--mf-hero-nav); }
.mf-hero .mf-hero__arrow:hover, .mf-hero .mf-hero__arrow:focus-visible { background: var(--mf-hero-active); border-color: var(--mf-hero-active); color: #000; }
.mf-hero .mf-hero__dot, .mf-hero .mf-hero__dot:hover, .mf-hero .mf-hero__dot:focus { width: 28px; height: 28px; border: 0; background: transparent; }
.mf-hero .mf-hero__pause { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(0,0,0,.35); color: var(--mf-hero-nav); }
.mf-hero .mf-hero__pause:hover, .mf-hero .mf-hero__pause:focus-visible { background: var(--mf-hero-active); color: #000; }
.mf-nav .mf-nav__toggle, .mf-nav .mf-nav__toggle:hover, .mf-nav .mf-nav__toggle:focus { width: 44px; height: 44px; border: 0; background: transparent; }
.mf-nav .mf-nav__toggle { color: var(--mf-toggle); }
.mf-nav .mf-nav__toggle:hover, .mf-nav .mf-nav__toggle:focus-visible { color: var(--mf-toggle-hover); }
.mf-nav .mf-nav__close, .mf-nav .mf-nav__close:hover, .mf-nav .mf-nav__close:focus { width: 44px; height: 44px; border: 0; background: transparent; }
.mf-nav .mf-nav__close { color: var(--mf-panel-color); }
.mf-nav .mf-nav__close:hover, .mf-nav .mf-nav__close:focus-visible { color: var(--mf-panel-accent); }
.mf-nav .mf-nav__sub-toggle, .mf-nav .mf-nav__sub-toggle:hover, .mf-nav .mf-nav__sub-toggle:focus { width: 44px; height: 44px; border: 0; background: transparent; color: var(--mf-panel-color); }
.mf-cards .mf-cards__arrow { width: 44px; height: 44px; font-size: 20px; border: 0; background: var(--mf-nav-c); color: var(--mf-nav-a); }
.mf-cards .mf-cards__arrow:hover, .mf-cards .mf-cards__arrow:focus-visible { background: var(--mf-nav-a); color: var(--mf-nav-c); }
.mf-cards .mf-cards__dot, .mf-cards .mf-cards__dot:hover, .mf-cards .mf-cards__dot:focus { width: 28px; height: 28px; border: 0; background: transparent; }
.mf-card .mf-yt, .mf-card .mf-yt:hover, .mf-card .mf-yt:focus { width: 100%; height: 100%; border: 0; background: #000; }

/* ============================================================== IMMAGINI DEI WIDGET
 * Elementor applica `.elementor img { height: auto; max-width: 100% }` (0,1,1): le immagini di
 * slider e card devono invece riempire il box (object-fit). Specificità (0,2,0), nessun !important.
 */
.mf-hero .mf-hero__img,
.mf-card .mf-card__img { width: 100%; height: 100%; max-width: none; }
