/* ==========================================================================
   FSE Italia — implementazione del design system "Coral Stay"
   (fseitalia-DESIGN.md). Sfondi neutri e luminosi, accento corallo solo per
   le CTA, forme arrotondate, ombre morbide, fotografia protagonista.
   Versione precedente (BistroMenu): css/site-bistromenu.css
   ========================================================================== */

:root {
  /* Colori */
  --primary: #BF303C;
  --primary-hover: #E04E52;
  --secondary: #00A699;
  --neutral: #767676;
  --bg: #FFFFFF;
  --surface: #F7F7F7;
  --text: #222222;
  --text-secondary: #717171;
  --border: #DDDDDD;
  --success: #008A05;
  --warning: #E07912;
  --error: #C13515;

  /* Tipografia */
  --font-head: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  /* Spaziatura (base 8px) */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px;
  --s32: 32px; --s40: 40px; --s48: 48px; --s64: 64px; --s80: 80px;

  /* Raggi */
  --r4: 4px; --r8: 8px; --r12: 12px; --r16: 16px; --rfull: 9999px;

  /* Elevazione */
  --e1: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .05);
  --e2: 0 2px 4px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .12);
  --e3: 0 6px 20px rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .16);

  --nav-h: 80px;
  --container: 1280px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--s16)); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); margin: 0; }
h1 { font-size: 48px; line-height: 56px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
h3 { font-size: 22px; line-height: 28px; font-weight: 700; }
h4 { font-size: 18px; line-height: 24px; font-weight: 700; }
p { margin: 0 0 var(--s16); }
small, .small { font-size: 12px; line-height: 16px; }
.mono { font-family: var(--font-mono); font-size: 14px; line-height: 20px; }

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

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (min-width: 992px) { .container { padding: 0 40px; } }
@media (max-width: 575px) { .container { padding: 0 16px; } }

/* --------------------------------------------------------------------------
   Navigazione
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: var(--e1); border-bottom-color: transparent; }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand {
  display: flex; align-items: center; gap: var(--s12);
  font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -.01em;
  color: var(--primary); text-decoration: none;
}
.brand img { width: 40px; height: auto; }
.brand:hover { color: var(--primary); text-decoration: none; }

.nav-links {
  display: flex; align-items: center; gap: var(--s4); list-style: none; margin: 0; padding: 4px;
  border: 1px solid var(--border); border-radius: var(--rfull); box-shadow: var(--e1);
}
.nav-links a {
  display: block; padding: 10px 16px; border-radius: var(--rfull);
  font-size: 14px; line-height: 20px; font-weight: 600;
  color: var(--text); text-decoration: none;
  transition: background .15s ease;
}
.nav-links a:hover { background: var(--surface); }
.nav-links a.active { background: var(--text); color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: var(--s8);
  height: 48px; padding: 0 16px 0 20px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--rfull); box-shadow: var(--e1);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 1099px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: calc(var(--nav-h) - 8px); right: 16px; left: auto;
    width: min(320px, calc(100vw - 32px));
    flex-direction: column; align-items: stretch; gap: 0; padding: var(--s8) 0;
    background: var(--bg); border-radius: var(--r16); box-shadow: var(--e2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-radius: 0; font-size: 15px; }
  .nav-links a.active { background: var(--surface); color: var(--text); box-shadow: inset 3px 0 0 var(--primary); }
}

/* --------------------------------------------------------------------------
   Bottoni
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 24px;
  border-radius: var(--r8); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--surface); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 16px 32px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Chip
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s8);
  padding: 4px 12px; border-radius: var(--rfull);
  font-family: var(--font-body); font-size: 12px; line-height: 16px; font-weight: 600;
  white-space: nowrap; border: 1px solid var(--border); background: transparent; color: var(--text);
}
.chip svg { width: 14px; height: 14px; }
.chip-filter { background: var(--bg); }
.chip-featured { background: var(--text); color: #fff; border-color: var(--text); }
.chip-available { background: #E6F4E6; color: var(--success); border-color: transparent; }
.chip-limited { background: #FDF0E3; color: var(--warning); border-color: transparent; }
.chip.mono { font-family: var(--font-body); }

/* --------------------------------------------------------------------------
   Sezioni
   -------------------------------------------------------------------------- */
.section { padding: var(--s80) 0; }
.section-surface { background: var(--surface); }

.section-head { max-width: 720px; margin: 0 0 var(--s40); }
.eyebrow {
  display: inline-block; margin-bottom: var(--s8);
  font-family: var(--font-body); font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase; color: var(--secondary);
}
.section-head h2 { margin-bottom: var(--s8); }
.section-head .lead { color: var(--text-secondary); font-size: 18px; line-height: 28px; margin: 0; }
.rule { display: none; }

@media (max-width: 767px) {
  .section { padding: var(--s48) 0; }
  .section-head { margin-bottom: var(--s32); }
  h1 { font-size: 34px; line-height: 42px; }
  h2 { font-size: 26px; line-height: 34px; }
}

/* --------------------------------------------------------------------------
   Hero / carosello
   -------------------------------------------------------------------------- */
.hero { padding: calc(var(--nav-h) + var(--s24)) 0 0; }
.carousel {
  position: relative; height: min(72vh, 640px); min-height: 440px; overflow: hidden;
  max-width: calc(var(--container) - 80px); margin: 0 auto;
  border-radius: var(--r16); background: var(--text);
}
@media (max-width: 1279px) { .carousel { margin: 0 40px; } }
@media (max-width: 991px) { .carousel { margin: 0 24px; } }
@media (max-width: 575px) { .carousel { margin: 0 16px; } }

.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .9s ease;
}
.slide.active { opacity: 1; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 55%);
}
.slide-caption { position: absolute; z-index: 1; left: 0; right: 0; bottom: var(--s48); }
.slide-caption .container { padding: 0 var(--s40); }
.slide-card {
  max-width: 480px; padding: var(--s24) var(--s32);
  background: var(--bg); border-radius: var(--r16); box-shadow: var(--e3);
}
.slide-card .eyebrow { margin-bottom: var(--s4); }
.slide-card h1, .slide-card h2 { font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: -.01em; margin-bottom: var(--s8); }
.slide-card p { margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 24px; }

