@charset "utf-8";
/* diabete.com — Consulenza
   Foglio di stile 2026, allineato al tema diabete.com.
   Sostituisce diabete-style.css (conservato come backup).
   Artwork — ottobre 2026 */

/* ---------- font ---------- */
@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("fonts/geist-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Geist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("fonts/geist-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- token ---------- */
:root {
	--ink: #232323;
	--ink-strong: #121212;
	--muted: #6b6b6b;
	--faint: #9a9a97;
	--primary: #007f91;
	--primary-ink: #005f6d;
	--primary-soft: #e5f2f4;
	--accent: #fdba4d;
	--accent-soft: #fff3dd;
	--sand: #f3efe6;
	--surface: #f5f5f4;
	--line: #e6e6e3;
	--bg: #ffffff;
	--card: #ffffff;

	--font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--r-sm: 10px;
	--r-md: 16px;
	--r-lg: 24px;
	--r-pill: 999px;

	--gutter: clamp(16px, 4vw, 40px);
	--maxw: 1180px;
	--side: 364px;
	--shadow: 0 1px 2px rgba(18, 18, 18, .04), 0 8px 24px -12px rgba(18, 18, 18, .12);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
	margin: 0 0 .4em;
	color: var(--ink-strong);
	font-weight: 650;
	line-height: 1.25;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.15rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.5rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink-strong); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; text-decoration: none; }

.sr-only {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- impalcatura ---------- */
.container { width: 100%; }

.container .contents {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 var(--gutter) 64px;
}

/* ---------- testata ---------- */
.top {
	position: sticky; top: 0; z-index: 30;
	display: grid; grid-template-columns: auto minmax(0, 400px) 1fr; align-items: center; gap: 14px 22px;
	min-height: 68px; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter);
	background: rgba(255, 255, 255, .9);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--line);
}

.top-left { display: flex; align-items: center; }

.top .logo { display: flex; align-items: center; line-height: 1; padding: 0; }
.top .logo img { width: auto; height: 32px; max-width: 100%; display: block; }

.top-search { min-width: 0; }
.top-search form { margin: 0; }

.top-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.top-right > span { color: var(--muted); font-size: .9rem; }

.top-right a, .hdrbtn {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 17px;
	border: 1px solid var(--primary); border-radius: var(--r-pill);
	background: var(--primary); color: #fff;
	font-size: .9rem; font-weight: 600; text-decoration: none !important;
	transition: background .15s, border-color .15s;
}
.top-right a:hover, .hdrbtn:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }

.top-search input[type="text"] {
	min-height: 40px; width: 100%;
	padding: 0 14px !important;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--surface) url("../images/search.svg") no-repeat 12px 50% / 15px 15px;
	padding-left: 34px !important;
	font: inherit; font-size: .9rem; color: var(--ink);
}
.top-search input[type="text"]:focus { background-color: var(--card); border-color: var(--primary); outline: none; }

.hdrfrm { display: inline-flex; margin: 0; }
.hdrfrm > input {
	min-height: 38px; padding: 0 15px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.hdrfrm > input:hover { border-color: var(--ink-strong); color: var(--ink-strong); }

/* ---------- intestazione colonna ---------- */
.col-head { margin: 0 0 18px; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 6px;
	margin-bottom: 10px; padding: 4px 11px;
	border-radius: var(--r-pill);
	background: var(--primary-soft); color: var(--primary-ink);
	font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}

.col-head p { margin: 0; color: var(--muted); font-size: .96rem; }

.col-head--brand {
	padding: 22px 24px 24px;
	border-radius: var(--r-lg);
	background: var(--primary);
	color: #fff;
}
.col-head--brand h2 { color: #fff; }
.col-head--brand p { color: rgba(255, 255, 255, .82); }
.col-head--brand .eyebrow { background: rgba(255, 255, 255, .16); color: #fff; }
.col-head--brand .guida {
	background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff;
}
.col-head--brand .guida:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }
.col-head--brand .guida small { color: rgba(255, 255, 255, .75); }

.guida {
	display: inline-flex; align-items: center; gap: 12px;
	margin-top: 14px; padding: 12px 16px 12px 12px;
	border: 1px solid var(--line); border-radius: var(--r-md);
	background: var(--sand); color: var(--ink-strong);
	font-size: .9rem; font-weight: 600; text-decoration: none !important;
	transition: border-color .15s, transform .15s var(--ease);
}
.guida:hover { border-color: var(--primary); transform: translateY(-1px); }
.guida img { width: 44px; height: auto; border-radius: 6px; display: block; float: none !important; }
.guida svg { flex: 0 0 auto; display: block; }
.guida span { display: block; }
.guida small { display: block; color: var(--muted); font-weight: 500; }

/* vecchia fascia a due colori: non serve piu */
.top-col { display: none; }

/* ---------- griglia principale ---------- */
.main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--side);
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
	padding-top: clamp(28px, 4vw, 44px);
}

