/* PM Dinamico 1.0 — movimento leggero sopra PM Notte. Colori e caratteri restano quelli del tema. */

/* ---------- Comparsa allo scorrimento (attiva solo con JavaScript e senza "riduci movimento") ---------- */
.pmd-attesa { opacity: 0; transform: translateY(22px); }
.pmd-visto { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--pmd-ritardo, 0ms); }

/* ---------- Ingresso dell'apertura in home (solo CSS; il titolo H1 resta fermo per non rallentare la pagina) ---------- */
@keyframes pmd-sali { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pmd-foto { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
	.ev-hero__testo > *:not(h1) { animation: pmd-sali .6s cubic-bezier(.2, .7, .2, 1) both; }
	.ev-hero__testo > *:not(h1):nth-child(n+3) { animation-delay: .1s; }
	.ev-hero__testo > *:not(h1):nth-child(n+5) { animation-delay: .2s; }
	.ev-hero__foto { animation: pmd-foto .8s ease both; }
}

/* ---------- Schede: si sollevano e si illuminano al passaggio ---------- */
.pm-evento, .ev-fronte, .pm-recensione, .ev-tappa, .pm-fronte, .uagb-post__inner-wrap {
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
	.pm-evento:hover, .ev-fronte:hover, .pm-recensione:hover, .ev-tappa:hover, .pm-fronte:hover, .uagb-post__inner-wrap:hover {
		transform: translateY(-4px);
		border-color: rgba(148, 210, 222, .55);
		box-shadow: 0 18px 40px -24px rgba(148, 210, 222, .55);
	}
	.pm-evento__foto { overflow: hidden; }
	.pm-evento__foto img { transition: transform .5s ease; }
	.pm-evento:hover .pm-evento__foto img { transform: scale(1.04); }
	.pm-btn .ev-freccia { transition: transform .2s ease; }
	.pm-btn:hover .ev-freccia { transform: translate(2px, -2px); }
	.pm-collaborazioni li { transition: border-color .2s ease, color .2s ease; }
	.pm-collaborazioni li:hover { border-color: #94d2de; color: #94d2de; }
}

/* ---------- Intestazione: più compatta dopo lo scorrimento ---------- */
.pm-nav { transition: box-shadow .25s ease, background-color .25s ease; }
.pm-nav.pmd-scorsa { background: rgba(11, 20, 26, .96); box-shadow: 0 10px 30px -18px #000; }
.pm-nav__lista a { position: relative; }
.pm-nav__lista a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
	background: #94d2de; transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.pm-nav__lista a:hover::after, .pm-nav__lista .current-menu-item > a::after { transform: scaleX(1); }

/* ---------- Schede articolo (home e fondo articolo) ---------- */
.pmd-articolo .pm-evento__titolo a { color: #eaf4f6; text-decoration: none; }
.pmd-articolo .pm-evento__titolo a:hover { color: #94d2de; }
.pmd-articolo .pm-evento__foto a { display: block; height: 100%; }
.pmd-articoli .pm-evento:first-child { grid-column: auto; }
.pmd-articoli .pm-evento:first-child .pm-evento__foto { aspect-ratio: 16 / 10; }
.pmd-articoli .pm-evento:first-child .pm-evento__titolo { font-size: 19px; }
.pmd-invito { margin: 3em 0 0; }
.pmd-invito h2 { margin-top: 0 !important; }
.pmd-correlati { margin: 3em 0 0; }
.pmd-correlati__griglia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pmd-correlati .pm-evento:first-child { grid-column: auto; }
.pmd-correlati .pm-evento:first-child .pm-evento__foto { aspect-ratio: 16 / 10; }
.pmd-correlati .pm-evento:first-child .pm-evento__titolo { font-size: 19px; }
.pmd-correlati .pm-evento__titolo { margin-top: 4px !important; }
@media (max-width: 640px) { .pmd-correlati__griglia { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pagina Blog: i titoli ora sono H2 ma conservano la misura di prima ---------- */
h2.uagb-post__title { font-size: 24px; line-height: 1.2; }

/* ---------- Barra di avanzamento della lettura ---------- */
.pmd-lettura { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 950; pointer-events: none; }
.pmd-lettura span { display: block; height: 100%; width: 100%; background: #94d2de; transform: scaleX(0); transform-origin: left; }
.admin-bar .pmd-lettura { top: 32px; }

/* ---------- Rispetto di "riduci movimento" ---------- */
@media (prefers-reduced-motion: reduce) {
	.pmd-attesa { opacity: 1; transform: none; }
	.pm-evento:hover, .ev-fronte:hover, .pm-recensione:hover, .ev-tappa:hover, .pm-fronte:hover, .uagb-post__inner-wrap:hover { transform: none; }
	.pm-evento:hover .pm-evento__foto img { transform: none; }
}

/* =========================================================
   1.1 — Effetti più evidenti
   ========================================================= */

/* Comparsa: più ampia, con sfocatura che si scioglie */
.pmd-attesa { opacity: 0; transform: translateY(48px) scale(.98); filter: blur(6px); }
.pmd-visto { opacity: 1; transform: none; filter: none; transition: opacity .9s ease, transform .9s cubic-bezier(.16, 1, .3, 1), filter .9s ease; transition-delay: var(--pmd-ritardo, 0ms); }

/* Titoli di sezione: la parola in corsivo azzurro si "accende" con una sottolineatura che si disegna */
.ev-sezione__titolo .pm-chiave, .pm-sezione__titolo .pm-chiave, .pm-cta-finale h2 .pm-chiave {
	background: linear-gradient(#94d2de, #94d2de) no-repeat 0 100% / 0 3px;
	transition: background-size 1s cubic-bezier(.16, 1, .3, 1) .35s;
	padding-bottom: 2px;
}
.pmd-visto .pm-chiave, .pmd-visto.pm-chiave { background-size: 100% 3px; }

@media (prefers-reduced-motion: no-preference) {
	/* Parola gigante della home: entra lettera per riga, con una maschera che si apre */
	.ev-hero .ev-gigante { animation: pmd-maschera 1.1s cubic-bezier(.16, 1, .3, 1) both .05s; }
	@keyframes pmd-maschera {
		from { clip-path: inset(0 0 100% 0); transform: translateY(40px); }
		to { clip-path: inset(0 0 0 0); transform: none; }
	}
	/* Alone dietro la foto che respira */
	.ev-hero__foto::before { animation: pmd-respiro 6s ease-in-out infinite; }
	@keyframes pmd-respiro {
		0%, 100% { opacity: .75; transform: scale(1); }
		50% { opacity: 1; transform: scale(1.06); }
	}
	/* Pulsante "Prenota una call" nell'intestazione: un riflesso che passa ogni pochi secondi */
	.pm-nav__cta { position: relative; overflow: hidden; isolation: isolate; }
	.pm-nav__cta::after {
		content: ""; position: absolute; inset: 0; z-index: -1;
		background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
		transform: translateX(-120%);
		animation: pmd-riflesso 5s ease-in-out infinite 2s;
	}
	@keyframes pmd-riflesso { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
	/* Etichette sotto il titolo (Ordini, AICOMTEC...): compaiono in sequenza */
	.ev-hero__prove li { animation: pmd-sali .6s cubic-bezier(.16, 1, .3, 1) both; }
	.ev-hero__prove li:nth-child(1) { animation-delay: .45s; }
	.ev-hero__prove li:nth-child(2) { animation-delay: .55s; }
	.ev-hero__prove li:nth-child(3) { animation-delay: .65s; }
	.ev-hero__prove li:nth-child(4) { animation-delay: .75s; }
	.ev-hero__prove li:nth-child(n+5) { animation-delay: .85s; }
}

/* Schede: luce che segue il puntatore (stile siti di design) */
@media (hover: hover) {
	.pm-evento, .ev-fronte, .pm-recensione, .ev-tappa, .pm-fronte { position: relative; }
	.pm-evento::before, .ev-fronte::before, .pm-recensione::before, .ev-tappa::before, .pm-fronte::before {
		content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
		background: radial-gradient(320px circle at var(--pmd-x, 50%) var(--pmd-y, 50%), rgba(148, 210, 222, .16), transparent 60%);
		opacity: 0; transition: opacity .3s ease;
	}
	.pm-evento:hover::before, .ev-fronte:hover::before, .pm-recensione:hover::before, .ev-tappa:hover::before, .pm-fronte:hover::before { opacity: 1; }
	.pm-evento:hover, .ev-fronte:hover, .pm-recensione:hover, .ev-tappa:hover, .pm-fronte:hover { transform: translateY(-8px); }
	/* Pulsanti principali: si gonfiano leggermente */
	.pm-btn--primario { transition: transform .2s ease, box-shadow .2s ease, background-color .2s; }
	.pm-btn--primario:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(148, 210, 222, .8); }
}

@media (prefers-reduced-motion: reduce) {
	.pmd-attesa { opacity: 1; transform: none; filter: none; }
	.pm-evento:hover, .ev-fronte:hover, .pm-recensione:hover, .ev-tappa:hover, .pm-fronte:hover, .pm-btn--primario:hover { transform: none; }
}

/* =========================================================
   1.2 — Home: lettere, rete, eventi a scorrimento, schede impilate
   Tutto additivo: togliendo questo blocco il sito torna alla 1.1.
   ========================================================= */

/* Barra di avanzamento nell'intestazione (pagine, non articoli) */
.pmd-avanza { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: #94d2de; transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* Rete di nodi attorno alla foto in apertura */
.pmd-rete { position: absolute; left: -12%; top: -10%; width: 124%; height: 110%; pointer-events: none; overflow: visible; }
.pmd-rete line { stroke: #94d2de; stroke-width: .35; stroke-opacity: .5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pmd-rete circle { fill: #94d2de; }

/* Eventi in home: schede da scorrere (attivo solo se lo script ha messo la classe) */
.pm-eventi.pmd-binario {
	display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
	margin-left: calc(-1 * var(--pm-gutter)); margin-right: calc(-1 * var(--pm-gutter));
	padding: 8px var(--pm-gutter) 24px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.pm-eventi.pmd-binario::-webkit-scrollbar { display: none; }
.pm-eventi.pmd-binario > .pm-evento { flex: 0 0 min(80vw, 400px); scroll-snap-align: center; grid-column: auto; }
.pm-eventi.pmd-binario > .pm-evento.pmd-attesa { opacity: 1; transform: none; filter: none; }
.pm-eventi.pmd-binario > .pm-evento:first-child .pm-evento__foto { aspect-ratio: 16 / 10; }
.pm-eventi.pmd-binario > .pm-evento:first-child .pm-evento__titolo { font-size: 19px; }
.pmd-frecce { display: flex; gap: 8px; justify-content: flex-end; margin: -12px 0 10px; }
.pm-notte .pmd-freccia {
	width: 48px; height: 48px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer;
	background: #16232a; color: #eaf4f6; border: 1px solid #2a3a42; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.pm-notte .pmd-freccia:hover { background: #94d2de; color: #0b141a; border-color: #94d2de; }
.pm-notte .pmd-freccia:active { transform: scale(.92); }
@media (max-width: 640px) { .pmd-frecce { display: none; } }

/* Metodo MERZEK: lettera scelta sollevata, barra del passo */
.ev-merzek__lettera { transition: background-color .2s, color .2s, transform .25s cubic-bezier(.16, 1, .3, 1), border-color .2s; }
.ev-merzek__lettera[aria-selected="true"] { transform: translateY(-4px); }
.ev-merzek__lettera:active { transform: scale(.94); }
.pmd-passo { height: 3px; border-radius: 3px; background: #1c2a31; margin: 0 0 14px; overflow: hidden; }
.pmd-passo span { display: block; height: 100%; width: 16.67%; background: #94d2de; transition: width .45s cubic-bezier(.16, 1, .3, 1); }

/* Email nell'invito finale */
.pmd-posta-riga { margin: 16px 0 0 !important; }
.pm-notte a.pmd-posta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #eaf4f6; font-weight: 600; text-decoration: none; }
.pm-notte a.pmd-posta:hover { color: #94d2de; }

@keyframes pmd-lettera { from { opacity: 0; transform: translateY(60%) rotate(6deg); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pmd-traccia { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pmd-pulsa { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.9); } }
@keyframes pmd-cambia { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pmd-disegna { from { background-size: 0 3px; } to { background-size: 100% 3px; } }
@keyframes pmd-fuoco { 0% { opacity: .55; transform: scale(.9); } 45%, 55% { opacity: 1; transform: scale(1); } 100% { opacity: .55; transform: scale(.9); } }

@media (prefers-reduced-motion: no-preference) {
	/* Parola gigante: le lettere entrano una alla volta (sostituisce la maschera della 1.1) */
	.ev-hero .ev-gigante.pmd-lettere { animation: none; clip-path: none; }
	.ev-gigante.pmd-lettere span { display: inline-block; animation: pmd-lettera .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--pmd-i, 0) * 80ms + 60ms); }
	.pmd-rete line { animation: pmd-traccia 1.6s ease-out both; animation-delay: calc(var(--pmd-i, 0) * 110ms + 300ms); }
	.pmd-rete circle { transform-box: fill-box; transform-origin: center; animation: pmd-pulsa 3.6s ease-in-out infinite; animation-delay: calc(var(--pmd-i, 0) * 300ms); }
	.ev-merzek__pannello:not([hidden]) { animation: pmd-cambia .35s cubic-bezier(.16, 1, .3, 1) both; }
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		/* La scheda evento al centro è a fuoco, le altre sfumano */
		.pm-eventi.pmd-binario > .pm-evento { animation: pmd-fuoco linear both; animation-timeline: view(inline); }
	}
}
@media (prefers-reduced-motion: reduce) {
	.ev-merzek__lettera[aria-selected="true"] { transform: none; }
	.pmd-passo span { transition: none; }
}


/* =========================================================
   1.3 — Apertura d'impatto: cielo di nodi, orbite, EVOLVI luminosa,
   eventi subito dopo l'apertura, servizi impilati anche su telefono.
   ========================================================= */

/* Cielo di nodi animato dietro tutta l'apertura */
.pmd-hero { position: relative; }
.pmd-hero > *:not(.pmd-cielo) { position: relative; z-index: 1; }
.pmd-cielo {
	position: absolute; top: -70px; left: 50%; width: 100vw; height: calc(100% + 70px); transform: translateX(-50%);
	pointer-events: none; z-index: 0; opacity: 0; transition: opacity 1.6s ease;
	-webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent);
}
.pmd-cielo.pmd-pronto { opacity: 1; }

/* Orbite attorno alla foto */
.pmd-orbite { position: absolute; left: 50%; top: 46%; width: 150%; max-width: 560px; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
.pmd-orbite ellipse { fill: none; stroke: #94d2de; stroke-width: .7; stroke-opacity: .55; }
.pmd-orbite .pmd-orbita--b ellipse { stroke-dasharray: 2 5; stroke-opacity: .7; }
.pmd-orbite circle { fill: #94d2de; }
.pmd-orbite g { transform-box: view-box; transform-origin: 100px 100px; }
@media (max-width: 960px) { .pmd-orbite { width: 190%; } .pmd-orbite ellipse { stroke-width: 1; } }

/* Titolo: la parte in corsivo è sottolineata */
.ev-home .ev-hero .ev-sotto .pm-chiave { text-decoration: underline; text-decoration-color: #94d2de; text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Parola gigante: alone azzurro */
.ev-gigante.pmd-lettere { filter: drop-shadow(0 0 26px rgba(148, 210, 222, .32)); }

/* Servizi 01-03 impilati: lo script mette la classe solo se ogni scheda entra intera nello schermo */
.ev-fronti.pmd-pila .ev-fronte { position: sticky; top: 84px; box-shadow: 0 -18px 40px -22px #000; border-color: #2a3a42; }
.ev-fronti.pmd-pila .ev-fronte:nth-child(2) { top: 98px; }
.ev-fronti.pmd-pila .ev-fronte:nth-child(3) { top: 112px; }

.ev-fronti.pmd-compatta .ev-fronte { padding: 18px; gap: 10px; }
.ev-fronti.pmd-compatta .ev-fronte__numero { font-size: 36px; }
.ev-fronti.pmd-compatta .ev-fronte__testo { margin-bottom: 10px; }
.ev-fronti.pmd-compatta .ev-fronte__punti { gap: 6px; }
.ev-fronti.pmd-compatta .ev-fronte__punti li { padding: 9px 12px; }

/* Puntini sotto le schede evento */
.pmd-punti { display: flex; justify-content: center; gap: 8px; margin: 0 0 6px; }
.pmd-punti span { width: 8px; height: 8px; border-radius: 50%; background: #2a3a42; transition: background-color .3s, width .3s; }
.pmd-punti span.pmd-on { background: #94d2de; width: 26px; border-radius: 8px; }

@keyframes pmd-lettera13 { from { opacity: 0; transform: translateY(80%) scale(1.25) rotate(8deg); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pmd-luce { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
@keyframes pmd-gira { to { transform: rotate(360deg); } }
@keyframes pmd-gira-b { to { transform: rotate(-360deg); } }
@keyframes pmd-passa { 0% { opacity: 0; transform: translateY(48px) scale(.96); } 22%, 78% { opacity: 1; transform: none; } 100% { opacity: .35; transform: scale(.92); } }

@media (prefers-reduced-motion: no-preference) {
	.ev-gigante.pmd-lettere span { animation: pmd-lettera13 1.2s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--pmd-i, 0) * 110ms + 100ms); }
	.pmd-orbite .pmd-orbita--a { animation: pmd-gira 46s linear infinite; }
	.pmd-orbite .pmd-orbita--b { animation: pmd-gira-b 62s linear infinite; }
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	@media (prefers-reduced-motion: no-preference) {
		/* Un riflesso azzurro attraversa le lettere ogni pochi secondi */
		.ev-gigante.pmd-lettere span {
			background: linear-gradient(100deg, #eaf4f6 0%, #eaf4f6 40%, #94d2de 50%, #eaf4f6 60%, #eaf4f6 100%) 100% 0 / 300% 100%;
			-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
			animation: pmd-lettera13 1.2s cubic-bezier(.16, 1, .3, 1) both, pmd-luce 5s ease-in-out infinite;
			animation-delay: calc(var(--pmd-i, 0) * 110ms + 100ms), calc(var(--pmd-i, 0) * 140ms + 1800ms);
		}
	}
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		/* Su schermi bassi (niente pila) le schede dei servizi entrano e, uscendo, rimpiccioliscono */
		.ev-fronti:not(.pmd-pila) .ev-fronte { animation: pmd-passa linear both; animation-timeline: view(); }
	}
}

/* =========================================================
   1.4.3 — Rifiniture viste sul sito reale
   ========================================================= */

/* Pagine interne con foto: su schermi grandi titolo a sinistra e foto intera a destra (prima era una fascia larga che tagliava la testa) */
@media (min-width: 961px) {
	.ev-apertura-pagina:has(.ev-apertura-pagina__foto) { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: clamp(32px, 5vw, 72px); align-items: end; }
	.ev-apertura-pagina:has(.ev-apertura-pagina__foto) > .ev-gigante { grid-column: 1; grid-row: 1; align-self: end; font-size: min(150px, calc(58cqi / (var(--len, 6) * 0.78))); }
	.ev-apertura-pagina:has(.ev-apertura-pagina__foto) > .ev-sotto { grid-column: 1; grid-row: 2; align-self: start; }
	.ev-apertura-pagina:has(.ev-apertura-pagina__foto) > .ev-apertura-pagina__foto { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
	.ev-apertura-pagina:has(.ev-apertura-pagina__foto) > .ev-apertura-pagina__foto img { width: 100%; height: auto; max-height: 560px; object-fit: cover; object-position: 50% 12%; }
	/* Orbite: non attraversano più il titolo */
	.pmd-orbite { width: 112%; }
}

/* Eventi: ogni scheda interamente visibile è a fuoco; sfumano solo quelle che entrano o escono */
@keyframes pmd-fuoco2 {
	entry 0% { opacity: .55; transform: scale(.9); }
	entry 100% { opacity: 1; transform: none; }
	exit 0% { opacity: 1; transform: none; }
	exit 100% { opacity: .55; transform: scale(.9); }
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.pm-eventi.pmd-binario > .pm-evento { animation-name: pmd-fuoco2; }
	}
}

/* =========================================================
   1.5 — Estetica: piè di pagina, spazi, recensioni, foto eventi, cookie
   ========================================================= */

/* Spazi tra le sezioni: circa un terzo in meno */
.pm-evolvi .ev-sezione { padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(44px, 6vw, 84px); }

/* Recensioni: virgolette grandi azzurre, niente barra laterale, nome in evidenza */
.pm-notte .pm-recensione { position: relative; padding: 62px 26px 24px; }
.pm-notte .pm-recensione blockquote { position: relative; border: 0 !important; background: none !important; padding: 0 !important; margin: 0 0 18px; font-size: 17px; line-height: 1.55; color: #eaf4f6; }
.pm-notte .pm-recensione blockquote::before { content: "\201C"; position: absolute; left: -4px; top: -50px; font: italic 500 76px/1 "Playfair Display", Georgia, serif; color: #94d2de; pointer-events: none; }
.pm-notte .pm-recensione figcaption { display: flex; align-items: center; gap: 10px; color: #eaf4f6; font-weight: 600; font-size: 15px; }
.pm-notte .pm-recensione figcaption::before { content: ""; flex: none; width: 22px; height: 2px; background: #94d2de; }

/* Foto degli eventi: stessa resa per foto e locandine, velatura scura che si alleggerisce al passaggio */
.pm-evento__foto { position: relative; }
.pm-evento__foto::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 20, 26, 0) 35%, rgba(11, 20, 26, .55)); transition: opacity .3s ease; }
.pm-evento__foto--locandina { background: #0b141a; }
.pm-evento__foto--locandina img { object-fit: cover; object-position: 50% 0; filter: brightness(.8) saturate(.9); transition: filter .3s ease, transform .5s ease; }
@media (hover: hover) {
	.pm-evento:hover .pm-evento__foto::after { opacity: .35; }
	.pm-evento:hover .pm-evento__foto--locandina img { filter: none; }
}

/* Piè di pagina nello stile del sito */
.pm-notte .site-footer .footer-widgets { padding-top: 40px; padding-bottom: 8px; }
.pm-notte .site-footer .widget h2 { font-size: 14px !important; letter-spacing: .1em; text-transform: uppercase; color: #9fb2b8 !important; margin-bottom: 14px; }
.pm-notte .site-footer .footer-widget-1 h2 { text-align: left !important; }
.pm-notte .site-footer .menu { list-style: none; margin: 0; padding: 0; }
.pm-notte .site-footer .menu a { display: inline-block; padding: 7px 0; color: #eaf4f6 !important; font-weight: 500; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.pm-notte .site-footer .menu a:hover { color: #94d2de !important; transform: translateX(4px); }
.pm-notte .site-footer .widget_media_image img { filter: brightness(0) invert(1); opacity: .85; width: 200px !important; max-width: 100%; }
.pm-notte .site-footer .wp-social-link { color: #eaf4f6 !important; transition: color .2s ease, transform .2s ease; }
.pm-notte .site-footer .wp-social-link:hover { color: #94d2de !important; transform: translateY(-3px); }
.pm-notte .site-info { font-size: 14px; }
.pm-notte .site-info .pmd-albo { color: #9fb2b8; }

/* Pulsante delle preferenze cookie: scuro e più piccolo, torna pieno al passaggio */
body.pm-notte .iubenda-tp-btn[data-tp-float] { background-color: #16232a !important; border: 1px solid #2a3a42 !important; box-shadow: none !important; opacity: .8; transform: scale(.8); transform-origin: 0 100%; transition: opacity .2s ease, transform .2s ease; }
body.pm-notte .iubenda-tp-btn[data-tp-float]:hover, body.pm-notte .iubenda-tp-btn[data-tp-float]:focus-visible { opacity: 1; transform: none; }

/* Chi sono, telefono: i due pulsanti restano su una riga senza andare a capo */
@media (max-width: 640px) {
	.ev-chi-hero .ev-hero__azioni .pm-btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; font-size: 14.5px; }
	.ev-chi-hero .ev-hero__azioni .ev-freccia { display: none; }
}
@media (max-width: 380px) { .ev-chi-hero .ev-hero__azioni { flex-wrap: wrap; } }

/* =========================================================
   1.6 — Pagina Fisco: foto scontornata con alone, come in home
   ========================================================= */
.ev-apertura-pagina__foto:has(.pmd-foto-scontornata) { position: relative; max-width: 240px; margin: 24px auto 0; }
.ev-apertura-pagina__foto:has(.pmd-foto-scontornata)::before { content: ""; position: absolute; inset: 8% 0 0 0; border-radius: 50% 50% 0 0; background: radial-gradient(circle at 50% 40%, rgba(148, 210, 222, .5), rgba(148, 210, 222, .08) 58%, transparent 72%); pointer-events: none; }
.ev-apertura-pagina__foto:has(.pmd-foto-scontornata)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: linear-gradient(transparent, #0b141a); pointer-events: none; }
.ev-apertura-pagina .ev-apertura-pagina__foto img.pmd-foto-scontornata { position: relative; display: block; width: 100% !important; height: auto !important; max-height: none !important; object-fit: contain !important; border-radius: 0 !important; }
@media (min-width: 961px) {
	.ev-apertura-pagina:has(.pmd-foto-scontornata) > .ev-apertura-pagina__foto { max-width: none; margin: 0; justify-self: center; width: min(100%, 320px); }
}
@media (prefers-reduced-motion: no-preference) {
	.ev-apertura-pagina__foto:has(.pmd-foto-scontornata)::before { animation: pmd-respiro 6s ease-in-out infinite; }
}

/* =========================================================
   1.6.1 — Telefono con "Riduci movimento" attivo: versione dolce.
   Niente spostamenti, zoom o rotazioni: solo comparse in dissolvenza.
   ========================================================= */
@keyframes pmd-dissolvi { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.ev-gigante.pmd-lettere span { display: inline-block; animation: pmd-dissolvi .9s ease both; animation-delay: calc(var(--pmd-i, 0) * 140ms + 100ms); }
	.ev-hero__testo > *:not(h1):not(.ev-gigante), .ev-hero__foto { animation: pmd-dissolvi .9s ease both .5s; }
	.ev-merzek__pannello:not([hidden]) { animation: pmd-dissolvi .35s ease both; }
	.pmd-dolce { opacity: 0; }
	.pmd-dolce.pmd-dolce-vista { animation: pmd-dissolvi .8s ease both; }
}

/* Pannello di controllo: compare solo aprendo il sito con ?pmd=diag */
.pmd-diag { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 2147483646; background: #eaf4f6; color: #0b141a; border-radius: 16px; padding: 14px 16px; font: 15px/1.45 system-ui, sans-serif; box-shadow: 0 20px 50px -10px #000; max-width: 460px; margin: 0 auto; }
.pmd-diag b { display: block; font-size: 16px; margin-bottom: 6px; }
.pmd-diag ul { margin: 0; padding: 0 0 0 18px; }
.pmd-diag .pmd-diag-no { color: #a3001e; font-weight: 700; }
.pmd-diag .pmd-diag-si { color: #00603a; font-weight: 700; }

/* =========================================================
   1.7 — Finestra "Prenota una call" (il calendario si carica solo al clic)
   ========================================================= */
html.pmd-prenota-aperta { overflow: hidden; }
.pmd-prenota { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: clamp(0px, 3vw, 32px); background: rgba(6, 12, 16, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pmd-prenota[hidden] { display: none; }
.pmd-prenota__scheda { position: relative; width: min(100%, 980px); max-height: 100%; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); background: #121e24; color: #eaf4f6; border: 1px solid rgba(148, 210, 222, .4); border-radius: 28px; overflow: hidden; box-shadow: 0 40px 120px -30px #000; font-family: "Instrument Sans", system-ui, sans-serif; }
.pmd-prenota__info { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.pmd-prenota__sopra { color: #94d2de; font-weight: 600; font-size: 14px; margin: 0; }
.pm-notte .pmd-prenota__titolo { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.06; letter-spacing: -.03em; margin: 0; color: #eaf4f6; }
.pmd-prenota__titolo em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 500; color: #94d2de; }
.pmd-prenota__testo { color: #9fb2b8; margin: 0; font-size: 16px; line-height: 1.5; }
.pmd-prenota__passi { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: passo; }
.pmd-prenota__passi li { counter-increment: passo; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; background: #16232a; border: 1px solid #1c2a31; font-weight: 500; font-size: 15.5px; line-height: 1.3; }
.pmd-prenota__passi li::before { content: counter(passo); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #94d2de; color: #0b141a; font: 15px/1 "Archivo Black", "Instrument Sans", sans-serif; }
.pmd-prenota__note { margin: auto 0 0; padding-top: 10px; color: #9fb2b8; font-size: 14px; line-height: 1.45; }
.pm-notte .pmd-prenota__note a { color: #94d2de; }
.pmd-prenota__calendario { position: relative; background: #0b141a; border-left: 1px solid #1c2a31; min-height: min(680px, 86vh); display: flex; flex-direction: column; }
.pmd-prenota__calendario iframe { flex: 1; width: 100%; min-height: 560px; border: 0; background: #fff; }
.pmd-prenota__attesa { position: absolute; inset: 0; display: grid; place-items: center; color: #9fb2b8; font-size: 15px; pointer-events: none; }
.pmd-prenota__riserva { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px; text-align: center; color: #9fb2b8; }
.pmd-prenota.pmd-bloccato .pmd-prenota__riserva { display: flex; }
.pmd-prenota.pmd-bloccato iframe, .pmd-prenota.pmd-bloccato .pmd-prenota__attesa, .pmd-prenota.pmd-caricato .pmd-prenota__attesa { display: none; }
.pmd-prenota__sotto { margin: 0; padding: 10px 16px; font-size: 13.5px; color: #9fb2b8; border-top: 1px solid #1c2a31; text-align: center; }
.pm-notte .pmd-prenota__sotto a { color: #94d2de; }
.pm-notte .pmd-prenota__chiudi { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; background: #16232a; color: #eaf4f6; border: 1px solid #2a3a42; }
.pm-notte .pmd-prenota__chiudi:hover { background: #94d2de; color: #0b141a; border-color: #94d2de; }
@keyframes pmd-prenota-fondo { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmd-prenota-sale { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.pmd-prenota:not([hidden]) { animation: pmd-prenota-fondo .25s ease both; }
@media (prefers-reduced-motion: no-preference) { .pmd-prenota:not([hidden]) .pmd-prenota__scheda { animation: pmd-prenota-sale .45s cubic-bezier(.16, 1, .3, 1) both; } }
@media (max-width: 820px) {
	.pmd-prenota { padding: 0; place-items: stretch; }
	.pmd-prenota__scheda { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); border-radius: 0; border: 0; width: 100%; height: 100%; max-height: none; overflow-y: auto; }
	.pmd-prenota__info { padding: 20px 64px 14px 20px; gap: 8px; overflow: visible; }
	.pmd-prenota__passi, .pmd-prenota__note { display: none; }
	.pmd-prenota__calendario { border-left: 0; border-top: 1px solid #1c2a31; min-height: 620px; }
}

/* Finestra di prenotazione senza calendario: richiesta via email o modulo */
.pmd-prenota.pmd-solo-email .pmd-prenota__sotto { display: none; }
.pmd-prenota.pmd-solo-email .pmd-prenota__riserva { align-items: stretch; text-align: left; padding: clamp(24px, 4vw, 44px); }
.pmd-prenota.pmd-solo-email .pmd-prenota__riserva .pm-btn { width: 100%; }
.pmd-prenota__grande { color: #eaf4f6; font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; }
@media (max-width: 820px) { .pmd-prenota.pmd-solo-email .pmd-prenota__calendario { min-height: 0; } }


/* =========================================================
   1.8 — Prenotazione interna: giorni, orari e modulo nello stile del sito
   ========================================================= */
.pmd-prenota.pmd-interno .pmd-prenota__attesa, .pmd-prenota.pmd-interno .pmd-prenota__sotto { display: none; }
.pmd-prenota.pmd-interno .pmd-prenota__calendario { overflow-y: auto; max-height: min(760px, 92vh); min-height: 0; }
.pmd-pr { padding: clamp(20px, 3.4vw, 36px); padding-top: clamp(56px, 6vw, 64px); }
.pmd-pr fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.pmd-pr legend { display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 12px; font-weight: 700; font-size: 17px; color: #eaf4f6; }
.pmd-pr legend span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #94d2de; color: #0b141a; font: 13px/1 "Archivo Black", "Instrument Sans", sans-serif; }
.pmd-pr__nota { margin: 0; color: #9fb2b8; font-size: 15px; }
.pmd-pr__giorni { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pmd-pr__ore { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pmd-pr__giorni .pmd-pr__nota, .pmd-pr__ore .pmd-pr__nota { grid-column: 1 / -1; }
.pm-notte .pmd-pr__giorno, .pm-notte .pmd-pr__ora { background: #16232a; color: #eaf4f6; border: 1px solid #2a3a42; border-radius: 14px; cursor: pointer; font-family: inherit; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
.pm-notte .pmd-pr__giorno { display: grid; justify-items: center; gap: 1px; padding: 9px 4px 10px; min-height: 76px; }
.pmd-pr__giorno small { font-size: 12.5px; color: #9fb2b8; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.pmd-pr__giorno b { font: 24px/1.1 "Archivo Black", "Instrument Sans", sans-serif; font-weight: 400; }
.pm-notte .pmd-pr__ora { min-height: 48px; padding: 0 6px; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .pm-notte .pmd-pr__giorno:hover, .pm-notte .pmd-pr__ora:hover:not(:disabled) { border-color: #94d2de; } }
.pm-notte .pmd-pr__giorno:active, .pm-notte .pmd-pr__ora:active:not(:disabled) { transform: scale(.95); }
.pm-notte .pmd-pr .pmd-pr__giorno[aria-pressed="true"], .pm-notte .pmd-pr .pmd-pr__ora[aria-pressed="true"], .pm-notte .pmd-pr .pmd-pr__giorno[aria-pressed="true"]:hover, .pm-notte .pmd-pr .pmd-pr__ora[aria-pressed="true"]:hover, .pm-notte .pmd-pr .pmd-pr__giorno[aria-pressed="true"]:focus, .pm-notte .pmd-pr .pmd-pr__ora[aria-pressed="true"]:focus { background: #94d2de; color: #0b141a; border-color: #94d2de; }
.pm-notte .pmd-pr .pmd-pr__giorno:focus:not([aria-pressed="true"]), .pm-notte .pmd-pr .pmd-pr__ora:focus:not([aria-pressed="true"]), .pm-notte .pmd-pr .pmd-pr__giorno:hover:not([aria-pressed="true"]), .pm-notte .pmd-pr .pmd-pr__ora:hover:not([aria-pressed="true"]) { background: #16232a; color: #eaf4f6; }
.pmd-pr__giorno[aria-pressed="true"] small { color: #0b141a; }
.pm-notte .pmd-pr__ora:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.pmd-pr label { display: block; margin: 0 0 12px; font-size: 14.5px; font-weight: 600; color: #eaf4f6; }
.pmd-pr label small { font-weight: 400; color: #9fb2b8; }
.pm-notte .pmd-pr input[type="text"], .pm-notte .pmd-pr input[type="email"], .pm-notte .pmd-pr textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 16px/1.4 inherit; font-family: inherit; background: #0b141a; color: #eaf4f6; border: 1px solid #2a3a42; border-radius: 12px; box-sizing: border-box; }
.pm-notte .pmd-pr input:focus, .pm-notte .pmd-pr textarea:focus { border-color: #94d2de; outline: 2px solid rgba(148, 210, 222, .35); outline-offset: 1px; }
.pmd-pr textarea { resize: vertical; min-height: 64px; }
.pmd-pr .pmd-pr__trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pmd-pr .pmd-pr__privacy { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 400; color: #9fb2b8; font-size: 14px; line-height: 1.45; margin: 4px 0 14px; }
.pmd-pr__privacy input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #94d2de; }
.pm-notte .pmd-pr__privacy a { color: #94d2de; }
.pmd-pr__errore { margin: 0 0 12px; color: #ffb4a8; font-weight: 600; font-size: 15px; min-height: 1px; }
.pmd-pr__errore:empty { display: none; }
.pmd-pr .pm-btn { width: 100%; }
.pm-notte .pmd-pr button[type="submit"]:disabled { opacity: .7; cursor: progress; }
.pmd-pr__fatto { display: grid; justify-items: center; text-align: center; gap: 10px; padding: clamp(16px, 5vw, 48px) 0; color: #94d2de; outline: 0; }
.pmd-pr__fatto[hidden], .pmd-pr__form[hidden] { display: none; }
.pm-notte .pmd-pr__fatto h3 { margin: 6px 0 0; font-size: 28px; color: #eaf4f6; }
.pmd-pr__fatto p { margin: 0; color: #9fb2b8; max-width: 38ch; }
.pmd-pr__fatto .pmd-pr__quando { color: #eaf4f6; font-weight: 700; font-size: 19px; }
.pmd-pr__fatto .pm-btn { width: auto; margin-top: 10px; }
@keyframes pmd-pr-spunta { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) { .pmd-pr__fatto:not([hidden]) svg path { stroke-dasharray: 60; animation: pmd-pr-spunta .6s cubic-bezier(.16, 1, .3, 1) both .15s; } }
@media (max-width: 820px) {
	.pmd-prenota.pmd-interno .pmd-prenota__scheda { grid-template-rows: auto auto; height: auto; min-height: 100%; align-content: start; }
	.pmd-prenota.pmd-interno { overflow-y: auto; -webkit-overflow-scrolling: touch; }
	.pmd-prenota.pmd-interno .pmd-prenota__calendario { max-height: none; overflow: visible; min-height: 0; display: block; }
	.pmd-pr { padding-top: 20px; }
}
@media (max-width: 420px) { .pmd-pr__giorni { gap: 6px; } .pmd-pr__giorno b { font-size: 21px; } .pm-notte .pmd-pr__ora { font-size: 15px; } }

/* 1.8 — Nota tecnica: l'ingresso delle lettere non usa più la sfocatura animata.
   Su WebKit (il motore di Safari e di tutti i browser su iPhone) la sfocatura animata sulle lettere
   faceva chiudere la pagina in modo intermittente; spostamento, scala e dissolvenza restano. */
