/* Termotecnica B&B — foglio di stile unico del sito */

/* Caratteri del brand book: Exo per i titoli; per il testo Barlow, alternativa libera al DIN */
@font-face {
  font-family: "Exo";
  src: url("../fonts/exo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Colori istituzionali dal brand book: blu Pantone 2955 C, azzurri 292 C e 290 C, grigio Cool Gray 11 C */
:root {
  --navy-900: #0f2843;       /* blu istituzionale scurito, per il piè di pagina */
  --navy-800: #17395e;       /* blu istituzionale */
  --navy-700: #1f4a77;
  --brand: #6cb3e1;          /* azzurro */
  --brand-200: #bbd8e8;      /* azzurro chiaro */
  --brand-50: #eef6fb;
  --accent: #1d6aa5;         /* link su fondo chiaro */
  --accent-dark: #17395e;
  --ink: #17395e;            /* titoli */
  --text: #56565a;           /* grigio istituzionale per il testo */
  --muted: #6b6b70;
  --line: #dfe5eb;
  --surface: #f4f7fa;
  --white: #fff;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Exo", "Barlow", system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  --header-h: 80px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) {
  body { font-size: 1.125rem; }
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dark); }

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

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

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--navy-800); color: var(--white); padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(56px, 7vw, 96px) 0; }
.section--surface { background: var(--surface); }
.section--tight { padding-top: clamp(40px, 5vw, 64px); }

.eyebrow {
  font-family: var(--font-head);
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head p { color: var(--muted); }

.lead { font-size: 1.125rem; color: var(--muted); max-width: 680px; }
@media (min-width: 900px) { .lead { font-size: 1.25rem; } }

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-900); color: var(--white); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: var(--white); color: var(--navy-800); }
.btn--light:hover { background: var(--brand-50); color: var(--navy-800); }
.btn--outline-light { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn--outline-light:hover { border-color: var(--white); color: var(--white); }
.btn svg { width: 1em; height: 1em; flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* ---------- Intestazione ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(8px); }
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 24px;
}

.brand { display: block; flex: none; }
.brand img { width: 254px; height: auto; }   /* brand book: logo orizzontale almeno 250 px */
@media (max-width: 480px) { .brand img { width: 250px; } }
/* schermi molto stretti: si riducono i margini, non il logo (minimo 250 px da brand book) */
@media (max-width: 340px) { .site-header .wrap { gap: 8px; padding-left: 12px; padding-right: 12px; } }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -8px;
  background: none; border: 0; border-radius: 8px; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 500;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

@media (max-width: 819px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(14,34,54,.08);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .js .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
  .js .site-nav li:last-child a { border-bottom: 0; }
  .js .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
  /* senza JavaScript il menu resta visibile e va a capo */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative; overflow: hidden;
  background-color: var(--navy-800);
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  color: #c9d6e2;
}
.hero::after {               /* sfuma la griglia verso sinistra, dove sta il testo */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy-800) 0%, rgba(23,57,94,.85) 45%, rgba(23,57,94,.2) 100%);
  pointer-events: none;
}
.hero > .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center;
  padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(56px, 8vw, 96px);
}
.hero__inner { max-width: 760px; }
.hero .eyebrow { color: var(--brand); }
.hero h1 { color: var(--white); font-weight: 600; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.125rem); margin-bottom: 0; }
.hero .actions { margin-top: 2.5rem; }

.hero__mark { display: block; width: clamp(200px, 22vw, 290px); opacity: .92; }
.hero__mark img { width: 100%; height: auto; }
@media (max-width: 899px) {
  .hero > .wrap { grid-template-columns: 1fr; }
  .hero__mark { display: none; }
}

