/* =========================================================
   Corsi Primo Soccorso Roma (stessa linea grafica del sito 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__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__title { font-size: clamp(2.3rem, 4.6vw, 3.7rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: .3em; }
.hero__title::after { content: ""; display: block; width: 72px; height: 5px; border-radius: 4px; margin-top: 18px; background: linear-gradient(90deg, var(--green-700), var(--green-500)); }
.hero__subtitle { font-size: 1.15rem; 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 { color: var(--green-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 { 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 { 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 .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; }
.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 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; 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 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 { 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; }

/* =========================================================
   Corsi Primo Soccorso Roma — componenti specifici
   ========================================================= */
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; width: auto !important; }
.brand > img, .brand > picture { display: block; flex: none; width: 210px; }
.brand > picture img { width: 100%; }
.brand__site { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); line-height: 1.25; max-width: 11ch; padding-left: 12px; border-left: 2px solid var(--green-100); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .55); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: #fff; color: var(--green-800); }

/* Slider della home */
.slider { position: relative; width: 100%; min-width: 0; }
.slider__viewport { display: grid; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--green-900); }
.slide { grid-area: 1 / 1; display: grid; grid-template-rows: auto 1fr; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide__media { position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.slide__media img, .slide__media picture { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.slide__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 38, 26, 0) 45%, rgba(0, 38, 26, .55)); }
.slide__body { padding: 22px 26px 26px; background: linear-gradient(160deg, var(--green-800), var(--green-950)); color: #d5e8dc; }
.slide__label { display: inline-block; margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8fd07a; }
.slide__title { color: #fff; font-size: clamp(1.25rem, 2.1vw, 1.6rem); font-weight: 800; margin: 0 0 6px; }
.slide__text { margin: 0 0 16px; font-size: .95rem; line-height: 1.55; }
.slide__links { display: flex; flex-wrap: wrap; gap: 10px; }
.slider__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.slider__dots { display: flex; gap: 8px; }
.slider__dot { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: var(--green-200); cursor: pointer; transition: width .25s, background .25s; }
.slider__dot.is-active { width: 28px; background: var(--green-700); }
.hero__inner:has(.slider) { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); }

/* Prossimo corso + conto alla rovescia */
.next-course { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 30px -24px rgba(0, 38, 26, .35); position: relative; z-index: 2; }
.next-course__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 28px; align-items: center; padding-block: 22px; }
.next-course .kicker { margin-bottom: .35em; }
.next-course__date { margin: 0; display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 1.05rem; line-height: 1.45; }
.next-course__date .ico { fill: var(--green-700); width: 1.3em; height: 1.3em; margin-top: .1em; }
.countdown { display: flex; gap: 8px; }
.countdown__unit { min-width: 66px; text-align: center; background: linear-gradient(160deg, var(--green-700), var(--green-900)); color: #fff; border-radius: 12px; padding: 8px 6px 6px; }
.countdown__unit span { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown__unit small { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: #bfe0c9; font-weight: 700; }
.page-layout--home { padding-top: 64px; }

/* Date dei corsi */
.next-list { list-style: none; padding: 0 !important; margin: 0 0 1em; }
.next-list li { padding: 14px 18px !important; margin: 0 !important; background: var(--green-50); border: 1px solid var(--green-100); border-left: 4px solid var(--green-500); border-radius: 12px; }
.next-list li::before { display: none !important; }
.dates { display: grid; gap: 12px; margin: 0 0 1.6em; }
.date-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.date-card:hover { border-color: var(--green-200); box-shadow: var(--shadow); }
.date-card p { margin: 0; }
.date-card__date { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.date-card__date .ico { fill: var(--green-700); width: 1.25em; height: 1.25em; }
.date-card__time { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; margin-top: 4px !important; padding-left: 2.1em; }
.date-card__time .ico { fill: var(--green-500); }
.date-card .btn { flex: none; text-decoration: none; }
.prose .date-card .btn--primary, .prose .btn--primary { color: #fff; }
.date-card.is-full { opacity: .75; }
.date-card__badge { font-size: .8rem; font-weight: 700; color: #8a1c1c; background: #fdecec; border-radius: 999px; padding: .4em .9em; }
.dates__empty { padding: 16px 20px; background: var(--bg-alt); border-radius: var(--radius); border: 1px dashed var(--green-200); }

/* Sezione "Prossime date in calendario" */
.next-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }
.next-dates__list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.next-dates__item { padding: 16px 0; border-top: 1px solid var(--line); }
.next-dates__label { margin: 0 0 6px; font-weight: 700; color: var(--green-700); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.next-dates__date { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; color: var(--ink); line-height: 1.35; }
.next-dates__date .ico { fill: var(--green-700); }
.next-dates__time { margin: 4px 0 0; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.next-dates__time .ico { fill: var(--green-500); }
.next-dates__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.map-card { position: relative; display: block; min-height: 360px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); text-decoration: none; color: #fff; }
.map-card picture, .map-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.map-card:hover .map-card__img { transform: scale(1.04); }
.map-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 38, 26, 0) 30%, rgba(0, 38, 26, .88)); }
.map-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.map-card__body .kicker { color: #8fd07a; margin: 0; }
.map-card__body strong, .map-card__addr { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.map-card__body .ico { fill: #8fd07a; }
.map-card__body small { color: #d5e8dc; margin-bottom: 10px; }
.map-card:hover { color: #fff; }

/* Fascia finale */
.cta-band { background: linear-gradient(120deg, var(--green-900), var(--green-700)); color: #d5e8dc; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 44px; }
.cta-band__title { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; margin: 0 0 4px; }
.cta-band p { margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Riquadro soddisfazione e barre */
.side-box--sat { background: #fff; box-shadow: var(--shadow-sm); }
.side-box__iso { width: 130px; height: auto; align-self: flex-start; }
.side-box__period { font-weight: 600; color: var(--green-700); font-size: .92rem; }
.meters { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 9px; }
.meters li { margin: 0 !important; padding: 0 !important; }
.meters li::before { display: none !important; }
.meter { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label value" "bar bar"; gap: 3px 10px; align-items: center; font-size: .84rem; }
.meter__label { grid-area: label; font-weight: 600; color: var(--ink-2); }
.meter__value { grid-area: value; font-weight: 800; color: var(--green-700); font-variant-numeric: tabular-nums; }
.meter__bar { grid-area: bar; height: 7px; border-radius: 99px; background: var(--green-100); overflow: hidden; }
.meter__fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.meters--big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-top: 8px; }
.meters--big .meter { font-size: .95rem; }
.meters--big .meter__bar { height: 10px; }
.sat { margin: 1.4em 0; padding: 26px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sat__form label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.sat__pick { display: flex; gap: 10px; flex-wrap: wrap; }
.sat__pick select { flex: 1 1 280px; min-width: 0; font: inherit; font-size: .95rem; padding: .7em 1em; border: 1px solid var(--green-200); border-radius: 12px; background: #fff; color: var(--ink); }
.sat__caption { margin: 18px 0 6px; color: var(--muted); }

/* Programma: schede e moduli */
.prog { margin: 1.6em 0; }
.prog__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.prog__tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2); cursor: pointer; font-size: .85rem; font-weight: 600; transition: .2s; }
.prog__tab strong { font-size: 1.15rem; font-weight: 800; color: var(--green-700); letter-spacing: .02em; }
.prog__tab:hover { border-color: var(--green-200); }
.prog__tab.is-active { background: linear-gradient(160deg, var(--green-700), var(--green-900)); border-color: transparent; color: #d5e8dc; box-shadow: var(--shadow); }
.prog__tab.is-active strong { color: #fff; }
.prog:not(.is-ready) .prog__nav { display: none; }
.prog__panel { margin-bottom: 1.6em; }
.prog.is-ready .prog__panel { display: none; }
.prog.is-ready .prog__panel.is-active { display: block; }
.prose .prog__goal { font-size: 1.02rem; color: var(--ink); background: var(--green-50); border-left: 4px solid var(--green-500); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 0 0 1.2em; }
.prose .prog__module { font-size: 1.12rem; margin: 1.6em 0 .7em; color: var(--green-800); }
.prog__item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.prog__item summary { cursor: pointer; padding: 13px 18px 13px 44px; font-weight: 700; color: var(--ink); position: relative; list-style: none; }
.prog__item summary::-webkit-details-marker { display: none; }
.prog__item summary::before { content: "+"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; font-weight: 800; line-height: 1; }
.prog__item[open] summary::before { content: "–"; background: var(--green-700); color: #fff; }
.prog__body { padding: 0 18px 14px 44px; font-size: .96rem; }
.prog__body p { margin: 0; }
.prog__item--plain { padding: 13px 18px 13px 44px; font-weight: 700; color: var(--ink); position: relative; }
.prog__item--plain::before { content: ""; position: absolute; left: 20px; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); transform: translateY(-50%); }

/* Mappa e video incorporati */
.prose .map-embed, .prose .video-embed { display: block; position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 1em 0; background: var(--bg-alt); }
.prose .map-embed { aspect-ratio: 16 / 9; }
.prose .video-embed { aspect-ratio: 16 / 9; }
.prose .map-embed iframe, .prose .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .doc-ico { width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; border-radius: 0; box-shadow: none; display: inline-block; }

/* Modulo di contatto */
.form-box { margin: 1.6em 0; padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.prose .form-box__title { font-size: 1.3rem; margin: 0 0 18px; }
.form__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px 24px; }
.form__col { display: flex; flex-direction: column; gap: 14px; }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field--grow { flex: 1; }
.form__field label { font-weight: 700; font-size: .88rem; color: var(--ink); }
.form__field label span { color: var(--green-500); }
.form__field input, .form__field textarea { font: inherit; font-size: .96rem; padding: .75em 1em; border: 1px solid #cdd8d1; border-radius: 12px; background: #fbfdfc; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
.form__field textarea { flex: 1; min-height: 210px; resize: vertical; }
.form__field input:focus, .form__field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(26, 117, 0, .12); background: #fff; }
.form__field.is-invalid input, .form__field.is-invalid textarea { border-color: #c4320a; background: #fff8f6; }
.form__err { color: #b42318; font-size: .82rem; font-weight: 600; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.form__check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; cursor: pointer; flex: 1 1 320px; }
.form__check input { width: 18px; height: 18px; margin-top: .2em; accent-color: var(--green-700); flex: none; }
.form__check.is-invalid { color: #b42318; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__alert { background: #fff4f2; border: 1px solid #f5c3b8; color: #8a1c1c; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; font-size: .92rem; }
.form__ok { display: flex; gap: 14px; align-items: flex-start; background: var(--green-50); border: 1px solid var(--green-200); border-radius: 14px; padding: 18px 20px; }
.form__ok .ico { fill: var(--green-700); width: 28px; height: 28px; }
.form__ok strong, .form__ok-title { color: var(--green-800); font-weight: 700; }

/* Risorse in download (home) */
.resources { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.resources__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.resources__list a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.3; transition: .2s; height: 100%; }
.resources__list a:hover { border-color: var(--green-400); box-shadow: var(--shadow); color: var(--green-700); transform: translateY(-2px); }
.resources__list small { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; letter-spacing: .1em; margin-top: 2px; }
.resources__ico { width: 42px; height: 42px; border-radius: 12px; background: var(--green-100); display: grid; place-items: center; flex: none; }
.resources__ico .ico { fill: var(--green-700); }

/* Footer: newsletter */
.footer__col--news p { margin: 0 0 14px; }
.footer__col--news .btn { text-decoration: none !important; color: var(--green-800); }
.newsletter-embed { margin: 1.4em 0; min-height: 120px; }

/* Responsive */
@media (max-width: 1180px) {
  .brand > img, .brand > picture { width: 180px; }
  .brand__site { display: none; }
  .next-course__inner { grid-template-columns: 1fr auto; }
  .next-course__btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1060px) {
  .hero__inner:has(.slider) { grid-template-columns: 1fr; }
  .next-dates, .resources { grid-template-columns: 1fr; gap: 28px; }
  .map-card { min-height: 300px; }
}
@media (max-width: 760px) {
  .brand > img, .brand > picture { width: 150px; }
  .next-course__inner { grid-template-columns: 1fr; gap: 16px; padding-block: 20px; }
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown__unit span { font-size: 1.3rem; }
  .date-card { flex-direction: column; align-items: flex-start; }
  .date-card__date { font-size: 1.05rem; }
  .prog__nav { grid-template-columns: 1fr; }
  .meters--big { grid-template-columns: 1fr; }
  .form-box { padding: 20px; }
  .form__grid { grid-template-columns: 1fr; }
  .resources__list { grid-template-columns: 1fr; }
  .next-dates__list { padding: 24px; }
  .slide__body { padding: 18px 20px 20px; }
  .cta-band__inner { padding-block: 36px; }
}
@media print {
  .next-course, .cta-band, .slider__nav, .map-card { display: none !important; }
  .prog.is-ready .prog__panel { display: block !important; }
}

/* =========================================================
   Allineamento titoli/enfasi al vecchio sito (ottobre 2026):
   stessi tag del vecchio HTML, stesso aspetto di prima
   ========================================================= */
/* ordine visivo indipendente dall'ordine nel codice: nel vecchio sito «Prossimo Corso» (H3) precedeva l'H1 */
.main-flow { display: flex; flex-direction: column; }
.main-flow > * { min-width: 0; }
.main-flow > .page-hero { order: -1; }

/* testata della home: slider e prossimo corso prima dell'H1 nel codice, a schermo come prima */
.hero--cpsr .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); grid-template-areas: "text slider" "next next"; padding-bottom: 0; row-gap: 0; }
.hero--cpsr .hero__text { grid-area: text; padding-bottom: 80px; }
.hero--cpsr .slider { grid-area: slider; padding-bottom: 80px; }
.hero--cpsr .next-course { grid-area: next; margin-inline: calc(50% - 50vw); }
.hero--cpsr .eyebrow { margin-bottom: 1.2em; }
.hero__subtitle { display: block; margin: 0 0 1em; line-height: 1.5; letter-spacing: 0; }
h2.hero__subtitle { font-size: 1.15rem; color: var(--muted); font-weight: 500; }

/* tag cambiati, aspetto invariato */
.topbar__msg { display: block; }
.topbar__strong { color: #fff; font-weight: 600; }
.next-course .next-course__title { font-size: .75rem; line-height: 1.5; letter-spacing: .14em; color: var(--green-500); margin: 0 0 .35em; }
.next-course__day { font-weight: 700; color: var(--ink); }
.slide__text { display: block; color: inherit; font-weight: 400; letter-spacing: 0; }
h3.slide__text { font-size: .95rem; line-height: 1.55; margin: 0 0 16px; color: #d5e8dc; }
.side-nav__title, .side-box__title, .side-box__text { display: block; }
h3.side-box__title { font-size: 1.02rem; font-weight: 800; color: var(--ink); line-height: 1.35; margin: 0; letter-spacing: 0; }
.meter__label { line-height: 1.4; }
h3.meter__label { font: inherit; font-weight: 600; color: var(--ink-2); margin: 0; letter-spacing: 0; line-height: 1.4; }
.sat__caption { margin: 18px 0 6px; color: var(--muted); }
.sat__ed { font-weight: 700; color: var(--ink); }
.next-dates .section__title { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; }
.cta-band__title { display: block; color: #fff; line-height: 1.2; }
div.cta-band__title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.docs__title { display: block; }
.doc__name { font-weight: 700; }
.doc__text { display: block; margin: 4px 0 0; font-size: .92rem; color: var(--muted); }

/* «Altri siti web Safer»: tre link per paragrafo come nel vecchio sito, griglia invariata */
.other-sites__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.other-sites__group { display: contents; }
.other-sites__name::after { content: attr(data-domain); display: block; font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* footer: H3 per nome azienda e titoli delle colonne, etichette dei contatti in strong */
h3.footer__company { color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: .08em; margin: 0 0 .4em; }
h3.footer__title { line-height: 1.4; }
.footer__col--news .footer__title { display: block; }
.footer__text { display: block; margin: 0 0 14px; }
.footer address strong { color: #d7e7dd; font-weight: 600; }
.footer__vat strong { color: inherit; font-weight: 600; }
.footer__strong { color: #fff; font-weight: 700; }

@media (max-width: 1060px) {
  .hero--cpsr .hero__inner { grid-template-columns: 1fr; grid-template-areas: "text" "slider" "next"; }
  .hero--cpsr .hero__text { padding-bottom: 40px; }
  .hero--cpsr .slider { padding-bottom: 56px; }
}
@media (max-width: 760px) {
  .other-sites__list { grid-template-columns: 1fr; }
}

/* ---- Modulo unico richieste (/richiesta-informazioni/) e campo corso delle iscrizioni ---- */
.form-box__intro { color: var(--muted, #5b6b62); margin-bottom: 16px; }
.form__tipi { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.form__tipi legend { font-weight: 700; font-size: .88rem; color: var(--ink); margin-bottom: 8px; padding: 0; }
.form__tipi legend span { color: var(--green-500); }
.form__radio { display: inline-flex; align-items: center; gap: 8px; padding: .55em 1em; border: 1px solid #cdd8d1; border-radius: 999px; background: #fbfdfc; font-size: .92rem; cursor: pointer; }
.form__radio:has(input:checked) { border-color: var(--green-500); background: var(--green-50); color: var(--green-800); font-weight: 600; }
.form__radio input { accent-color: var(--green-700); }
.form__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form__wide { grid-column: 1 / -1; }
.form__wide > .form__field { height: 100%; }
.form__grid--2 textarea { min-height: 150px; }
.form__back { margin-top: 12px; }
[data-for][hidden] { display: none !important; }
@media (max-width: 700px) { .form__grid--2 { grid-template-columns: 1fr; } }

/* ---- Programma e calendario: titoli/enfasi come nel vecchio sito, stesso aspetto di prima ---- */
.prog__tab .prog__hours { font-size: 1.15rem; font-weight: 800; color: var(--green-700); letter-spacing: .02em; }
.prog__tab.is-active .prog__hours { color: #fff; }
.prose .prog__h, .prog__h { display: inline; margin: 0; font: inherit; font-weight: 700; color: inherit; letter-spacing: normal; text-transform: none; }
.prose .prog__body .prog__h { display: block; margin: .8em 0 .3em; font-size: .96rem; color: var(--ink); }
em.em-normal { font-style: normal; }
