/* nettunopa.it, NETTuno S.r.l.
   Stesso sistema di registro-afam.it: palette neutra zinc, blu del marchio NETTuno,
   arancio per l'azione principale (come il vecchio "Trova software"), colori dei pacchetti. Tema chiaro e scuro. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f1f4f6;
  --surface-3: #e4e7eb;
  --border: #e3e6ea;
  --border-strong: #cfd4da;
  --text: #16191d;
  --text-2: #3a4048;
  --muted: #4f5761;
  --faint: #6b737d;
  --brand: #019fd5;
  --brand-deep: #005487;
  --accent: #00669b;
  --brand-soft: #e7f5fb;
  --brand-line: #b5e1f3;
  --primary: #005487;
  --primary-hover: #00436c;
  --on-primary: #ffffff;
  --orange: #ff8a1f;
  --orange-hover: #f27500;
  --on-orange: #1d1203;
  --ok: #15803d;
  --ok-soft: #e8f6ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --t-scuola: #e8740f;
  --t-conservatori: #1c3b9e;
  --t-convitti: #7d0db5;
  --t-amministrazioni: #6f8a00;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05);
  --shadow: 0 1px 2px rgba(9, 9, 11, 0.04), 0 8px 24px -6px rgba(9, 9, 11, 0.10);
  --shadow-lg: 0 2px 4px rgba(9, 9, 11, 0.04), 0 24px 60px -12px rgba(9, 9, 11, 0.20);
  --header-bg: rgba(255, 255, 255, 0.86);
  --hero-ink: #0b1a26;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b;
    --bg-alt: #0f1013;
    --surface: #141518;
    --surface-2: #1c1d21;
    --surface-3: #2a2b30;
    --border: #27282d;
    --border-strong: #3f4047;
    --text: #fafafa;
    --text-2: #e4e4e7;
    --muted: #a8a8b2;
    --faint: #8f8f99;
    --brand: #2fb6e5;
    --brand-deep: #7fd3f2;
    --accent: #6cccf0;
    --brand-soft: #0a2532;
    --brand-line: #13465d;
    --primary: #2fb6e5;
    --primary-hover: #63c9ee;
    --on-primary: #04121a;
    --orange: #ff9a3d;
    --orange-hover: #ffb066;
    --ok: #4ade80;
    --ok-soft: #0f2a1a;
    --danger: #f87171;
    --danger-soft: #2e1414;
    --t-scuola: #ff9a3d;
    --t-conservatori: #7d9bff;
    --t-convitti: #c27cf0;
    --t-amministrazioni: #b5d12c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 70px -14px rgba(0, 0, 0, 0.75);
    --header-bg: rgba(9, 9, 11, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b;
  --bg-alt: #0f1013;
  --surface: #141518;
  --surface-2: #1c1d21;
  --surface-3: #2a2b30;
  --border: #27282d;
  --border-strong: #3f4047;
  --text: #fafafa;
  --text-2: #e4e4e7;
  --muted: #a8a8b2;
  --faint: #8f8f99;
  --brand: #2fb6e5;
  --brand-deep: #7fd3f2;
  --accent: #6cccf0;
  --brand-soft: #0a2532;
  --brand-line: #13465d;
  --primary: #2fb6e5;
  --primary-hover: #63c9ee;
  --on-primary: #04121a;
  --orange: #ff9a3d;
  --orange-hover: #ffb066;
  --ok: #4ade80;
  --ok-soft: #0f2a1a;
  --danger: #f87171;
  --danger-soft: #2e1414;
  --t-scuola: #ff9a3d;
  --t-conservatori: #7d9bff;
  --t-convitti: #c27cf0;
  --t-amministrazioni: #b5d12c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 70px -14px rgba(0, 0, 0, 0.75);
  --header-bg: rgba(9, 9, 11, 0.8);
  color-scheme: dark;
}

/* Colore della soluzione corrente */
.tint-scuola { --tint: var(--t-scuola); }
.tint-conservatori { --tint: var(--t-conservatori); }
.tint-convitti { --tint: var(--t-convitti); }
.tint-amministrazioni { --tint: var(--t-amministrazioni); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--text); margin: 0 0 0.5em; line-height: 1.15; text-wrap: balance; }
h1, h2 { font-weight: 750; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; }
h3 { font-size: 1.15rem; font-weight: 680; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
strong { font-weight: 650; color: var(--text); }
address { font-style: normal; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.6em 1.15em; border-radius: 999px;
  font: inherit; font-size: 0.97rem; font-weight: 650; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn .icon:last-child { transition: transform .15s ease; }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(2px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-accent { background: var(--orange); color: var(--on-orange); }
.btn-accent:hover { background: var(--orange-hover); color: var(--on-orange); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-on-dark { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.btn-lg { min-height: 52px; padding: 0.75em 1.5em; font-size: 1.03rem; }
.btn-sm { min-height: 38px; padding: 0.45em 0.95em; font-size: 0.9rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 19px; height: 19px; }
.text-link { display: inline-flex; align-items: center; gap: .35em; font-weight: 650; text-decoration: none; color: var(--accent); }
.text-link .icon { width: 1em; height: 1em; transition: transform .15s ease; }
.text-link:hover { color: var(--text); }
.text-link:hover .icon, a:hover > .text-link .icon { transform: translateX(3px); }

/* ---------- Barra novità ---------- */
.topbar { background: var(--primary); color: var(--on-primary); font-size: .86rem; }
.topbar-inner { display: flex; align-items: center; gap: 14px; min-height: 38px; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { text-decoration: underline; }
.topbar .icon { width: 15px; height: 15px; }
.topbar-label { font-weight: 750; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.topbar-inner > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.topbar-inner > a .icon { display: inline; vertical-align: -3px; margin-left: 4px; }
.topbar-contacts { margin-left: auto; display: flex; gap: 18px; white-space: nowrap; opacity: .92; }
@media (max-width: 900px) { .topbar-contacts { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); flex: none; }
.brand-logo img { width: 172px; height: auto; }
.brand-tag {
  font-size: .78rem; line-height: 1.25; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  padding-left: 14px; border-left: 1px solid var(--border-strong);
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none;
  font-size: 0.95rem; font-weight: 550; white-space: nowrap; position: relative;
}
.site-nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.nav-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-cta[aria-current="page"] { box-shadow: 0 0 0 3px var(--brand-line); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-close { display: block; }
.nav-open .nav-toggle .i-menu { display: none; }
.nav-tools { display: none; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; margin: 0; padding: 12px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none; max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a:not(.btn) { padding: 13px 12px; font-size: 1.05rem; }
  .site-nav a[aria-current="page"] { background: var(--surface-2); }
  .site-nav a[aria-current="page"]::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .nav-cta { display: flex; margin-top: 12px; width: 100%; }
}
@media (max-width: 640px) {
  .header-cta { display: none; }
  .brand-tag { display: none; }
}
@media (max-width: 520px) {
  .header-actions .theme-toggle { display: none; }
  .nav-tools { display: flex; margin-top: 10px; }
  .nav-tools .btn { flex: 1 1 auto; }
  .brand-logo img { width: 150px; }
}

/* ---------- Sezioni ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; position: relative; }
.section-tight { padding: clamp(36px, 5vw, 56px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 780px; margin-bottom: clamp(32px, 4.5vw, 52px); }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-bottom: 0; }
.section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head-row h2 { margin-bottom: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 0.8rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--brand); }
.eyebrow-light { color: #bfe9f8; }
.eyebrow-light::before { background: var(--orange); }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.25rem); color: var(--muted); line-height: 1.6; max-width: 700px; }

/* ---------- Hero fotografico della home (a tutto schermo) ---------- */
.hero-photo { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--hero-ink); min-height: clamp(460px, 74vh, 720px); display: flex; align-items: center; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 72% 30%; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 18, 28, .86) 0%, rgba(6, 18, 28, .66) 38%, rgba(6, 18, 28, .08) 70%, rgba(6, 18, 28, 0) 100%);
}
.hero-inner { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero-photo h1 { color: #fff; font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 850; letter-spacing: -0.035em; max-width: 12ch; margin-bottom: 16px; }
.hero-photo .lead { color: rgba(255, 255, 255, .88); font-size: clamp(1.15rem, 2vw, 1.4rem); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 28px; }
.hero-actions.center { justify-content: center; }
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.hero-cats a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none;
  color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .3);
}
.hero-cats a:hover { background: rgba(255, 255, 255, .2); color: #fff; }
@media (max-width: 760px) {
  .hero-photo { min-height: 0; align-items: flex-end; }
  .hero-bg img { object-position: 78% 20%; }
  .hero-photo::before { background: linear-gradient(180deg, rgba(6, 18, 28, .15) 0%, rgba(6, 18, 28, .55) 40%, rgba(6, 18, 28, .92) 72%); }
  .hero-inner { padding-top: 220px; }
}

/* ---------- Testate delle pagine ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 60px); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.page-hero .lead { margin-bottom: 0; }
.page-hero h1 { margin-bottom: 14px; }

/* Banner fotografico a tutto schermo con titolo (come il vecchio sito, più ampio) */
.page-banner { position: relative; isolation: isolate; overflow: hidden; background: var(--hero-ink); color: #fff; min-height: clamp(260px, 30vw, 400px); display: flex; align-items: flex-end; }
.page-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 18, 28, .82) 0%, rgba(6, 18, 28, .5) 42%, rgba(6, 18, 28, 0) 75%); }
.page-banner-inner { padding-top: 48px; padding-bottom: clamp(32px, 4vw, 52px); }
.page-banner h1 { color: #fff; margin: 0; font-weight: 800; }
.page-banner .breadcrumb ol { color: rgba(255, 255, 255, .7); }
.page-banner .breadcrumb a { color: rgba(255, 255, 255, .85); }
.page-banner .breadcrumb a:hover { color: #fff; }
.page-banner .breadcrumb li + li::before { color: rgba(255, 255, 255, .45); }
.page-banner .ribbon { margin-bottom: 14px; }
.page-banner .lead { color: rgba(255, 255, 255, .86); margin: 14px 0 0; max-width: 620px; }
@media (max-width: 760px) {
  .page-banner { min-height: 240px; }
  .page-banner::before { background: linear-gradient(180deg, rgba(6, 18, 28, .1) 0%, rgba(6, 18, 28, .82) 85%); }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; font-size: 0.88rem; color: var(--faint); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Griglie e card ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 30px); box-shadow: var(--shadow-sm); position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card h2, .card h3 { margin-bottom: 6px; }
.card h2 { font-size: 1.4rem; }
.card p { color: var(--muted); margin-bottom: 0; font-size: 1rem; }
.card .text-link { margin-top: 14px; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  background: var(--brand-soft); color: var(--accent); border: 1px solid var(--brand-line);
}
.card-icon .icon { width: 24px; height: 24px; }

/* Notizie */
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-media img { transform: scale(1.03); }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.news-body time { font-size: .8rem; font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.news-body h2, .news-body h3 { font-size: 1.12rem; margin-bottom: 8px; letter-spacing: -0.01em; font-weight: 700; }
.news-body h2 a, .news-body h3 a { color: var(--text); text-decoration: none; }
.news-body h2 a:hover, .news-body h3 a:hover { color: var(--accent); }
.news-body p { color: var(--muted); font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-body .text-link { margin-top: auto; }

/* Chip di fiducia */
.trust { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 0; }
.trust li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 0.87rem; font-weight: 600; color: var(--text-2);
}
.trust .icon { width: 16px; height: 16px; color: var(--accent); }

/* Split testo + elenco */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.top { align-items: start; }
.split h2 { margin-bottom: 16px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }

/* Elenco dei software in home (era "Presentazione software house") */
.soft-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.soft-list h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.soft-list ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.soft-list li a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 550; font-size: .95rem; line-height: 1.3; }
.soft-list li a:hover { background: var(--surface-2); color: var(--text); }
.soft-list li a > span { flex: 1; min-width: 0; }
.soft-list li a .icon { width: 16px; height: 16px; color: var(--faint); }
.soft-icon { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.soft-list .btn { width: 100%; }
@media (max-width: 520px) { .soft-list ul { grid-template-columns: 1fr; } }

/* ---------- Soluzioni: card con foto e nastro ---------- */
.suite-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border-top: 4px solid var(--tint); transition: box-shadow .2s ease, transform .2s ease; }
.suite-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.suite-media { position: relative; display: block; aspect-ratio: 16 / 6; overflow: hidden; background: var(--surface-2); }
.suite-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; transition: transform .5s ease; }
.suite-card:hover .suite-media img { transform: scale(1.03); }
.suite-media .ribbon { position: absolute; left: 0; top: 18px; }
.suite-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.suite-body h2, .suite-body h3 { font-size: 1.45rem; margin-bottom: 8px; }
.suite-body h2 a, .suite-body h3 a { color: var(--text); text-decoration: none; }
.suite-body h2 a:hover, .suite-body h3 a:hover { color: var(--tint); }
.suite-body p { color: var(--muted); }
.suite-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.csa-link { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.csa-link .icon { width: 16px; height: 16px; color: var(--ok); }
.csa-link:hover { color: var(--text); text-decoration: underline; }

/* Titolo delle versioni di una soluzione (Innovazione Adulti: CPIA, FAMI, IdA) */
.tipologia-title { font-size: 1.2rem; margin: 28px 0 14px; padding-left: 12px; border-left: 4px solid var(--tint, var(--brand)); }
.tipologia-title:first-of-type { margin-top: 0; }

/* Nastro della soluzione (linea e ambito) nei colori del vecchio sito */
.ribbon {
  --tint: var(--brand);
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 26px 7px 16px; color: #fff; background: var(--tint);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 50%, 100% 100%, 0 100%); line-height: 1.1; box-shadow: var(--shadow);
}
.ribbon-small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .9; }
.ribbon-big { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; text-transform: capitalize; }
.ribbon-scuola { --tint: #e8740f; }
.ribbon-conservatori { --tint: #001258; }
.ribbon-convitti { --tint: #7d0db5; }
.ribbon-amministrazioni { --tint: #7e9a00; }

/* ---------- Elenco programmi ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.filter-label { margin: 0; color: var(--muted); flex-basis: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filter-count { margin: 0 0 0 auto; color: var(--faint); font-size: .92rem; }

.prog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.prog-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
/* Scheda di arrivo tornando dalla pagina del programma (#p-slug) */
.prog-card.is-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.prog-card-link { display: flex; gap: 20px; padding: 22px; text-decoration: none; color: inherit; height: 100%; }
.prog-icon { width: 72px; height: 72px; border-radius: 16px; flex: none; box-shadow: var(--shadow-sm); background: #fff; }
.prog-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.prog-card h3 { font-size: 1.15rem; margin: 2px 0 6px; }
.prog-card:hover h3 { color: var(--accent); }
.prog-cats { font-size: .82rem; color: var(--faint); margin: 0 0 8px; }
.prog-cats span { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; margin-right: 4px; }
.prog-intro { color: var(--muted); font-size: .96rem; margin-bottom: 12px; }
.prog-card .text-link { margin-top: auto; font-size: .95rem; }
@media (max-width: 480px) {
  .prog-card-link { flex-direction: column; gap: 14px; padding: 20px; }
  .prog-icon { width: 60px; height: 60px; }
}

/* ---------- Scheda programma e pacchetto ---------- */
.prog-head { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); }
.prog-icon-lg { width: clamp(84px, 11vw, 128px); height: clamp(84px, 11vw, 128px); border-radius: 24px; box-shadow: var(--shadow); }
.prog-head h1 { margin-bottom: 8px; }
.prog-head .lead { margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags a { display: inline-block; font-size: .82rem; font-weight: 650; padding: 4px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--accent); border: 1px solid var(--brand-line); text-decoration: none; }
.tags a:hover { border-color: var(--accent); }
@media (max-width: 560px) { .prog-head { flex-direction: column; align-items: flex-start; } }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.detail-aside { position: sticky; top: 100px; }
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; order: -1; }
}
.aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.aside-card .ribbon { margin: -22px 0 16px -22px; }
.aside-title { font-weight: 750; font-size: 1.15rem; margin-bottom: 14px; }
.aside-actions { display: grid; gap: 10px; }
.aside-actions .btn { width: 100%; }
.aside-note { color: var(--faint); font-size: .88rem; margin: 14px 0 0; }
.aside-card .csa-link { margin-top: 14px; }
.aside-sub { font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 20px 0 8px; }
.aside-suites { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.aside-suites a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; }
.aside-suites a:hover { background: var(--surface-2); color: var(--text); }
.aside-suites .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tint); }
.aside-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.aside-list li { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.aside-list .icon { width: 18px; height: 18px; color: var(--accent); }

/* Blocchi con icona (erano gli "shortcode-box" del vecchio sito) */
.feat-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 22px; padding: 0 0 clamp(32px, 4vw, 44px); position: relative; }
.feat-row + .feat-row { padding-top: clamp(32px, 4vw, 44px); border-top: 1px solid var(--border); }
.feat-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--accent); border: 1px solid var(--brand-line); }
.feat-icon .icon { width: 26px; height: 26px; }
.tint-scuola .feat-icon, .tint-conservatori .feat-icon, .tint-convitti .feat-icon, .tint-amministrazioni .feat-icon {
  color: var(--tint); background: color-mix(in srgb, var(--tint) 10%, var(--surface)); border-color: color-mix(in srgb, var(--tint) 30%, var(--surface));
}
.feat-body h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin: 10px 0 12px; }
.feat-body p, .feat-body li { color: var(--text-2); }
.feat-body ul { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0 0 1em; }
.feat-body ul li { position: relative; padding-left: 26px; }
.feat-body ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.tint-scuola .feat-body ul li::before, .tint-conservatori .feat-body ul li::before, .tint-convitti .feat-body ul li::before, .tint-amministrazioni .feat-body ul li::before { background: var(--tint); }
.feat-body ul.doc-list { gap: 10px; }
.feat-body ul.doc-list li { padding: 0; }
.feat-body ul.doc-list li::before { display: none; }
.feat-body > :last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .feat-row { grid-template-columns: 1fr; gap: 10px; }
  .feat-icon { width: 46px; height: 46px; }
  .feat-icon .icon { width: 22px; height: 22px; }
  .feat-body h2 { margin-top: 0; }
}

/* Callout */
.callout { display: flex; gap: 16px; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--text-2); margin-top: 8px; }
.callout .icon { color: var(--accent); width: 24px; height: 24px; margin-top: 2px; }
.callout p { margin: 0; }

