/* =========================================================
   SAFER S.r.l. — foglio di stile principale
   Colori ricavati dal logo: verde scuro #005e34, verde brillante #1a7500, nero #00050b
   ========================================================= */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
  --green-950: #00261a;
  --green-900: #00331f;
  --green-800: #004a2c;
  --green-700: #005e34;
  --green-600: #0d6e2a;
  --green-500: #1a7500;
  --green-400: #3a9a1c;
  --green-200: #cfe6d3;
  --green-100: #e3f1e6;
  --green-50: #f2f8f3;
  --ink: #0a1014;
  --ink-2: #26323a;
  --muted: #5b6770;
  --line: #e2e8e4;
  --bg: #ffffff;
  --bg-alt: #f4f8f5;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0, 38, 26, .06), 0 1px 3px rgba(0, 38, 26, .08);
  --shadow: 0 10px 30px -12px rgba(0, 38, 26, .25);
  --shadow-lg: 0 24px 60px -24px rgba(0, 38, 26, .35);
  --wrap: 1240px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: inline-block; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-500); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--green-400); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.ico { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -.2em; }
.ico--sm { width: .95em; height: .95em; }
.ico--flip { transform: scaleX(-1); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--green-700); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .8em 1.35em; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--green-700); color: #fff; box-shadow: 0 8px 20px -10px rgba(0, 94, 52, .7); }
.btn--primary:hover { background: var(--green-500); color: #fff; }
.btn--light { background: var(--green-100); color: var(--green-800); }
.btn--light:hover { background: var(--green-200); color: var(--green-900); }
.btn--outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn--outline:hover { background: var(--green-700); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--sm { padding: .6em 1.1em; font-size: .88rem; }
.btn--block { display: flex; width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; text-decoration: none; color: var(--green-700); }
.link-arrow .ico { transition: transform .2s; }
.link-arrow:hover .ico { transform: translateX(3px); }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--green-700); display: grid; place-items: center; cursor: pointer; transition: .2s; }
.round-btn:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }

.kicker { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--green-500); margin: 0 0 .7em; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-700); background: var(--green-100); padding: .45em .9em; border-radius: 999px; margin: 0 0 1.2em; }

/* ---------- Topbar ---------- */
.topbar { background: var(--green-900); color: #cfe0d5; font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.topbar__msg { margin: 0; }
.topbar__msg strong { color: #fff; font-weight: 600; }
.topbar__msg { display: flex; align-items: baseline; gap: .45em; flex-wrap: wrap; }
.topbar__h { font: inherit; letter-spacing: normal; line-height: inherit; color: #fff; font-weight: 600; margin: 0; }
.topbar__h--sub { color: inherit; font-weight: 400; }
/* home: stesso testo della barra, solo decorativo (in home H2/H3 sono nell'hero dopo l'H1, come nel vecchio sito) */
.topbar__msg--deco::before { content: attr(data-a); color: #fff; font-weight: 600; }
.topbar__msg--deco::after { content: attr(data-b); }
.topbar__info { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.topbar__info li { display: flex; align-items: center; gap: 6px; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); }
.header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { flex: none; display: block; width: 210px; }
.brand img { display: block; width: 100%; height: auto; }
.header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header__phone { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--green-50); border: 1px solid var(--green-100); transition: .2s; }
.header__phone .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--green-700); fill: #fff; }
.header__phone small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; line-height: 1.1; }
.header__phone span { line-height: 1.2; }
.header__phone:hover { background: var(--green-100); color: var(--ink); }
.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; place-items: center; }
.burger .ico { width: 24px; height: 24px; }

