/*
 * SiteSetter - stile base delle pagine create con l'editor visuale
 * ------------------------------------------------------------------
 * Caricato sia dentro l'editor sia sul sito pubblico. Tutte le classi
 * iniziano con "ssb-" per non scontrarsi con il CSS del tema.
 * I colori principali si cambiano dalle variabili qui sotto (o dal
 * pannello Stili dell'editor sui singoli elementi).
 */
:root {
	--ssb-primary: #1f4fd8;
	--ssb-primary-dark: #163a9f;
	--ssb-accent: #f5a524;
	--ssb-text: #1e2430;
	--ssb-muted: #5d6676;
	--ssb-bg-soft: #f4f6fa;
	--ssb-radius: 14px;
	--ssb-max: 1160px;
}
.ssb-page {
	/* sfondo proprio: le pagine dell'editor non ereditano i colori del tema (es. body scuro) */
	background: #fff;
	color: var(--ssb-text);
	font-family: inherit;
	line-height: 1.6;
}
.ssb-page *, .ssb-page *::before, .ssb-page *::after { box-sizing: border-box; }
.ssb-page img { max-width: 100%; height: auto; display: block; }

/* Titoli e paragrafi: colori dell'editor anche se il tema ne imposta altri */
/* specificità bassa (:where) così le classi dei blocchi, es. .ssb-eyebrow, hanno la precedenza */
.ssb-page :where(h1, h2, h3, h4, h5, h6, p, li, span, small, strong) { color: inherit; }
.ssb-page :where(a:not(.ssb-btn)) { color: var(--ssb-primary); }
.ssb-section--dark a:not(.ssb-btn), .ssb-section--primary a:not(.ssb-btn), .ssb-hero a:not(.ssb-btn) { color: inherit; }

/* Sezioni e contenitore */
.ssb-section { padding: 72px 20px; position: relative; }
.ssb-section--soft { background: var(--ssb-bg-soft); }
.ssb-section--dark { background: #121826; color: #fff; }
.ssb-section--dark .ssb-muted { color: rgba(255,255,255,.7); }
.ssb-section--primary { background: var(--ssb-primary); color: #fff; }
.ssb-container { max-width: var(--ssb-max); margin: 0 auto; }
.ssb-narrow { max-width: 760px; margin: 0 auto; }
.ssb-center { text-align: center; }
.ssb-muted { color: var(--ssb-muted); }

/* Tipografia */
.ssb-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ssb-primary); margin: 0 0 12px; }
.ssb-section--dark .ssb-eyebrow, .ssb-section--primary .ssb-eyebrow, .ssb-hero .ssb-eyebrow { color: var(--ssb-accent); }
.ssb-h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.12; margin: 0 0 18px; font-weight: 800; }
.ssb-h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; margin: 0 0 16px; font-weight: 750; }
.ssb-h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 10px; font-weight: 700; }
.ssb-lead { font-size: 1.15rem; margin: 0 0 28px; }
.ssb-text { margin: 0 0 16px; }

/* Pulsanti */
.ssb-btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--ssb-primary); background: var(--ssb-primary); color: #fff; transition: transform .15s ease, background .15s ease; cursor: pointer; font-size: 1rem; }
.ssb-btn:hover { background: var(--ssb-primary-dark); border-color: var(--ssb-primary-dark); transform: translateY(-1px); }
.ssb-btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.ssb-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: currentColor; }
.ssb-btn--accent { background: var(--ssb-accent); border-color: var(--ssb-accent); color: #1e2430; }
.ssb-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ssb-center .ssb-actions { justify-content: center; }

/* Hero */
.ssb-hero { padding: 120px 20px; color: #fff; background: #121826 center/cover no-repeat; position: relative; }
.ssb-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,16,30,.85), rgba(10,16,30,.35)); }
.ssb-hero > .ssb-container { position: relative; }
.ssb-hero .ssb-lead { max-width: 620px; color: rgba(255,255,255,.88); }
.ssb-hero--small { padding: 80px 20px; }

/* Griglie */
.ssb-grid { display: grid; gap: 28px; }
.ssb-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ssb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ssb-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ssb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ssb-col { min-height: 40px; }

/* Card */
.ssb-card { background: #fff; border-radius: var(--ssb-radius); padding: 28px; box-shadow: 0 8px 30px rgba(20,30,60,.08); color: var(--ssb-text); }
.ssb-card-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--ssb-bg-soft); color: var(--ssb-primary); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; }
.ssb-rounded { border-radius: var(--ssb-radius); }
.ssb-shadow { box-shadow: 0 18px 50px rgba(20,30,60,.16); }

/* Numeri */
.ssb-stat { text-align: center; }
.ssb-stat-number { font-size: 2.6rem; font-weight: 800; color: var(--ssb-primary); line-height: 1; margin: 0 0 8px; }
.ssb-section--dark .ssb-stat-number, .ssb-section--primary .ssb-stat-number { color: var(--ssb-accent); }

/* Testimonianze */
.ssb-quote { font-size: 1.05rem; font-style: italic; margin: 0 0 18px; }
.ssb-person { display: flex; align-items: center; gap: 12px; }
.ssb-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

/* Elenchi */
.ssb-list { list-style: none; padding: 0; margin: 0 0 24px; }
.ssb-list li { padding: 6px 0 6px 30px; position: relative; }
.ssb-list li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: var(--ssb-primary); font-weight: 800; }

