/* Restyling 2026 – base: sfondo, tipografia, link, pulsanti, form, focus.
   Prefisso #top.db-restyle (id del body + classe) per battere il CSS dinamico di Enfold. */

#top.db-restyle {
	--enfold-font-family-heading: var(--db-font-head);
	--enfold-font-family-body: var(--db-font-body);

	/* Colori di Enfold (Opzioni Tema) tradotti nella nuova palette: valgono per tutti gli elementi del tema */
	--enfold-main-color-primary: var(--db-green);
	--enfold-main-color-secondary: var(--db-green);
	--enfold-main-color-button-border: var(--db-green-dark);
	--enfold-main-color-button-border2: var(--db-green-dark);
	--enfold-main-color-stripe: #CFEED5;
	--enfold-main-color-stripe2: var(--db-tint-green);
	--enfold-main-color-stripe2nd: var(--db-tint-green);
	--enfold-main-color-bg2: var(--db-cream);
	--enfold-main-color-border: var(--db-line);
	--enfold-alternate-color-primary: var(--db-green);
	--enfold-alternate-color-secondary: var(--db-green);
	--enfold-alternate-color-button-border: var(--db-green-dark);
	--enfold-alternate-color-button-border2: var(--db-green-dark);
	--enfold-alternate-color-stripe: #CFEED5;
	--enfold-alternate-color-stripe2: var(--db-tint-green);
	--enfold-alternate-color-stripe2nd: var(--db-tint-green);
	--enfold-alternate-color-bg: var(--db-cream);
	--enfold-alternate-color-border: var(--db-line);
	--enfold-header-color-primary: var(--db-green);
	--enfold-header-color-color: var(--db-text);
	--enfold-header-color-border: var(--db-line);
	--enfold-header-color-button-border: var(--db-green-dark);
	--enfold-header-color-stripe: #CFEED5;
	--enfold-header-color-stripe2: var(--db-tint-green);
	--enfold-main-color-color: var(--db-text);
	--enfold-alternate-color-color: var(--db-text);
	--enfold-footer-color-bg2: var(--db-forest);
	--enfold-socket-color-bg: var(--db-forest);

	background: var(--db-cream);
	color: var(--db-text);
	font-family: var(--db-font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* Solo i contenitori esterni: le sezioni Enfold con foto/colore di sfondo restano intatte */
/* :where() azzera la specificità del prefisso: vince sul bianco di default di Enfold
   ma perde contro i colori/foto impostati sulle singole sezioni nel builder. */
:where(#top.db-restyle) #wrap_all,
:where(#top.db-restyle) #main,
:where(#top.db-restyle) .main_color {
	background-color: var(--db-cream);
	border-color: var(--db-line);
}

/* Testo */
#top.db-restyle p,
#top.db-restyle li,
#top.db-restyle .avia_textblock,
#top.db-restyle .main_color,
#top.db-restyle input,
#top.db-restyle select,
#top.db-restyle textarea {
	font-family: var(--db-font-body);
}
/* Il colore del testo si eredita (così il bianco impostato nel builder sui fondi scuri resta bianco) */

#top.db-restyle .avia_textblock p,
#top.db-restyle .entry-content p {
	font-size: 17px;
	line-height: 1.65;
}

/* Titoli */
#top.db-restyle h1, #top.db-restyle h2, #top.db-restyle h3,
#top.db-restyle h4, #top.db-restyle h5, #top.db-restyle h6,
#top.db-restyle #wrap_all .all_colors h1,
#top.db-restyle #wrap_all .all_colors h2,
#top.db-restyle #wrap_all .all_colors h3,
#top.db-restyle #wrap_all .all_colors h4,
#top.db-restyle #wrap_all .all_colors h5,
#top.db-restyle #wrap_all .all_colors h6,
#top.db-restyle .av-special-heading-tag,
#top.db-restyle .title_container .main-title,
#top.db-restyle .av-special-font {
	font-family: var(--db-font-head);
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.12;
}

:where(#top.db-restyle) :is(h1, h2, h3, h4, h5, h6, .av-special-heading-tag) { color: var(--db-forest); }

/* Font vecchi scritti "a mano" nei contenuti (style="font-family: raleway/gloria…"):
   l'unico modo di battere uno style inline è !important. */
#top.db-restyle [style*="raleway" i] { font-family: var(--db-font-body) !important; }
#top.db-restyle [style*="gloria" i] { font-family: var(--db-font-head) !important; }

#top.db-restyle #wrap_all .all_colors h1 { font-size: clamp(34px, 4.2vw, 52px); }
#top.db-restyle #wrap_all .all_colors h2 { font-size: clamp(27px, 3vw, 38px); }
#top.db-restyle #wrap_all .all_colors h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; }
#top.db-restyle #wrap_all .all_colors h4 { font-size: 19px; }

/* Fasce scure/colorate (classe db-on-dark): titoli e testi bianchi */
#top.db-restyle .db-on-dark h1, #top.db-restyle .db-on-dark h2,
#top.db-restyle .db-on-dark h3, #top.db-restyle .db-on-dark h4,
#top.db-restyle .db-on-dark p, #top.db-restyle .db-on-dark li,
#top.db-restyle .db-on-dark strong,
#top.db-restyle .db-on-dark .avia_textblock,
#top.db-restyle #wrap_all .db-on-dark .av-special-heading-tag,
#top.db-restyle #wrap_all .db-on-dark .av-subheading {
	color: #fff;
}