.main-left, .main-right { min-width: 0; float: none; width: auto; }

/* la colonna del modulo segue la lettura; --sticky-top lo calcola lib/sticky.js */
@media (min-width: 901px) {
	.main-right { position: sticky; top: var(--sticky-top, 88px); align-self: start; }
}

/* ---------- scheda domanda ---------- */
.box-q {
	margin: 0 0 18px;
	padding: 20px 22px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	transition: border-color .15s, box-shadow .2s, transform .2s var(--ease);
}
.box-q:hover { border-color: #d7d7d2; box-shadow: var(--shadow); }

.box-q table { display: block; width: 100%; border: 0; border-collapse: collapse; }
.box-q thead, .box-q tfoot { display: block; }

.box-q caption {
	display: inline-flex; align-items: center;
	margin-bottom: 10px; padding: 4px 11px;
	border-radius: var(--r-pill);
	background: var(--primary-soft); color: var(--primary-ink);
	font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-align: left;
}

.box-q th { display: block; padding: 0; text-align: left; font-weight: 650; }

.box-q th a {
	display: block;
	color: var(--ink-strong);
	font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); font-weight: 650; line-height: 1.35; letter-spacing: -.01em;
	text-decoration: none;
}
.box-q th a:hover { color: var(--primary-ink); text-decoration: none; }

/* le righe diventano celle di un unico contenitore flessibile */
.box-q tbody { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.box-q tbody tr { display: contents; }
.box-q tbody td { display: block; padding: 0; width: auto !important; height: auto !important; vertical-align: baseline; }

.box-q td.info { display: none; }            /* etichetta "RISPOSTA:" ridondante */
.box-q td.pic { flex: 0 0 auto; }
.box-q td.pic:empty { display: none; }
.box-q td.pic img {
	width: 52px; height: 52px; display: block;
	border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--surface);
}