/* FAQ */
.ssb-faq details { border-bottom: 1px solid rgba(0,0,0,.1); padding: 18px 0; }
.ssb-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.ssb-faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--ssb-primary); }
.ssb-faq details[open] summary::after { content: "–"; }
.ssb-faq details p { margin: 12px 0 0; color: var(--ssb-muted); }

/* Galleria */
.ssb-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ssb-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }

/* Video e mappa */
.ssb-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--ssb-radius); overflow: hidden; background: #000; }
.ssb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Moduli */
.ssb-form { display: grid; gap: 14px; }
.ssb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ssb-form label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 4px; }
.ssb-form input[type=text], .ssb-form input[type=email], .ssb-form input[type=tel], .ssb-form textarea, .ssb-form select { width: 100%; padding: 12px 14px; border: 1px solid #cfd5df; border-radius: 10px; font: inherit; background: #fff; color: var(--ssb-text); }
.ssb-form textarea { min-height: 140px; resize: vertical; }
.ssb-form .ssb-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.ssb-form-msg { font-weight: 600; min-height: 1.4em; }
.ssb-form-msg.is-ok { color: #1f7a3d; }
.ssb-form-msg.is-error { color: #c62828; }
.ssb-hidden { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Separatori */
.ssb-divider { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 32px 0; }
.ssb-spacer { height: 60px; }

/* Responsive */
@media (max-width: 992px) {
	.ssb-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ssb-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.ssb-section { padding: 52px 18px; }
	.ssb-hero { padding: 84px 18px; }
	.ssb-split, .ssb-grid-2, .ssb-grid-3, .ssb-grid-4, .ssb-form-row { grid-template-columns: 1fr; }
	.ssb-split { gap: 28px; }
	.ssb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================= Header, footer e menu comuni ================= */
.ssb-part { background: transparent; }
.ssb-header { background: #fff; border-bottom: 1px solid rgba(0,0,0,.08); position: relative; z-index: 50; }
.ssb-header--sticky { position: sticky; top: 0; }
.ssb-header-inner { max-width: var(--ssb-max); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
.ssb-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ssb-text); text-decoration: none; margin-right: auto; }
.ssb-logo img { height: 40px; width: auto; }
.ssb-header .ssb-btn { padding: 10px 20px; }
.ssb-header--center .ssb-header-inner { flex-direction: column; gap: 10px; }
.ssb-header--center .ssb-logo { margin: 0; }

/* Menu (generato da Admin > Pagine > Menu) */
.ssb-menu, .ssb-submenu { list-style: none; margin: 0; padding: 0; }
.ssb-menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ssb-menu-item { position: relative; }
.ssb-menu-item > a, .ssb-menu-item > span { display: block; padding: 8px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.ssb-page .ssb-menu-item > a { color: inherit; }
.ssb-menu-item > a:hover, .ssb-menu-item.is-active > a { background: var(--ssb-bg-soft); color: var(--ssb-primary); }
.ssb-menu-item.has-children > a::after { content: "▾"; margin-left: 6px; font-size: .8em; }
.ssb-submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border-radius: 10px; box-shadow: 0 12px 30px rgba(20,30,60,.14); padding: 6px; z-index: 60; }
.ssb-submenu .ssb-submenu { top: 0; left: 100%; }
.ssb-menu-item:hover > .ssb-submenu, .ssb-menu-item:focus-within > .ssb-submenu { display: block; }
.ssb-submenu .ssb-menu-item > a { font-weight: 500; }
.ssb-menu-empty { color: var(--ssb-muted); font-size: .9rem; padding: 8px 12px; border: 1px dashed currentColor; border-radius: 8px; }
.ssb-lang-switcher { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.ssb-lang-switcher a { display: block; padding: 6px 8px; border-radius: 6px; font-size: .85rem; font-weight: 700; text-decoration: none; color: inherit; opacity: .65; }
.ssb-lang-switcher a.active, .ssb-lang-switcher a:hover { opacity: 1; background: var(--ssb-bg-soft); }
.ssb-burger { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; padding: 9px; border-radius: 8px; }
.ssb-burger span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; }

/* Footer */
.ssb-footer { background: #121826; color: rgba(255,255,255,.82); padding: 56px 20px 24px; }
.ssb-footer-inner { max-width: var(--ssb-max); margin: 0 auto; }
.ssb-footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.ssb-footer h3, .ssb-footer h4 { color: #fff; margin: 0 0 14px; }
.ssb-footer .ssb-menu { flex-direction: column; align-items: flex-start; gap: 0; }
.ssb-footer .ssb-menu-item > a { padding: 4px 0; font-weight: 500; }
.ssb-footer .ssb-menu-item > a:hover { background: none; color: #fff; text-decoration: underline; }
.ssb-footer .ssb-submenu { display: none !important; }
.ssb-footer a { color: #fff; }
.ssb-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 768px) {
	.ssb-burger { display: block; }
	.ssb-header-inner { flex-wrap: wrap; }
	.ssb-header [data-ss-menu], .ssb-header .ssb-header-actions { display: none; width: 100%; }
	.ssb-header.is-menu-open [data-ss-menu], .ssb-header.is-menu-open .ssb-header-actions { display: block; }
	.ssb-header .ssb-menu { flex-direction: column; align-items: stretch; }
	.ssb-submenu { position: static; display: block; box-shadow: none; padding: 0 0 0 14px; }
	.ssb-footer-cols { grid-template-columns: 1fr; }
}