.carousel-ctrl {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95); color: var(--text);
  border: 0; border-radius: var(--rfull); box-shadow: var(--e1); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.carousel-ctrl:hover { box-shadow: var(--e2); transform: translateY(-50%) scale(1.06); }
.carousel-ctrl svg { width: 18px; height: 18px; }
.carousel-ctrl.prev { left: var(--s24); }
.carousel-ctrl.next { right: var(--s24); }

.carousel-dots {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--s16);
  display: flex; justify-content: center; gap: 6px;
}
.carousel-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--rfull);
  background: rgba(255, 255, 255, .6); cursor: pointer; transition: width .2s ease;
}
.carousel-dots button[aria-current="true"] { background: #fff; width: 22px; }

@media (max-width: 767px) {
  .carousel { height: 68vh; min-height: 460px; }
  .slide-caption { bottom: var(--s48); }
  .slide-caption .container { padding: 0 var(--s16); }
  .slide-card { padding: var(--s16) var(--s24); }
  .slide-card h1, .slide-card h2 { font-size: 26px; line-height: 32px; }
  .carousel-ctrl { top: var(--s16); transform: none; width: 36px; height: 36px; }
  .carousel-ctrl:hover { transform: none; }
  .carousel-ctrl.prev { left: auto; right: 60px; }
  .carousel-ctrl.next { right: 16px; }
}

/* --------------------------------------------------------------------------
   Chi siamo
   -------------------------------------------------------------------------- */
.about-intro {
  max-width: 820px; margin: 0 0 var(--s48);
  font-size: 18px; line-height: 30px; color: var(--text);
}
.about-intro p + p { color: var(--text-secondary); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s24);
  margin: 0 0 var(--s64);
}
.stat {
  padding: var(--s24); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r12); box-shadow: var(--e1);
}
.stat .num { display: block; font-family: var(--font-head); font-size: 40px; line-height: 48px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.stat .lbl { display: block; margin-top: var(--s4); font-size: 14px; line-height: 20px; color: var(--text-secondary); }
@media (max-width: 767px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--s12); }
  .stat { padding: var(--s16); }
  .stat .num { font-size: 30px; line-height: 38px; }
}

/* Timeline: righe orizzontali con miniatura */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 960px; }
.tl-item {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s24);
  align-items: start; padding: var(--s24) 0;
  border-top: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: 1px solid var(--border); }