/* Fondo dietro la pagina: Enfold lo colora col grigio scuro della socket */
html:has(> body.db-restyle) { background-color: #FFF8EE; }

/* Lo style.css del child (gestionale mensa / lazy_mofo) contiene regole globali
   "body { margin: 20px 20px 100px 20px; font-family: sans-serif }" e "a,h1,p { color: #0074d9 }"
   che creano una cornice intorno a tutto il sito e colorano di blu i testi: qui le neutralizziamo. */
body#top.db-restyle {
	margin: 0;
	font-family: var(--db-font-body);
	font-size: 17px;
}
/* specificità minima: battono solo "a,h1,p { color: #0074d9 }", non i colori impostati nel builder */
:where(#top.db-restyle) p { color: inherit; }
:where(#top.db-restyle) h1 { color: var(--db-forest); }

/* Link */
#top.db-restyle a,
#top.db-restyle .main_color a {
	color: var(--db-green);
	text-underline-offset: 3px;
}
#top.db-restyle .avia_textblock a:not(.avia-button) {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-decoration-color: rgba(47, 138, 63, .35);
}
#top.db-restyle .avia_textblock a:not(.avia-button):hover {
	text-decoration-color: var(--db-green);
}

/* Pulsanti: pillola verde con ombra piatta */
#top.db-restyle #wrap_all .avia-button,
#top.db-restyle .avia-button-wrap a.avia-button,
#top.db-restyle input[type="submit"],
#top.db-restyle .wpcf7-submit,
#top.db-restyle button.button,
#top.db-restyle .more-link {
	font-family: var(--db-font-body);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0;
	text-transform: none;
	border-radius: var(--db-radius-pill);
	padding: 13px 24px;
	background-color: var(--db-green);
	border: 0;
	color: #fff;
	box-shadow: var(--db-shadow-btn);
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
	opacity: 1;
}
#top.db-restyle #wrap_all .avia-button:hover,
#top.db-restyle input[type="submit"]:hover,
#top.db-restyle .wpcf7-submit:hover {
	background-color: var(--db-green-dark);
	transform: translateY(2px);
	box-shadow: 0 2px 0 var(--db-green-dark);
	color: #fff;
}
#top.db-restyle #wrap_all .avia-button .avia_button_icon { color: inherit; }

/* Secondario: bordo verde (colore "subtle" o classe db-btn-secondary) */
#top.db-restyle #wrap_all .avia-button.avia-color-theme-color-subtle,
#top.db-restyle #wrap_all .avia-button.avia-color-light,
#top.db-restyle #wrap_all .db-btn-secondary .avia-button,
#top.db-restyle #wrap_all .avia-button.db-btn-secondary {
	background: #fff;
	color: var(--db-green);
	box-shadow: inset 0 0 0 2.5px var(--db-green);
}
#top.db-restyle #wrap_all .avia-button.avia-color-theme-color-subtle:hover,
#top.db-restyle #wrap_all .db-btn-secondary .avia-button:hover,
#top.db-restyle #wrap_all .avia-button.db-btn-secondary:hover {
	background: var(--db-tint-green);
	transform: none;
}

/* CTA iscrizioni: corallo con testo scuro */
#top.db-restyle #wrap_all .db-btn-cta .avia-button,
#top.db-restyle #wrap_all .avia-button.db-btn-cta {
	background: var(--db-coral);
	color: var(--db-coral-ink);
	box-shadow: 0 4px 0 var(--db-coral-dark);
}
#top.db-restyle #wrap_all .db-btn-cta .avia-button:hover,
#top.db-restyle #wrap_all .avia-button.db-btn-cta:hover {
	background: #EE7D47;
	box-shadow: 0 2px 0 var(--db-coral-dark);
}

/* Form (Contact Form 7 e form Enfold) */
#top.db-restyle .main_color input[type="text"],
#top.db-restyle .main_color input[type="email"],
#top.db-restyle .main_color input[type="tel"],
#top.db-restyle .main_color input[type="number"],
#top.db-restyle .main_color input[type="url"],
#top.db-restyle .main_color input[type="date"],
#top.db-restyle .main_color input[type="search"],
#top.db-restyle .main_color textarea,
#top.db-restyle .main_color select {
	font-family: var(--db-font-body);
	font-size: 16px;
	color: var(--db-text);
	background: #fff;
	border: 2px solid var(--db-line);
	border-radius: var(--db-radius-sm);
	padding: 14px 16px;
	box-shadow: none;
}
#top.db-restyle .main_color input:focus,
#top.db-restyle .main_color textarea:focus,
#top.db-restyle .main_color select:focus {
	border-color: var(--db-green);
	background: #fff;
}
#top.db-restyle .wpcf7-form label { font-weight: 700; color: var(--db-forest); }

/* Tabelle: via il maiuscolo */
#top.db-restyle .main_color th {
	background: var(--db-green);
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
	font-family: var(--db-font-body);
	font-weight: 800;
}

/* Focus visibile per chi naviga da tastiera */
#top.db-restyle a:focus-visible,
#top.db-restyle button:focus-visible,
#top.db-restyle input:focus-visible,
#top.db-restyle select:focus-visible,
#top.db-restyle textarea:focus-visible,
#top.db-restyle .avia-button:focus-visible {
	outline: 3px solid var(--db-sun);
	outline-offset: 3px;
}

#top.db-restyle ::selection { background: var(--db-sun); color: var(--db-forest); }