.box-q .info, .morelink {
	display: block;
	color: var(--faint);
	font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.box-q .detail { display: block; color: var(--ink); font-size: .92rem; font-weight: 500; }

.box-q .reply {
	flex: 1 1 100%;
	margin-top: 4px; padding-top: 14px;
	border-top: 1px solid var(--line);
	color: var(--muted); font-size: .97rem; line-height: 1.68;
}
.box-q .reply a { color: var(--muted); text-decoration: none; }
.box-q .reply a:hover { color: var(--ink); text-decoration: none; }

/* colonna "ti potrebbe interessare anche" */
.box-q tbody tr:last-child td:first-child { flex: 1 1 100%; }
.box-q tbody tr:last-child td:first-child:not(:has(a)) { display: none; }
.box-q .morelink { margin-bottom: 8px; }
.box-q tbody tr:last-child td:first-child > div { display: flex; flex-wrap: wrap; gap: 8px; }
.box-q tbody tr:last-child td:first-child > div > div { display: contents; }
.box-q tbody tr:last-child td:first-child a {
	display: inline-flex; align-items: center; max-width: 100%;
	padding: 5px 12px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--primary-ink);
	font-size: .8rem; font-weight: 600; text-decoration: none !important;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.box-q tbody tr:last-child td:first-child a:hover { border-color: var(--primary); }

/* condivisione */
.box-q .share {
	display: flex; align-items: center; gap: 10px;
	margin-left: auto; flex: 0 0 auto;
	padding-top: 4px;
}
.box-q .share .detail {
	display: inline; color: var(--faint);
	font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.box-q .share .sh {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px;
	border: 1px solid var(--line); border-radius: 50%;
	background: var(--card); color: var(--faint);
	transition: color .15s, background .15s, border-color .15s, transform .15s var(--ease);
}
.box-q .share .sh:hover { color: #fff; border-color: transparent; transform: translateY(-1px); }
.box-q .share .sh--fb:hover { background: #1877f2; }
.box-q .share .sh--x:hover { background: #121212; }
.box-q .share .sh--wa:hover { background: #25d366; }
.box-q .share .sh--mail:hover { background: var(--primary); }
.box-q .share svg { display: block; }
.box-q .share iframe { display: none; }

/* pagina di dettaglio: stessa larghezza del resto del sito */
.pubblicazione, .mobile_pubblicazione { padding-top: clamp(24px, 4vw, 40px); }

.dettaglio {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--side);
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}
.dettaglio__testo, .dettaglio__lato { min-width: 0; }

.pubblicazione .box-q, .mobile_pubblicazione .box-q {
	margin: 0; padding: clamp(20px, 3vw, 32px);
}
.pubblicazione .box-q:hover { box-shadow: none; border-color: var(--line); }

/* colonna laterale della pagina di dettaglio */
.lato-cta {
	padding: 22px 24px;
	border-radius: var(--r-lg);
	background: var(--primary);
	color: #fff;
}
.lato-cta strong { display: block; color: #fff; font-size: 1.06rem; font-weight: 650; }
.lato-cta p { margin: 6px 0 16px; color: rgba(255, 255, 255, .85); font-size: .92rem; }
.lato-cta .cta-btn { min-height: 42px; padding: 0 20px; font-size: .92rem; }

.lato-box {
	margin-top: 16px; padding: 18px 20px;
	border: 1px solid var(--line); border-radius: var(--r-lg);
	background: var(--card);
}
.lato-box p { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }

.lato-titolo {
	display: block; margin-bottom: 12px;
	color: var(--faint); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}

.lato-esperto__riga { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lato-esperto__riga img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.lato-esperto__riga strong { display: block; color: var(--ink-strong); font-size: .95rem; font-weight: 650; line-height: 1.3; }
.lato-esperto__riga small { color: var(--muted); font-size: .82rem; }

.lato-elenco { margin: 0 0 12px; padding: 0; list-style: none; }
.lato-elenco li { padding: 9px 0; border-top: 1px solid var(--line); }
.lato-elenco li:first-child { border-top: 0; padding-top: 0; }
.lato-elenco a { color: var(--ink); font-size: .89rem; line-height: 1.45; text-decoration: none; }
.lato-elenco a:hover { color: var(--primary-ink); }

.lato-link {
	display: inline-flex; align-items: center; gap: 6px;
	color: var(--primary-ink); font-size: .86rem; font-weight: 650; text-decoration: none;
}
.lato-link::after { content: "→"; transition: transform .15s var(--ease); }
.lato-link:hover::after { transform: translateX(2px); }
.lato-box .lato-link + .lato-link { margin-left: 16px; }

@media (min-width: 901px) {
	.dettaglio__lato { position: sticky; top: var(--sticky-top, 88px); }
}

@media (max-width: 900px) {
	.dettaglio { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
.pubblicazione .box-q .reply { color: var(--ink); font-size: 1.02rem; border-top: 0; padding-top: 6px; }
.pubblicazione .box-q th {
	margin-top: 2px; padding: 16px 18px;
	background: var(--surface); border-radius: var(--r-md);
	color: var(--ink); font-size: 1.01rem; font-weight: 500; line-height: 1.7;
}

.torna { margin: 0 0 14px; }
.torna a { color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.torna a:hover { color: var(--primary-ink); }

.cta-chiedi {
	display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
	max-width: 760px; margin: 22px auto 0; padding: 22px 26px;
	border-radius: var(--r-lg);
	background: var(--primary);
	color: #fff;
}
.cta-chiedi p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .95rem; max-width: 42ch; }
.cta-chiedi strong { display: block; color: #fff; font-size: 1.06rem; font-weight: 650; }
.cta-btn {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
	border-radius: var(--r-pill); background: #fff; color: var(--primary-ink);
	font-size: .95rem; font-weight: 650; text-decoration: none !important; white-space: nowrap;
	transition: transform .15s var(--ease);
}
.cta-btn:hover { transform: translateY(-1px); }

/* ---------- paginazione ---------- */
nav, .nav { margin: 26px 0 0; }
nav ul {
	display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
	margin: 0; padding: 0; list-style: none;
}
nav ul li { margin: 0; }
nav ul li a, .nav a {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; min-height: 38px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong);
	font-size: .9rem; font-weight: 600; text-decoration: none !important;
	transition: border-color .15s, background .15s;
}
nav ul li a:hover, .nav a:hover { border-color: var(--primary); color: var(--primary-ink); }
nav ul li.currentpage a {
	background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ---------- filtri ---------- */
.filtri { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.chip {
	display: inline-flex; align-items: center; gap: 7px;
	min-height: 34px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong);
	font-size: .88rem; font-weight: 600; text-decoration: none !important;
	cursor: pointer; white-space: nowrap;
	transition: border-color .15s, background .15s, color .15s;
}
.chip small { color: var(--faint); font-size: .78rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.chip--attivo { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip--attivo small { color: rgba(255, 255, 255, .72); }
.chip--attivo:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.chip--togli span { font-size: 1.1rem; line-height: 1; opacity: .8; }

.conteggio { margin: 0 0 16px; color: var(--faint); font-size: .86rem; font-variant-numeric: tabular-nums; }

#elenco { transition: opacity .15s; }
.elenco--attesa { opacity: .45; pointer-events: none; }

.box-q .meta a.filtro, .box-q .detail a.filtro {
	color: var(--ink); text-decoration: none;
	border-bottom: 1px solid var(--line);
}
.box-q .detail a.filtro:hover { color: var(--primary-ink); border-bottom-color: var(--primary); }

/* ---------- risposta aperta in linea ---------- */
.leggi {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 10px; padding: 0;
	border: 0; background: none; color: var(--primary-ink);
	font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer;
}
.leggi::after { content: "↓"; font-size: .95em; }
.leggi[aria-expanded="true"]::after { content: "↑"; }
.leggi:hover { color: var(--primary); }
.leggi:disabled { color: var(--faint); cursor: default; }

.intera p { margin: 0 0 .9em; color: var(--ink); font-size: .97rem; line-height: 1.68; }
.intera p:last-child { margin-bottom: 0; }

.altre { margin: 26px 0 0; text-align: center; }
.altre[hidden] { display: none; }
.btn-altre {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 26px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong);
	font: inherit; font-size: .95rem; font-weight: 650; cursor: pointer;
	transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.btn-altre:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-ink); transform: translateY(-1px); }
.btn-altre:disabled { color: var(--faint); cursor: default; }
.btn-altre[hidden] { display: none; }
.altre-stato { margin: 10px 0 0; color: var(--faint); font-size: .84rem; min-height: 1.2em; }

nav.pagine[hidden] { display: none; }

.noresults {
	padding: 22px 24px;
	background: var(--accent-soft);
	border: 1px solid #f3e0bd; border-radius: var(--r-md);
	color: #6b4e17; font-size: .96rem;
}

/* ---------- modulo "fai una domanda" ---------- */
.main-right form { width: auto; margin: 0; }

.main-right > form,
.main-right .askbox {
	padding: clamp(18px, 2.4vw, 24px);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
}

label {
	display: block; margin: 18px 0 7px;
	color: var(--ink); font-size: .88rem; line-height: 1.5; font-weight: 500;
}
label:first-of-type { margin-top: 0; }
label strong { display: block; color: var(--ink-strong); font-size: .95rem; font-weight: 650; }

.main-right input[type="text"],
.main-right input[type="password"],
.main-right textarea,
.mobile_main input[type="text"],
.mobile_main textarea,
.mobile_main input[type="password"],
.login input[type="text"],
.login input[type="password"],
.modulectr input[type="text"],
.modulectr input[type="password"],
.modulectr input[type="file"],
.modulectr textarea,
.modulectr select {
	width: 100%; min-height: 44px; padding: 10px 14px;
	border: 1px solid var(--line); border-radius: var(--r-sm);
	background: var(--card); color: var(--ink);
	font: inherit; font-size: .95rem;
	transition: border-color .15s, box-shadow .15s;
}
.main-right textarea, .mobile_main textarea, .modulectr textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.main-right input[type="text"]:focus,
.main-right textarea:focus,
.login input:focus,
.modulectr input:focus,
.modulectr select:focus,
.modulectr textarea:focus {
	border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none;
}

/* scelta del campo: ex sprite PNG, ora pannelli di testo */
.campocontainer { margin: 4px 0 0; }

.sezione_diabetologo, .sezione_nutrizionista, .sezione_psicologo,
.sezione_diabetologo_open, .sezione_nutrizionista_open, .sezione_psicologo_open {
	display: flex; align-items: center; gap: 10px;
	width: auto; height: auto; margin: 0 0 8px; padding: 13px 16px;
	background: var(--card) none; border: 1px solid var(--line); border-radius: var(--r-md);
	color: var(--ink-strong); font-size: .95rem; font-weight: 600;
	cursor: pointer; user-select: none;
	transition: border-color .15s, background .15s;
}
.sezione_diabetologo::before, .sezione_nutrizionista::before, .sezione_psicologo::before,
.sezione_diabetologo_open::before, .sezione_nutrizionista_open::before, .sezione_psicologo_open::before {
	content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
}
.sezione_nutrizionista::before, .sezione_nutrizionista_open::before { background: #4fae6a; }
.sezione_psicologo::before, .sezione_psicologo_open::before { background: var(--accent); }

.sezione_diabetologo::after, .sezione_nutrizionista::after, .sezione_psicologo::after,
.sezione_diabetologo_open::after, .sezione_nutrizionista_open::after, .sezione_psicologo_open::after {
	content: "+"; margin-left: auto; color: var(--faint); font-size: 1.15rem; font-weight: 500; line-height: 1;
}
.sezione_diabetologo:hover, .sezione_nutrizionista:hover, .sezione_psicologo:hover { border-color: var(--primary); }

.sezione_diabetologo_open, .sezione_nutrizionista_open, .sezione_psicologo_open {
	margin-bottom: 0; border-color: var(--primary); border-radius: var(--r-md) var(--r-md) 0 0;
	background: var(--primary-soft);
}
.sezione_diabetologo_open::after, .sezione_nutrizionista_open::after, .sezione_psicologo_open::after { content: "–"; color: var(--primary-ink); }

.tabsezione_diabetologo, .tabsezione_nutrizionista, .tabsezione_psicologo {
	display: none;          /* aperto dal JS con uno style inline */
	margin: 0 0 8px; padding: 0;
	border: 1px solid var(--primary); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md);
	background: var(--card); color: var(--ink);
	overflow: hidden;
}

.campodesc {
	width: auto; min-height: 0; margin: 0; padding: 14px 16px;
	background: var(--card) none; border: 0; border-bottom: 1px solid var(--line);
	color: var(--muted); font-size: .88rem; font-weight: 400; line-height: 1.6;
}

.camporadio {
	width: auto; margin: 0; padding: 12px 16px;
	background: var(--card); border: 0; border-bottom: 1px solid var(--line);
	display: flex; align-items: flex-start; gap: 11px;
}
.camporadio input[type="radio"] {
	width: 18px; height: 18px; min-width: 18px; margin: 3px 0 0;
	background: none; accent-color: var(--primary); vertical-align: top;
}
.camporadio > div { display: block; width: auto; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.camporadio > div span { display: block; color: var(--ink-strong); font-size: .88rem; font-weight: 650; }

.speclistsezione_diabetologo, .speclistsezione_nutrizionista, .speclistsezione_psicologo {
	width: auto; margin: 0; padding: 14px 16px;
	background: var(--surface); border: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px;
}

.specbox {
	width: auto; float: none !important;
	display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 3px 10px;
	padding: 10px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
	transition: border-color .15s, background .15s;
}
.specbox:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.specimg { grid-row: 1 / span 2; width: auto; float: none !important; }
.specimg img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; background: var(--surface); }
.specinfo { display: flex; align-items: center; gap: 8px; min-width: 0; width: auto; float: none !important; }
.specinfo br { display: none; }
.specinfo input[type="radio"] { width: 16px; height: 16px; min-width: 16px; margin: 0; accent-color: var(--primary); }
.specname { display: block; color: var(--ink-strong); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.specbox > a { grid-column: 2; font-size: .74rem; color: var(--primary-ink); justify-self: start; }

/* scelta e-mail / facebook */
.main-right input[type="button"], #links input[type="button"], .diabbutton {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong);
	font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
	transition: border-color .15s;
}
.main-right input[type="button"]:hover { border-color: var(--primary); color: var(--primary-ink); }
.fbbtn { border-color: var(--primary) !important; background: var(--primary-soft) !important; color: var(--primary-ink) !important; }

#showmail, #showfb { margin-top: 10px; }

.acceptprivacy, .newsletter { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; }
.acceptprivacy > input, .newsletter > input { width: 18px; height: 18px; min-width: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.acceptprivacy > span, .newsletter > span { color: var(--muted); font-size: .86rem; line-height: 1.5; }

.g-recaptcha { margin: 16px 0 0; }

.invia_enabled, .invia_disabled {
	display: inline-flex; align-items: center; justify-content: center;
	width: auto; height: auto; min-height: 46px; margin: 20px 0 0; padding: 0 26px;
	background: var(--primary) none !important; border: 1px solid var(--primary) !important; border-radius: var(--r-pill);
	color: #fff; font: inherit; font-size: .95rem; font-weight: 650; letter-spacing: .01em;
	cursor: pointer; transition: background .15s, transform .15s var(--ease);
}
.invia_enabled:hover, .invia_disabled:hover { background: var(--primary-ink) !important; transform: translateY(-1px); }

input[type="submit"] { font-family: inherit; }

/* ---------- pagine interne, login, backoffice ---------- */
.main-int, .login, .modulectr, .curriculum {
	max-width: 760px; margin: 0 auto;
	padding: clamp(28px, 4vw, 48px) 0 0;
}
.modulectr { max-width: none; }

.main-int h1, .main-int h2, .main-int h3 { color: var(--ink-strong); }
.main-int h3 { margin-top: 1.6em; font-size: 1.05rem; }
.main-int p, .curriculum p { color: var(--ink); font-size: 1rem; line-height: 1.7; }
.main-int a, .curriculum a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }

.login {
	max-width: 420px;
	padding: clamp(28px, 4vw, 48px) 0;
}
.login form {
	padding: 24px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}

.cv-testa {
	display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
	margin: 0 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.cv-testa h1 { margin: 0; }
.cv-foto img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; display: block; border: 1px solid var(--line); }
.curriculum .torna { margin-left: 0; }

.downloadcv { margin: 18px 0; }
.downloadcv img { width: 16px; height: auto; }
.downloadcv a {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong); font-size: .9rem; font-weight: 600; text-decoration: none !important;
}
.downloadcv a:hover { border-color: var(--primary); }

input[type="submit"]:not(.invia_enabled):not(.invia_disabled):not([value=""]) {
	display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px;
	border: 1px solid var(--primary); border-radius: var(--r-pill);
	background: var(--primary); color: #fff;
	font: inherit; font-size: .93rem; font-weight: 650; cursor: pointer;
}
.hdrfrm > input[type="submit"] { background: var(--card); border-color: var(--line); color: var(--muted); }

/* tabelle del backoffice */
.modulectr table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.modulectr table thead th { background: var(--surface); color: var(--ink-strong); font-weight: 650; text-align: left; }
.modulectr table thead th, .modulectr table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.modulectr table > tbody > tr:nth-child(even) { background: #fafaf9; }
.modulectr table a { color: var(--primary-ink); }

.back, .new, .publish, .remove {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	background: var(--card); color: var(--ink-strong);
	font-size: .86rem; font-weight: 600; text-decoration: none !important;
}
.publish { background: var(--primary); border-color: var(--primary); color: #fff; }
.remove { color: #a51d22; border-color: #e8c9ca; }

.highlight { background: var(--accent-soft); }

/* ---------- piede ---------- */
footer {
	width: auto; height: auto; line-height: 1.6;
	margin: 0; padding: 28px var(--gutter);
	border-top: 1px solid var(--line);
	background: var(--surface);
	color: var(--muted); font-size: .86rem;
}
footer > div { max-width: var(--maxw); margin: 0 auto; }
.footer-left {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
	float: none; width: auto; height: auto;
}
.footer-right { display: none; }
.footer-left-row1, .footer-left-row2 { float: none; width: auto; height: auto; }
.footer-left-row1 ul {
	display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
	margin: 0; padding: 0; list-style: none;
}
footer ul li { float: none; display: inline-flex; margin: 0; font-size: .86rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink-strong); text-decoration: underline; }
.footer-left-row2 img { width: auto; height: 22px; display: block; opacity: .75; }
.footer-note { color: var(--faint); font-size: .8rem; }
.footer-note a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
	:root { --side: 320px; }
}

@media (max-width: 900px) {
	.main { grid-template-columns: minmax(0, 1fr); gap: 44px; }
	.main-right { padding-top: 8px; border-top: 1px solid var(--line); }
}

@media (max-width: 1000px) {
	.top .logo img { height: 27px; }
}

@media (max-width: 860px) {
	.top { grid-template-columns: minmax(0, auto) auto; row-gap: 10px; }
	.top-left { min-width: 0; }
	.top-search { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 560px) {
	.solo-grande { display: none; }
	.top .logo img { height: 22px; }
	.top-right a, .hdrbtn { min-height: 36px; padding: 0 13px; font-size: .85rem; }
}

@media (max-width: 640px) {
	.top { min-height: 60px; gap: 10px; }
	.cta-chiedi { padding: 20px; }
	.box-q { padding: 18px 16px; border-radius: var(--r-md); }
	.box-q .share { margin-left: 0; flex: 1 1 100%; }
	.footer-left { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* ---------- stampa ---------- */
@media print {
	.top, footer, .main-right, nav, .box-q .share { display: none !important; }
	.box-q { border: 0; padding: 0; }
}