.facts {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(15,40,67,.6);
}
.facts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.facts li { padding: 22px 0 22px 24px; border-left: 1px solid rgba(255,255,255,.1); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { font-family: var(--font-head); display: block; color: var(--white); font-size: 1.375rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.facts span { font-size: .875rem; color: #9fb3c6; }
@media (max-width: 819px) {
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li { padding: 18px 0 18px 18px; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.1); }
}

/* ---------- Servizi ---------- */

.services {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.service {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--white);
}
.service__num {
  font-family: var(--font-head); display: block; font-size: .8125rem; font-weight: 600; letter-spacing: .08em;
  color: var(--brand); margin-bottom: 18px; font-variant-numeric: tabular-nums;
}
.service h3 { font-size: 1.1875rem; margin-bottom: .5em; }
.service p { color: var(--muted); font-size: .96875rem; }
@media (max-width: 999px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) {
  .services { grid-template-columns: 1fr; }
  .service { padding: 26px 22px 28px; }
}

/* ---------- Due colonne generiche ---------- */

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; }
.split--media { grid-template-columns: minmax(0, 380px) 1fr; align-items: center; }
@media (max-width: 899px) { .split, .split--even, .split--media { grid-template-columns: 1fr; } }

/* ---------- Soci ---------- */

.partners { display: grid; gap: 16px; }
.partners__label {
  margin: 8px 0 -4px; font-size: .8125rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.partner {
  padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white);
}
.partner h3 { margin-bottom: .35em; }
.partner p { font-size: .9375rem; color: var(--muted); }

/* ---------- Linea del tempo ---------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--brand-200);
}
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--brand);
}
.timeline time { font-family: var(--font-head); display: block; font-size: 1.25rem; font-weight: 650; color: var(--ink); line-height: 1.3; font-variant-numeric: tabular-nums; }
.timeline p { color: var(--muted); font-size: .9375rem; }

/* ---------- Elenchi ---------- */

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 40px; grid-template-columns: 1fr 1fr; }
.checklist li { position: relative; padding: 14px 0 14px 32px; border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 1.15em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
@media (max-width: 799px) { .checklist { grid-template-columns: 1fr; } }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--brand-200); color: var(--navy-700);
  font-size: .9375rem; font-weight: 500;
}

.plain-list { margin: 0 0 1em; padding-left: 1.2em; }
.plain-list li { margin-bottom: .4em; }

.cert-figure {
  margin: 0; padding: clamp(20px, 3vw, 36px); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.cert-figure img { margin: 0 auto; width: 100%; max-width: 320px; }

.note-box {
  border-left: 3px solid var(--brand); background: var(--white); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
}
.note-box p { margin: 0; }
.note-box p + p { margin-top: .5em; }

/* ---------- Intestazione delle pagine interne ---------- */

.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { margin-bottom: 0; }

.breadcrumb { margin-bottom: 1.25rem; font-size: .875rem; color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #9aa7b3; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Team ---------- */

.team-group + .team-group { margin-top: clamp(48px, 6vw, 72px); }
.team-group > h2 { font-size: 1.25rem; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }

.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 999px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .team { grid-template-columns: 1fr; gap: 16px; } }

.member {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.member__photo {
  width: 112px; height: 112px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--brand-50); box-shadow: 0 0 0 4px var(--brand-50);
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__initials {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--font-head); font-size: 2rem; font-weight: 600; letter-spacing: .02em; color: var(--accent);
}
.member h3 { font-size: 1.1875rem; margin-bottom: .4em; }
.member .member__role {
  margin: -.2em 0 .6em; font-size: .8125rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.member p { font-size: .9375rem; color: var(--muted); }
@media (max-width: 599px) {
  .member { flex-direction: row; align-items: flex-start; padding: 20px; gap: 16px; }
  .member__photo { width: 72px; height: 72px; box-shadow: 0 0 0 3px var(--brand-50); }
  .member__initials { font-size: 1.375rem; }
}

/* ---------- Referenze ---------- */

.refs { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 899px) { .refs { grid-template-columns: 1fr; } }

.refs-aside { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 899px) { .refs-aside { position: static; } }

.search-field { position: relative; margin-bottom: 24px; }
.search-field label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.search-field input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 11px 14px 11px 40px; border: 1px solid #c9d3dc; border-radius: 8px; background: var(--white);
}
.search-field input:focus { outline: 3px solid var(--brand-200); border-color: var(--accent); }
.search-field svg { position: absolute; left: 13px; bottom: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
html:not(.js) .search-field { display: none; }

.cat-nav ul { list-style: none; margin: 0; padding: 0; }
.cat-nav a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .9375rem;
}
.cat-nav a:hover { background: var(--surface); color: var(--ink); }
.cat-nav .count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .875rem; }
.cat-nav li.is-empty a { opacity: .4; }
@media (max-width: 899px) {
  .cat-nav ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .cat-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .875rem; }
}

