/*
 * 4UP Consulting — stili per le pagine costruite con i blocchi.
 * Classi da usare nel campo "Classi CSS aggiuntive" di un blocco (pannello Avanzate):
 *   fu-section   gruppo: sezione con spaziatura verticale
 *   fu-card      gruppo: scheda bianca con bordo
 *   fu-kicker    paragrafo: etichetta maiuscola sopra un titolo
 *   fu-lead      paragrafo: testo introduttivo più grande
 *   fu-more      paragrafo: link "Approfondisci →"
 *   fu-rounded   immagine: angoli arrotondati
 *   fu-cta       gruppo: riquadro scuro di invito al contatto
 */

/* Home a sezioni ------------------------------------------------------------ */
.fu-blocks { overflow-x: clip; }
.fu-blocks > .alignfull { margin-top: 0; margin-bottom: 0; }
.fu-blocks > *:not(.alignfull) { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }

.fu-section { padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }
.fu-section > * + * { margin-top: 1.25rem; }
.fu-section .wp-block-columns { gap: 1.5rem; margin-top: 2.5rem; margin-bottom: 0; }
.fu-section .wp-block-columns.are-vertically-aligned-center { gap: clamp(2rem, 5vw, 4rem); }

.fu-blocks h1, .fu-blocks h2, .fu-blocks h3,
.entry-content .fu-card h3 { font-family: var(--primary-font), Georgia, serif; line-height: 1.15; margin-top: 0; }
.fu-blocks h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.fu-blocks h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.fu-blocks h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.fu-blocks p { font-size: 1.0625rem; line-height: 1.7; }

/* Testi su sfondo scuro: eredita il colore impostato sul gruppo. */
.has-white-color h1, .has-white-color h2, .has-white-color h3, .has-white-color h4 { color: inherit; }
.has-white-color p { color: rgba(255, 255, 255, 0.82); }
.has-white-color .fu-kicker { color: var(--fu-teal); }

/* Etichette, testi introduttivi, link ---------------------------------------- */
.fu-kicker {
	font-size: 0.85rem !important; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--fu-teal-dark); margin-bottom: 0.75rem !important;
}
.fu-lead { font-size: 1.2rem !important; line-height: 1.65; max-width: 44rem; }
.fu-more { margin-top: auto !important; padding-top: 0.75rem; font-weight: 700; }
.fu-more a, .fu-card .fu-more a { color: var(--fu-teal-dark); text-decoration: none; }
.fu-more a:hover { text-decoration: underline; }

