/*
 * Aperture a piena pagina (novembre 2026) — su tutte le pagine che iniziano con una Copertina .mca-hero
 * (classe body.mca-hero-full aggiunta da functions.php).
 * Foto a tutto schermo dietro i testi, header e breadcrumb sovrapposti alla foto, testi bianchi,
 * velatura scura solo sul lato del testo. Le foto restano quelle del CMS (punto focale della Copertina).
 * Home: slideshow con le immagini della galleria .mca-hero-slides annidata nella Copertina.
 */
body.mca-hero-full {
	--hf-header-h: 96px;
	--hf-veil: 8, 14, 16;
}
@media (max-width: 600px) { body.mca-hero-full { --hf-header-h: 84px; } }

/* ------------------------------------------------------------ HEADER sopra la foto */
body.mca-pal.mca-hero-full .mca-site-header { margin-bottom: calc(-1 * var(--hf-header-h)); border-bottom: 1px solid rgba(255, 255, 255, .22) !important; box-shadow: none !important; }
body.mca-pal.mca-hero-full .mca-site-header::before { background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; transition: background-color .3s; }
body.mca-pal.mca-hero-full .mca-header__bar { min-height: var(--hf-header-h) !important; }
/* Logo: sopra la foto (header trasparente) la versione ufficiale in negativo, MCA bianco e CONSULTING arancio;
   dopo lo scroll, con la barra avorio, torna il logo a colori. */
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-header__logo img.custom-logo { display: none !important; }
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-header__logo .mca-logo-neg {
	display: block !important; width: 148px; height: auto; aspect-ratio: 388 / 189;
}
@media (max-width: 600px) { body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-header__logo .mca-logo-neg { width: 128px; } }
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-nav .wp-block-navigation__container > .wp-block-navigation-item:not(.mca-nav-cta) > .wp-block-navigation-item__content { color: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-nav .wp-block-navigation-item:not(.mca-nav-cta) .wp-block-navigation-item__content::after { background: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-nav .wp-block-navigation__responsive-container-open {
	background: transparent !important; color: #FFFFFF !important; border: 1.5px solid rgba(255, 255, 255, .75) !important;
}
body.mca-pal.mca-hero-full .mca-site-header:not(.is-scrolled) .mca-nav .wp-block-navigation__responsive-container-open svg { fill: currentColor; }
/* dopo lo scroll l'header torna pieno, avorio */
body.mca-pal.mca-hero-full .mca-site-header.is-scrolled::before { background: rgba(247, 243, 235, .97) !important; }
body.mca-pal.mca-hero-full .mca-site-header.is-scrolled { border-bottom-color: #E0D7C8 !important; box-shadow: 0 6px 24px -18px rgba(48, 46, 44, .35) !important; }

/* ------------------------------------------------------------ BREADCRUMB sopra la foto (pagine interne) */
body.mca-pal.mca-hero-full main#contenuto { position: relative; }
body.mca-pal.mca-hero-full .mca-breadcrumbs {
	position: absolute; top: var(--hf-header-h); left: 0; right: 0; z-index: 5;
	background: transparent !important; border: 0 !important; padding-top: 14px !important; padding-bottom: 0 !important;
}
body.mca-pal.mca-hero-full .mca-breadcrumbs ol, body.mca-pal.mca-hero-full .mca-breadcrumbs a,
body.mca-pal.mca-hero-full .mca-breadcrumbs [aria-current] { color: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-breadcrumbs a { opacity: .82; }
body.mca-pal.mca-hero-full .mca-breadcrumbs li + li::before { color: rgba(255, 255, 255, .5) !important; }

/* ------------------------------------------------------------ HERO a piena pagina */
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero {
	display: flex !important; align-items: center !important; justify-content: flex-start !important;
	min-height: 100vh !important; min-height: 100svh !important;
	padding: calc(var(--hf-header-h) + 72px) 0 clamp(56px, 9vh, 104px) !important;
	background: #0E1416 !important; overflow: hidden; position: relative;
}
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero > .wp-block-cover__image-background {
	position: absolute !important; inset: 0 !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
	width: 100% !important; height: 100% !important; min-height: 0 !important; max-width: none !important; margin: 0 !important;
	object-fit: cover !important; clip-path: none !important; transform: none !important; -webkit-mask-image: none !important; mask-image: none !important;
	aspect-ratio: auto !important; z-index: 0 !important; grid-column: auto !important; grid-row: auto !important;
}
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero:not(.mca-hero--bulb) > .wp-block-cover__background { display: none !important; }
/* velatura: scura sul lato del testo, leggera fascia sotto l'header; il resto della foto resta pieno */
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero:not(.mca-hero--bulb)::after {
	content: "" !important; display: block !important; position: absolute !important; z-index: 1 !important; pointer-events: none;
	inset: 0 !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; height: auto !important;
	clip-path: none !important; -webkit-mask-image: none !important; mask-image: none !important; aspect-ratio: auto !important;
	background:
		linear-gradient(90deg, rgba(var(--hf-veil), .86) 0%, rgba(var(--hf-veil), .8) 36%, rgba(var(--hf-veil), .5) 54%, rgba(var(--hf-veil), .12) 68%, rgba(var(--hf-veil), 0) 78%),
		linear-gradient(180deg, rgba(var(--hf-veil), .55) 0%, rgba(var(--hf-veil), 0) 24%) !important;
}
/* Il contenitore dei testi resta "static": così la galleria dello slideshow (annidata qui dentro) si posiziona
   rispetto all'intera Copertina e copre tutta la foto, non solo la zona sotto l'header. I testi stanno sopra
   grazie a .mca-hero__content (position relative, z-index 2). */
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero > .wp-block-cover__inner-container {
	position: static !important; z-index: auto !important; width: 100% !important; max-width: none !important; min-height: 0 !important;
	display: block !important; margin: 0 !important; box-sizing: border-box;
	padding: 0 max(20px, calc((100vw - 1240px) / 2)) !important;
}
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero > .wp-block-cover__inner-container::after { display: none !important; }
body.mca-pal.mca-hero-full .mca-hero .mca-hero__content { position: relative; z-index: 2; max-width: 44rem !important; width: 100%; margin: 0 !important; padding: 0 !important; }
body.mca-pal.mca-hero-full .mca-hero .mca-hero__content > * { max-width: none !important; margin-left: 0 !important; }

/* testi bianchi */
body.mca-pal.mca-hero-full .mca-hero :is(h1, p, li, mark, span:not(.mca-ico-el)) { color: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-hero h1 {
	font-size: clamp(2.3rem, 1.25rem + 3vw, 4.2rem) !important; line-height: 1.04 !important; letter-spacing: -.035em !important;
	max-width: 15ch !important; margin-top: 1rem !important; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
body.mca-pal.mca-hero-full .mca-hero h1 mark { background: none !important; }
body.mca-pal.mca-hero-full .mca-hero h1 mark::after { display: none !important; }
body.mca-pal.mca-hero-full .mca-hero .is-style-lead {
	color: #FFFFFF !important; opacity: .92; font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem) !important; line-height: 1.6 !important;
	max-width: 34rem !important; text-shadow: 0 1px 14px rgba(0, 0, 0, .3);
}
body.mca-pal.mca-hero-full .mca-hero .is-style-eyebrow { color: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-hero .is-style-eyebrow::before { background: #AD411B !important; }
/* pulsanti come nella reference: bordo bianco, angoli tondi; al passaggio si riempiono di bianco */
body.mca-pal.mca-hero-full .mca-hero .wp-block-buttons { margin-top: clamp(24px, 3.5vh, 36px) !important; gap: 12px; }
body.mca-pal.mca-hero-full .mca-hero .wp-block-button > .wp-block-button__link {
	background: transparent !important; color: #FFFFFF !important; border: 1.5px solid rgba(255, 255, 255, .85) !important;
	border-radius: 999px !important; padding: .85rem 1.6rem !important; font-weight: 600; box-shadow: none !important;
}
body.mca-pal.mca-hero-full .mca-hero .wp-block-button > .wp-block-button__link:hover,
body.mca-pal.mca-hero-full .mca-hero .wp-block-button > .wp-block-button__link:focus-visible { background: #FFFFFF !important; color: #302E2C !important; border-color: #FFFFFF !important; }
body.mca-pal.mca-hero-full .mca-hero :focus-visible { outline: 2px solid #FFFFFF !important; outline-offset: 3px !important; }

/* ------------------------------------------------------------ SLIDESHOW della home */
body.mca-pal.mca-hero-full .wp-site-blocks .mca-hero .wp-block-gallery.mca-hero-slides { display: none !important; z-index: 0 !important; position: absolute !important; inset: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important; }
body.mca-pal.mca-hero-full .wp-site-blocks .mca-hero .wp-block-gallery.mca-hero-slides.is-ready { display: block !important; }
/* Dissolvenza semplice tra foto ferme (nessuno zoom): ogni foto resta 1,5 secondi, il passaggio dura 0,8 s */
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-gallery.mca-hero-slides.has-nested-images figure.wp-block-image { transition: opacity .8s ease !important; }
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-gallery.mca-hero-slides figure.wp-block-image img,
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-gallery.mca-hero-slides figure.wp-block-image.is-active img {
	object-position: 60% 50%; transform: none !important; transition: none !important;
}
/* pulsante pausa/riproduci dello slideshow (aggiunto da theme.js) */
.mca-slides-toggle {
	position: absolute; z-index: 3; right: max(20px, calc((100vw - 1240px) / 2)); bottom: clamp(24px, 4vh, 40px);
	width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .15);
	color: #FFFFFF; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.mca-slides-toggle:hover { background: rgba(255, 255, 255, .15); }
.mca-slides-toggle:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.mca-slides-toggle svg { width: 16px; height: 16px; fill: currentColor; }

/* ------------------------------------------------------------ INTERVENTI: lampadina su fondo scuro */
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb {
	background: radial-gradient(ellipse 70% 90% at 72% 52%, #2A3438 0%, #172024 45%, #0C1214 100%) !important;
}
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb > .wp-block-cover__background { display: none !important; }
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb > .wp-block-cover__image-background {
	inset: auto !important; top: 50% !important; right: var(--bulb-r) !important; left: auto !important; bottom: auto !important;
	width: var(--bulb-w) !important; height: auto !important; object-fit: contain !important; transform: translateY(-50%) !important;
	filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)) !important;
}
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb::before { opacity: .9; }
body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb > .wp-block-cover__inner-container { width: 100% !important; }
body.mca-pal.mca-hero-full .mca-hero--bulb .mca-hero__content { max-width: min(40rem, 46vw) !important; }

/* ------------------------------------------------------------ MOBILE */
@media (max-width: 781px) {
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero {
		align-items: flex-end !important; padding: calc(var(--hf-header-h) + 56px) 0 36px !important;
	}
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero:not(.mca-hero--bulb)::after {
		background:
			linear-gradient(0deg, rgba(var(--hf-veil), .92) 0%, rgba(var(--hf-veil), .84) 50%, rgba(var(--hf-veil), .5) 68%, rgba(var(--hf-veil), 0) 86%),
			linear-gradient(180deg, rgba(var(--hf-veil), .6) 0%, rgba(var(--hf-veil), 0) 20%) !important;
	}
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero > .wp-block-cover__inner-container { padding: 0 16px !important; }
	body.mca-pal.mca-hero-full .mca-hero h1 { font-size: clamp(2rem, 1.1rem + 4.6vw, 2.7rem) !important; max-width: none !important; }
	body.mca-pal.mca-hero-full .mca-hero .wp-block-button, body.mca-pal.mca-hero-full .mca-hero .wp-block-button > .wp-block-button__link { width: 100%; text-align: center; }
	body.mca-pal.mca-hero-full .mca-breadcrumbs { padding-top: 10px !important; }
	/* Interventi su mobile: lampadina nella metà alta, testi in basso */
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb { --bulb-w: 78vw; }
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb > .wp-block-cover__image-background {
		top: calc(var(--hf-header-h) + 34vw) !important; left: 50% !important; right: auto !important; transform: translate(-50%, -50%) !important;
	}
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb::before, body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb::after { display: none !important; }
	body.mca-pal.mca-hero-full .mca-hero--bulb .mca-hero__content { max-width: none !important; }
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--bulb { padding-top: calc(var(--hf-header-h) + 70vw) !important; }
	.mca-slides-toggle { right: 16px; top: calc(var(--hf-header-h) + 16px); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.mca-slides-toggle { display: none; }
}

/* Chi siamo (variante shift, soggetto al centro della foto): la foto è ancorata a destra e sfuma nel fondo scuro,
   così il soggetto non finisce sotto i testi */
@media (min-width: 782px) {
	body.mca-pal.mca-hero-full .wp-site-blocks .wp-block-cover.mca-hero--shift > .wp-block-cover__image-background {
		left: auto !important; right: 0 !important; width: 62% !important; object-position: 18% 50% !important;
		-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%) !important; mask-image: linear-gradient(90deg, transparent 0%, #000 34%) !important;
	}
}
/* niente zoom d'apertura sulla foto: le immagini restano ferme */
body.mca-pal.mca-hero-full .wp-site-blocks .mca-hero > .wp-block-cover__image-background { animation: none !important; }

/* Altezza dell'header = esattamente --hf-header-h: niente margini interni attorno al logo, così la foto
   (tirata su della stessa misura) parte dal bordo superiore e non lascia una fascia del fondo pagina sopra il logo */
body.mca-pal.mca-hero-full .mca-site-header .mca-header__bar { height: var(--hf-header-h); min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center; }
body.mca-pal.mca-hero-full .mca-site-header .mca-header__logo,
body.mca-pal.mca-hero-full .mca-site-header .mca-header__logo a { padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; }
body.mca-pal.mca-hero-full .mca-site-header > .mca-header { padding-top: 0 !important; padding-bottom: 0 !important; }
body.mca-pal.mca-hero-full .mca-site-header { box-sizing: border-box; }
/* il filetto inferiore dell'header (1px) è compreso nella sovrapposizione */
body.mca-pal.mca-hero-full .mca-site-header { margin-bottom: calc(-1 * var(--hf-header-h) - 1px) !important; }
