/*
 * Vistudio: ritocchi perché i widget Elementor ereditino font e forme del tema.
 * Accodato da inc/elementor.php solo se Elementor è attivo. I colori vengono dai globali di Elementor
 * (`--e-global-color-<slug>`, gli stessi slug della palette del tema), con i preset del tema come ripiego.
 */

/* Titoli: Archivo allargato come nel resto del tema. */
.elementor .elementor-heading-title {
	font-family: var(--wp--preset--font-family--archivo);
	font-stretch: 110%;
}

/* Etichette, pillole e paragrafi-titolo: senza allargamento. La famiglia di font viene dal preset del Kit. */
.elementor .vistudio-label .elementor-heading-title,
.elementor .vistudio-badge .elementor-heading-title,
.elementor .vistudio-pill .elementor-heading-title,
.elementor .elementor-widget-heading p.elementor-heading-title {
	font-stretch: 100%;
}

.elementor .vistudio-statement p.elementor-heading-title,
.elementor .vistudio-step__num p.elementor-heading-title {
	font-stretch: 112%;
}

.elementor .elementor-widget-text-editor,
.elementor .elementor-widget-icon-list {
	font-family: var(--wp--preset--font-family--rubik);
}

.elementor .elementor-widget-text-editor p {
	margin: 0;
}

/* Pulsanti: pillola, almeno 44px, testo e icona sulla stessa riga. */
.elementor .elementor-button {
	min-height: 44px;
	box-sizing: border-box;
	border-radius: var(--wp--custom--radius--pill);
	font-family: var(--wp--preset--font-family--rubik);
	text-decoration: none;
}

.elementor .elementor-button .elementor-button-content-wrapper {
	min-height: 44px;
	align-items: center;
}

