/*
 * Stili del sito che non dipendono dal tema. Sostituiscono quelli di Twentig usati nei contenuti.
 */

:root {
	--dc-ombra: 0 8px 18px 0 rgba(0, 0, 0, 0.12);
	--dc-puntini: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 20'%3e%3ccircle cx='2.5' cy='4.5' r='2.5'/%3e%3ccircle cx='2.5' cy='-.19' r='2.81'/%3e%3ccircle cx='2.5' cy='14.38' r='1.38'/%3e%3ccircle cx='2.5' cy='19.25' r='.75'/%3e%3ccircle cx='2.5' cy='9.5' r='2'/%3e%3c/svg%3e");
}

/* Schede in griglia (es. esempi di video nell'articolo "Realizzazione video aziendale"). */
.dc-scheda {
	box-shadow: 0.1rem 0.1rem 5px 2px rgba(0, 0, 0, 0.1);
	padding: 1rem;
	border-bottom-right-radius: 4rem;
}

/* Stile "Cornice" di immagini, video e contenuti incorporati: bordo bianco e ombra. */
figure:where(.wp-block-image, .wp-block-embed, .wp-block-video).is-style-cornice {
	display: block;
	background-color: #fff;
	padding: 12px;
	box-shadow: var(--dc-ombra);
	box-sizing: border-box;
}

.is-style-cornice:is(.wp-block-image, .wp-block-embed, .wp-block-video) figcaption {
	text-align: center;
	margin: 0 auto;
	padding: 20px 0 10px;
	color: #555;
}

.wp-block-image.is-style-cornice.is-resized > figcaption {
	display: block;
}

/* Bordo a puntini sopra e sotto un gruppo, nel colore di sfondo del gruppo. */
:is(.dc-puntini-sopra, .dc-puntini-sotto):where(.wp-block-group, .wp-block-cover) {
	position: relative;
}

.dc-puntini-sopra::before,
.dc-puntini-sotto::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -19px;
	width: 100%;
	height: 20px;
	background-color: inherit;
	-webkit-mask: var(--dc-puntini) center repeat no-repeat;
	mask: var(--dc-puntini) center repeat no-repeat;
	z-index: 2;
	pointer-events: auto;
}

.dc-puntini-sopra::before {
	top: -19px;
	bottom: auto;
	transform: rotate(180deg);
}

/* Stile "Frecce" degli elenchi. */
ul.wp-block-list.is-style-frecce {
	list-style: none !important;
	padding-inline: 0 !important;
}

ul.is-style-frecce ul {
	list-style: none;
	padding-inline-start: 0;
}

ul.is-style-frecce li {
	position: relative;
	padding-inline-start: 1.5em;
	margin-inline-start: 0;
}

ul.is-style-frecce li::before {
	content: "→";
	position: absolute;
	inset-inline-start: 0;
}

/* Classe "dc-link-esteso": tutto il blocco è cliccabile e porta al primo link che contiene. */
.dc-link-esteso:where(.wp-block-group, .wp-block-column) {
	position: relative;
}

.dc-link-esteso:where(.wp-block-group, .wp-block-column, .wp-block-cover) :where(a, button)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: auto;
	background-color: transparent;
}

.dc-link-esteso .wp-block-button ~ .wp-block-button a::after {
	content: none;
}

.dc-link-esteso .wp-block-embed {
	position: relative;
	z-index: 2;
}

.wp-block-cover.dc-link-esteso .wp-block-cover__inner-container {
	position: static;
	z-index: 1;
	pointer-events: none;
}

.wp-block-cover.dc-link-esteso .wp-block-cover__inner-container :is(a, button) {
	pointer-events: auto;
}

/* Classe "dc-hover-opacita" sulle copertine: al passaggio del mouse il velo colorato si schiarisce. */
.wp-block-cover.dc-hover-opacita :is(.wp-block-cover__background, .wp-block-cover__gradient-background) {
	transition: opacity 0.2s;
}

.dc-hover-opacita:where(:hover, :focus-within) :is(.wp-block-cover__background, .wp-block-cover__gradient-background).has-background-dim {
	opacity: 0.65 !important;
}

.dc-hover-opacita:where(:hover, :focus-within) :is(.wp-block-cover__background, .wp-block-cover__gradient-background):is(.has-background-dim-0, .has-background-dim-10) {
	opacity: 0.2 !important;
}

.dc-hover-opacita:where(:hover, :focus-within) :is(.wp-block-cover__background, .wp-block-cover__gradient-background):is(.has-background-dim-20, .has-background-dim-30) {
	opacity: 0.4 !important;
}

.dc-hover-opacita:where(:hover, :focus-within) :is(.wp-block-cover__background, .wp-block-cover__gradient-background).has-background-dim-100 {
	opacity: 0.5 !important;
}

/*
 * Classi "dc-appare" e "dc-appare-su": il blocco compare in dissolvenza (o salendo) quando entra
 * nello schermo. Solo nelle pagine, con JavaScript attivo e se il visitatore non ha ridotto le animazioni.
 */
@media (prefers-reduced-motion: no-preference) {
	.dc-js :where(.dc-appare, .dc-appare-su) {
		opacity: 0;
	}

	.dc-js :where(.dc-appare, .dc-appare-su).dc-visto {
		opacity: 1;
		animation: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
	}

	.dc-js .dc-appare.dc-visto {
		animation-name: dc-appare;
	}

	.dc-js .dc-appare-su.dc-visto {
		animation-name: dc-appare-su;
	}
}

@keyframes dc-appare {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes dc-appare-su {
	from {
		opacity: 0;
		transform: translate3d(0, 50px, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Moduli di Contact Form 7: i campi non escono mai dal loro riquadro. */
.wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.wpcf7 textarea,
.wpcf7 select {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

/* Riquadro del modulo nella pagina contatti: su mobile bordo e margini più sottili. */
@media (width <= 767px) {
	.dc-riquadro-modulo {
		border-width: 0.75rem !important;
		padding: 1.5rem !important;
	}
}