/* ---------- Nav (desktop) ---------- */
.nav { margin-left: auto; }
.nav__head, .nav__mobile-cta { display: none; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; background: none; border: 0; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.nav__link:hover, .nav__item:hover > .nav__link, .nav__toggle[aria-expanded="true"] { background: var(--green-50); color: var(--green-700); }
.nav__item.is-active > .nav__link { color: var(--green-700); }
.nav__item.is-active > .nav__link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--green-500); }
.nav__toggle .ico { transition: transform .2s; }
.nav__toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.nav__panel { position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.nav__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.has-sub:hover > .nav__panel, .has-sub.is-open > .nav__panel, .has-sub:focus-within > .nav__panel { opacity: 1; visibility: visible; transform: none; }
.dropdown { list-style: none; margin: 0; padding: 0; }
.dropdown a { display: block; padding: 9px 14px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500; }
.dropdown a:hover, .dropdown a[aria-current] { background: var(--green-50); color: var(--green-700); }
.has-mega { position: static; }
.has-mega > .nav__panel { left: 50%; transform: translate(-50%, 6px); width: min(1100px, calc(100vw - 48px)); padding: 26px; }
.has-mega:hover > .nav__panel, .has-mega.is-open > .nav__panel, .has-mega:focus-within > .nav__panel { transform: translate(-50%, 0); }
.mega { display: grid; grid-template-columns: 1.25fr 1fr .9fr; gap: 28px; }
.mega__title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 2px solid var(--green-100); }
.mega__title:hover { color: var(--green-700); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600; }
.mega li a:hover, .mega li a[aria-current] { background: var(--green-50); color: var(--green-700); }
.mega__sub { margin: 0 0 6px 10px !important; border-left: 2px solid var(--green-100); padding-left: 6px !important; }
.mega__sub a { font-weight: 500 !important; font-size: .86rem !important; color: var(--muted) !important; padding: 5px 10px !important; }
.mega__sub a:hover { color: var(--green-700) !important; }
.mega__cta { align-self: start; background: linear-gradient(160deg, var(--green-700), var(--green-900)); color: #d8eadf; border-radius: var(--radius); padding: 22px; font-size: .9rem; }
.mega__cta-title { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .4em; }
.mega__cta .btn--primary { background: #fff; color: var(--green-800); }
.mega__cta .btn--primary:hover { background: var(--green-100); }
.nav-overlay { display: none; }

/* ---------- Hero home ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, var(--green-100), transparent 60%), linear-gradient(180deg, #fff, var(--bg-alt)); }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(26, 117, 0, .06); pointer-events: none; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: center; padding-block: 72px 80px; position: relative; z-index: 1; }
.hero__heading { display: flex; flex-direction: column; align-items: flex-start; }
.hero__heading .eyebrow { order: -1; }
.eyebrow__h { font: inherit; letter-spacing: inherit; line-height: inherit; color: inherit; text-transform: inherit; margin: 0; }
.hero__title { font-size: clamp(2.3rem, 4.6vw, 3.7rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 0; }
.hero__title:not(:has(.hero__subtitle))::after, .hero__subtitle::before { content: ""; display: block; width: 72px; height: 5px; border-radius: 4px; margin: 18px 0; background: linear-gradient(90deg, var(--green-700), var(--green-500)); }
.hero__sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero__subtitle { display: block; font-size: 1.15rem; line-height: 1.7; letter-spacing: normal; color: var(--muted); font-weight: 500; max-width: 36ch; }
.hero__certs { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 34px 0 0; }
.hero__certs li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow-sm); }
.hero__certs img { display: block; height: 52px; width: auto; }
.hero__media { position: relative; width: 100%; max-width: 520px; justify-self: end; }
.hero__img { display: block; width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1; object-fit: cover; }
.hero__media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--green-500), var(--green-800)); z-index: -1; opacity: .9; }
.hero__badge { position: absolute; left: -26px; bottom: -30px; width: 110px; height: auto; background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }

/* ---------- Sezioni ---------- */
.section { padding-block: 84px; }
.section--tight { padding-block: 64px; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: linear-gradient(180deg, var(--green-900), var(--green-950)); color: #cfe0d5; }
.section--dark .section__title, .section--dark .card__title { color: #fff; }
.section--dark .section__lead { color: #cfe0d5; }
.section--dark .section__lead strong { color: #fff; }
.section--dark .kicker { color: #8fd07a; }
.section__head { max-width: 860px; margin-bottom: 40px; }
.section__head--row { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: none; }
.section__title { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 800; letter-spacing: -.02em; }
.section__title--xl { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.section__lead { font-size: 1.06rem; color: var(--muted); }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.news-strip { margin-bottom: 24px; }
.grid--media .card { flex-direction: row; }
.grid--media .card__img { flex: 0 0 42%; aspect-ratio: auto; }
@media (max-width: 760px) { .grid--media .card { flex-direction: column; } .grid--media .card__img { aspect-ratio: 4 / 3; } }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s; color: var(--ink-2); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green-200); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-100); }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card__body p { font-size: .95rem; }
.card__title { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.card:not(.card--media) .card__body { border-top: 4px solid var(--green-500); }
.card .link-arrow { margin-top: auto; }
.section--dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); color: #cfe0d5; }
.section--dark .card:hover { background: rgba(255, 255, 255, .07); border-color: rgba(143, 208, 122, .4); }
.section--dark .card strong { color: #fff; }
.section--dark .link-arrow { color: #8fd07a; }
.section--dark .card:not(.card--media) .card__body { border-top-color: #8fd07a; }

/* Modalità (E-learning / FAD) */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mode { display: grid; grid-template-columns: 180px 1fr; gap: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.mode::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--green-700), var(--green-500)); }
.mode__img img { width: 100%; border-radius: var(--radius); display: block; aspect-ratio: 1; object-fit: cover; }
.mode__title { font-size: 1.3rem; font-weight: 800; }
.mode__text { font-size: .95rem; }
.mode__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Calendario */
.calendar-block { display: grid; grid-template-columns: .85fr 1.4fr; gap: 48px; align-items: start; }
.calendar-block__intro { position: sticky; top: calc(var(--header-h) + 24px); }
.calendar-block__intro .cta-buttons { flex-direction: column; align-items: stretch; max-width: 360px; }
.calendar-block__intro .cta-buttons .btn { justify-content: flex-start; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cal__table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cal__table thead th { background: var(--green-700); color: #fff; text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; padding: 14px 20px; }
.cal__table tbody th, .cal__table td { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.cal__table tbody tr:last-child th, .cal__table tbody tr:last-child td { border-bottom: 0; }
.cal__table tbody tr:hover { background: var(--green-50); }
.cal__table tbody th { font-weight: 700; color: var(--ink); width: 27%; }
.cal__table td:last-child { width: 27%; }
.cal__table tbody th a { color: var(--ink); text-decoration: none; }
.cal__table tbody th a:hover { color: var(--green-700); text-decoration: underline; }
.cal__date, .cal__time { display: inline-flex; gap: 8px; align-items: flex-start; }
.cal__date .ico, .cal__time .ico { margin-top: .35em; fill: var(--green-500); }
.cal__time { white-space: nowrap; font-weight: 600; color: var(--green-800); }
.cal__meta { display: block; font-size: .8rem; color: var(--muted); margin: 4px 0 0 23px; }
.cal__na { color: var(--muted); font-style: italic; }
.cal__empty { padding: 24px; margin: 0; }

/* Testimonianze */
.testimonials-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: stretch; }
.testimonials { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; position: relative; overflow: hidden; }
.testimonials__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.testimonials__head .section__title { margin: 0; }
.testimonials__nav { display: flex; gap: 8px; }
.testimonials__viewport { overflow: hidden; }
.testimonials__track { display: flex; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.quote { flex: 0 0 100%; margin: 0; padding: 12px 4px 0; }
.quote__ico { width: 42px; height: 42px; fill: var(--green-200); }
.quote blockquote { margin: 6px 0 18px; font-size: 1.12rem; line-height: 1.65; color: var(--ink); font-weight: 500; }
.quote figcaption { color: var(--muted); font-size: .92rem; }
.quote figcaption strong, .quote__author { color: var(--green-700); font-weight: 700; }
.testimonials__dots { display: flex; gap: 8px; margin-top: 20px; }
.testimonials__dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: var(--green-200); cursor: pointer; padding: 0; transition: .3s; }
.testimonials__dots button[aria-current="true"] { width: 28px; background: var(--green-700); }
.newsletter { background: linear-gradient(160deg, var(--green-700), var(--green-900)); color: #fff; border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.newsletter h2, .newsletter__title { color: #fff; font-size: 1.4rem; }
.newsletter__ico { width: 48px; height: 48px; fill: #8fd07a; margin-bottom: 14px; }
.newsletter .btn--primary { background: #fff; color: var(--green-800); }

/* Altri siti */
.other-sites { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.other-sites__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.other-sites__list a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .94rem; transition: .2s; background: #fff; line-height: 1.3; }
.other-sites__list a > span:nth-child(2) { flex: 1; }
.other-sites__list small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.other-sites__list a:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); color: var(--green-700); }
.other-sites__ico { width: 38px; height: 38px; border-radius: 10px; background: var(--green-100); display: grid; place-items: center; flex: none; }
.other-sites__ico .ico { fill: var(--green-700); }
.other-sites__list a > .ico { fill: var(--muted); }

/* ---------- Pagine interne ---------- */
.page-hero { background: linear-gradient(135deg, var(--green-900), var(--green-700) 70%, var(--green-600)); color: #d5e8dc; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 56px solid rgba(255, 255, 255, .05); pointer-events: none; }
.page-hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-block: 48px; position: relative; z-index: 1; }
.page-hero__title { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.55rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.page-hero__media img { display: block; width: 100%; border-radius: var(--radius); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); aspect-ratio: 870 / 295; object-fit: cover; border: 4px solid rgba(255, 255, 255, .12); }
.page-hero--plain { padding-block: 56px; }
.page-hero__date { margin: 12px 0 0; color: #bfe0c9; font-weight: 600; font-size: .9rem; }
.prose .news-new { margin-bottom: 0; }
.page-hero--plain .kicker { color: #8fd07a; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; font-size: .82rem; }
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "›"; opacity: .6; }
.crumbs a { color: #bfe0c9; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #fff; font-weight: 600; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding-block: 56px 72px; }
.page-content { min-width: 0; }
.page-side { display: flex; flex-direction: column; gap: 20px; }
.side-nav { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.side-nav__title { line-height: 1.7; letter-spacing: normal; font-weight: 800; color: var(--ink); padding: 10px 12px 12px; margin: 0 0 6px; border-bottom: 2px solid var(--green-100); font-size: 1rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; line-height: 1.35; border-left: 3px solid transparent; }
.side-nav a:hover { background: var(--green-50); color: var(--green-700); }
.side-nav .is-group a { font-weight: 700; color: var(--ink); margin-top: 6px; }
.side-nav__group { font: inherit; letter-spacing: normal; margin: 0; }
.side-nav .is-current a { background: var(--green-100); color: var(--green-800); font-weight: 700; border-left-color: var(--green-500); }
.side-box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; font-size: .92rem; display: flex; flex-direction: column; gap: 10px; }
.side-box p { margin: 0; }
.side-box__title { font-weight: 800; color: var(--ink); font-size: 1.02rem; line-height: 1.7; letter-spacing: normal; margin: 0; }
.side-box--news { background: linear-gradient(160deg, var(--green-700), var(--green-900)); border: 0; }
.side-box--news .side-box__title { color: #fff; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.pager__link { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.3; transition: .2s; }
.pager__link strong { font-weight: inherit; }
.pager__link small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.pager__link .ico { fill: var(--green-700); width: 20px; height: 20px; }
.pager__link:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); color: var(--green-700); }
.pager__link--next { justify-content: flex-end; text-align: right; grid-column: 2; }

/* ---------- Prose (contenuti migrati) ---------- */
.prose { font-size: 1.02rem; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.55rem; margin-top: 1.6em; color: var(--ink); }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; color: var(--green-800); }
.prose h4 { font-size: 1.08rem; margin-top: 1.5em; color: var(--green-700); text-transform: none; }
.prose h3 strong, .prose h2 strong { font-weight: inherit; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose .lead-title { display: block; font-size: 1.2rem; color: var(--green-700); margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose ul li { margin-bottom: .45em; }
.prose ul li::marker { color: var(--green-500); }
.prose ol li::marker { color: var(--green-700); font-weight: 700; }
.prose a { font-weight: 600; }
.prose img { border-radius: 10px; }
.prose .img-left { float: left; margin: .3em 1.4em 1em 0; max-width: 45%; }
.prose .img-right { float: right; margin: .3em 0 1em 1.4em; max-width: 45%; }
.prose .thumb { width: 200px; }
.prose .sep { display: block; clear: both; height: 1px; background: var(--line); margin: 1.4em 0; }
.prose .clear { clear: both; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: .94rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.prose table tbody, .prose table thead { display: table; width: 100%; border-collapse: collapse; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 12px 14px; vertical-align: top; text-align: left; }
.prose tr:first-child td { background: var(--green-50); }
.prose tr:last-child td { border-bottom: 0; }
.prose sup { font-size: .7em; }
.prose .map { position: relative; border-radius: var(--radius); overflow: hidden; margin: 1.4em 0; background: var(--green-50); border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.prose .map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: linear-gradient(135deg, var(--green-50), var(--green-100)); }
.map__placeholder p { margin: 0 0 12px; font-size: .9rem; color: var(--muted); max-width: 44ch; }
.prose .sitemap ul { list-style: none; padding-left: 0; }
.prose .sitemap ul ul { padding-left: 1.2em; border-left: 2px solid var(--green-100); margin-left: .3em; }
.prose .quote { background: var(--bg-alt); border-left: 4px solid var(--green-500); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 0 0 16px; }
.prose .quote-author { font-size: .9rem; color: var(--muted); margin-top: 6px; }
/* box "Formazione a distanza" (vecchio layout a colonne) */
.prose .c-row { margin: 0 0 2em; }
.prose .c-row > .boxed { display: grid; grid-template-columns: 180px 1fr; gap: 6px 28px; align-items: center; background: linear-gradient(135deg, var(--green-50), #fff); border: 1px solid var(--green-200); border-radius: var(--radius-lg); padding: 26px; }
.prose .c-row > .boxed > .c-col-1-3 { grid-row: span 2; align-self: start; }
.prose .c-row > .boxed > .c-col-1-3 img { width: 100%; display: block; border-radius: var(--radius); }
.prose .c-row > .boxed h2 { margin: 0; font-size: 1.4rem; color: var(--green-800); }
.prose .c-row > .boxed p { margin: 0; font-size: .96rem; }
.prose .c-row > .boxed a { display: inline-flex; margin: 0 .3em; padding: .15em .8em; border-radius: 99px; background: #fff; border: 1px solid var(--green-200); text-decoration: none; font-size: .9rem; }
.prose .c-row > .boxed a:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.prose .c-row .c-col-3-3 { grid-column: 2; }
/* box corso (elenco corsi e-learning) */
.prose > .boxed { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 12px; background: #fff; transition: .2s; }
.prose > .boxed:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); }
.prose > .boxed > div:first-child { font-weight: 700; color: var(--ink); line-height: 1.35; }
.prose > .boxed > div:first-child > div + div { font-weight: 500; font-size: .85rem; color: var(--green-500); margin-top: 4px; }
.prose > .boxed > div:last-child a { display: inline-flex; padding: .6em 1.2em; border-radius: 99px; background: var(--green-700); color: #fff; text-decoration: none; font-size: .82rem; letter-spacing: .04em; white-space: nowrap; }
.prose > .boxed > div:last-child a:hover { background: var(--green-500); }

/* CTA di pagina e documenti */
.page-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 36px 0 0; padding: 22px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line); }
.page-cta__or { color: var(--muted); font-weight: 600; }
.docs { margin-top: 44px; }
.docs__title { font-size: 1.3rem; font-weight: 700; color: var(--ink); line-height: 1.2; margin: 0 0 .6em; display: flex; align-items: center; gap: 10px; }
.docs__title::before { content: ""; width: 6px; height: 1.3em; border-radius: 4px; background: var(--green-500); }
.docs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .2s; }
.doc:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); }
.doc__ico { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--green-100); display: grid; place-items: center; }
.doc__ico .ico { fill: var(--green-700); }
.doc__link { text-decoration: none; color: var(--ink); }
.doc__link:hover { color: var(--green-700); text-decoration: underline; }
.doc p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--green-950); color: #a9c2b3; font-size: .92rem; }
.footer a { color: #d7e7dd; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer address a, .footer__bottom a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #8fd07a; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-block: 64px 40px; }
.footer__brand img { width: 220px; margin-bottom: 20px; }
.footer address { font-style: normal; line-height: 2; }
.footer address strong { color: #fff; }
.footer__name { color: #fff; font-size: inherit; font-weight: 700; letter-spacing: normal; line-height: 2; margin: 0; }
.footer address .ico { fill: #8fd07a; margin-right: 4px; }
.footer__vat { font-size: .82rem; opacity: .8; }
.footer__title { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1.1em; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: .55em; }
.footer__certs { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer__certs img { height: 50px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.social { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.social span, .social strong { margin-right: 6px; font-weight: 600; color: #fff; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); transition: .2s; }
.social a:hover { background: var(--green-500); text-decoration: none; }
.social .ico { fill: #fff; width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .15); }
.footer__bottom-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; font-size: .82rem; }
.footer__bottom p { margin: 0; }
.footer__bottom strong { color: #fff; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s; z-index: 90; }
.to-top .ico { transform: rotate(180deg); fill: #fff; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Consenso cookie e anteprima */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; z-index: 300; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px 20px; font-size: .9rem; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent__actions { display: flex; gap: 10px; justify-content: flex-end; }
.preview-bar { background: #fff4d6; color: #6b4a00; text-align: center; font-weight: 600; font-size: .88rem; padding: 8px 16px; }

/* Reveal animation */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header__phone small { display: none; }
  .nav__link { padding: 10px 10px; font-size: .9rem; }
  .brand { width: 180px; }
}
@media (max-width: 1060px) {
  :root { --header-h: 72px; }
  .burger { display: grid; }
  .header__phone { padding: 6px; }
  .header__phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* nome del link leggibile dagli screen reader */
  .nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 88vw); background: #fff; z-index: 200; transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility .3s; overflow-y: auto; padding: 0 0 24px; box-shadow: var(--shadow-lg); margin: 0; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 800; position: sticky; top: 0; background: #fff; z-index: 2; }
  .nav__close { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; }
  .nav__list { flex-direction: column; align-items: stretch; padding: 12px; gap: 2px; }
  .nav__link { width: 100%; justify-content: space-between; padding: 13px 14px; font-size: 1rem; }
  .nav__item.is-active > .nav__link::after { display: none; }
  .nav__item.is-active > .nav__link { background: var(--green-50); }
  .nav__panel, .has-mega > .nav__panel { position: static; opacity: 1; visibility: visible; transform: none !important; box-shadow: none; border: 0; padding: 0 0 6px 10px; width: auto; min-width: 0; display: none; }
  .has-sub.is-open > .nav__panel { display: block; }
  .has-sub:hover > .nav__panel { display: none; }
  .has-sub.is-open:hover > .nav__panel { display: block; }
  .nav__panel::before { display: none; }
  .mega { grid-template-columns: 1fr; gap: 12px; }
  .mega__title { font-size: .95rem; padding: 10px; margin: 0; border: 0; background: var(--bg-alt); border-radius: 9px; }
  .mega__cta { display: none; }
  .nav__mobile-cta { display: flex; flex-direction: column; gap: 10px; padding: 12px 24px; }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0, 20, 12, .45); z-index: 99; opacity: 0; visibility: hidden; transition: .3s; }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 64px; }
  .hero__media { max-width: 520px; justify-self: start; }
  .modes { grid-template-columns: 1fr; }
  .calendar-block { grid-template-columns: 1fr; gap: 28px; }
  .calendar-block__intro { position: static; }
  .calendar-block__intro .cta-buttons { flex-direction: row; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .testimonials-wrap { grid-template-columns: 1fr; }
  .other-sites { grid-template-columns: 1fr; gap: 24px; }
  .page-layout { grid-template-columns: 1fr; gap: 40px; }
  .page-side { order: 2; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .wrap { padding-inline: 18px; }
  .topbar__msg { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar__info { gap: 14px; font-size: .78rem; }
  .topbar__info li:first-child { display: none; }
  .brand { width: 150px; }
  .section { padding-block: 60px; }
  .section--tight { padding-block: 44px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .mode { grid-template-columns: 1fr; padding: 22px; }
  .mode__img { max-width: 160px; }
  .hero__badge { left: auto; right: 12px; bottom: -26px; width: 84px; }
  .hero__media::before { inset: 12px -10px -12px 12px; }
  .hero__certs img { height: 42px; }
  .page-hero__inner { grid-template-columns: 1fr; padding-block: 32px; gap: 24px; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .testimonials { padding: 24px; }
  .quote blockquote { font-size: 1rem; }
  .other-sites__list { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--next { grid-column: 1; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; padding-block: 48px 28px; }
  .social { margin-left: 0; }
  .cal__table thead { display: none; }
  .cal__table, .cal__table tbody, .cal__table tr, .cal__table th, .cal__table td { display: block; width: 100%; }
  .cal__table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .cal__table tbody th, .cal__table td { padding: 2px 0; border: 0; width: auto; }
  .cal__table tbody th { font-size: 1rem; margin-bottom: 4px; }
  .cal__time { white-space: normal; }
  .prose .c-row > .boxed { grid-template-columns: 1fr; padding: 20px; }
  .prose .c-row > .boxed > .c-col-1-3 { grid-row: auto; max-width: 140px; }
  .prose .c-row .c-col-3-3 { grid-column: 1; }
  .prose > .boxed { flex-direction: column; align-items: flex-start; }
  .prose .img-left, .prose .img-right { float: none; margin: 0 0 1em; max-width: 100%; }
}
@media print {
  .topbar, .header, .footer, .page-side, .to-top, .pager, #prossimi-corsi .cta-buttons { display: none !important; }
  .page-hero { background: none; color: #000; }
  .page-hero__title { color: #000; }
}

/* ===== Pagina "in costruzione" (modalità presentazione) ===== */
.costruzione { padding-block: 56px 72px; max-width: 960px; }
.costruzione__img { margin: 0 auto; max-width: 900px; }
.costruzione__img img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.costruzione__actions { max-width: 900px; margin: 36px auto 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.costruzione__actions .cta-buttons { margin: 0; justify-content: center; }
.costruzione__back { margin: 0; }
@media (max-width: 760px) { .costruzione { padding-block: 32px 48px; } .costruzione__actions { margin-top: 24px; } }

/* ===== Immagini con copia WebP: il contenitore <picture> non influisce sul layout ===== */
picture { display: contents; }

/* ---------- Modulo richieste / preventivi / iscrizioni ---------- */
.form { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 700; color: var(--ink); margin-bottom: 10px; padding: 0; }
.form__tipi { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.form__tipi legend { flex-basis: 100%; }
.form__radio { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.form__radio:has(input:checked) { border-color: var(--green-700); background: var(--green-50); color: var(--green-800); }
.form__radio input { accent-color: var(--green-700); margin: 0; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form__f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.form__f--wide { grid-column: 1 / -1; }
.form__f input, .form__f textarea { font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink); padding: 11px 14px; border: 1px solid #c9d4cd; border-radius: 10px; background: #fff; width: 100%; }
.form__f textarea { resize: vertical; min-height: 140px; }
.form__f input:focus, .form__f textarea:focus { outline: 3px solid var(--green-100); border-color: var(--green-500); }
.form [aria-invalid="true"] { border-color: #b3261e; }
.form__err { color: #b3261e; font-size: .85rem; font-weight: 500; }
.form__alert { background: #fdecea; color: #8a1c13; border: 1px solid #f5c2bd; border-radius: 10px; padding: 12px 16px; margin: 0 0 8px; }
.form__check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.5; }
.form__check input { margin-top: 3px; accent-color: var(--green-700); width: 18px; height: 18px; flex: none; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.form__or { color: var(--muted); font-size: .92rem; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form [data-for][hidden] { display: none; }
.form-done { background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 32px; }
.form-done__ico { width: 40px; height: 40px; fill: var(--green-700); margin-bottom: 8px; }
.form-done__title { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.cal__iscr { display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 4px; font-size: .82rem; font-weight: 700; text-decoration: none; }
.cal__iscr .ico { transition: transform .2s; }
.cal__iscr:hover .ico { transform: translateX(3px); }
@media (max-width: 760px) { .form__grid { grid-template-columns: 1fr; } .form-done { padding: 22px; } }