.elementor .elementor-button-text {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.elementor .elementor-button-text::before,
.elementor .elementor-button-text::after {
	content: none;
	flex: none;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: var(--vistudio-icon) center / contain no-repeat;
	mask: var(--vistudio-icon) center / contain no-repeat;
}

.elementor .vistudio-arrow .elementor-button-text::after,
.elementor .vistudio-arrow-ne .elementor-button-text::after {
	content: "";
}

.elementor .vistudio-arrow .elementor-button-text::after {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	width: 18px;
	height: 18px;
}

.elementor .vistudio-arrow-ne .elementor-button-text::after {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E");
}

.elementor .vistudio-play .elementor-button-text::before {
	content: "";
	--vistudio-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E");
}

/* Pulsante che sembra un link sottolineato. */
.elementor .vistudio-link .elementor-button {
	background: transparent;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.elementor .vistudio-link .elementor-button-text {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Card delle due fasi: il pulsante finale sta in fondo. */
.elementor .vistudio-fase > .elementor-widget-button:last-child {
	margin-top: auto;
}

/* Fase 2: alone giallo che respira intorno al riquadro (giallo della palette, in trasparenza).
   Si toglie dal pannello levando la classe vistudio-fase--alone (Avanzate → Classi CSS). */
.elementor .vistudio-fase--alone {
	animation: vistudio-alone 3.6s ease-in-out infinite;
}
@keyframes vistudio-alone {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 0, 0); }
	50% { box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.22), 0 0 36px 6px rgba(255, 212, 0, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
	.elementor .vistudio-fase--alone { animation: none; box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.22); }
}

/* Hero: la card navy ha il marchio dietro (classe vistudio-hero__card di blocks.css). */
.elementor .vistudio-hero__card {
	position: relative;
	overflow: hidden;
}

/* Etichette, pillole, badge: l'elemento è il contenitore del widget. */
.elementor .vistudio-label,
.elementor .vistudio-badge,
.elementor .vistudio-pill {
	width: auto;
	--container-widget-width: auto;
}

/* Passi numerati: cerchio da 52px (le misure vengono da blocks.css). */
.elementor .elementor-widget.vistudio-step__num {
	width: 52px;
	max-width: 52px;
	--container-widget-width: 52px;
}

.elementor .vistudio-step__num .elementor-widget-container {
	width: 100%;
}

.elementor .vistudio-step__num.is-accent {
	border-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
}

/* Righe "Dall'obiettivo agli strumenti": freccia prima degli strumenti. */
.elementor .vistudio-goals__tools {
	flex: 1 1 400px;
	min-width: 0;
}

.elementor .vistudio-goals__tools::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	margin-right: 6px;
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.elementor .vistudio-pill.is-accent {
	border-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
}

/* Loghi dei clienti. */
.elementor .vistudio-clienti__loghi .elementor-widget-image {
	width: auto;
	--container-widget-width: auto;
}

.elementor .vistudio-clienti__loghi img {
	display: block;
	max-width: none;
}

/* Lista con la spunta: il testo non va a capo sotto l'icona. */
.elementor .elementor-icon-list-item {
	align-items: center;
}

/* Agenzia e Servizi */

/* Spazio per la foto non ancora disponibile: ritratto 4/5, marchio in basso a sinistra nell'hero. */
.elementor .e-con.vistudio-foto-vuota--ritratto {
	aspect-ratio: 4 / 5;
}

.elementor .e-con.vistudio-foto-vuota--marchio {
	position: relative;
	overflow: hidden;
	background-image: url("../images/marchio.svg");
	background-repeat: no-repeat;
	background-size: 260px 260px;
	background-position: left -70px bottom -70px;
}

/* Cerchio arancio con l'icona dei principi. */
.elementor .elementor-widget.vistudio-icona {
	position: relative;
	flex: none;
	width: 54px;
	max-width: 54px;
	height: 54px;
	--container-widget-width: 54px;
	border-radius: 50%;
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
}

.elementor .vistudio-icona::after {
	content: "";
	position: absolute;
	inset: 14px;
	background-color: var(--e-global-color-navy, var(--wp--preset--color--navy));
	-webkit-mask: var(--vistudio-icon) center / contain no-repeat;
	mask: var(--vistudio-icon) center / contain no-repeat;
}

.elementor .vistudio-icona--compass {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Cpath%20d='M15.5%208.5l-2%205-5%202%202-5z'/%3E%3C/svg%3E");
}

.elementor .vistudio-icona--target {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='9'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='5'/%3E%3Ccircle%20cx='12'%20cy='12'%20r='1.4'/%3E%3C/svg%3E");
}

.elementor .vistudio-icona--people {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='8'%20r='3.2'/%3E%3Cpath%20d='M3.5%2019c0-3%202.5-5.2%205.5-5.2s5.5%202.2%205.5%205.2'/%3E%3Ccircle%20cx='17'%20cy='9'%20r='2.6'/%3E%3Cpath%20d='M15.8%2014.1c2.7%200.2%204.7%202.1%204.7%204.9'/%3E%3C/svg%3E");
}

.elementor .vistudio-icona--gem {
	--vistudio-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203l7.5%207.5L12%2021l-7.5-10.5z'/%3E%3Ccircle%20cx='12'%20cy='10.5'%20r='2.2'/%3E%3C/svg%3E");
}

/* Nomi dei clienti: Archivo allargato (i titoli "p" restano a 100% per le etichette). */
.elementor .vistudio-cliente p.elementor-heading-title {
	font-stretch: 108%;
}

/* Indice dei servizi: voce a tutta larghezza, testo a sinistra e freccia arancio a destra. */
.elementor .vistudio-indice__voce .elementor-button {
	text-align: left;
}

.elementor .vistudio-indice__voce .elementor-button-content-wrapper,
.elementor .vistudio-indice__voce .elementor-button-text {
	width: 100%;
	justify-content: space-between;
}

.elementor .vistudio-indice__voce .elementor-button-text::after {
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
}

.elementor .vistudio-indice__voce .elementor-button:hover .elementor-button-text,
.elementor .vistudio-indice__voce .elementor-button:focus-visible .elementor-button-text {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Numero del servizio: Archivo allargato come i passi della home. */
.elementor .vistudio-servizio__num p.elementor-heading-title {
	font-stretch: 112%;
}

.elementor .elementor-widget.vistudio-servizio__num {
	width: auto;
	flex: none;
	--container-widget-width: auto;
	padding-top: 6px;
}

/* Pagine dei servizi */

/* Schermata del sito nell'hero: proporzione 16/11 e barra del browser con tre puntini. */
.elementor .e-con.vistudio-foto-vuota--schermo {
	aspect-ratio: 16 / 11;
}

.elementor .e-con.vistudio-barra {
	flex-direction: row;
	align-items: center;
	padding: 12px 16px;
	background-color: var(--e-global-color-bordo, var(--wp--preset--color--bordo));
}

/* ::before è dello sfondo di Elementor: i puntini stanno su ::after. */
.elementor .e-con.vistudio-barra::after {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	--vistudio-punto: color-mix(in srgb, var(--e-global-color-grigio, var(--wp--preset--color--grigio)) 40%, var(--e-global-color-bordo, var(--wp--preset--color--bordo)));
	background-color: var(--vistudio-punto);
	box-shadow: 16px 0 0 var(--vistudio-punto), 32px 0 0 var(--vistudio-punto);
}

/* "Fa per voi se…": Archivo allargato come le altre frasi. */
.elementor .vistudio-frase-cliente p.elementor-heading-title {
	font-stretch: 108%;
}

/* Domande frequenti (widget Toggle): il link del titolo è alto almeno 44px. */
.elementor .elementor-toggle .elementor-toggle-title {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	flex: 1 1 0;
	min-width: 0;
}

/* Icona e domanda sulla stessa riga anche quando la domanda va a capo (390px). */
.elementor .elementor-toggle .elementor-tab-title {
	display: flex;
	align-items: flex-start;
}

.elementor .elementor-toggle .elementor-toggle-icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/* Voce aperta: la risposta sta a 12px dalla domanda, come nel design. */
.elementor .elementor-toggle .elementor-tab-title.elementor-active {
	padding-bottom: 12px;
}

/* Il testo non deve toccare i bordi dello schermo a 390px. */
@media (max-width: 767px) {
	.elementor .elementor-widget-shortcode {
		width: 100%;
	}
}

/* Card hero: Elementor azzera l'immagine di sfondo, la rimettiamo (marchio decorativo). */
.elementor .e-con.vistudio-hero__card {
	background-image: url("../images/marchio.svg");
	background-repeat: no-repeat;
	background-size: 360px 360px;
	background-position: right -64px top -56px;
}

@media (max-width: 599px) {
	.elementor .e-con.vistudio-hero__card {
		background-size: 250px 250px;
	}
}

/* Contenitori dentro una riga che devono restare larghi quanto il contenuto. */
.elementor .e-con.vistudio-clienti__loghi {
	width: auto;
	--width: auto;
}

.elementor .e-con.vistudio-goals__tools {
	width: auto;
	--width: auto;
	flex: 1 1 400px;
	align-items: center;
	--align-items: center;
}

/* Elementor usa ::before dei contenitori per lo sfondo sovrapposto (position absolute): la freccia deve restare nel flusso. */
.elementor .e-con.vistudio-goals__tools::before {
	position: static;
	display: block;
	opacity: 1;
	inset: auto;
	transform: none;
	border: 0;
}

/* Contatti */

/* Telefono, email e social sulla card navy: link bianchi alti almeno 44px (i colori vengono dal widget). */
.elementor .vistudio-recapito a,
.elementor .vistudio-social a {
	display: inline-block;
	text-decoration: none;
}

.elementor .vistudio-recapito a {
	padding: 8px 0;
	margin-block: -8px;
}

.elementor .vistudio-recapito a:hover,
.elementor .vistudio-recapito a:focus-visible {
	text-decoration: underline;
}

.elementor .vistudio-social a {
	margin-right: 20px;
	padding: 12px 0;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Mappa: la card ha la proporzione 4/3 e lo sfondo di blocks.css; il segnaposto della spilla è una maschera. */
.elementor .e-con.vistudio-mappa {
	aspect-ratio: 4 / 3;
	box-sizing: border-box;
}

.elementor .elementor-widget.vistudio-pin {
	position: relative;
	flex: none;
	width: 32px;
	max-width: 32px;
	height: 32px;
	--container-widget-width: 32px;
}

.elementor .vistudio-pin::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--e-global-color-navy, var(--wp--preset--color--navy));
	-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2021s-6.5-5.6-6.5-11a6.5%206.5%200%200%201%2013%200c0%205.4-6.5%2011-6.5%2011z'/%3E%3Ccircle%20cx='12'%20cy='10'%20r='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2021s-6.5-5.6-6.5-11a6.5%206.5%200%200%201%2013%200c0%205.4-6.5%2011-6.5%2011z'/%3E%3Ccircle%20cx='12'%20cy='10'%20r='2.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Newsletter: il modulo Brevo si allarga quanto la colonna. */
.elementor .e-con.vistudio-newsletter__modulo {
	min-width: 0;
}

/* Articoli costruiti con Elementor: i container di primo livello stanno nella colonna di lettura
   (768px, come gli articoli a blocchi). Un container con la classe vistudio-largo (Avanzate → Classi CSS)
   può allargarsi fino al contenitore del sito. I margini interni restano quelli del pannello. */
.vistudio-articolo-el .elementor > .e-con:not(.vistudio-largo) {
	max-width: calc(768px + 2 * clamp(20px, 5vw, 56px));
	margin-inline: auto;
}
.vistudio-articolo-el .elementor > .e-con.vistudio-largo {
	max-width: calc(1240px + 2 * clamp(20px, 5vw, 56px));
	margin-inline: auto;
}

/* Testo solo per i lettori di schermo (per esempio l'elenco dei servizi del nastro). */
.vistudio-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Hero della home: titolo largo, "valere" evidenziato in giallo, ruotato e ancora più largo. */
.elementor h1.elementor-heading-title:has(.vistudio-evidenziatore) {
	font-stretch: 112%;
}
.elementor .vistudio-evidenziatore {
	display: inline-block;
	padding: 0 0.12em 0.04em;
	margin: 0 -0.04em;
	border-radius: 0.14em;
	background-color: var(--e-global-color-arancio, var(--wp--preset--color--arancio));
	color: var(--e-global-color-navy, var(--wp--preset--color--navy));
	transform: rotate(-2deg);
	font-stretch: 125%;
}

/* Nastro dei servizi: una riga che scorre da destra a sinistra, con il marchio nero tra un servizio e l'altro.
   Il contenuto è ripetuto due volte: a metà corsa il secondo giro è esattamente dove partiva il primo. */
.elementor .vistudio-nastro p.elementor-heading-title {
	font-stretch: 112%;
	white-space: nowrap;
}
.vistudio-nastro__track {
	display: flex;
	width: max-content;
	animation: vistudio-nastro 30s linear infinite;
}
.vistudio-nastro__giro {
	display: flex;
	align-items: center;
	gap: 0.45em;
	padding-right: 0.45em;
}
.vistudio-nastro__sep {
	flex: none;
	width: 0.72em;
	height: 0.72em;
	background: url("../images/marchio-nero.svg") center / contain no-repeat;
}
@keyframes vistudio-nastro {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.vistudio-nastro__track { animation: none; }
}