/* ---------- Certificazioni e documenti ---------- */
.cert-list { display: grid; gap: 0; }
.cert { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: clamp(28px, 4vw, 40px) 0; border-top: 1px solid var(--border); }
.cert:first-child { border-top: 0; padding-top: 0; }
.cert-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--brand-soft); color: var(--accent); border: 1px solid var(--brand-line); }
.cert-icon .icon { width: 30px; height: 30px; }
.cert-body { max-width: 860px; }
.cert-body h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 8px; }
.cert-body p { color: var(--text-2); }
@media (max-width: 560px) { .cert { grid-template-columns: 1fr; gap: 12px; } .cert-icon { width: 52px; height: 52px; } }

.doc-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.doc-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 650; line-height: 1.3; transition: border-color .15s ease, box-shadow .15s ease; }
.doc-link:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--text); }
.doc-link > .icon:first-child { width: 22px; height: 22px; color: var(--accent); }
.doc-link span { flex: 1; min-width: 0; }
.doc-link small { display: block; font-weight: 500; color: var(--faint); font-size: .82rem; margin-top: 2px; }
.doc-link .doc-dl { width: 18px; height: 18px; color: var(--faint); }
.doc-link:hover .doc-dl { color: var(--accent); }
.doc-list-lg { grid-template-columns: 1fr; gap: 12px; margin: 0; }
.doc-list-lg .doc-link { padding: 20px 22px; font-size: 1.05rem; }
.doc-list-lg.doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doc-grid .doc-link { height: 100%; padding: 26px 26px; }
.doc-grid .doc-link > .icon:first-child { width: 28px; height: 28px; }
@media (max-width: 760px) { .doc-list-lg.doc-grid { grid-template-columns: 1fr; } }