.ref-cat + .ref-cat { margin-top: 48px; }
.ref-cat h2 { font-size: 1.375rem; display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.ref-cat h2 .count { font-size: .875rem; font-weight: 500; color: var(--muted); }

.ref-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ref-table th {
  text-align: left; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 0 16px 10px 0; border-bottom: 2px solid var(--ink);
}
.ref-table td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table td:first-child { color: var(--ink); font-weight: 500; width: 55%; }
.ref-table td:last-child { color: var(--muted); }
.ref-table tr[hidden] { display: none; }
@media (max-width: 599px) {
  .ref-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ref-table, .ref-table tbody, .ref-table tr, .ref-table td { display: block; width: 100%; }
  .ref-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ref-table td { padding: 0; border: 0; }
  .ref-table td:first-child { width: 100%; }
  .ref-table td:last-child { font-size: .875rem; }
}

.no-results { padding: 24px; border: 1px dashed #c9d3dc; border-radius: var(--radius); color: var(--muted); }

/* ---------- Contatti ---------- */

.contact-card { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.contact-card h2 { font-size: 1.5rem; margin-bottom: .2em; }
.contact-card .sub { color: var(--muted); margin-bottom: 1.5rem; }

.contact-list { margin: 0; display: grid; gap: 0; }
.contact-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list dt { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: .2em; }
.contact-list dd { margin: 0; color: var(--ink); }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
@media (max-width: 479px) { .contact-list > div { grid-template-columns: 1fr; gap: 2px; } }

.map {
  position: relative; margin-top: clamp(40px, 5vw, 64px);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16 / 7; min-height: 320px; background: var(--surface);
}
.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: 24px;
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.map__placeholder > div { background: var(--white); padding: 24px 28px; border-radius: var(--radius); box-shadow: 0 8px 28px rgba(14,34,54,.1); max-width: 440px; }
.map__placeholder p { font-size: .875rem; color: var(--muted); margin: .75rem 0 1.1rem; }
.map__placeholder .actions { margin-top: 0; justify-content: center; }
@media (max-width: 599px) { .map { aspect-ratio: auto; height: 420px; } }

/* ---------- Fascia contatti ---------- */

.cta { background: var(--navy-800); color: #c9d6e2; }
.cta .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding-top: clamp(48px, 6vw, 72px); padding-bottom: clamp(48px, 6vw, 72px); }
.cta h2 { color: var(--white); margin-bottom: .35em; }
.cta p { margin: 0; }
.cta a:not(.btn) { color: var(--white); }
.cta .actions { margin-top: 0; }
@media (max-width: 799px) { .cta .wrap { grid-template-columns: 1fr; } }

/* ---------- Piè di pagina ---------- */

.site-footer { background: var(--navy-900); color: #9fb3c6; font-size: .9375rem; }
.site-footer a { color: #d5e1ec; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-main h2 { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem; }
.footer-main ul { list-style: none; margin: 0; padding: 0; }
.footer-main li { margin-bottom: .45em; }
.footer-main address { font-style: normal; }
.footer-logo { width: 260px; margin-bottom: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 24px; font-size: .8125rem; }
@media (max-width: 799px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 479px) { .footer-main { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Pagina 404 ---------- */

.notfound { min-height: 50vh; display: grid; align-content: center; }

/* ---------- Stampa ---------- */

@media print {
  .site-header, .nav-toggle, .cta, .map, .search-field, .cat-nav, .skip-link { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .section { padding: 16pt 0; }
  .page-head { background: none; border: 0; padding: 0 0 12pt; }
  .refs { display: block; }
  a { color: #000; text-decoration: none; }
}

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

/* ---------- Aggiunte: icone dei servizi, rimando referenze, testi legali ---------- */

.service__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.service__top .service__num { margin-bottom: 0; }
.service__icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px;
  background: var(--brand-50); color: var(--accent);
}
.service__icon svg { width: 30px; height: 30px; }

.ref-teaser ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ref-teaser a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 500;
}
.ref-teaser a:hover { color: var(--accent); background: var(--surface); }
.ref-teaser .count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* griglia tecnica appena accennata nelle pagine interne, come nell'hero */
.page-head {
  background-image:
    linear-gradient(90deg, var(--surface) 30%, rgba(244,247,250,.6) 100%),
    linear-gradient(rgba(14,34,54,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,34,54,.05) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  background-position: 0 0, -1px -1px, -1px -1px;
}

.back-to-cats { display: none; margin-top: 14px; font-size: .875rem; font-weight: 500; text-decoration: none; }
@media (max-width: 899px) { .back-to-cats { display: inline-block; } }

.prose { max-width: 780px; }
.prose h2 { font-size: 1.375rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.0625rem; margin-top: 1.6em; margin-bottom: .4em; }
.prose .updated { margin-top: 2.5em; font-size: .875rem; color: var(--muted); }

.footer-bottom .legal, .footer-bottom .legal-links { margin: 0; line-height: 1.6; }
.footer-bottom .legal-links { align-self: flex-end; }