.tl-when {
  grid-column: 2; grid-row: 1;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--secondary);
}
.tl-img { grid-column: 1; grid-row: 1 / span 2; width: 120px; height: 120px; border-radius: var(--r12); overflow: hidden; background: var(--surface); }
.tl-img img { width: 100%; height: 100%; object-fit: cover; }
.tl-body { grid-column: 2; min-width: 0; }
.tl-body h3 { font-size: 20px; line-height: 28px; margin-bottom: var(--s8); }
.tl-body p { color: var(--text-secondary); margin: 0; font-size: 15px; }
.tl-body .chips { display: flex; flex-wrap: wrap; gap: var(--s8); margin-top: var(--s12); }
.tl-body .chip { white-space: normal; }
@media (max-width: 575px) {
  .tl-item { grid-template-columns: 72px 1fr; gap: var(--s4) var(--s16); }
  .tl-img { width: 72px; height: 72px; grid-row: 1 / span 1; }
  .tl-body { grid-column: 1 / -1; }
}

/* Card */
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r12); padding: var(--s24); box-shadow: var(--e1);
}
.card-featured { border-color: transparent; box-shadow: var(--e2); }

.brochure {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s24);
  max-width: 960px; margin: var(--s48) 0 0; padding: var(--s32);
  border-radius: var(--r16);
}
.brochure h3 { margin-bottom: var(--s4); }
.brochure p { margin: 0; color: var(--text-secondary); }
@media (max-width: 767px) { .brochure { flex-direction: column; align-items: flex-start; padding: var(--s24); } }

/* --------------------------------------------------------------------------
   Soci
   -------------------------------------------------------------------------- */
.soci { list-style: none; margin: 0; padding: 0; }
.socio {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s8);
  padding: 0 0 var(--s24); overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r12); box-shadow: var(--e1);
  transition: box-shadow .2s ease, transform .2s ease;
}
.socio:hover { box-shadow: var(--e2); transform: translateY(-2px); }
.socio > :not(.socio-logo) { margin-left: var(--s24); margin-right: var(--s24); }
.socio-logo {
  width: 100%; aspect-ratio: 2 / 1; margin-bottom: var(--s8);
  display: grid; place-items: center;
  background: #fff; border-bottom: 1px solid var(--border);
}
.socio-logo img { max-width: 78%; max-height: 78%; width: auto; object-fit: contain; }
.socio h3 { font-size: 18px; line-height: 24px; }
.socio h3 a { color: var(--text); text-decoration: none; }
.socio h3 a:hover { text-decoration: underline; }
.socio address {
  width: calc(100% - 48px); margin-top: auto; padding-top: var(--s12);
  border-top: 1px solid var(--border);
  font-style: normal; font-size: 14px; line-height: 22px; color: var(--text-secondary);
}
.socio address .mono { color: var(--text); font-family: var(--font-body); font-weight: 600; font-size: 14px; }

/* --------------------------------------------------------------------------
   Fire Safety Engineering
   -------------------------------------------------------------------------- */
.definition {
  max-width: 960px; padding: var(--s48);
  background: var(--surface); border-radius: var(--r16);
}
.definition .intro { color: var(--text-secondary); margin-bottom: var(--s16); }
.definition blockquote {
  margin: 0; padding: 0 0 0 var(--s24); border-left: 4px solid var(--primary);
  font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 34px; color: var(--text);
}
@media (max-width: 767px) {
  .definition { padding: var(--s24); }
  .definition blockquote { font-size: 18px; line-height: 28px; padding-left: var(--s16); }
}

/* --------------------------------------------------------------------------
   Griglie e card progetti
   -------------------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s24); }
@media (max-width: 991px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .grid-3 { grid-template-columns: 1fr; } }

.cat-card, .proj-card {
  display: flex; flex-direction: column;
  background: transparent; border: 0; padding: 0;
  text-decoration: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.cat-card .media, .proj-card .media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--r12); background: var(--surface);
  box-shadow: var(--e1); transition: box-shadow .2s ease, transform .2s ease;
}
.cat-card .media img, .proj-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card .body, .proj-card .body { padding: var(--s12) var(--s4) 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cat-card h3, .proj-card h3 { font-size: 18px; line-height: 24px; }
.cat-card p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 20px; }
.cat-card .more {
  margin-top: var(--s8);
  display: inline-flex; align-items: center; gap: var(--s4);
  color: var(--text); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.cat-card .more svg { width: 14px; height: 14px; transition: transform .2s; }
.cat-card .num {
  position: absolute; top: 12px; left: 12px; z-index: 1;
}
.cat-card:hover, .proj-card:hover { color: inherit; text-decoration: none; }
.cat-card:hover .media, .proj-card:hover .media { box-shadow: var(--e2); transform: translateY(-2px); }
.cat-card:hover .media img, .proj-card:hover .media img { transform: scale(1.03); }
.cat-card:hover .more svg { transform: translateX(3px); }
.cat-card:focus-visible, .proj-card:focus-visible { outline-offset: 4px; border-radius: var(--r12); }

.cat-card .num {
  display: inline-flex; padding: 4px 10px; border-radius: var(--rfull);
  background: rgba(255, 255, 255, .95); box-shadow: var(--e1);
  font-family: var(--font-body); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text);
}
.cat-card .media + .body .num { display: none; }

.proj-card .media { aspect-ratio: 3 / 2; }
.proj-card .city { color: var(--text-secondary); font-size: 14px; line-height: 20px; display: flex; align-items: center; gap: var(--s4); }
.proj-card .city svg { width: 14px; height: 14px; }
.proj-card .play { position: absolute; right: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   Mappa
   -------------------------------------------------------------------------- */