/* ---------- Moduli e contatti ---------- */
.contact-choice h2 { font-size: 1.4rem; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid h2 { margin-bottom: 24px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 650; font-size: .95rem; margin-bottom: 6px; }
.field label .opt { font-weight: 400; color: var(--faint); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .err { color: var(--danger); font-size: .9rem; margin: 6px 0 0; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem !important; font-weight: 400 !important; color: var(--text-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { padding: 16px 18px; border-radius: 12px; margin-bottom: 20px; }
.form-alert.ok { background: var(--ok-soft); color: var(--text); border: 1px solid var(--ok); }
.form-alert.ko { background: var(--danger-soft); color: var(--text); border: 1px solid var(--danger); }
.contact-stack { display: grid; gap: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.contact-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.contact-card h2 .icon { color: var(--accent); }
.contact-card dl { margin: 0; display: grid; gap: 10px; }
.contact-card dl > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
.contact-card dt { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.contact-card dd { margin: 0; font-weight: 650; text-align: right; }
.contact-card p { margin: 0 0 12px; color: var(--text-2); }
.contact-card p:last-child { margin-bottom: 0; }
.contact-extra { margin-top: 14px !important; font-size: .95rem; }

/* ---------- Notizia ---------- */
.news-cover { width: 100%; border-radius: var(--radius); margin-bottom: 32px; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--border); }
.news-title, .news-title + .lead { max-width: none; text-wrap: wrap; }
.news-aside .aside-sub:first-child { margin-top: 0; }
.aside-date { display: flex; align-items: center; gap: 10px; font-weight: 650; margin: 0; }
.aside-date .icon { width: 18px; height: 18px; color: var(--accent); }
.aside-news { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.aside-news a { display: block; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; line-height: 1.35; }
.aside-news a:hover { background: var(--surface-2); color: var(--text); }
.aside-news small { display: block; color: var(--faint); font-weight: 500; font-size: .82rem; margin-top: 2px; }
@media (max-width: 960px) { .news-aside { order: 1; } }
.prose p, .prose li { color: var(--text-2); font-size: 1.08rem; }
.prose .checklist { margin-bottom: 1.2em; }
.prose h2 { margin-top: 1.6em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: .97rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.prose .news-note { font-size: .92rem; color: var(--faint); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 24px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.checklist .icon-check { width: 22px; height: 22px; padding: 3px; border-radius: 50%; margin-top: 3px; background: var(--brand-soft); color: var(--accent); stroke-width: 2.4; }
.post-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 650; line-height: 1.3; }
.post-nav a small { display: block; color: var(--faint); font-weight: 500; font-size: .8rem; }
.post-nav a.next { justify-content: flex-end; text-align: right; }
.post-nav .icon { color: var(--accent); }
.post-nav-all { color: var(--accent) !important; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav a.next { justify-content: flex-start; text-align: left; } }

/* ---------- Banda CTA ---------- */
.cta-band { padding: clamp(56px, 7vw, 88px) 0; background: var(--bg-alt); border-top: 1px solid var(--border); }
.cta-inner {
  display: grid; grid-template-columns: 1.2fr auto; gap: 32px; align-items: center;
  background: linear-gradient(120deg, #003a5e 0%, #005487 55%, #0077b0 100%); color: #fff; border-radius: 24px; padding: clamp(32px, 5vw, 60px);
  position: relative; overflow: hidden;
}
.cta-inner::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid rgba(255, 255, 255, .06); }
.cta-inner > * { position: relative; z-index: 1; }
.cta-inner h2 { color: #fff; margin-bottom: 12px; }
.cta-inner p { color: rgba(255, 255, 255, .82); margin: 0; max-width: 600px; font-size: 1.08rem; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 480px) { .cta-actions .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); font-size: .95rem; }
.footer-contacts { background: var(--hero-ink); color: #fff; }
.footer-contacts-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.big-contact { display: flex; align-items: center; gap: 16px; padding: 30px 24px; color: #fff; text-decoration: none; border-left: 1px solid rgba(255, 255, 255, .1); }
.big-contact:first-child { border-left: 0; padding-left: 0; }
.big-contact:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.big-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(1, 159, 213, .18); color: #6cccf0; flex: none; }
.big-icon .icon { width: 24px; height: 24px; }
.big-contact strong { display: block; color: #fff; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.big-contact small { color: rgba(255, 255, 255, .7); font-size: .88rem; }
@media (max-width: 900px) {
  .footer-contacts-inner { grid-template-columns: 1fr; }
  .big-contact { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0; }
  .big-contact:first-child { border-top: 0; }
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; padding-top: 56px; }
.footer-brand p { color: var(--muted); max-width: 380px; margin-top: 16px; }
.footer-badges { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-badges li { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.footer-badges img { border-radius: 6px; background: #fff; }
.footer-badges li:first-child img { width: 54px; height: auto; }
.footer-badges li:last-child img { width: 180px; height: auto; padding: 4px; }
.footer-col h2 { font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.footer-col a { color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-small { font-size: .87rem; color: var(--faint); }
.footer-bottom { margin-top: 44px; padding: 22px var(--gutter) 28px; border-top: 1px solid var(--border); color: var(--faint); font-size: .85rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }
.site-footer .brand-logo img { width: 180px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Animazione d'ingresso leggera ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease, box-shadow .2s ease, border-color .2s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

@media print {
  .topbar, .site-header, .cta-band, .footer-contacts, .detail-aside { display: none; }
  .page-banner, .hero-photo { color: #000; background: none; min-height: 0; }
  .page-banner > img, .hero-bg { display: none; }
  .page-banner h1, .hero-photo h1 { color: #000; }
}
.policy-cookie { text-align: center; margin: 32px 0 0; }