/* Pulsanti ------------------------------------------------------------------ */
.wp-block-button__link {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0.75rem 1.6rem;
	border-radius: 0.375rem; border: 1px solid var(--fu-coral);
	background: var(--fu-coral); color: #011E5C; font-weight: 700; text-decoration: none;
}
.wp-block-button__link:hover { background: var(--fu-coral-dark); border-color: var(--fu-coral-dark); color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: inherit; border-color: currentColor;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: rgba(108, 195, 234, 0.12); color: inherit; }
.wp-block-buttons { gap: 0.75rem; margin-top: 1.75rem; }
.entry-content .wp-block-button__link { color: #011E5C; }
.entry-content .wp-block-button.is-style-outline .wp-block-button__link { color: inherit; }

/* Schede ---------------------------------------------------------------------- */
.fu-card {
	display: flex; flex-direction: column; height: 100%;
	padding: 1.75rem; background: #fff; color: #14233F;
	border: 1px solid #DCE4EF; border-top: 3px solid var(--fu-teal-dark); border-radius: 0.5rem;
}
.fu-card > * { margin-top: 0; margin-bottom: 0.6rem; }
.fu-card p { color: #4A5870; font-size: 1rem; }
.wp-block-column:nth-child(even) > .fu-card { border-top-color: var(--fu-coral); }

/* Immagini ------------------------------------------------------------------ */
.fu-rounded img { border-radius: 1rem; display: block; width: 100%; height: auto; }
.wp-block-image.fu-rounded { margin: 0; }

/* Riquadro invito ----------------------------------------------------------- */
.fu-cta { padding: clamp(2rem, 5vw, 3rem); border-radius: 0.75rem; margin-top: 3rem; }
.fu-cta h2, .fu-cta h3 { margin-top: 0; }
.fu-cta h2::after { display: none; }

/* Ultime news (blocco "Ultimi articoli") ------------------------------------ */
.wp-block-latest-posts.is-grid { gap: 1.5rem; margin-top: 2.5rem; padding: 0; }
.wp-block-latest-posts.is-grid li {
	margin: 0 !important; width: auto !important;
	background: #fff; border: 1px solid #DCE4EF; border-radius: 0.5rem; overflow: hidden;
	display: flex; flex-direction: column;
}
@media (min-width: 782px) {
	.wp-block-latest-posts.columns-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.wp-block-latest-posts__featured-image { margin: 0 !important; aspect-ratio: 16 / 10; background: var(--fu-teal-soft); }
.wp-block-latest-posts__featured-image img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-latest-posts__post-title {
	display: block; padding: 1.25rem 1.5rem 0.25rem;
	font-family: var(--primary-font), Georgia, serif; font-weight: 700; font-size: 1.15rem; line-height: 1.35;
	color: var(--fu-slate); text-decoration: none;
}
.wp-block-latest-posts__post-title:hover { color: var(--fu-teal-dark); }
.wp-block-latest-posts__post-date { padding: 0 1.5rem 1.5rem; font-size: 0.9rem; color: #5F6C82; }

/* Pagine interne ------------------------------------------------------------ */
.entry-content .wp-block-columns { gap: 1.5rem; }
.entry-content > .wp-block-heading { margin-top: 3rem; }
.entry-content ul.fu-checks { list-style: none; padding-left: 0; }
.entry-content ul.fu-checks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; }
.entry-content ul.fu-checks li::before {
	content: ""; position: absolute; left: 0; top: 0.45em; width: 0.9rem; height: 0.5rem;
	border-left: 2px solid var(--fu-teal-dark); border-bottom: 2px solid var(--fu-teal-dark); transform: rotate(-45deg);
}

@media (max-width: 781px) {
	.fu-section .wp-block-columns { margin-top: 2rem; }
}

/* --- Allineamento: nelle sezioni della home testi e colonne hanno la stessa larghezza --- */
.fu-section.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: 1200px !important; }
.fu-section > .fu-lead { padding-right: max(0px, calc(100% - 46rem)); }
.fu-section > .wp-block-columns:first-child { margin-top: 0; }

/* --- Colori dei testi (più specifici delle regole generali del tema) --- */
.fu-blocks p, .fu-blocks li { color: #2E3B52; }
.fu-blocks .has-white-color p, .fu-blocks .has-white-color li { color: rgba(255, 255, 255, 0.82); }
.fu-blocks .fu-kicker, .entry-content .fu-kicker { color: var(--fu-teal-dark); }
.fu-blocks .has-white-color .fu-kicker, .entry-content .has-white-color .fu-kicker { color: var(--fu-teal); }
.fu-blocks .fu-card p, .entry-content .fu-card p { color: #4A5870; }
.fu-blocks .fu-more a, .entry-content .fu-more a { color: var(--fu-teal-dark); font-weight: 700; }

/* --- Ultime news in griglia --- */
ul.wp-block-latest-posts.is-grid.columns-3 { display: grid; grid-template-columns: 1fr; }
@media (min-width: 782px) {
	ul.wp-block-latest-posts.is-grid.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.fu-blocks a.wp-block-latest-posts__post-title, .entry-content a.wp-block-latest-posts__post-title {
	font-family: var(--primary-font), Georgia, serif; color: var(--fu-slate);
}
ul.wp-block-latest-posts.is-grid { padding-left: 0 !important; margin-left: 0; list-style: none; }
.entry-content ul.fu-checks li, .fu-blocks ul.fu-checks li { list-style: none; }
.fu-cta.is-layout-constrained > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