.map-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--s24); align-items: stretch; }
.map-frame { height: 560px; border-radius: var(--r16); overflow: hidden; background: var(--surface); box-shadow: var(--e1); }
.map-frame .leaflet-tile-pane { filter: grayscale(1) brightness(1.06) contrast(.9); }
#map { width: 100%; height: 100%; }
.map-list {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r16); box-shadow: var(--e1);
  display: flex; flex-direction: column; max-height: 560px; overflow: hidden;
}
.map-list header {
  padding: var(--s16) var(--s24); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s12);
}
.map-list header h3 { font-size: 18px; line-height: 24px; }
.map-list ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.map-list li button {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: var(--s12);
  padding: 12px var(--s24); text-align: left;
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  background: transparent; border: 0; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background .15s ease;
}
.map-list li button:hover { background: var(--surface); }
.map-list li button.selected { background: var(--surface); font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.map-list .idx { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); min-width: 22px; }
.map-note { margin-top: var(--s24); color: var(--text-secondary); font-size: 14px; line-height: 20px; }
@media (max-width: 991px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-frame { height: 420px; }
  .map-list { max-height: 320px; }
}

.pin {
  width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--text); border: 2px solid #fff; box-shadow: var(--e1);
}
.pin.hq { background: var(--primary); }
.leaflet-container { font-family: var(--font-body); background: var(--surface); }
.leaflet-popup-content-wrapper { border-radius: var(--r12); box-shadow: var(--e2); }
.leaflet-popup-content { margin: 12px 16px; font-size: 14px; line-height: 20px; color: var(--text); }
.leaflet-popup-content strong { font-family: var(--font-head); font-weight: 700; }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.team { list-style: none; margin: 0; padding: 0; }
.member {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: var(--s32) var(--s24) var(--s24); height: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r12); box-shadow: var(--e1);
  transition: box-shadow .2s ease, transform .2s ease;
}
.member:hover { box-shadow: var(--e2); transform: translateY(-2px); }
.member img {
  width: 128px; height: 128px; object-fit: cover; border-radius: var(--rfull);
  margin-bottom: var(--s16);
}
.member h3 { font-size: 20px; line-height: 28px; }
.member .title { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-secondary); }
.member .role { margin-top: var(--s8); }
.socials { display: flex; gap: var(--s8); justify-content: center; list-style: none; margin: var(--s16) 0 0; padding: 0; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--rfull); color: var(--text);
  transition: background .15s ease, border-color .15s ease;
}
.socials a:hover { background: var(--surface); border-color: var(--text); }
.socials svg { width: 16px; height: 16px; }
.team-closing { max-width: 760px; margin: var(--s48) 0 0; font-size: 18px; line-height: 30px; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Contatti
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s24); }
.contact-grid .card { display: flex; flex-direction: column; align-items: flex-start; }
.contact-grid .card h3 { margin: var(--s12) 0 var(--s8); }
.contact-grid address { font-style: normal; color: var(--text-secondary); }
.contact-grid .mono { color: var(--text); font-family: var(--font-body); font-weight: 700; font-size: 18px; }
.contact-grid .btn { margin-top: auto; }
@media (max-width: 991px) { .contact-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--surface); color: var(--text); padding: var(--s48) 0 var(--s32); border-top: 1px solid var(--border); }
.footer-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s24);
  padding-bottom: var(--s24); border-bottom: 1px solid var(--border);
}
.footer .socials { margin: 0; }
.footer .socials a { background: var(--bg); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s12);
  padding-top: var(--s24); font-size: 14px; line-height: 20px; color: var(--text-secondary);
}
.footer-bottom ul { display: flex; gap: var(--s24); list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Pagine categoria progetti
   -------------------------------------------------------------------------- */
.page-head { padding: calc(var(--nav-h) + var(--s48)) 0 var(--s48); background: var(--bg); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s8); align-items: center; margin-bottom: var(--s24); font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.crumbs a { color: var(--text); font-weight: 600; }
.page-head h1 { margin-bottom: var(--s12); }
.page-head .lead { color: var(--text-secondary); font-size: 18px; line-height: 28px; margin: 0; }
.page-head-grid { display: grid; grid-template-columns: 1fr 480px; gap: var(--s48); align-items: center; }
.page-head-grid .media { aspect-ratio: 4 / 3; border-radius: var(--r16); overflow: hidden; box-shadow: var(--e2); }
.page-head-grid .media img { width: 100%; height: 100%; object-fit: cover; }
.page-head + .section { background: var(--surface); }
@media (max-width: 991px) {
  .page-head { padding: calc(var(--nav-h) + var(--s24)) 0 var(--s32); }
  .page-head-grid { grid-template-columns: 1fr; gap: var(--s24); }
}

.state { max-width: 720px; margin: 0 auto; }
.state .card { padding: var(--s40); }
.state h2 { font-size: 24px; line-height: 32px; margin-bottom: var(--s12); }
.state p { color: var(--text-secondary); margin: 0; }

.skeleton { background: linear-gradient(90deg, #EEEEEE 0%, #F7F7F7 50%, #EEEEEE 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r12); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { height: 300px; }

.back-row { margin-top: var(--s48); display: flex; justify-content: center; }

/* Modale dettaglio progetto */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--s40) 16px; overflow-y: auto;
  background: rgba(0, 0, 0, .5);
}
.modal-panel {
  position: relative; width: 100%; max-width: 820px; overflow: hidden;
  background: var(--bg); border-radius: var(--r12); box-shadow: var(--e3);
}
.modal-close {
  position: absolute; top: var(--s16); right: var(--s16); z-index: 2;
  width: 40px; min-height: 40px; height: 40px; padding: 0; border-radius: var(--rfull);
  background: var(--bg); box-shadow: var(--e1);
}
.modal-head { padding: var(--s32) var(--s32) var(--s16); padding-right: 80px; }
.modal-head h2 { font-size: 26px; line-height: 34px; }
.modal-head .chip { margin-bottom: var(--s12); }
.modal-media { background: var(--text); }
.modal-media .ratio { position: relative; aspect-ratio: 16 / 9; }
.modal-media iframe, .modal-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-media video { background: #000; object-fit: contain; }
.modal-media img { width: 100%; }
.modal-body { padding: var(--s24) var(--s32) var(--s32); }
.modal-body .intro { color: var(--text-secondary); margin-bottom: var(--s24); }
.spec { list-style: none; margin: 0 0 var(--s24); padding: 0; }
.spec li { display: grid; grid-template-columns: 200px 1fr; gap: var(--s24); padding: var(--s16) 0; border-bottom: 1px solid var(--border); }
.spec li:first-child { border-top: 1px solid var(--border); }
.spec .k { font-weight: 600; color: var(--text); font-size: 14px; }
.spec .v { color: var(--text-secondary); font-size: 14px; }
.thresholds { padding: var(--s24); background: var(--surface); border-radius: var(--r12); }
.thresholds h3 { font-size: 18px; line-height: 24px; margin-bottom: var(--s8); }
.thresholds ul { list-style: none; margin: 0; padding: 0; }
.thresholds li { display: flex; justify-content: space-between; gap: var(--s24); padding: var(--s12) 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.thresholds li:last-child { border-bottom: 0; }
.thresholds li .mono { color: var(--text); font-weight: 600; white-space: nowrap; }
.modal-foot { display: flex; justify-content: flex-end; padding: 0 var(--s32) var(--s32); }
@media (max-width: 767px) {
  .modal { padding: var(--s8); }
  .modal-head { padding: var(--s24); padding-right: 72px; }
  .modal-body { padding: var(--s16) var(--s24) var(--s24); }
  .modal-foot { padding: 0 var(--s24) var(--s24); }
  .spec li { grid-template-columns: 1fr; gap: 2px; }
}

body.modal-open { overflow: hidden; }

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