/* Civita · sito istituzionale */
@font-face { font-family: "Bonum"; src: url("../fonts/bonum-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bonum"; src: url("../fonts/bonum-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --brand: #A00024; --brand-dark: #75001B; --brand-deep: #4E0012; --brand-tint: #F7EEF0; --brand-soft: #D08092;
  --ink: #221B1D; --muted: #5E5658; --line: #E7E1E2; --bg: #fff; --bg-soft: #F6F4F4; --dark: #241E20; --sky: #4A9FD2;
  --ok: #1F7A4D; --ok-bg: #E5F4EC; --warn: #8A5A00; --warn-bg: #FBF0D9; --off: #6B6466; --off-bg: #EEEBEC; --info: #1F4E8C; --info-bg: #E6EEF8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(34,27,29,.06), 0 8px 24px rgba(34,27,29,.08);
  --shadow-hover: 0 2px 4px rgba(34,27,29,.08), 0 16px 40px rgba(34,27,29,.14);
  --serif: "Bonum", "Bookman Old Style", "URW Bookman", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px; --gutter: clamp(16px, 4vw, 32px); --header-h: 76px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.65 var(--sans); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
dialog:focus, dialog:focus-visible, .modal__box:focus { outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 820px; }
.small { font-size: .85rem; color: var(--muted); }
.note { font-size: .82rem; color: var(--muted); margin-top: 20px; }
.note--light { color: rgba(255,255,255,.7); }
.empty { padding: 28px; text-align: center; background: var(--bg-soft); border-radius: var(--radius); color: var(--muted); }

/* Topbar */
.topbar { background: var(--brand-deep); color: #fff; font-size: .8rem; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar__tag { opacity: .85; letter-spacing: .02em; }
.topbar__links { display: flex; align-items: center; gap: 20px; }
.topbar__links > a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; opacity: .92; }
.topbar__links > a:hover { opacity: 1; text-decoration: underline; }
.langs { display: flex; gap: 2px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.langs a { color: #fff; text-decoration: none; font-weight: 700; font-size: .75rem; padding: 3px 7px; border-radius: 5px; opacity: .75; }
.langs a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.langs a.is-on { opacity: 1; background: rgba(255,255,255,.2); }

/* Header */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); }
.header__in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 11px; border-radius: 8px; position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav .nav__cta { background: var(--brand); color: #fff; margin-left: 8px; padding: 10px 18px; }
.nav .nav__cta::after { display: none; }
.nav .nav__cta:hover { background: var(--brand-dark); }
.nav__langs { display: none; }
.nav__dd { position: relative; display: flex; }
.nav__dd > .nav__ddlink::before { content: ""; }
.nav__sub { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 6px; display: none; flex-direction: column; z-index: 50; }
.nav__dd:hover .nav__sub, .nav__dd:focus-within .nav__sub { display: flex; }
.nav__sub a { padding: 10px 12px; border-radius: 8px; }
.nav__sub a::after { display: none; }
.nav__sub a:hover { background: var(--brand-tint); }
.ptabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 22px; }
.ptabs a { padding: 10px 16px; font-weight: 700; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ptabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.agroup { margin-bottom: 34px; }
.agroup__h { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.is-locked { overflow: hidden; }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); }
.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { background: var(--brand-tint); }
.btn--outline-light { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--sm { min-height: 42px; padding: 8px 18px; font-size: .9rem; }

/* Spirale decorativa */
.sp { fill: none; stroke: currentColor; stroke-width: 18; stroke-linecap: round; stroke-dasharray: 3200; stroke-dashoffset: 3200; animation: draw 3.2s .2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Hero home */
.hero { position: relative; color: #fff; background: radial-gradient(120% 140% at 85% 0%, #C2183F 0%, var(--brand) 35%, var(--brand-dark) 70%, var(--brand-deep) 100%); overflow: hidden; }
.hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(24px, 4vw, 56px); padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(88px, 10vw, 140px); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-left: 3px solid #fff; padding-left: 12px; margin-bottom: 20px; opacity: .92; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.3rem + 4vw, 4.3rem); line-height: 1.06; margin-bottom: .4em; }
.hero__lead { font-family: var(--serif); font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); opacity: .92; max-width: 34em; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: end; }
.hero__spiral { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,.14); }
.hero__omino { position: absolute; left: 50%; top: 50%; width: 76%; transform: translate(-50%, -50%); filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 10px)); } }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: #fff; clip-path: ellipse(70% 100% at 50% 100%); }

/* Accessi rapidi */
.quick { position: relative; z-index: 2; margin-top: -70px; }
.quick__in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quick__item { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 24px 56px 24px 24px; text-decoration: none; color: var(--ink); border-top: 4px solid var(--brand); transition: transform .2s; }
.quick__item:hover { transform: translateY(-3px); }
.quick__n { font-family: var(--serif); color: var(--brand); font-weight: 700; }
.quick__item b { font-family: var(--serif); font-size: 1.2rem; }
.quick__item span:not(.quick__n) { color: var(--muted); font-size: .93rem; }
.quick__item > svg { position: absolute; right: 22px; top: 26px; width: 22px; height: 22px; color: var(--brand); }

/* Hero pagine interne */
.phero { position: relative; color: #fff; background: linear-gradient(120deg, var(--brand-deep), var(--brand) 60%, #B81E44); overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 60px); }
.phero h1 { color: #fff; max-width: 22em; position: relative; z-index: 1; margin-bottom: .3em; }
.phero .wrap { position: relative; z-index: 1; }
.phero__lead { max-width: 46em; font-size: 1.1rem; opacity: .92; margin: 0; }
.phero__art { position: absolute; right: -60px; top: 50%; width: 380px; height: 380px; transform: translateY(-50%); color: rgba(255,255,255,.12); }

/* Sezioni */
.section { padding: clamp(52px, 7vw, 96px) 0; }
.section--first { padding-top: clamp(32px, 5vw, 56px); }
.section--tint { background: var(--bg-soft); }
.section--dark { background: var(--dark); color: #EDE8E9; }
.section--dark h2 { color: #fff; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section__head h2 { margin-bottom: 0; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 28px; height: 3px; background: currentColor; border-radius: 2px; }
.kicker--light { color: #fff; }
.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.prose p, .prose li { color: #3E3739; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose h2 { font-size: 1.45rem; margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--bg-soft); }
.prose a:not(.link-btn) { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(160,0,36,.35); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; overflow-wrap: anywhere; }
.prose a:not(.link-btn):hover { color: var(--brand-dark); text-decoration-color: currentColor; }
.prose a[target="_blank"]:not(.link-btn)::after { content: "\2197"; display: inline-block; margin-left: .15em; font-size: .85em; text-decoration: none; }
.prose a.link-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 24px; margin: .3em 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; transition: background .2s; }
.prose a.link-btn:hover { background: var(--brand-dark); }
.prose a.link-btn::after { content: "\2192"; }
.prose a.link-btn[target="_blank"]::after { content: "\2197"; }
.subhead0 { font-size: 1.25rem; }

/* Numeri */
.stats { background: var(--brand); color: #fff; }
.stats__in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 16px; text-align: center; border-left: 1px solid rgba(255,255,255,.2); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.1; }
.stat span { font-size: .85rem; opacity: .92; }

/* Ambiti, servizi, step */
.ambiti { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.amb { background: #fff; border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); border-top: 4px solid var(--brand); }
.amb__n { font-family: var(--serif); font-weight: 700; color: var(--brand); font-size: 1.5rem; display: block; margin-bottom: 8px; }
.amb h3 { font-size: 1.08rem; }
.amb p { font-size: .94rem; color: var(--muted); margin: 0; }
.servs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 24px; }
.serv { background: #fff; border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); border-left: 4px solid var(--brand); scroll-margin-top: calc(var(--header-h) + 20px); }
.serv p { color: var(--muted); margin: 0; font-size: .96rem; }
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 56px 18px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.steps li::before { content: counter(s); position: absolute; top: 16px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.steps strong { display: block; font-family: var(--serif); margin-bottom: 4px; }
.steps span { font-size: .9rem; color: var(--muted); }
.fondi { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fondi li { background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; font-size: .85rem; color: var(--muted); }
.fondi a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.fondi a b { font-size: .95rem; }
.fondi a svg { color: var(--brand); width: 14px; height: 14px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 16px; height: 9px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }

/* Citazione, card */
.quote { position: relative; background: var(--brand-tint); border-radius: var(--radius); padding: 28px; border-left: 4px solid var(--brand); }
.quote img { width: 150px; margin: -12px auto 12px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.45; color: var(--brand); }
.card-feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; border-top: 4px solid var(--brand); margin-top: 20px; }
.card-feature__tag { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.card-feature p { color: var(--muted); margin: 0; }

/* Badge stato */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--off-bg); color: var(--off); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--aperto, .badge--riaperto { background: var(--ok-bg); color: var(--ok); }
.badge--graduatoria { background: var(--info-bg); color: var(--info); }
.badge--sospeso { background: var(--warn-bg); color: var(--warn); }
.badge--pubblicato { background: var(--brand-tint); color: var(--brand); }

/* Enti / testata */
.enti { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; padding: 14px 16px; background: linear-gradient(90deg, #fff, var(--bg-soft)); border-bottom: 3px solid var(--av, var(--brand)); font-size: .78rem; font-weight: 600; color: #3A3A3A; }
.enti span:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--muted); }
.enti--sm { padding: 10px 14px; font-size: .68rem; line-height: 1.35; min-height: 64px; }
.testata { background: #fff; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.testata img { width: 100%; height: auto; max-height: 120px; object-fit: contain; }
.testata--sm { padding: 8px 10px; min-height: 64px; display: flex; align-items: center; }
.testata--sm img { max-height: 48px; }

/* Card bando */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.bcard { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; border: 1px solid var(--line); }
.bcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.bcard[hidden] { display: none; }
.bcard__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bcard__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.bcard__tipo { font-size: .78rem; font-weight: 600; color: var(--muted); }
.bcard__grad { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--info); margin-left: auto; }
.bcard__avviso { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.bcard h3 { font-size: 1.08rem; line-height: 1.3; margin-bottom: 8px; }
.bcard__sum { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.bcard__date { display: flex; align-items: center; gap: 8px; font-size: .86rem; margin: auto 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bcard__date svg { color: var(--brand); }
.bcard__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--brand); }

/* Filtri bandi */
.bfilters { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; background: var(--bg-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.bfilters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sel { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sel select, .sel input { min-height: 42px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--ink); font-size: .92rem; min-width: 190px; }
.sel--q { flex: 1; min-width: 200px; }
.sel--q input { width: 100%; }
.bcount { font-size: .88rem; color: var(--muted); margin: 0 0 16px; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; font-size: .88rem; font-weight: 600; cursor: pointer; min-height: 42px; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Pagina bando */
.bhead { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.bhead .wrap { padding-top: 14px; padding-bottom: 14px; }
.bhead .enti, .bhead .testata { border-radius: 10px; border: 1px solid var(--line); }
.bhead .enti { font-size: .85rem; padding: 18px 20px; border-bottom: 3px solid var(--av, var(--brand)); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); padding-top: 16px; padding-bottom: 0; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink); max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs--top { padding-top: 22px; }
.section--bando { padding-top: 24px; }
.bpage { display: grid; grid-template-columns: 1fr 330px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.bpage__avviso { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.bpage h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.bpage__side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.binfo { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 18px; }
.binfo div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.binfo div:last-child { border-bottom: 0; }
.binfo dt { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.binfo dd { margin: 2px 0 0; font-size: .95rem; }
.bhelp { background: var(--brand-tint); border-radius: var(--radius); padding: 18px; }
.bhelp h2 { font-size: 1.05rem; margin-bottom: 6px; }
.bhelp p { margin: 0 0 6px; font-size: .92rem; }
.bdocs { margin-top: 32px; }
.bdocs h2 { font-size: 1.35rem; }
.dls { display: grid; gap: 10px; }
.dl { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.dl:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.dl__ic { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; }
.dl__ic svg { width: 22px; height: 22px; }
.dl__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl__t b { font-size: .98rem; }
.dl__t small { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
.dl__go { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.dl__go svg { width: 20px; height: 20px; }
[data-fine][hidden] { display: none; }

/* News */
.ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.ncard { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; }
.ncard:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.ncard__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-tint); }
.ncard__img img { width: 100%; height: 100%; object-fit: cover; }
.ncard__img--ph { position: relative; background: linear-gradient(120deg, var(--brand-deep), var(--brand)); }
.ncard__sp { position: absolute; right: -30px; top: -20px; width: 220px; height: 220px; color: rgba(255,255,255,.18); }
.ncard__sp .sp { animation: none; stroke-dashoffset: 0; }
.ncard__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.ncard time, .ndate { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ncard h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.ncard p { color: var(--muted); font-size: .92rem; }
.ncard__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand); font-size: .9rem; }
.nimg { margin: 0 0 24px; }
.nimg img { border-radius: var(--radius); }

/* Progetti */
.plogos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.plogo { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.plogo:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c); }
.plogo img { max-height: 92px; width: auto; max-width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.pcard { --c: var(--brand); display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: left; border: 0; padding: 0; cursor: pointer; color: inherit; transition: transform .25s, box-shadow .25s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pcard[hidden] { display: none; }
.pcard__logo { position: relative; height: 160px; display: grid; place-items: center; background: #F7F5F5; border-bottom: 4px solid var(--c); }
.pcard__logo img { max-height: 112px; max-width: 70%; width: auto; }
.pcard__badge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 999px; }
.pcard__body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.pcard__meta { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.pcard__h { font-family: var(--serif); font-weight: 700; font-size: 1.04rem; line-height: 1.3; margin-bottom: 10px; }
.pcard__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: auto 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pcard__nums span { font-size: .7rem; color: var(--muted); line-height: 1.3; }
.pcard__nums b { display: block; font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.pcard__more { font-weight: 700; font-size: .9rem; color: var(--c); display: inline-flex; align-items: center; gap: 6px; }

/* Video */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.vcard { margin: 0; }
.vcard--main { grid-column: 1 / -1; }
.vcard--main .yt { aspect-ratio: 21 / 9; }
.vcard figcaption { margin-top: 10px; font-size: .95rem; color: #fff; font-weight: 600; }
.vcard figcaption small { display: block; font-weight: 400; color: rgba(255,255,255,.7); font-size: .82rem; }
.yt { --c: var(--brand); position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--c); color: #fff; }
.yt::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 20% 10%, rgba(255,255,255,.4), rgba(255,255,255,0) 55%, rgba(0,0,0,.3)); }
.yt__logo { position: absolute; inset: 14% 30%; display: grid; place-items: center; }
.yt__logo img { max-height: 100%; width: auto; background: rgba(255,255,255,.94); border-radius: 18px; padding: 8%; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.yt--hero { background: var(--sky); }
.yt--hero::before { display: none; }
.yt--hero .yt__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.yt__play { position: absolute; right: 14px; bottom: 12px; width: 52px; height: 52px; border-radius: 50%; background: rgba(160,0,36,.94); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .2s; }
.yt--hero .yt__play { left: 50%; top: 50%; right: auto; bottom: auto; width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.yt__play svg { width: 24px; height: 24px; margin-left: 3px; }
.yt--hero .yt__play svg { width: 34px; height: 34px; }
.yt:hover .yt__play { transform: scale(1.08); }
.yt__label { position: absolute; left: 12px; bottom: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 6px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Documenti e visualizzatore PDF */
.doctabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0 18px; }
.doctab { display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 10px; cursor: pointer; color: var(--ink); min-height: 72px; }
.doctab:hover { border-color: var(--brand-soft); }
.doctab[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.doctab img { width: 52px; height: 64px; object-fit: cover; object-position: top; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.doctab b { display: block; font-family: var(--serif); font-size: 1rem; line-height: 1.25; }
.doctab small { color: var(--muted); font-size: .8rem; }
.docs { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 16px; font-size: .92rem; color: var(--muted); }
.docs a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pv { display: flex; flex-direction: column; background: #3A3436; border-radius: var(--radius); overflow: hidden; position: relative; }
.pv--inline { height: min(78vh, 860px); min-height: 440px; box-shadow: var(--shadow); }
.pv--full { height: 100%; width: 100%; border-radius: 0; }
.pv__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; background: #2A2426; color: #fff; min-height: 56px; }
.pv__title { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pv__ctrl { display: flex; align-items: center; gap: 2px; flex: none; }
.pv__ctrl button, .pv__ctrl a { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.pv__ctrl button:hover, .pv__ctrl a:hover { background: rgba(255,255,255,.12); }
.pv__ctrl button:disabled { opacity: .35; cursor: default; background: transparent; }
.pv__ctrl svg { width: 22px; height: 22px; }
.pv__page { font-variant-numeric: tabular-nums; font-size: .88rem; padding: 0 4px; min-width: 56px; text-align: center; }
.pv__sep { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 6px; }
.pv__close { background: rgba(255,255,255,.12) !important; margin-left: 6px; }
.pv__scroll { position: relative; flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 0 24px; outline: none; }
.pv__page-el { position: relative; margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.pv__page-el canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv__status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; text-align: center; font-size: .95rem; pointer-events: none; padding: 16px; }
.pv__status:empty { display: none; }
.pv__status a { color: #fff; pointer-events: auto; }
.pv__spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; margin: 0 auto 12px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Lavora con noi, contatti */
.boxlinks { display: grid; gap: 12px; }
.boxlink { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; background: #fff; border: 1.5px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.1rem; box-shadow: var(--shadow); }
.boxlink:hover { border-color: var(--brand); }
.boxlink svg { color: var(--brand); width: 22px; height: 22px; }
.sedi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sede { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; border-top: 4px solid var(--brand); }
.sede h2 { font-size: 1.5rem; margin-bottom: 2px; }
.sede h3 { font-size: 1rem; margin-top: 18px; }
.sede__tipo { font-size: .82rem; color: var(--muted); }
.sede p { display: flex; gap: 12px; align-items: flex-start; }
.sede p > svg { color: var(--brand); width: 20px; height: 20px; margin-top: 4px; }
.sede p span { overflow-wrap: anywhere; }

/* CTA */
.ctaband { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; padding: clamp(48px, 6vw, 80px) 0; }
.ctaband__in { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ctaband h2 { color: #fff; margin: 0; max-width: 18em; }
.ctaband__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.ctaband__art { position: absolute; left: -80px; top: -60px; width: 360px; height: 360px; color: rgba(255,255,255,.1); }

/* Footer */
.footer { background: var(--dark); color: rgba(255,255,255,.78); font-size: .88rem; padding-top: 48px; }
.footer__grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 32px; }
.footer__brand img { height: 52px; width: auto; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 14px; }
.footer__h { font-family: var(--sans); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.footer a { color: #fff; }
.footer p { margin: 0 0 14px; }
.footer__links { display: flex; flex-direction: column; gap: 4px; }
.footer__accred { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.footer__accred .accred__scroll { background: #F9F9F9; border-radius: 10px; padding: 10px; overflow-x: auto; }
.footer__accred img { margin: 0 auto; width: 100%; max-width: 1000px; }
.footer__bottom { margin-top: 26px; background: rgba(0,0,0,.25); padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); font-size: .8rem; }
.footer__bottom-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Dialog */
.modal { border: 0; padding: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; margin: 0; overflow: hidden; }
.modal::backdrop { background: rgba(20,15,17,.72); }
.modal[open] { display: flex; align-items: center; justify-content: center; }
.modal__box { position: relative; background: #fff; width: min(980px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; overscroll-behavior: contain; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: pop .25s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.06); font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.pm { --c: var(--brand); --c-tint: var(--brand-tint); }
.pm__head { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; padding: 36px 40px 30px; background: var(--c-tint); border-bottom: 4px solid var(--c); }
.pm__head img { width: 150px; }
.pm__avviso { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.pm__head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); color: var(--c); margin-bottom: 4px; }
.pm__esteso { font-family: var(--serif); color: var(--muted); margin-bottom: 10px; }
.pm__claim { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin: 0; }
.pm__body { padding: 30px 40px 36px; }
.pm__nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 26px; }
.pm__nums div { background: var(--bg-soft); border-radius: 10px; padding: 12px; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.pm__nums b { display: block; font-family: var(--serif); color: var(--c); font-size: 1.5rem; }
.pm__sec { display: grid; grid-template-columns: 190px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.pm__sec h3 { font-size: 1rem; color: var(--c); margin: 0; }
.pm__sec h3 span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-size: .8rem; margin-right: 8px; font-family: var(--sans); }
.pm__sec p { margin: 0; color: #3E3739; }
.pm__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pm__tags li { background: var(--c-tint); border-radius: 8px; padding: 6px 12px; font-size: .88rem; }
.pm__video { margin: 0 0 24px; }
.pm__method { margin-top: 24px; padding: 22px; background: var(--bg-soft); border-radius: var(--radius); }
.pm__method h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pm__method > p { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.pm__method ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: m; }
.pm__method li { counter-increment: m; background: #fff; border-radius: 10px; padding: 12px 12px 12px 46px; position: relative; font-size: .86rem; line-height: 1.35; color: var(--muted); }
.pm__method li::before { content: counter(m); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.pm__method li b { display: block; color: var(--ink); font-size: .88rem; margin-bottom: 2px; }
.pm__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pm__actions .btn--primary { background: var(--c); }
.pm__actions .btn--ghost { color: var(--c); border-color: var(--c); }
.modal--pdf .pv { width: 100%; height: 100%; }

/* Responsive */
@media (max-width: 1140px) {
  .nav a { padding: 10px 8px; font-size: .86rem; }
  .ambiti { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .plogos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .brand img { height: 42px; }
  .burger { display: block; }
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 12px var(--gutter) 32px; transform: translateY(-10px); opacity: 0; visibility: hidden; transition: transform .2s, opacity .2s, visibility .2s; overflow-y: auto; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 1.15rem; padding: 15px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a::after { display: none; }
  .nav .nav__cta { margin: 20px 0 0; text-align: center; border-radius: 999px; border: 0; }
  .nav__langs { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
  .nav__dd { flex-direction: column; }
  .nav__dd > .nav__ddlink::after { display: none; }
  .nav__sub a:first-child { display: none; }
  .nav__sub { position: static; display: flex; border: 0; box-shadow: none; padding: 0; min-width: 0; border-radius: 0; }
  .nav__sub a { padding: 15px 4px; border-radius: 0; }
  .nav__sub a { padding-left: 22px; font-size: 1.02rem; }
  .nav__langs a { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 16px; font-size: .95rem; }
  .nav__langs a.is-on { border-color: var(--brand); color: var(--brand); }
  .topbar__tag { display: none; }
  .topbar__in { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .bpage { grid-template-columns: 1fr; }
  .bpage__side { position: static; }
  .sedi { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .pm__method ol { grid-template-columns: 1fr 1fr; }
  .vcard--main .yt { aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar__links { gap: 14px; }
  .topbar__links > a:nth-child(2) { display: none; }
  .hero__in { grid-template-columns: 1fr; padding-bottom: 96px; }
  .hero__art { order: -1; max-width: 230px; justify-self: center; }
  .hero__cta .btn { flex: 1 1 auto; }
  .quick { margin-top: -56px; }
  .quick__in { grid-template-columns: 1fr; gap: 12px; }
  .stats__in { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.2); }
  .ambiti, .steps, .fondi { grid-template-columns: 1fr; }
  .steps li { padding: 18px 18px 18px 64px; }
  .steps li::before { top: 18px; }
  .plogos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bgrid, .ngrid, .pgrid, .servs { grid-template-columns: 1fr; }
  .bfilters { padding: 14px; }
  .sel, .sel select, .sel input { width: 100%; min-width: 0; }
  .videos { grid-template-columns: 1fr; }
  .doctabs { grid-template-columns: 1fr; gap: 8px; }
  .pv--inline { height: 72vh; min-height: 380px; }
  .pv__title { display: none; }
  .pv__bar { justify-content: center; padding: 6px; }
  .pv__ctrl button, .pv__ctrl a { width: 40px; }
  .sedi { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__accred img { width: 760px; max-width: none; }
  .phero__art { width: 240px; height: 240px; right: -90px; }
  .modal__box { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .pm__head { grid-template-columns: 1fr; padding: 56px 20px 22px; gap: 14px; }
  .pm__head img { width: 110px; }
  .pm__body { padding: 22px 20px 32px; }
  .pm__nums { grid-template-columns: repeat(3, 1fr); }
  .pm__sec { grid-template-columns: 1fr; gap: 8px; }
  .pm__method ol { grid-template-columns: 1fr; }
  .pm__actions .btn { flex: 1 1 100%; }
  .crumbs span[aria-current] { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sp { stroke-dashoffset: 0; }
}
@media print {
  .topbar, .header, .footer, .bhelp, .hero__art, .phero__art, .btn { display: none !important; }
  .phero { background: none; color: #000; } .phero h1 { color: #000; }
}
