:root {
  /* ── Palette "Grafite" ──
     Neri neutri, testo quasi bianco e il blu del logo come unico accento.
     I nomi --accent-green / --accent-cyan restano per compatibilità con le
     regole esistenti: ora valgono blu chiaro (testo) e blu acciaio. */
  --brand: #08589F;
  --bg-primary: #0A0B0D;
  --bg-elev: #0F1114;
  --surface: #131619;
  --surface-2: #1A1D22;
  --bg-card: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  /* Contrasti verificati >= 4.5:1 sul fondo (WCAG 2.1 AA) */
  --text-primary: #EDEFF2;
  --text-secondary: #A9AFB8;
  --text-muted: #8A919B;
  --accent: #5B9DFF;                /* blu del logo schiarito: testo, linee, icone */
  --accent-hover: #84B5FF;
  --accent-fill: #1F6FE0;           /* pieno dei pulsanti, testo bianco */
  --accent-fill-hover: #1A62CC;
  --accent-green: #5B9DFF;
  --accent-green-hover: #84B5FF;
  --accent-cyan: #8CB8F0;
  --accent-cyan-hover: #A9CBF5;
  --accent-success: #4ADE80;
  --accent-error: #F87171;
  /* Bordi di campi e controlli: contrasto >= 3:1 (WCAG 1.4.11) */
  --border-light: rgba(255, 255, 255, 0.34);
  --border-subtle: rgba(255, 255, 255, 0.16);
  --focus-ring: #84B5FF;
  --gradient-cta: linear-gradient(135deg, #2377EE 0%, #1553B8 100%);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --container-max: 1280px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  /* Gradient sottile applicato all'intera pagina, attaccato al viewport
     così rimane fisso durante lo scroll → nessuno "stacco netto" tra sezioni */
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(91, 157, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(91, 157, 255, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-primary);
  line-height: 1.5;
  /* "clip" taglia l'overflow orizzontale SENZA trasformare il body in un
     contenitore di scroll: con "hidden" position:sticky non funziona
     (es. barra filtri Labs su mobile). "hidden" resta come fallback. */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════
   FILIGRANA LOGO PWMEC (icona ufficiale)
   Fissa nel viewport ma con effetto PARALLAX allo scroll:
   --sy è aggiornata via JS (assets/js/app.js → initWatermarkParallax)
   I due loghi derivano e ruotano lentamente mentre si scorre.
   Opacità bassa + filter tinted → si fonde col tema dark
═══════════════════════════════════════════════════════ */
:root { --sy: 0; }

body::before {
  content: '';
  position: fixed;
  bottom: -140px;
  right: -140px;
  width: 720px;
  height: 720px;
  background-image: url('../img/pwmec-icon.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.03;
  /* Trasforma il blu originale del logo in cyan accent del sito */
  filter: brightness(0) saturate(100%) invert(60%) sepia(85%) saturate(540%) hue-rotate(155deg) brightness(95%) contrast(95%);
  pointer-events: none;
  /* -1: sempre dietro al contenuto, senza bisogno di z-index su <main> */
  z-index: -1;
  /* Parallax: sale leggermente e ruota in senso orario scrollando */
  transform: translate3d(0, calc(var(--sy) * -0.05px), 0) rotate(calc(var(--sy) * 0.012deg));
  will-change: transform;
}

/* Filigrana secondaria in alto a sinistra (più piccola, ancora più tenue, verde) */
body::after {
  content: '';
  position: fixed;
  top: -110px;
  left: -110px;
  width: 480px;
  height: 480px;
  background-image: url('../img/pwmec-icon.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.02;
  /* Verde accent del tema */
  filter: brightness(0) saturate(100%) invert(89%) sepia(28%) saturate(2548%) hue-rotate(38deg) brightness(105%) contrast(90%);
  pointer-events: none;
  z-index: -1;
  /* Parallax: scende leggermente e contro-ruota (parte da -20deg) */
  transform: translate3d(0, calc(var(--sy) * 0.04px), 0) rotate(calc(-20deg + var(--sy) * -0.015deg));
  will-change: transform;
}

/* Rispetta chi preferisce ridurre il movimento */
@media (prefers-reduced-motion: reduce) {
  body::before { transform: rotate(0deg); }
  body::after  { transform: rotate(-20deg); }
}

/* Tutto il contenuto principale stays sopra le filigrane.
   NB: <main> NON deve avere z-index: creerebbe un contesto di stacking che
   intrappola i modali/lightbox (position:fixed al suo interno) SOTTO l'header
   fisso (z-index 100), nascondendo titolo e pulsante di chiusura. */
.site-header,
.site-footer,
.cookie-banner,
.cookie-modal-overlay,
.fv-overlay {
  position: relative;
  z-index: 1;
}

/* Su mobile: filigrana più piccola per non occupare troppo spazio */
@media (max-width: 767px) {
  body::before {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -100px;
    opacity: 0.018;
  }
  body::after {
    width: 320px;
    height: 320px;
    opacity: 0.012;
  }
}

html { overflow-x: hidden; overflow-x: clip; }

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITÀ — Focus visibile (WCAG 2.4.7) + Skip link (2.4.1)
═══════════════════════════════════════════════════════ */

/* Focus visibile globale ad alto contrasto su tutti gli elementi interattivi.
   Usa :focus-visible così non disturba i click del mouse, solo Tab/tastiera. */
*:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link "Salta al contenuto" — nascosto fino al focus da tastiera */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 18px;
  background: var(--accent-fill);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 0;
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

/* Class utility solo per screen reader (testo invisibile) */

img, video, svg, canvas { max-width: 100%; height: auto; }

img {
  display: block;
}

a, button, [role="button"], input, label, select, textarea {
  -webkit-tap-highlight-color: rgba(91, 157, 255, 0.15);
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-green);
}

ul {
  list-style: none;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: var(--font-family);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR — barra fissa in vetro scuro, tendine e menu laterale
   (markup in includes/header.php, comportamento in app.js → initNavbar)
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
/* Dopo lo scroll: più opaca e con ombra, per staccarsi dal contenuto */
.site-header.is-scrolled {
  background: rgba(10, 11, 13, 0.93);
  border-bottom-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: rgba(10, 11, 13, 0.97); }
}

.nb-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nb-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
  border-radius: 8px;
}
.nb-logo-img {
  height: clamp(32px, 3.2vw, 42px);
  width: auto;
  display: block;
  filter: brightness(0) invert(1);   /* logo blu → bianco */
}

/* ── Voci principali ── */
.nb-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.nb-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nb-item { position: relative; }

.nb-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font: 600 15px/1 var(--font-family);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nb-link svg { width: 15px; height: 15px; opacity: 0.7; transition: transform 0.2s ease; }
.nb-link:hover,
.nb-item.is-open > .nb-link { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nb-item.is-open > .nb-link svg { transform: rotate(180deg); }

/* "Sei qui": trattino verde sotto la voce della pagina/sezione attuale */
.nb-link.is-active { color: #fff; }
.nb-link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  border-radius: 2px;
  background: var(--accent-fill);
}

.nb-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Tendine (desktop) ── */
.nb-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: 340px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(16, 18, 21, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 28px 60px -22px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  /* --nb-shift: spostamento calcolato da app.js per non uscire dallo schermo */
  transform: translate(calc(-50% + var(--nb-shift, 0px)), 6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 5;
}
/* Ponte invisibile tra voce e tendina: il mouse può scendere senza chiuderla */
.nb-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nb-item.is-open > .nb-menu { opacity: 1; visibility: visible; transform: translate(calc(-50% + var(--nb-shift, 0px)), 0); }
.nb-menu-wide { width: 620px; }
.nb-menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.nb-menu-title {
  padding: 10px 12px 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nb-menu-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-primary);
  transition: background-color 0.15s ease;
}
.nb-menu-link:hover,
.nb-menu-link:focus-visible { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nb-menu-link.is-active { background: rgba(91, 157, 255, 0.08); }
.nb-menu-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 157, 255, 0.1);
  border: 1px solid rgba(91, 157, 255, 0.25);
  color: var(--accent-green);
}
.nb-menu-icon svg { width: 18px; height: 18px; }
.nb-menu-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.nb-menu-text strong { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.nb-menu-text span { font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.nb-menu-foot { margin: 6px 4px 2px; padding: 10px 8px 4px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.nb-menu-foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-cyan); }
.nb-menu-foot a:hover { color: var(--accent-green); }
.nb-menu-foot svg { width: 15px; height: 15px; }

/* ── Azioni a destra: telefono, preventivo, menu ── */
.nb-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.nb-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.nb-phone:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nb-phone svg { width: 18px; height: 18px; color: var(--accent-cyan); flex-shrink: 0; }

.nb-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nb-cta:hover { background: var(--accent-fill-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(91, 157, 255, 0.7); }
.nb-cta svg { width: 16px; height: 16px; }
.nb-cta.is-active { box-shadow: 0 0 0 3px rgba(91, 157, 255, 0.3); }
.nb-cta-short { display: none; }

.nb-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.nb-burger:hover { background: rgba(255, 255, 255, 0.07); }
.nb-burger-lines { position: relative; width: 22px; height: 16px; }
.nb-burger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease;
}
.nb-burger-lines span:nth-child(1) { top: 0; }
.nb-burger-lines span:nth-child(2) { top: 7px; width: 70%; }
.nb-burger-lines span:nth-child(3) { top: 14px; }

/* ── Menu laterale (telefono e tablet) ── */
.nb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(4, 5, 6, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.nb-backdrop.is-open { opacity: 1; visibility: visible; }

.nb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  background: #101215;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -30px 0 60px -24px rgba(0, 0, 0, 0.75);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.32s;
}
.nb-drawer.is-open { transform: none; visibility: visible; }

.nb-drawer-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 12px 0 20px;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nb-drawer-head .nb-logo-img { height: 30px; }
.nb-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.nb-close:hover { background: rgba(255, 255, 255, 0.1); }
.nb-close svg { width: 20px; height: 20px; }

.nb-drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 16px;
}
.nb-drawer-label {
  padding: 18px 12px 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nb-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 7px 12px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}
.nb-drawer-link:hover,
.nb-drawer-link:active { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nb-drawer-link.is-active { background: rgba(91, 157, 255, 0.08); color: #fff; }
.nb-drawer-link .nb-menu-icon { width: 34px; height: 34px; }
.nb-drawer-link .nb-badge { margin-left: auto; }

.nb-drawer-foot {
  flex-shrink: 0;
  display: grid;
  gap: 10px;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #101215;
}
.nb-cta-block { width: 100%; height: 50px; justify-content: center; font-size: 16px; }
.nb-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.nb-quick a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}
.nb-quick a:hover { border-color: var(--accent-green); color: #fff; }
.nb-quick svg { width: 18px; height: 18px; color: var(--accent-cyan); }

/* ── Adattamento alle larghezze ── */
/* Portatili piccoli: telefono solo come icona */
@media (max-width: 1199px) {
  .nb-phone { width: 40px; padding: 0; justify-content: center; }
  .nb-phone-label { display: none; }
  .nb-link { padding: 0 12px; }
}
/* Tablet e telefono: voci nel menu laterale */
@media (max-width: 991px) {
  .nb-nav { display: none; }
  .nb-burger { display: inline-flex; }
  .nb-cta { height: 40px; padding: 0 14px; }
  .nb-cta-long { display: none; }
  .nb-cta-short { display: inline; }
  .nb-phone { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
}
@media (max-width: 599px) {
  .nb-cta { display: none; }               /* è nel menu laterale, sempre in vista in basso */
  .nb-drawer-foot .nb-cta { display: inline-flex; }
}
/* Telefono in orizzontale: poca altezza → voci più fitte e tutto il menu
   scorre in un unico blocco (i pulsanti fissi in basso toglievano spazio) */
@media (max-height: 500px) {
  .nb-drawer { overflow-y: auto; overscroll-behavior: contain; }
  .nb-drawer-body { flex: none; overflow: visible; }
  .nb-drawer-link { min-height: 44px; }
  .nb-drawer-label { padding-top: 12px; }
}
/* Su desktop il menu laterale non esiste */
@media (min-width: 992px) {
  .nb-drawer, .nb-backdrop { display: none; }
}

.hero {
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
}

/* ── Hero 3D (filigrana) ── */
.hero-3d {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.hero-3d canvas {
  display: block;
  outline: none;
  opacity: 0.8;
  filter: drop-shadow(0 12px 28px rgba(140, 184, 240, 0.2));
}

.hero-3d-loader {
  display: flex;
  gap: 10px;
  opacity: 0.5;
}

.hero-3d-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-fill);
  opacity: 0.4;
  animation: hero3d-pulse 1.2s ease-in-out infinite;
}

.hero-3d-loader span:nth-child(2) { animation-delay: 0.18s; background: var(--accent-fill); }
.hero-3d-loader span:nth-child(3) { animation-delay: 0.36s; }

@keyframes hero3d-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.4; }
  50%      { transform: scale(1.5); opacity: 1;   }
}

.servizi {
  padding: 80px 0;
}

/* Responsive: su mobile gli step si impilano e il connettore ruota verticale */

.chi-siamo {
  padding: 88px 0;
}

/* ── Settori carosello ── */
/* Titolo come le altre sezioni (es. "Su di noi"): grande e centrato */

.settori-carousel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.sc-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-slide {
  flex: 0 0 100%;        /* esattamente 100% del viewport, no flex-grow/shrink */
  width: 100%;
  max-width: 100%;       /* impedisce che la slide cresca per content interno (es. desc max-width 500) */
  box-sizing: border-box;
  padding: 52px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.sc-prev { left: -18px; }
.sc-next { right: -18px; }

.sc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* Non-text contrast >=3:1 vs sfondo scuro (WCAG 1.4.11) */
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  /* niente overflow:hidden — taglierebbe lo pseudo-elemento che espande
     l'area touch su mobile; la barra viene clippata via border-radius */
  transition: background 0.25s, width 0.25s ease, border-radius 0.25s;
}

.sc-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.sc-dot.active {
  background: rgba(91, 157, 255, 0.18);
  width: 32px;
  border-radius: 4px;
}

.sc-dot-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  max-width: 100%;
  background: var(--accent-fill);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 4px rgba(91, 157, 255, 0.4);
}

@media (max-width: 700px) {
  .sc-slide { padding: 40px 44px; }
  .sc-prev { left: 6px; }
  .sc-next { right: 6px; }
}

.perche-noi {
  padding: 80px 0;
}

/* ── Responsive ── */

.preventivo-page {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  min-height: 80vh;
}

.preventivo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 32px;
  max-width: 640px;
}

.preventivo-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.preventivo-annulla {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-green);
}

.preventivo-annulla:hover {
  color: var(--accent-green-hover);
}

.prev-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tipo-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tipo-btn {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1.5px solid var(--border-light);
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.tipo-btn.active {
  background: var(--accent-fill);
  color: #fff;
  border-color: var(--accent-green);
}

.tipo-btn:not(.active):hover {
  border-color: var(--accent-green);
  background: rgba(91, 157, 255, 0.06);
}

.prev-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.prev-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prev-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.prev-field input,
.prev-field textarea {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.prev-field input::placeholder,
.prev-field textarea::placeholder {
  color: var(--text-secondary);
}

.prev-field input:focus,
.prev-field textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(140, 184, 240, 0.12);
}

.prev-field textarea {
  resize: vertical;
  min-height: 100px;
}

.file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 24px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(91, 157, 255, 0.04);
}

.file-dropzone.has-files {
  border-color: var(--accent-green);
  border-style: solid;
  background: rgba(91, 157, 255, 0.03);
}

.dropzone-icon {
  color: var(--text-secondary);
}

.dropzone-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.file-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── File list ── */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fl-in 0.18s ease;
}

@keyframes fl-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fl-num {
  flex-shrink: 0;
  width: 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  line-height: 1;
}

.fl-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 0;
}

.fl-ext {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.fl-ext-pdf  { background: rgba(239, 68,  68,  0.15); color: #f87171; }
.fl-ext-step,
.fl-ext-stp  { background: rgba(91, 157, 255, 0.15); color: var(--accent-cyan); }
.fl-ext-stl  { background: rgba(91, 157, 255, 0.15); color: var(--accent-green); }
.fl-ext-dxf  { background: rgba(155, 89,  182, 0.15); color: #c084fc; }
.fl-ext-f3d  { background: rgba(251, 191, 36,  0.15); color: #fbbf24; }

.fl-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.fl-size {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-family:  var(--font-mono);
}

.fl-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.fl-remove:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.07);
}

.file-errors {
  font-size: 12px;
  color: var(--accent-error);
  font-weight: 600;
  margin-top: 6px;
  display: none;
}

.fl-preview {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.fl-preview:hover {
  border-color: rgba(140, 184, 240, 0.4);
  color: var(--accent-cyan);
  background: rgba(91, 157, 255, 0.08);
}

/* ════════════════════════════════════
   File Viewer Popup
════════════════════════════════════ */
.fv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.fv-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.fv-modal {
  background: #0C0E11;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  width: 92vw;
  max-width: 1080px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.22s ease;
}

.fv-overlay.active .fv-modal {
  transform: scale(1) translateY(0);
}

.fv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.fv-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fv-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.fv-close:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}

.fv-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #0D0F12;
}

.fv-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.fv-canvas-wrap {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

.fv-canvas-wrap canvas {
  display: block;
}

.fv-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  color: var(--text-secondary);
  gap: 10px;
}

.fv-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(140, 184, 240, 0.25);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: fv-spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes fv-spin {
  to { transform: rotate(360deg); }
}

.fv-3d-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}

.fv-hint-fade {
  opacity: 0;
}

.fv-unsupported {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 14px;
  padding: 48px;
  text-align: center;
}

.fv-uns-icon {
  font-size: 44px;
  opacity: 0.25;
}

.fv-unsupported p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.65;
}

.fv-uns-note {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}

.prev-privacy {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-cyan);
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.prev-submit-row {
  display: flex;
  justify-content: flex-end;
}

.prev-submit-btn {
  padding: 12px 40px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: background 0.2s ease, transform 0.2s ease;
}

.prev-submit-btn:hover {
  background: var(--accent-fill-hover);
  transform: translateY(-1px);
}

.prev-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  font-size: 14px;
  padding: 8px 0;
  min-height: 24px;
}

.form-message.success {
  color: var(--accent-green);
}

.form-message.error {
  color: var(--accent-error);
  font-weight: 600;
}

.content-page {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 80px;
  min-height: 70vh;
}

.content-page .page-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-page .page-hero h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}

.content-page .page-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 700px;
}

.content-page h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 48px 0 20px;
}

.content-page h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.content-page p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.content-page ul,
.content-page ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.content-page li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 8px;
  list-style: disc;
}

.content-page ol li {
  list-style: decimal;
}

.content-page a {
  color: var(--accent-cyan);
}

.content-page strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.content-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.content-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.content-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.content-card p {
  margin-bottom: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  font-size: 20px;
  color: var(--text-secondary);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
}

.faq-answer-inner p {
  margin-bottom: 0;
}

.cta-banner {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-top: 64px;
}

.cta-banner h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.cta-banner p {
  max-width: 500px;
  margin: 0 auto 24px;
}

.cta-banner .btn-green {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: background 0.2s ease, transform 0.2s ease;
}

.cta-banner .btn-green:hover {
  background: var(--accent-fill-hover);
  transform: translateY(-1px);
}

.legal-page {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 80px;
  min-height: 70vh;
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--accent-cyan);
}

.legal-page h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-page .legal-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.legal-page h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text-primary);
}

.legal-page p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-page ol li {
  margin-bottom: 10px;
  font-size: 14.5px;
}

.legal-card {
  background: rgba(91, 157, 255, 0.04);
  border: 1px solid rgba(91, 157, 255, 0.2);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}

.legal-card p {
  margin-bottom: 0;
  font-size: 14.5px;
  line-height: 1.85;
}

.legal-card strong {
  color: var(--text-primary);
  font-size: 16px;
}

.legal-card a {
  color: var(--accent-cyan);
  border-bottom: 1px solid rgba(140, 184, 240, 0.3);
  transition: border-color 0.2s;
}

.legal-card a:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.legal-footer-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  text-align: center;
  color: var(--text-secondary);
}

.legal-note {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  margin: 14px 0;
}

.legal-placeholder {
  color: var(--text-muted);
}

.legal-placeholder em {
  color: rgba(251, 191, 36, 0.7);
  font-style: italic;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13.5px;
}

.legal-table thead {
  background: rgba(91, 157, 255, 0.06);
}

.legal-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-table td {
  padding: 12px 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table code {
  font-family:  var(--font-mono);
  background: rgba(91, 157, 255, 0.1);
  border: 1px solid rgba(140, 184, 240, 0.25);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.legal-table a {
  color: var(--accent-cyan);
  word-break: break-word;
}

@media (max-width: 700px) {
  .legal-table { font-size: 12.5px; display: block; overflow-x: auto; }
  .legal-table th, .legal-table td { padding: 9px 10px; }
}

/* Footer additions */

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 6px;
  list-style: disc;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.legal-page th,
.legal-page td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border-light);
  font-size: 14px;
}

.legal-page th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  color: var(--text-primary);
}

.legal-page td {
  color: var(--text-secondary);
}

.legal-page a {
  color: var(--accent-cyan);
}

.cookie-update-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 8px;
}

.cookie-update-btn:hover {
  background: var(--accent-fill-hover);
}

#page-content {
  opacity: 1;
  transition: opacity 0.25s ease;
}

#page-content.fade-out {
  opacity: 0;
}

.site-footer {
  padding: 56px 0 0;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  color: var(--accent-green);
  background: rgba(91, 157, 255, 0.06);
  border-color: rgba(91, 157, 255, 0.3);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #121418;
  border-top: 1px solid var(--border-light);
  padding: 20px 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-text h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cookie-banner-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-banner-text a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn-accept {
  background: var(--accent-fill);
  color: #fff;
}

.cookie-btn-reject {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--text-primary);
}

.cookie-btn-settings {
  background: transparent;
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cookie-modal {
  background: #121418;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-light);
}

.cookie-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.cookie-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-secondary);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-modal-body {
  padding: 16px 24px;
}

.cookie-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-category h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cookie-category p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.toggle-switch.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 26px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-fill);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.cookie-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border-light);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Regole legacy consolidate: il grosso del responsive è gestito dal blocco
   "RESPONSIVE UNIFICATO" in fondo al file (breakpoint 1199/991/767/480/360).
   Qui restano solo le regole NON coperte dal sistema unificato. */

@media (max-width: 767px) {
  .content-page .page-hero h1 { font-size: 30px; }
  .content-cards { grid-template-columns: 1fr; }
  .cta-banner { padding: 32px 24px; }
  .cookie-banner-text { min-width: auto; }
}

@media (max-width: 480px) {
  .content-page .page-hero h1 { font-size: 26px; }
  .content-page h2 { font-size: 24px; }
  .cookie-modal-footer { flex-direction: column; }
}

@media print {
  .site-header,
  .cookie-banner,
  .cookie-modal-overlay,
  .nb-drawer,
  .nb-backdrop {
    display: none !important;
  }
  body {
    background: white;
    color: #111;
  }
  .hero { padding-top: 0; }
}

/* ============================================================
   MODALE PARCO MACCHINE — FRESATURA CNC
   ============================================================ */
/* ── Animazione entrata modale ── */
@keyframes mf-slide-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.mf-chiudi {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mf-chiudi svg {
  display: block;
}

.mf-chiudi:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.55);
  color: #ef4444;
  transform: rotate(90deg);
}

.mf-chiudi:active {
  transform: rotate(90deg) scale(0.92);
}

/* Operazioni possibili grid (tornitura modal bottom) */

.macchina-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  transition: filter 0.3s ease;
}

/* ── Hover interattivo sulle facce SVG ── */
.mf-face {
  cursor: crosshair;
  transition: fill 0.2s ease;
}

.mf-face-floor:hover { fill: rgba(237, 239, 242, 0.35); }
.mf-face-front:hover { fill: rgba(91, 157, 255, 0.22); }
.mf-face-right:hover { fill: rgba(140, 184, 240, 0.22); }

/* ── Accordion ── */
.mf-accord {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mf-accord-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.mf-accord-head {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-align: left;
  font-family: var(--font-family);
}

.mf-accord-head > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mf-accord-head:hover { background: rgba(255, 255, 255, 0.05); }

.mf-accord-item.open .mf-accord-head {
  background: rgba(91, 157, 255, 0.07);
  color: var(--accent-cyan);
}

.mf-accord-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mf-accord-arrow {
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.mf-accord-item.open .mf-accord-arrow { transform: rotate(180deg); }

.mf-accord-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mf-mat-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mf-mat-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.mf-mat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.mf-mat-note {
  font-size: 12.5px;
  color: rgba(237, 239, 242, 0.72);
  line-height: 1.5;
}

/* Responsive */

@media (max-width: 480px) {
  .mf-mat-rows { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .mf-chiudi { position: absolute; top: 20px; right: 20px; }
}

/* ── Durezze ── */
.hd-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hd-result {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hd-result span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.7px;
}

.hd-result strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-green);
  font-family:  var(--font-mono);
}

/* ── Equivalenze acciai ── */

.eq-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .hd-result-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   Sezione MATERIALI LAVORATI (home)
═══════════════════════════════════════ */

.mat-accord-wrap {
  max-width: 820px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.mat-accord-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

.mat-accord .mf-accord-item {
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.mat-accord .mf-accord-head {
  padding: 16px 20px;
  font-size: 15px;
}

.mat-accord .mf-mat-rows {
  padding: 18px 20px;
}

/* ── Touch target minimi (WCAG 2.1 AAA = 44×44) ── */
@media (max-width: 1139px) {
  .btn-green,
  .prev-submit-btn,
  .tipo-btn,
  .mf-chiudi,
  .fl-preview,
  .fl-remove,
  .cookie-btn {
    min-height: 44px;
  }

  /* Per i dots del carosello: area cliccabile espansa via pseudo-elemento
     senza alterare la dimensione visuale (resta piccolo e tondo).
     NB: richiede che .sc-dot NON abbia overflow:hidden (vedi regola base) */
  .sc-dot {
    position: relative;
  }
  .sc-dot::after {
    content: '';
    position: absolute;
    inset: -14px -6px;     /* extra hit area trasparente */
  }
}

/* ════════════════════════════════════════
   TABLET LANDSCAPE (≤ 1199px)
═══════════════════════════════════════ */
@media (max-width: 1199px) {
  :root { --container-max: 100%; }
  .container { padding-left: 32px; padding-right: 32px; }
  .nb-inner { padding: 0 24px; }
}

/* ════════════════════════════════════════
   TABLET PORTRAIT (≤ 991px)
═══════════════════════════════════════ */
@media (max-width: 991px) {
  .container { padding-left: 24px; padding-right: 24px; }

  /* Sezioni: padding ridotto */
  .servizi,
  .chi-siamo,
  .perche-noi { padding: 64px 0; }

  /* Settori carousel */
  .sc-slide { padding: 44px 48px; }
  .sc-prev { left: 4px; }
  .sc-next { right: 4px; }

  /* Preventivo form */
  .prev-row { grid-template-columns: 1fr; gap: 16px; }
  .tipo-toggle { grid-template-columns: 1fr; gap: 8px; }
  .preventivo-page { padding-top: calc(var(--header-height) + 24px); }
  .preventivo-header h1 { font-size: 28px; }

  /* File viewer popup */
  .fv-modal { width: 96vw; height: 90vh; height: 90dvh; }
}

/* ════════════════════════════════════════
   MOBILE LANDSCAPE / SMALL TABLET (≤ 767px)
═══════════════════════════════════════ */
@media (max-width: 767px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .nb-inner { padding: 0 16px; }

  /* Settori carousel: mobile-friendly (no frecce, solo swipe + dots) */
  .settori-carousel {
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;       /* gabbia di sicurezza contro overflow accidentali */
  }   /* swipe + dots bastano su mobile */
  .sc-slide {
    padding: 28px 22px;
    gap: 14px;
  }
  .sc-dot { width: 10px; height: 10px; }
  .sc-dot.active { width: 28px; height: 10px; }

  /* Materiali accordion */
  .mat-accord .mf-accord-head { padding: 14px 16px; font-size: 14.5px; }
  .mat-accord .mf-mat-rows { padding: 16px; grid-template-columns: 1fr; }

  /* Modali parco macchine */
  .mf-chiudi { position: absolute; top: 14px; right: 14px; }

  /* Labs */
  .hd-result-grid { grid-template-columns: repeat(2, 1fr); }

  /* Preventivo form: input più grandi su mobile */
  .prev-field input,
  .prev-field textarea { min-height: 44px; font-size: 16px; /* 16px = no zoom iOS */ }
  .file-dropzone { padding: 24px 16px; }
  .file-list-item { gap: 8px; }
  .fl-num { width: 18px; font-size: 13px; }
  .fl-card { padding: 7px 10px; gap: 8px; }
  .fl-name { font-size: 12.5px; }
  .fl-size { font-size: 10px; }

  /* File viewer popup */
  /* 100dvh: su iOS/Android 100vh include la barra dell'indirizzo e taglia il fondo */
  .fv-modal { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; max-width: none; }
  .fv-header { padding: 12px 16px; }
  .fv-title { font-size: 12px; }

  /* Cookie banner */
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { flex-direction: column; gap: 8px; }
  .cookie-banner-actions .cookie-btn { width: 100%; }

  /* Header */
  /* Logo height ora gestito da clamp() globale, niente override */
}

/* ════════════════════════════════════════
   MOBILE PORTRAIT (≤ 480px)
═══════════════════════════════════════ */
@media (max-width: 480px) {

  /* Settori carousel: ancora più compatto su mobile portrait */
  .sc-slide { padding: 24px 18px; }
}

/* ════════════════════════════════════════
   MOBILE MICRO (≤ 360px) - device molto piccoli
═══════════════════════════════════════ */
@media (max-width: 360px) {
  .container { padding-left: 12px; padding-right: 12px; }
}

/* ════════════════════════════════════════
   PREFERS-REDUCED-MOTION (accessibilità)
═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════
   LANDSCAPE su mobile (orizzontale stretto)
═══════════════════════════════════════ */
@media (max-height: 500px) and (max-width: 991px) {
  .hero { min-height: auto; }
}

/* ═══════════════════════════════════════════════════════
   LABS MOBILE REDESIGN — Accordion + sticky filters
═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* Durezze: 2 col */
  .hd-result-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hd-result { padding: 10px; }
  .hd-result strong { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════
   DOVE SIAMO — Pagina con mappa e info
═══════════════════════════════════════════════════════ */

.dove-siamo-page h2 {
  margin-top: 48px;
}

/* ── Card indirizzo + nav buttons ── */
.dove-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: linear-gradient(135deg, rgba(91, 157, 255, 0.04), rgba(91, 157, 255, 0.04));
  border: 1px solid rgba(91, 157, 255, 0.2);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 24px 0 32px;
}

.dove-card-info h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.dove-address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.dove-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.dove-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.dove-contact:hover {
  color: var(--accent-cyan);
}

.dove-contact svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.dove-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.dove-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.btn-nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-nav:hover {
  transform: translateY(-1px);
  color: var(--text-primary);
}

.btn-nav-google { color: #ea4335; }
.btn-nav-google:hover { background: rgba(234, 67, 53, 0.1); border-color: rgba(234, 67, 53, 0.4); color: #ea4335; }

.btn-nav-apple { color: #ffffff; }
.btn-nav-apple:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); color: #ffffff; }

.btn-nav-waze { color: #8CB8F0; }
.btn-nav-waze:hover { background: rgba(91, 157, 255, 0.1); border-color: rgba(140, 184, 240, 0.4); color: #8CB8F0; }

/* ── Mappa ── */
.dove-mappa-wrap {
  position: relative;
  margin: 0 0 24px;
}

#dove-map {
  width: 100%;
  height: 480px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.dove-mappa-attribution {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin: 6px 4px 0 0;
}

.dove-mappa-attribution a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(140, 184, 240, 0.3);
}

/* ── Marker custom Leaflet ── */
.dove-marker {
  background: none !important;
  border: none !important;
}

.dove-marker-pin {
  width: 40px;
  height: 50px;
  color: var(--accent-green);
  filter: drop-shadow(0 4px 8px rgba(91, 157, 255, 0.5));
  animation: dove-marker-bounce 2.4s ease-in-out infinite;
}

.dove-marker-pin svg {
  width: 100%;
  height: 100%;
}

@keyframes dove-marker-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── Popup Leaflet ── */
.leaflet-popup-content-wrapper {
  background: #0C0E11 !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(91, 157, 255, 0.3) !important;
  border-radius: 10px !important;
  padding: 4px 4px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-tip {
  background: #0C0E11 !important;
  border: 1px solid rgba(91, 157, 255, 0.3) !important;
}

.dove-popup {
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
}

.dove-popup strong {
  color: var(--accent-green);
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
}

/* ── Info "Come raggiungerci" ── */
.dove-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 32px;
}

.dove-info-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 22px 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dove-info-card:hover {
  border-color: rgba(91, 157, 255, 0.2);
  background: rgba(91, 157, 255, 0.03);
}

.dove-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(91, 157, 255, 0.08);
  border: 1px solid rgba(140, 184, 240, 0.25);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  margin-bottom: 14px;
}

.dove-info-icon svg {
  width: 100%;
  height: 100%;
}

.dove-info-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.dove-info-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .dove-card { grid-template-columns: 1fr; gap: 24px; padding: 22px 24px; }
  .dove-nav-buttons { min-width: 0; }
  .btn-nav { justify-content: center; }
  .dove-info-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  #dove-map { height: 360px; }
  .dove-info-grid { grid-template-columns: 1fr; }
  .dove-card { padding: 20px; }
  .dove-contacts { flex-direction: column; gap: 8px; }
}

/* ──────────────────────────────────────────────
   Foto facciata (hero) + galleria reparti
   ────────────────────────────────────────────── */
.dove-hero-photo {
  margin: 28px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.dove-hero-photo a {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.dove-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.dove-hero-photo a:hover img {
  transform: scale(1.03);
}

.dove-hero-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dove-hero-zoom svg {
  width: 100%;
  height: 100%;
}

.dove-hero-photo a:hover .dove-hero-zoom {
  opacity: 1;
  transform: translateY(0);
}

.dove-hero-photo figcaption {
  padding: 10px 16px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
}

.dove-gallery-intro {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin: 4px 0 16px;
}

.dove-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.dove-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.02);
}

.dove-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.dove-gallery-item:hover img {
  transform: scale(1.06);
}

.dove-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dove-gallery-item:hover .dove-gallery-overlay {
  opacity: 1;
}

.dove-gallery-overlay svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

@media (max-width: 900px) {
  .dove-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .dove-gallery { grid-template-columns: 1fr; }
  .dove-hero-photo img { max-height: 320px; }
}

/* ──────────────────────────────────────────────
   Lightbox foto
   ────────────────────────────────────────────── */
.dove-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dove-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.dove-lightbox-content {
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.dove-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.dove-lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
  font-style: italic;
}

.dove-lightbox-caption:empty {
  display: none;
}

.dove-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dove-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}

@media (max-width: 600px) {
  .dove-lightbox { padding: 20px; }
  .dove-lightbox-close { top: 12px; right: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   RIFINITURA MOBILE E SCHERMI PICCOLI
   In fondo al file per prevalere sulle regole precedenti.
   1) leggibilità  2) aree di tocco  3) spazi  4) notch iPhone
═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  /* Header più basso: più spazio utile per il contenuto
     (tutti gli offset sotto l'header usano questa variabile) */
  :root { --header-height: 60px; }

  /* Sezioni home: meno vuoto verticale tra un blocco e l'altro */
  .servizi,
  .chi-siamo,
  .perche-noi { padding: 52px 0; }
  .legal-page { padding-top: calc(var(--header-height) + 28px); padding-bottom: 56px; }

  /* ── 1. Leggibilità: testi descrittivi almeno 14px ── */
  .mf-mat-note,
  .dove-contact { font-size: 13.5px; }

  /* Etichette, badge e tag: almeno 11–12px */
  .dove-nav-label { font-size: 12px; }
  .hd-result span { font-size: 12px; }

  /* ── 2. Aree di tocco: link e pulsanti piccoli da centrare col dito ── */
  .legal-page .back-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 12px; }
  .preventivo-annulla { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; margin-right: -10px; }
  .fv-close { width: 40px; height: 40px; }
  .dove-contact { padding: 6px 0; }
}

@media (max-width: 480px) {
  .servizi,
  .chi-siamo,
  .perche-noi { padding: 44px 0; }
}

/* ── 4. Notch e angoli arrotondati (viewport-fit=cover nell'<head>) ──
   Con il telefono in orizzontale il contenuto finiva sotto la "tacca":
   il margine laterale diventa il maggiore tra quello normale e l'area sicura. */
@media (max-width: 1199px) {
  .container { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
  .nb-inner { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}
@media (max-width: 991px) {
  .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}
@media (max-width: 767px) {
  .container,
  .nb-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 360px) {
  .container { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}
/* Banner cookie e fondo pagina sopra la barra "home" degli iPhone */
.cookie-banner {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 767px) {
  .cookie-banner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* ── Prestazioni su touch: lo sfondo "fixed" costringe il browser a
   ridisegnare tutta la pagina a ogni scroll (scatti su Android) ── */
@media (hover: none), (max-width: 767px) {
  body { background-attachment: scroll; }
}

/* ═══════════════════════════════════════════════════════════════
   PAGINA PREVENTIVO — form guidato in due blocchi + riquadro laterale
   (in fondo al file: sostituisce le misure delle regole precedenti)
═══════════════════════════════════════════════════════════════ */
.preventivo-header,
.prev-layout {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}
.preventivo-header { align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.preventivo-sub { margin-top: 8px; font-size: 15px; color: var(--text-secondary); line-height: 1.55; }

.prev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.prev-form { max-width: none; margin: 0; gap: 20px; }

/* Blocchi numerati, con lo stesso stile delle schede del sito */
.prev-group {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 22px 24px 24px;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 18px;
}
.prev-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  float: left;            /* il legend partecipa alla griglia come primo elemento */
  width: 100%;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.prev-legend + * { clear: both; }
.prev-legend-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family:  var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(91, 157, 255, 0.1);
  border: 1px solid rgba(91, 157, 255, 0.35);
  flex-shrink: 0;
}

.prev-field { gap: 6px; }
.prev-field-short { max-width: 360px; }
.req { color: var(--accent-green); font-weight: 700; }
.opt { font-weight: 400; font-size: 13px; color: var(--text-muted); }
.prev-hint { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.prev-hint:empty { display: none; }

/* Errori sul singolo campo */
.field-error {
  font-size: 13px;
  font-weight: 600;
  color: #f87171;
  line-height: 1.4;
}
.field-error:empty { display: none; }
.prev-field.has-error input,
.prev-field.has-error textarea {
  border-color: var(--accent-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.prev-privacy.has-error .checkbox-label { color: #fca5a5; }

/* Azienda / Privato: sempre affiancati (prima su mobile erano due bottoni enormi impilati) */
.tipo-toggle { grid-template-columns: 1fr 1fr; gap: 10px; }
.tipo-btn { padding: 11px 16px; }

/* Trappola anti-bot: fuori dallo schermo, non display:none (alcuni bot lo riconoscono) */
.prev-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Invio */
.prev-submit-row { justify-content: space-between; align-items: center; gap: 16px; }
.prev-required-note { font-size: 13px; color: var(--text-muted); }
.prev-submit-btn { padding: 14px 36px; min-width: 200px; }
.prev-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: -8px;
}
.prev-progress[hidden] { display: none; }
.prev-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-fill);
  transition: width 0.2s ease;
}
.form-message:empty { display: none; }
.form-message.error {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Conferma di invio */
.prev-success {
  border: 1.5px solid rgba(91, 157, 255, 0.45);
  border-radius: var(--radius-lg);
  background: rgba(91, 157, 255, 0.04);
  padding: 40px 28px;
  text-align: center;
  outline: none;
}
.prev-success[hidden] { display: none; }
.prev-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent-fill);
}
.prev-success-icon svg { width: 28px; height: 28px; }
.prev-success h2 { font-size: 24px; margin-bottom: 10px; }
.prev-success p { color: var(--text-secondary); line-height: 1.6; }
.prev-success strong { color: var(--text-primary); overflow-wrap: anywhere; }
.prev-success-note { margin-top: 6px; font-size: 14px; }
.prev-success-note a { color: var(--accent-cyan); }
.prev-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.prev-success .btn-green {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 28px;
  background: var(--accent-fill);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
}
.prev-success .btn-green:hover { background: var(--accent-fill-hover); color: #fff; }
.prev-secondary-btn {
  min-height: 46px;
  padding: 12px 24px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}
.prev-secondary-btn:hover { border-color: var(--accent-green); }

/* Riquadro "Come funziona" */
.prev-aside {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 24px;
}
.prev-aside h2 { font-size: 17px; margin-bottom: 18px; }
.prev-steps {
  list-style: none;
  counter-reset: prev-step;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 16px;
}
.prev-steps li {
  counter-increment: prev-step;
  position: relative;
  padding-left: 42px;
  display: grid;
  gap: 2px;
}
.prev-steps li::before {
  content: counter(prev-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family:  var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(91, 157, 255, 0.1);
  border: 1px solid rgba(91, 157, 255, 0.35);
}
.prev-steps strong { font-size: 15px; }
.prev-steps span { font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.prev-direct {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  display: grid;
  gap: 8px;
}
.prev-direct p { font-size: 14px; color: var(--text-secondary); margin-bottom: 2px; }
.prev-direct-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: 15px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.prev-direct-link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-cyan); }
.prev-direct-link:hover { color: var(--accent-green); }

/* Tablet e telefono: una colonna, riquadro informativo sotto al form */
@media (max-width: 991px) {
  .prev-layout { grid-template-columns: 1fr; gap: 28px; max-width: 680px; }
  .preventivo-header { max-width: 680px; }
  .prev-aside { position: static; }
  .tipo-toggle { grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 767px) {
  .preventivo-page { padding-top: calc(var(--header-height) + 24px); padding-bottom: 56px; }
  .preventivo-header h1 { font-size: 26px; }
  .preventivo-sub { font-size: 14.5px; }
  .prev-group { padding: 18px 16px 20px; gap: 16px; }
  .prev-field-short { max-width: none; }
  .prev-submit-row { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .prev-required-note { text-align: center; }
  .prev-submit-btn { width: 100%; min-height: 50px; }
  .prev-success { padding: 32px 18px; }
  .prev-success-actions { flex-direction: column; }
  .prev-success-actions > * { width: 100%; justify-content: center; }
  .prev-aside { padding: 20px 18px; }
}
.file-errors:not(:empty) { display: block; font-size: 13px; color: #f87171; }
/* 16px ovunque: sotto questa misura Safari (iPhone/iPad) ingrandisce la pagina al tocco */
.prev-field input,
.prev-field textarea { font-size: 16px; }
/* CAPTCHA: vuoto quando la verifica è invisibile, riquadro Cloudflare se serve un clic */
.prev-captcha { display: grid; gap: 6px; }
.prev-captcha:has(#prev-turnstile:empty) { gap: 0; }

/* ═══════════════════════════════════════════════════════════════
   TEMA "GRAFITE"
   Neri neutri, foto reali dell'officina, titoli grandi in Inter Tight,
   card a griglia ("bento") e il blu del logo come unico accento.
   Questo blocco sta in fondo al file: le sue regole prevalgono su quelle
   precedenti con la stessa specificità.
═══════════════════════════════════════════════════════════════ */

body {
  background-image: none;
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
}
/* Filigrana del logo: tolta, il nuovo stile punta su foto e tipografia */
body::before,
body::after { display: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

::selection { background: rgba(91, 157, 255, 0.35); color: #fff; }

a { transition: color 0.2s ease; }

/* ── Header: trasparente sopra le foto, vetro scuro appena si scorre ── */
.site-header {
  background: linear-gradient(to bottom, rgba(10, 11, 13, 0.72), rgba(10, 11, 13, 0)) border-box no-repeat;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header.is-scrolled {
  background: rgba(10, 11, 13, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background: rgba(10, 11, 13, 0.97); }
}
.nb-link { border-radius: 999px; font-weight: 500; }
.nb-cta {
  border-radius: 999px;
  font-weight: 600;
  padding: 0 20px;
}
.nb-cta:hover { box-shadow: 0 10px 30px -10px rgba(31, 111, 224, 0.8); }
.nb-badge { background: var(--accent-fill); color: #fff; }
.nb-menu {
  background: rgba(19, 22, 25, 0.96);
  border-color: var(--line-strong);
  border-radius: 18px;
}

/* ═══ Elementi comuni ═══ */
.gx-section {
  position: relative;
  padding: clamp(88px, 11vw, 150px) 0;
}
.gx-section + .gx-section { padding-top: 0; }

.gx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.gx-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(91, 157, 255, 0.8);
  flex: none;
}

.gx-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  text-wrap: balance;
}
/* Titolo a due toni: la seconda parte in grigio */
.gx-title span { color: #7E8691; }

.gx-lead {
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 46ch;
}

.gx-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 32px 64px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.gx-head .gx-lead { justify-self: end; }

/* Pulsanti */
.gx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.gx-btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.gx-btn:hover svg { transform: translateX(3px); }
.gx-btn:active { transform: scale(0.98); }

.gx-btn-primary { background: var(--accent-fill); color: #fff; box-shadow: 0 12px 34px -14px rgba(31, 111, 224, 0.9); }
.gx-btn-primary:hover { background: var(--accent-fill-hover); color: #fff; box-shadow: 0 16px 40px -12px rgba(31, 111, 224, 0.95); }

.gx-btn-ghost {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.gx-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); color: #fff; }

.gx-btn-white { background: #fff; color: #0A0B0D; }
.gx-btn-white:hover { background: #E6ECF5; color: #0A0B0D; }

/* Comparsa allo scroll */
.gx-hero [data-animate],
.gx-section [data-animate],
.gx-gallery-section [data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.gx-section [data-animate].visible,
.gx-gallery-section [data-animate].visible {
  opacity: 1;
  transform: none;
}
.gx-bento > :nth-child(2),
.gx-sectors > :nth-child(2),
.gx-cap-grid > :nth-child(3n+2) { transition-delay: 0.08s; }
.gx-bento > :nth-child(3),
.gx-sectors > :nth-child(3),
.gx-cap-grid > :nth-child(3n) { transition-delay: 0.16s; }

/* ═══ HERO ═══ */
.gx-hero {
  position: relative;
  min-height: min(100svh, 1000px);
  min-height: min(100vh, 1000px);
  min-height: min(100svh, 1000px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-height) + 64px) 0 0;
  overflow: hidden;
  isolation: isolate;
}
.gx-hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0A0B0D;
}
.gx-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  animation: gx-hero-zoom 2.6s var(--ease) both;
}
.gx-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 11, 13, 0.94) 0%, rgba(10, 11, 13, 0.78) 38%, rgba(10, 11, 13, 0.28) 72%, rgba(10, 11, 13, 0.4) 100%),
    linear-gradient(0deg, #0A0B0D 0%, rgba(10, 11, 13, 0.6) 22%, rgba(10, 11, 13, 0) 50%),
    radial-gradient(60% 70% at 85% 25%, rgba(31, 111, 224, 0.22), transparent 70%);
}
@keyframes gx-hero-zoom {
  from { transform: scale(1.1); opacity: 0.4; }
  to   { transform: scale(1);   opacity: 1; }
}

.gx-hero-inner { position: relative; }

.gx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #D7DCE2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: gx-rise 0.9s var(--ease) 0.1s both;
}
.gx-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 157, 255, 0.2);
}

.gx-hero-title {
  max-width: 13.5ch;
  font-family: var(--font-display);
  font-size: clamp(42px, 7.2vw, 104px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
  /* Riflesso metallico: dal bianco all'acciaio */
  background: linear-gradient(180deg, #FFFFFF 35%, #AEB8C4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Con background-clip:text il colore esiste solo dentro il riquadro del
     titolo: con un'interlinea così stretta le "gambe" di g, p, q dell'ultima
     riga ne uscivano e sparivano. Il margine interno le include; quello
     negativo lascia invariata la distanza dal testo sotto. */
  padding: 0.06em 0 0.16em;
  margin: -0.06em 0 -0.16em;
  text-wrap: balance;
  animation: gx-rise 0.9s var(--ease) 0.2s both;
}
.gx-hero-lead {
  max-width: 52ch;
  margin-top: 28px;
  font-size: clamp(16.5px, 1.4vw, 19px);
  line-height: 1.6;
  color: #C3C9D1;
  animation: gx-rise 0.9s var(--ease) 0.3s both;
}
.gx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  animation: gx-rise 0.9s var(--ease) 0.4s both;
}
@keyframes gx-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.gx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(56px, 8vw, 104px) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  animation: gx-rise 0.9s var(--ease) 0.55s both;
}
.gx-stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 28px 24px 36px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.gx-stat:first-child { border-left: 0; padding-left: 0; }
.gx-stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #fff;
  white-space: nowrap;
}
.gx-stat dd span {
  margin-left: 6px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
}
.gx-stat dt {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ═══ Nastro dei settori ═══ */
.gx-marquee {
  overflow: hidden;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.gx-marquee-track {
  display: flex;
  width: max-content;
  animation: gx-marquee 38s linear infinite;
}
.gx-marquee:hover .gx-marquee-track { animation-play-state: paused; }
.gx-marquee-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.gx-marquee-list li {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #8E96A1;
  white-space: nowrap;
}
.gx-marquee-list li::after {
  content: '';
  width: 10px;
  height: 10px;
  margin: 0 clamp(28px, 3.4vw, 48px);
  border: 2px solid var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.8;
}
@keyframes gx-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══ Servizi: griglia bento ═══ */
.gx-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.gx-span-7 { grid-column: span 7; }
.gx-span-5 { grid-column: span 5; }
.gx-span-4 { grid-column: span 4; }
.gx-span-12 { grid-column: 1 / -1; }

.gx-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.5s var(--ease), background-color 0.3s ease;
}
.gx-tile:hover { border-color: var(--line-strong); }
/* Riflesso in alto, come una lamiera lucidata */
.gx-tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  z-index: 2;
}

.gx-tile-photo {
  min-height: clamp(440px, 46vw, 600px);
  justify-content: flex-end;
  padding: 36px;
  background: #0F1114;
}
.gx-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.gx-tile-photo:hover .gx-tile-img { transform: scale(1.045); }
.gx-tile-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 13, 0) 30%, rgba(10, 11, 13, 0.6) 60%, rgba(10, 11, 13, 0.95) 100%);
}
.gx-tile-body { position: relative; z-index: 1; }

.gx-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.gx-tile-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.gx-tile-photo .gx-tile-title { font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -0.035em; color: #fff; }
.gx-tile-text { font-size: 15.5px; line-height: 1.6; color: var(--text-secondary); max-width: 48ch; }
.gx-tile-photo .gx-tile-text { color: #C9CED5; }

.gx-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(91, 157, 255, 0.08);
  border: 1px solid rgba(91, 157, 255, 0.22);
  flex: none;
}
.gx-tile-icon svg { width: 24px; height: 24px; }

.gx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: auto 0 0;
  padding: 24px 0 0;
}
.gx-tags li {
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* "Parco macchine": testo + freccia in un cerchio */
.gx-more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 0;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}
.gx-more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #0A0B0D;
  flex: none;
  transition: transform 0.35s var(--ease), background-color 0.25s ease, color 0.25s ease;
}
.gx-more-icon svg { width: 18px; height: 18px; }
.gx-more:hover .gx-more-icon,
.gx-flow-link:hover .gx-more-icon { transform: translateX(4px); background: var(--accent-fill); color: #fff; }

/* Lavorazione in evidenza (rettifica senza centri): testo + disegno del principio */
.gx-tile-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  padding: 44px;
  background:
    radial-gradient(70% 110% at 100% 0%, rgba(31, 111, 224, 0.16), transparent 62%),
    var(--surface);
  border-color: rgba(91, 157, 255, 0.28);
}
.gx-tile-feature:hover { border-color: rgba(91, 157, 255, 0.45); }
.gx-feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.gx-feature-chips .gx-chip { margin-bottom: 0; }
.gx-chip-new { background: var(--accent-fill); border-color: transparent; }
.gx-feature-title { font-size: clamp(30px, 3.2vw, 44px); letter-spacing: -0.035em; }
.gx-tile-feature .gx-tile-text strong { color: var(--text-primary); font-weight: 600; }
.gx-feature-tags { margin: 0; padding-top: 22px; }
.gx-feature-specs {
  display: flex;
  flex-wrap: wrap;
  margin: 28px 0 0;
  border-top: 1px solid var(--line-strong);
}
.gx-feature-specs > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 18px 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid var(--line);
}
.gx-feature-specs > div:last-child { border-right: 0; margin-right: 0; }
.gx-feature-specs dt { font-size: 13px; color: var(--text-secondary); }
.gx-feature-specs dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  white-space: nowrap;
}
.gx-feature-specs dd span {
  margin: 0 5px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
}
.gx-feature-specs dd span:last-child { margin-right: 0; }
.gx-tile-feature .gx-more { margin-top: 30px; }
.gx-feature-art {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0D0F12;
  overflow: hidden;
}
.gx-centerless-svg { display: block; width: 100%; height: auto; }

/* Card "dal prototipo alla serie" */
.gx-tile-flow { gap: 10px; justify-content: space-between; }
.gx-flow-label {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.gx-flow-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.gx-flow-link:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: #fff; }
.gx-flow-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.gx-flow-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gx-flow-text strong { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.gx-flow-text small { font-size: 13.5px; color: var(--text-secondary); }
.gx-flow-link .gx-more-icon { width: 38px; height: 38px; background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ═══ Azienda ═══ */
.gx-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.gx-split-top { align-items: start; }
.gx-prose {
  margin-top: 28px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.7;
  color: var(--text-secondary);
}
.gx-prose p + p { margin-top: 1em; }
.gx-prose strong { color: var(--text-primary); font-weight: 600; }
.gx-split-media {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gx-split-media img { width: 100%; height: 100%; object-fit: cover; }

.gx-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  list-style: none;
  margin: clamp(72px, 9vw, 120px) 0 0;
  padding: 0;
  counter-reset: none;
}
.gx-timeline li {
  position: relative;
  padding-top: 36px;
  border-top: 1px solid var(--line-strong);
}
.gx-timeline li::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0A0B0D;
  border: 2px solid #8E96A1;
}
.gx-timeline li.is-now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(91, 157, 255, 0.2); }
.gx-tl-year {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.gx-timeline h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.gx-timeline p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.gx-timeline strong { color: var(--text-primary); font-weight: 600; }

/* ═══ Settori ═══ */
.gx-sectors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.gx-sector {
  grid-column: span 2;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.gx-sector:nth-child(n+4) { grid-column: span 3; }
.gx-sector:hover { border-color: rgba(91, 157, 255, 0.35); background: #15191E; }
.gx-sector h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.gx-sector p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.gx-sector strong { color: var(--text-primary); font-weight: 600; }

/* ═══ Galleria officina ═══ */
.gx-gallery-section { padding: 0 0 clamp(88px, 11vw, 150px); }
.gx-gallery-section + .gx-section,
.gx-gallery-section + .dove-lightbox + .gx-section { padding-top: 0; }
.gx-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.35fr;
  grid-auto-rows: clamp(300px, 32vw, 460px);
  gap: 16px;
}
.gx-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}
/* Altezze sfalsate: le foto pari partono più in basso */
.gx-gallery-item:nth-child(even) { align-self: end; height: calc(100% - 56px); }
.gx-gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.gx-gallery-item:hover img { transform: scale(1.06); }
.gx-gallery-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #0A0B0D;
  background: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.gx-gallery-zoom svg { width: 18px; height: 18px; }
.gx-gallery-item:hover .gx-gallery-zoom,
.gx-gallery-item:focus-visible .gx-gallery-zoom { opacity: 1; transform: none; }

/* ═══ Capacità tecniche: righe da scheda tecnica ═══ */
.gx-cap-grid { border-top: 1px solid var(--line-strong); }
.gx-cap {
  display: grid;
  grid-template-columns: 48px minmax(0, 0.9fr) minmax(0, 1.5fr) 190px;
  align-items: start;
  gap: 32px;
  padding: 34px 8px;
  border-bottom: 1px solid var(--line-strong);
  transition: background-color 0.3s ease;
}
.gx-cap:hover { background: rgba(255, 255, 255, 0.025); }
.gx-cap .gx-tile-icon { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.gx-cap .gx-tile-icon svg { width: 22px; height: 22px; }
.gx-cap h3 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; padding-top: 8px; }
.gx-cap p { font-size: 15.5px; line-height: 1.65; color: var(--text-secondary); padding-top: 8px; }
.gx-cap strong { color: var(--text-primary); font-weight: 600; }
.gx-cap-tag {
  justify-self: end;
  margin-top: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(91, 157, 255, 0.3);
  border-radius: 999px;
  white-space: nowrap;
}

/* ═══ Materiali ═══ */
.gx-sticky { position: sticky; top: calc(var(--header-height) + 32px); }
.gx-materiali .gx-lead { margin-top: 24px; }
.gx-note { margin-top: 24px; font-size: 14.5px; color: var(--text-muted); max-width: 46ch; }
.gx-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.gx-materiali .mat-accord-wrap { max-width: none; margin: 0; }
.gx-materiali .mat-accord { display: block; }
.gx-materiali .mf-accord-item {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  margin: 0;
}
.gx-materiali .mf-accord-item:first-child { border-top: 1px solid var(--line-strong); }
.gx-materiali .mf-accord-head {
  padding: 28px 4px;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  background: none;
}
.gx-materiali .mf-accord-head:hover { color: #fff; background: none; }
.gx-materiali .mf-accord-item.open,
.gx-materiali .mf-accord-item.open .mf-accord-head { background: none; }
.gx-materiali .mf-accord-dot { width: 12px; height: 12px; margin-right: 14px; vertical-align: 0.05em; }
.gx-materiali .mf-accord-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-secondary);
}
.gx-materiali .mf-accord-item.open .mf-accord-arrow { background: #fff; color: #0A0B0D; border-color: #fff; }
.gx-materiali .mf-mat-rows { padding: 0 4px 28px; gap: 0; }
.gx-materiali .mf-mat-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.gx-materiali .mf-mat-name { font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.gx-materiali .mf-mat-note { font-size: 14.5px; color: var(--text-secondary); }

/* ═══ Pagine interne: stessi caratteri e card ═══ */
.content-page .page-hero h1,
.legal-page h1,
.preventivo-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.content-page .page-hero h1 { font-size: clamp(32px, 5.4vw, 72px); }
.content-page .page-hero { border-bottom-color: var(--line); }
.content-page h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.03em; }
.content-page h3 { letter-spacing: -0.02em; }
.legal-page h1 { font-size: clamp(32px, 4.2vw, 52px); }
.preventivo-header h1 { font-size: clamp(32px, 4.2vw, 52px); }
.legal-page h2 { letter-spacing: -0.02em; }

/* Etichetta sopra i titoli delle pagine interne (stesso stile della home) */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.section-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(91, 157, 255, 0.8);
  flex: none;
}
.legal-page .section-eyebrow { display: flex; width: fit-content; }
.legal-page code,
.content-page code { color: var(--accent); }

.content-cards > *,
.content-card {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 20px;
}

.cookie-banner { background: rgba(15, 17, 20, 0.97); border-top-color: var(--line-strong); }
.cookie-btn { border-radius: 999px; }
.cookie-modal { background: #131619; border-color: var(--line-strong); border-radius: 22px; }

/* Modali parco macchine */

.site-footer { background: #08090B; border-top: 1px solid var(--line); }

/* ═══ Movimento ridotto ═══ */
@media (prefers-reduced-motion: reduce) {
  .gx-hero-img,
  .gx-kicker,
  .gx-hero-title,
  .gx-hero-lead,
  .gx-hero-actions,
  .gx-stats { animation: none; }
  .gx-marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .gx-marquee-list[aria-hidden="true"] { display: none; }
  .gx-section [data-animate],
  .gx-gallery-section [data-animate] { opacity: 1; transform: none; transition: none; }
}

/* ═══ Tablet ═══ */
@media (max-width: 1080px) {
  .gx-span-7, .gx-span-5 { grid-column: span 12; }
  .gx-span-4 { grid-column: span 6; }
  .gx-tile-flow { grid-column: span 12; }
  .gx-cap { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px 24px; }
  .gx-cap h3 { grid-column: 2; }
  .gx-cap p { grid-column: 2 / -1; grid-row: 2; padding-top: 0; }
  .gx-cap-tag { grid-column: 3; grid-row: 1; }
  .gx-sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-sector, .gx-sector:nth-child(n+4) { grid-column: span 1; }
  .gx-sector:last-child { grid-column: span 2; }
  .gx-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (max-width: 900px) {
  .gx-head { grid-template-columns: 1fr; gap: 20px; }
  .gx-tile-feature { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
  .gx-head .gx-lead { justify-self: start; }
  .gx-split { grid-template-columns: 1fr; }
  .gx-split-media { aspect-ratio: 4 / 3; }
  .gx-sticky { position: static; }
  .gx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .gx-stat:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .gx-gallery {
    display: flex;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin: 0 -24px;
    padding: 0 24px 8px;
    scrollbar-width: none;
  }
  .gx-gallery::-webkit-scrollbar { display: none; }
  .gx-gallery-item { flex: 0 0 72%; aspect-ratio: 4 / 5; scroll-snap-align: center; }
  .gx-gallery-item:nth-child(even) { margin-top: 0; }
  .gx-gallery-zoom { opacity: 1; transform: none; }
}

/* ═══ Telefono ═══ */
@media (max-width: 640px) {
  .gx-section { padding: 80px 0; }
  .gx-hero { padding-top: calc(var(--header-height) + 40px); min-height: 100svh; }
  .gx-hero-img { object-position: 62% 50%; }
  .gx-hero-media::after {
    background:
      linear-gradient(0deg, #0A0B0D 0%, rgba(10, 11, 13, 0.82) 45%, rgba(10, 11, 13, 0.55) 100%),
      radial-gradient(80% 50% at 80% 10%, rgba(31, 111, 224, 0.25), transparent 70%);
  }
  .gx-kicker { font-size: 12px; margin-bottom: 22px; }
  .gx-kicker-place { display: none; }
  .gx-hero-title { letter-spacing: -0.04em; }
  .gx-hero-lead { margin-top: 20px; }
  .gx-hero-actions { flex-direction: column; margin-top: 28px; }
  .gx-hero-actions .gx-btn { width: 100%; }
  .gx-stats { margin-top: 48px; }
  .gx-stat { padding: 20px 0 22px 16px; }
  .gx-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .gx-stat dt { font-size: 12.5px; }

  .gx-marquee { padding: 18px 0; }

  .gx-bento { gap: 12px; }
  .gx-span-4 { grid-column: span 12; }
  .gx-tile, .gx-sector { padding: 26px; border-radius: 20px; }
  .gx-tile-photo { min-height: 440px; padding: 26px; }
  .gx-tile-feature { padding: 26px; gap: 26px; }
  .gx-feature-specs { display: block; }
  .gx-feature-specs > div {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    margin: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .gx-feature-specs dd { font-size: 22px; }
  .gx-feature-art { border-radius: 16px; }
  .gx-tile-icon { margin-bottom: 22px; }

  .gx-sectors { grid-template-columns: 1fr; gap: 12px; }
  .gx-sector:last-child { grid-column: span 1; }
  .gx-cap { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 16px; padding: 26px 0; }
  .gx-cap p { grid-column: 1 / -1; grid-row: auto; margin-top: 8px; }
  .gx-cap-tag { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-top: 10px; }

  .gx-timeline { grid-template-columns: 1fr; gap: 0; margin-top: 64px; }
  .gx-timeline li { padding: 0 0 32px 28px; border-top: 0; border-left: 1px solid var(--line-strong); }
  .gx-timeline li:last-child { padding-bottom: 0; }
  .gx-timeline li::before { top: 2px; left: -5px; }

  .gx-gallery { margin: 0 -16px; padding: 0 16px 8px; }
  .gx-gallery-item { flex-basis: 80%; }

  .gx-materiali .mf-accord-head { padding: 22px 0; }
  .gx-materiali .mf-mat-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   Telefono: logo → azioni (2×2) → link in due colonne → dati legali.
   PC: logo | azioni | Servizi | Azienda, poi la riga dei dati legali.
═══════════════════════════════════════════════════════════════ */
.site-footer.ft {
  padding: clamp(56px, 7vw, 88px) 0 0;
  text-align: left;
  background: #08090B;
  border-top: 1px solid var(--line);
}
.ft-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 0.7fr) minmax(0, 0.7fr);
  grid-template-areas: "brand actions servizi azienda";
  gap: 48px;
  align-items: start;
}
.ft-brand { grid-area: brand; }
.ft-actions { grid-area: actions; }
.ft-col-servizi { grid-area: servizi; }
.ft-col-azienda { grid-area: azienda; }

.ft-logo-link { display: inline-block; }
.ft-logo { display: block; width: 150px; height: auto; filter: brightness(0) invert(1); }   /* logo blu → bianco, come nell'header */
.ft-tagline {
  max-width: 34ch;
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.ft-social { display: flex; gap: 10px; margin-top: 20px; }
.ft-social:empty { display: none; }

/* Azioni: righe grandi e facili da toccare */
.ft-actions { display: grid; gap: 10px; }
.ft-action {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.ft-action:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line-strong); color: #fff; }
.ft-action:active { transform: scale(0.98); }
.ft-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(91, 157, 255, 0.1);
}
.ft-action-icon svg { width: 20px; height: 20px; }
.ft-action-text { display: flex; flex-direction: column; min-width: 0; }
.ft-action-text small { font-size: 12.5px; color: var(--text-muted); line-height: 1.3; }
.ft-action-text strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
  overflow-wrap: anywhere;
}

/* Colonne di link */
.ft-title {
  margin: 0 0 16px;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ft-col a {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
}
.ft-col a:hover { color: #fff; }

/* Dati societari e pagine legali */
.ft-bottom {
  margin-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.ft-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  padding-top: 28px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}
.ft-company {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-muted);
}
.ft-company strong { color: var(--text-secondary); font-weight: 600; }
.ft-company a { color: var(--text-secondary); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ft-company a:hover { color: #fff; }
.ft-sep { margin: 0 4px; color: var(--text-muted); }
.ft-legal-wrap { text-align: right; }
.ft-legal { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; }
.ft-legal a { padding: 4px 0; font-size: 13.5px; color: var(--text-secondary); text-decoration: none; }
.ft-legal a:hover { color: #fff; }
.ft-copy { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); }

/* Tablet: logo e azioni affiancati, link sotto */
@media (max-width: 1080px) {
  .ft-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "brand   actions"
      "servizi azienda";
    gap: 40px 32px;
  }
}

/* Telefono: azioni in griglia 2×2, tutto allineato a sinistra */
@media (max-width: 640px) {
  .site-footer.ft { padding-top: 44px; }
  .ft-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "brand   brand"
      "actions actions"
      "servizi azienda";
    gap: 28px 20px;
  }
  /* Il logo è già nell'header fisso, proprio sopra: qui basterebbe a ripeterlo */
  .ft-logo-link { display: none; }
  .ft-tagline { margin-top: 0; font-size: 14.5px; }
  .ft-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .ft-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 12px;
    border-radius: 14px;
  }
  .ft-action-icon { width: 32px; height: 32px; border-radius: 9px; }
  .ft-action-icon svg { width: 18px; height: 18px; }
  .ft-action-text small { font-size: 12px; }
  .ft-action-text strong { font-size: 14px; }
  .ft-title { margin-bottom: 8px; font-size: 12px; }
  .ft-col a { font-size: 14.5px; padding: 7px 0; }
  .ft-bottom { margin-top: 36px; }
  .ft-bottom-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 22px; }
  .ft-company { font-size: 13px; line-height: 1.75; }
  .ft-legal-wrap { text-align: left; }
  .ft-legal { justify-content: flex-start; gap: 2px 18px; }
  .ft-legal a { font-size: 13px; }
  .ft-copy { font-size: 12.5px; }
}

/* ═══════════════════════════════════════════════════════════════
   PARCO MACCHINE — pop-up di Fresatura e Tornitura
   PC: elenco a sinistra, macchina scelta a destra (disegno + dati).
   Telefono: a tutto schermo, elenco come fila di schede scorrevoli.
═══════════════════════════════════════════════════════════════ */
.mx-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 8, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mx-overlay.active { opacity: 1; visibility: visible; }

.mx-sheet {
  display: flex;
  flex-direction: column;
  width: min(1200px, 100%);
  height: min(860px, 100%);
  overflow: hidden;
  background: #0F1114;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9);
  transform: translateY(24px) scale(0.985);
  transition: transform 0.45s var(--ease);
}
.mx-overlay.active .mx-sheet { transform: none; }

/* Intestazione */
.mx-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "text summary close";
  align-items: end;
  gap: 32px;
  padding: 28px 28px 24px 32px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 160% at 100% 0%, rgba(31, 111, 224, 0.16), transparent 62%);
}
.mx-head-text { grid-area: text; min-width: 0; }
.mx-summary { grid-area: summary; }
.mx-close { grid-area: close; align-self: start; }

.mx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.mx-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(91, 157, 255, 0.8);
}
.mx-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #fff;
}
.mx-lead { margin: 10px 0 0; max-width: 56ch; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }

.mx-summary { display: flex; margin: 0; }
.mx-summary > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.mx-summary dt { font-size: 12.5px; color: var(--text-muted); }
.mx-summary dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.mx-summary dd span,
.mx-specs dd span {
  margin-left: 4px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
}

.mx-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease);
}
.mx-close svg { width: 18px; height: 18px; }
.mx-close:hover { background: rgba(255, 255, 255, 0.1); transform: rotate(90deg); }

/* Corpo: elenco + scheda */
.mx-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.mx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.mx-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.mx-item:hover { background: rgba(255, 255, 255, 0.04); }
.mx-item.is-active { background: rgba(91, 157, 255, 0.08); border-color: rgba(91, 157, 255, 0.38); }
.mx-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mx-item-top strong { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.mx-item-dims { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); }
.mx-item-bar { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mx-item-bar span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent-fill), var(--accent)); }
.mx-item:not(.is-active) .mx-item-bar span { opacity: 0.55; }
.mx-item-ops { position: relative; margin-top: 12px; }
.mx-item-ops::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--line);
}

.mx-badge {
  flex: none;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--accent);
  border: 1px solid rgba(91, 157, 255, 0.35);
  border-radius: 999px;
}

.mx-panels { min-height: 0; overflow-y: auto; padding: 32px; scrollbar-width: thin; }
.mx-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  animation: mx-panel-in 0.35s var(--ease);
}
.mx-panel[hidden] { display: none; }
.mx-panel:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 6px; border-radius: 12px; }
.mx-panel-ops { display: block; }
@keyframes mx-panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.mx-drawing {
  margin: 0;
  padding: 18px 18px 14px;
  background: #0B0D10;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.mx-drawing .macchina-svg { width: 100%; height: auto; border-radius: 0; }
.mx-drawing figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
}

.mx-info-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mx-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
}
.mx-desc { margin: 14px 0 0; font-size: 15.5px; line-height: 1.65; color: var(--text-secondary); }
.mx-desc strong { color: var(--text-primary); font-weight: 600; }

.mx-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
  border-top: 1px solid var(--line-strong);
}
.mx-specs > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;   /* valori allineati in alto anche se un'etichetta va a capo */
  gap: 4px;
  padding: 16px 12px 0 0;
}
.mx-specs > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.mx-specs dt { font-size: 12.5px; color: var(--text-muted); }
.mx-specs dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  white-space: nowrap;
}

.mx-extra {
  margin: 22px 0 0;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
  background: rgba(91, 157, 255, 0.06);
  border: 1px solid rgba(91, 157, 255, 0.22);
  border-radius: 14px;
}
.mx-extra span {
  display: block;
  margin-bottom: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.mx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.mx-chips li {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* Lavorazioni possibili (tornitura) */
.mx-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.mx-op {
  padding: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.mx-op-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(91, 157, 255, 0.1);
}
.mx-op-icon svg { width: 20px; height: 20px; }
.mx-op h4 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: #fff; }
.mx-op p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }
.mx-op-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 2px;
  color: var(--accent);
  border: 1px solid rgba(91, 157, 255, 0.35);
  border-radius: 999px;
}

/* Piede con il preventivo */
.mx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 14px 20px 14px 32px;
  background: #0D0F12;
  border-top: 1px solid var(--line);
}
.mx-foot p { margin: 0; font-size: 14.5px; color: var(--text-secondary); }
.mx-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(31, 111, 224, 0.18);
  border: 1px solid rgba(91, 157, 255, 0.5);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.mx-cta svg { color: var(--accent); }
.mx-cta svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.mx-cta:hover { color: #fff; background: rgba(31, 111, 224, 0.3); }
.mx-cta:hover svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .mx-overlay, .mx-sheet { transition: none; }
  .mx-panel { animation: none; }
}

/* Tablet: scheda in colonna (disegno sopra, dati sotto) */
@media (max-width: 1000px) {
  .mx-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text close" "summary summary"; gap: 20px; }
  .mx-summary > div:first-child { padding-left: 0; border-left: 0; }
  .mx-body { grid-template-columns: 250px minmax(0, 1fr); }
  .mx-panel { grid-template-columns: 1fr; gap: 24px; }
  .mx-panels { padding: 24px; }
}

/* Le aree che scorrono non "passano" lo scorrimento alla pagina sotto */
.mx-panels,
.mx-list,
.nb-drawer,
.nb-drawer-body { overscroll-behavior: contain; }

/* Telefono: a tutto schermo, elenco orizzontale */
@media (max-width: 760px) {
  .mx-overlay { padding: 0; align-items: stretch; }
  .mx-sheet {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    transform: translateY(32px);
  }
  /* Intestazione bassa: il riepilogo è già nelle schede dell'elenco */
  .mx-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "text close";
    align-items: center;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  }
  .mx-summary { display: none; }
  .mx-eyebrow { margin-bottom: 4px; font-size: 11px; }
  .mx-title { font-size: 24px; }
  .mx-lead { display: none; }
  .mx-close { align-self: center; width: 40px; height: 40px; }

  .mx-body { display: flex; flex-direction: column; }
  .mx-list {
    flex-direction: row;
    flex: none;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;   /* la scheda agganciata non tocca il bordo */
    scrollbar-width: none;
  }
  .mx-list::-webkit-scrollbar { display: none; }
  .mx-item {
    flex: 0 0 auto;
    width: 178px;
    gap: 5px;
    padding: 10px 12px;
    border-color: var(--line);
    scroll-snap-align: start;
  }
  .mx-item-top strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Gli assi sono già nella scheda della macchina: qui terrebbero il nome su due righe */
  .mx-item-top .mx-badge { display: none; }
  .mx-item-dims { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mx-item-ops { width: auto; min-width: 168px; margin-top: 0; }
  .mx-item-ops::before { display: none; }

  /* Scheda: prima nome e misure, poi disegno, poi descrizione */
  .mx-panels { flex: 1; padding: 18px 16px 24px; }
  .mx-panel { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .mx-info { display: contents; }
  .mx-info-head { order: 1; }
  .mx-specs { order: 2; margin-top: 14px; }
  .mx-drawing { order: 3; margin-top: 18px; padding: 12px 10px 10px; border-radius: 16px; }
  .mx-desc { order: 4; margin-top: 18px; }
  .mx-extra { order: 5; }
  .mx-chips { order: 6; }
  .mx-name { font-size: 24px; }
  .mx-specs dd { font-size: 21px; }
  .mx-specs > div + div { padding-left: 12px; }
  .mx-ops { grid-template-columns: 1fr; margin-top: 16px; }
  .mx-op { padding: 18px; }

  .mx-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .mx-foot p { display: none; }
  .mx-foot { justify-content: flex-start; }
}

/* Telefono in orizzontale e schermi bassi: elenco a sinistra, tutto compatto */
@media (max-height: 560px) and (orientation: landscape) {
  .mx-overlay { padding: 0; align-items: stretch; }
  .mx-sheet { width: 100%; height: 100%; border: 0; border-radius: 0; transform: none; }
  .mx-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "text summary close";
    align-items: center;
    gap: 16px;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  }
  .mx-eyebrow, .mx-lead { display: none; }
  .mx-title { font-size: 22px; }
  .mx-summary { display: flex; }
  .mx-summary > div { padding: 0 14px; }
  .mx-summary > div:first-child { padding-left: 14px; border-left: 1px solid var(--line); }
  .mx-summary dd { font-size: 18px; }
  .mx-summary dt { font-size: 11px; }
  .mx-close { width: 36px; height: 36px; align-self: center; }

  .mx-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .mx-list {
    flex-direction: column;
    gap: 4px;
    padding: 8px 8px 8px max(8px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .mx-item { width: 100%; padding: 8px 10px; gap: 4px; }
  .mx-item-top .mx-badge { display: none; }
  .mx-item-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mx-item-ops { margin-top: 6px; }
  .mx-item-ops::before { display: none; }

  .mx-panels { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 18px 16px; }
  .mx-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .mx-panel-ops { display: block; }
  .mx-info { display: block; }
  .mx-drawing { order: 0; margin-top: 0; padding: 10px; }
  .mx-drawing figcaption { display: none; }
  .mx-name { font-size: 22px; }
  .mx-desc { margin-top: 10px; font-size: 14.5px; }
  .mx-specs { margin-top: 14px; }
  .mx-specs dd { font-size: 20px; }
  .mx-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mx-foot { padding: 6px max(16px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .mx-foot p { display: block; font-size: 13.5px; }
  @media (max-width: 760px) { .mx-foot p { display: none; } }

}

/* ═══════════════════════════════════════════════════════════════
   PWLABS — strumenti per l'officina
   PC: elenco a sinistra (fisso mentre si scorre), uno strumento a destra.
   Telefono: elenco come fila di schede fissa in alto, strumento sotto.
═══════════════════════════════════════════════════════════════ */
.lb-page { padding: calc(var(--header-height) + 44px) 0 88px; }
.lb-page [hidden] { display: none !important; }

.lb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  align-items: end;
  gap: 24px 48px;
  margin-bottom: 36px;
}
.lb-hero .gx-eyebrow { margin-bottom: 14px; }
.lb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
}
.lb-lead { margin: 16px 0 0; max-width: 60ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--text-secondary); }

.lb-search { position: relative; }
.lb-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.lb-search input {
  width: 100%;
  height: 54px;
  padding: 0 112px 0 48px;
  font-family: var(--font-family);
  font-size: 15.5px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lb-search input::placeholder { color: var(--text-muted); }
.lb-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 157, 255, 0.18); }
.lb-search input::-webkit-search-cancel-button { display: none; }
.lb-search-count {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  color: var(--text-muted);
  pointer-events: none;
}

.lb-app {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Elenco degli strumenti */
.lb-nav {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  scrollbar-width: thin;
}
.lb-nav-inner { display: flex; flex-direction: column; gap: 2px; }
.lb-nav-title {
  margin: 14px 12px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lb-nav-title:first-child { margin-top: 6px; }
.lb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.lb-nav-item:hover { background: rgba(255, 255, 255, 0.04); }
.lb-nav-item.is-active { background: rgba(91, 157, 255, 0.1); border-color: rgba(91, 157, 255, 0.38); }
.lb-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lb-nav-icon svg { width: 18px; height: 18px; }
.lb-nav-item.is-active .lb-nav-icon { background: var(--accent-fill); color: #fff; }
.lb-nav-text { display: flex; flex-direction: column; min-width: 0; }
.lb-nav-text strong { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.lb-nav-text small { font-size: 12.5px; line-height: 1.35; color: var(--text-muted); }
.lb-nav-empty { padding: 12px; font-size: 14px; color: var(--text-muted); }

/* Strumento */
.lb-work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lb-tool {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  animation: lb-in 0.35s var(--ease);
}
@keyframes lb-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.lb-tool-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.lb-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(91, 157, 255, 0.1);
  border: 1px solid rgba(91, 157, 255, 0.25);
}
.lb-tool-icon svg { width: 24px; height: 24px; }
.lb-tool-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}
.lb-tool-title p { margin: 8px 0 0; max-width: 64ch; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
.lb-tool-actions { display: flex; gap: 6px; }
.lb-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.lb-action svg { width: 15px; height: 15px; }
.lb-action:hover { color: #fff; border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.04); }
.lb-action.is-done { color: var(--accent-success); border-color: rgba(74, 222, 128, 0.5); }

.lb-tool-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.lb-tool-body-stack { grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* Campi */
.lb-inputs { display: grid; gap: 18px; min-width: 0; }
.lb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.lb-field > label,
.lb-seg > legend,
.lb-chips > legend,
.lb-choices > legend {
  display: block;
  float: left;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.lb-input {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 14px;
  background: #0D0F12;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lb-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 157, 255, 0.16); }
.lb-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
  -moz-appearance: textfield;
}
.lb-input input::-webkit-outer-spin-button,
.lb-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lb-input span { margin-left: 8px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.lb-input-search input { font-family: var(--font-family); font-size: 16px; }
.lb-input-search input::placeholder { color: var(--text-muted); }

.lb-select {
  width: 100%;
  height: 52px;
  padding: 0 42px 0 14px;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text-primary);
  background: #0D0F12 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9AFB8' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
.lb-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 157, 255, 0.16); }
.lb-select option { background: #131619; color: var(--text-primary); }

/* Pulsanti di scelta (radio) */
.lb-seg, .lb-chips, .lb-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.lb-seg label, .lb-chips label, .lb-choices label { position: relative; cursor: pointer; }
.lb-seg input, .lb-chips input, .lb-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.lb-seg span, .lb-chips span {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #0D0F12;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.lb-chips span { height: 36px; padding: 0 13px; font-size: 13.5px; }
#th-sizes span { font-family: var(--font-mono); font-size: 13px; }
.lb-seg label:hover span, .lb-chips label:hover span { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.lb-seg input:checked + span, .lb-chips input:checked + span {
  color: #fff;
  background: var(--accent-fill);
  border-color: var(--accent-fill);
}
.lb-seg input:focus-visible + span,
.lb-chips input:focus-visible + span,
.lb-choices input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.lb-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lb-choices > legend { grid-column: 1 / -1; float: none; }
.lb-choices span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  background: #0D0F12;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.lb-choices strong { font-family: var(--font-mono); font-size: 14.5px; font-weight: 600; color: #fff; }
.lb-choices small { font-size: 12.5px; color: var(--text-muted); }
.lb-choices label:hover span { border-color: rgba(255, 255, 255, 0.3); }
.lb-choices input:checked + span { background: rgba(91, 157, 255, 0.12); border-color: var(--accent); }

.lb-hint { margin: -6px 0 0; font-size: 13px; color: var(--text-muted); }

/* Risultati */
.lb-results { display: grid; gap: 12px; align-content: start; min-width: 0; }
.lb-results-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lb-result {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 16px 20px 18px;
  background: #0D0F12;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.lb-result-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.lb-result output {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  overflow-wrap: anywhere;
}
.lb-result output.lb-out-sm { font-size: 22px; letter-spacing: -0.02em; }
.lb-result-unit { font-size: 13px; color: var(--text-muted); }
.lb-result-unit b { font-weight: 600; color: var(--accent); }
.lb-result-main {
  background: linear-gradient(135deg, rgba(31, 111, 224, 0.24), rgba(31, 111, 224, 0.06));
  border-color: rgba(91, 157, 255, 0.42);
}
.lb-result-main output { font-size: 46px; }
.lb-result-main .lb-result-unit { color: #B9C3D0; }   /* più chiaro: sta su fondo blu */
.lb-result-name output { color: var(--accent); }
.lb-result.is-source { border-color: rgba(91, 157, 255, 0.5); }
#ft-kind[data-kind="gioco"] { color: #4ADE80; }
#ft-kind[data-kind="transizione"] { color: #FBBF24; }
#ft-kind[data-kind="interferenza"] { color: #F87171; }

.lb-note {
  margin: 0;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent);
  border-radius: 0 12px 12px 0;
}
.lb-note:empty { display: none; }

.lb-limits { display: grid; gap: 8px; }
.lb-limit {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0D0F12;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.lb-limit strong { font-family: var(--font-mono); font-size: 15px; color: var(--accent); }
.lb-limit-dev { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: #fff; }
.lb-limit-mm { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }

/* Disegni e grafici */
.lb-visual {
  margin: 24px 0 0;
  padding: 18px 20px 14px;
  background: #0D0F12;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.lb-visual svg { display: block; width: 100%; height: auto; }
.lb-visual figcaption { margin-top: 10px; font-size: 12.5px; text-align: center; color: var(--text-muted); }
.lb-visual-inline { margin: 0; padding: 12px; }
.lb-visual-inline svg { max-height: 380px; }

.lb-bars { display: grid; gap: 9px; }
.lb-bar { display: grid; grid-template-columns: 48px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.lb-bar-label { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.lb-bar-track { height: 10px; background: rgba(255, 255, 255, 0.06); border-radius: 6px; overflow: hidden; }
.lb-bar-track span { display: block; height: 100%; background: rgba(140, 184, 240, 0.4); border-radius: 6px; transition: width 0.35s var(--ease); }
.lb-bar-val { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--text-secondary); }
.lb-bar.is-active .lb-bar-label, .lb-bar.is-active .lb-bar-val { color: #fff; font-weight: 600; }
.lb-bar.is-active .lb-bar-track span { background: linear-gradient(90deg, var(--accent-fill), var(--accent)); }

/* Tabelle */
.lb-table-wrap {
  margin-top: 22px;
  max-height: 440px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  position: sticky;
  top: 0;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--text-muted);
  background: #0D0F12;
}
.lb-table td {
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-primary);
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.lb-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.lb-table-eq td { font-family: var(--font-family); font-size: 14.5px; }
.lb-table-eq td strong { font-weight: 600; color: #fff; }
.lb-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(91, 157, 255, 0.35);
  border-radius: 999px;
}
.lb-empty { margin: 0; padding: 18px 16px; font-size: 14.5px; color: var(--text-muted); }

/* Convertitore */
.lb-conv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.lb-conv-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #0D0F12;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lb-conv-cell:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 157, 255, 0.16); }
.lb-conv-cell span { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.lb-conv-cell input {
  width: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
  -moz-appearance: textfield;
}
.lb-conv-cell input::-webkit-outer-spin-button,
.lb-conv-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Note e formule */
.lb-formula { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.lb-formula summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}
.lb-formula summary::-webkit-details-marker { display: none; }
.lb-formula summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.lb-formula[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.lb-formula summary:hover { color: #fff; }
.lb-formula p { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: var(--text-secondary); }
.lb-formula code {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  white-space: nowrap;
}

.lb-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 24px;
  background: linear-gradient(90deg, rgba(31, 111, 224, 0.16), rgba(31, 111, 224, 0.04));
  border: 1px solid rgba(91, 157, 255, 0.3);
  border-radius: 20px;
}
.lb-cta strong { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: #fff; }
.lb-cta span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--text-secondary); }

.lb-disclaimer { max-width: 80ch; margin: 28px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .lb-tool { animation: none; }
}

/* Tablet */
@media (max-width: 1080px) {
  .lb-app { grid-template-columns: 250px minmax(0, 1fr); }
  .lb-nav-text small { display: none; }
  .lb-tool-body { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* Telefono e tablet stretto: elenco in alto come fila di schede */
@media (max-width: 860px) {
  .lb-page { padding-top: calc(var(--header-height) + 24px); }
  .lb-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
  .lb-app { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lb-nav {
    position: sticky;
    top: 60px;
    z-index: 20;
    max-height: none;
    margin: 0 -16px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(10, 11, 13, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    scrollbar-width: none;
  }
  .lb-nav::-webkit-scrollbar { display: none; }
  .lb-nav-inner { flex-direction: row; gap: 8px; width: max-content; }
  .lb-nav-title { display: none !important; }
  .lb-nav-item {
    flex: none;
    width: auto;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    border-color: var(--line-strong);
    border-radius: 999px;
  }
  .lb-nav-icon { width: 30px; height: 30px; border-radius: 999px; }
  .lb-nav-icon svg { width: 15px; height: 15px; }
  .lb-nav-text strong { font-size: 14px; white-space: nowrap; }
  .lb-nav-text small { display: none; }

  /* Il risultato principale resta agganciato in basso mentre si compilano i campi */
  .lb-results:not(.lb-results-grid) { display: contents; }
  .lb-result-main {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    background: linear-gradient(135deg, rgba(31, 111, 224, 0.34), rgba(31, 111, 224, 0.14)), #0F1114;
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.85);
  }
  .lb-result.lb-result-main { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 10px 16px 12px; }
  .lb-result.lb-result-main .lb-result-label { grid-column: 1 / -1; }
  .lb-result.lb-result-main output { font-size: 34px; }
  .lb-result.lb-result-main .lb-result-unit { padding-bottom: 6px; text-align: right; }
}

@media (max-width: 640px) {
  .lb-tool { padding: 20px 16px; border-radius: 20px; }
  .lb-tool-head { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding-bottom: 18px; margin-bottom: 20px; }
  .lb-tool-icon { width: 42px; height: 42px; border-radius: 12px; }
  .lb-tool-icon svg { width: 21px; height: 21px; }
  .lb-tool-title p { font-size: 14.5px; }
  .lb-tool-actions { grid-column: 1 / -1; }
  .lb-action { height: 34px; padding: 0 11px; }
  .lb-seg span { height: 40px; padding: 0 14px; font-size: 14px; }
  .lb-choices { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lb-result { padding: 14px 16px 16px; }
  .lb-result output { font-size: 28px; }
  .lb-result-main output { font-size: 38px; }
  .lb-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-limit { grid-template-columns: 48px minmax(0, 1fr); }
  .lb-limit-mm { grid-column: 2; }
  .lb-visual { padding: 14px 12px 12px; border-radius: 16px; }
  .lb-conv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-table td, .lb-table th { padding: 10px 12px; }
  .lb-cta { flex-direction: column; align-items: stretch; padding: 18px; }
  .lb-cta .gx-btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   PRESENTAZIONE PRIMA DEL PREVENTIVO
   Il sito presenta l'azienda: la richiesta di preventivo resta sempre
   raggiungibile, ma con pulsanti discreti invece che blu pieni.
═══════════════════════════════════════════════════════════════ */

/* Header: blu pieno ma compatto (senza freccia né alone); sul telefono è nel menu */
.nb-cta {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-fill);
  border: 1px solid transparent;
  box-shadow: none;
}
.nb-cta:hover { color: #fff; background: var(--accent-fill-hover); box-shadow: none; transform: none; }
.nb-cta.is-active { box-shadow: 0 0 0 3px rgba(91, 157, 255, 0.3); }
/* Nel menu laterale del telefono: in evidenza ma a tinta tenue */
.nb-drawer-foot .nb-cta-block {
  display: inline-flex;
  gap: 10px;
  height: 48px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #fff;
  background: rgba(31, 111, 224, 0.2);
  border: 1px solid rgba(91, 157, 255, 0.5);
}
.nb-drawer-foot .nb-cta-block svg { width: 18px; height: 18px; color: var(--accent); }
.nb-drawer-foot .nb-cta-block:hover { background: rgba(31, 111, 224, 0.3); }

/* Home: sezione Contatti */
.gx-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.gx-contact .gx-lead { margin-top: 22px; }
.gx-contact-list { margin: 32px 0 0; border-top: 1px solid var(--line-strong); }
.gx-contact-list > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.gx-contact-list dt { padding-top: 4px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); }
.gx-contact-list dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: #fff;
}
.gx-contact-list dd a { color: inherit; text-decoration: none; }
.gx-contact-list dd a:hover { color: var(--accent-hover); }
.gx-contact-list dd .gx-contact-more {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-family);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
}
.gx-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-top: 28px;
  padding: 18px 18px 18px 22px;
  background: rgba(31, 111, 224, 0.1);
  border: 1px solid rgba(91, 157, 255, 0.32);
  border-radius: 18px;
}
.gx-quote strong { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: #fff; }
.gx-quote span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--text-secondary); }
.gx-btn-sm { min-height: 44px; padding: 0 20px; font-size: 14.5px; box-shadow: none; }
.gx-btn-sm.gx-btn-primary:hover { box-shadow: none; }
.gx-contact-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}
.gx-contact-media img { width: 100%; height: 100%; object-fit: cover; }
.gx-contact-media figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 20px 16px;
  font-size: 13.5px;
  color: #E3E7EC;
  background: linear-gradient(0deg, rgba(10, 11, 13, 0.85), rgba(10, 11, 13, 0));
}
.gx-contact { padding-bottom: clamp(88px, 10vw, 140px); }

/* Pagine interne: chiusura sobria, pulsante a contorno */
.content-page .cta-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 32px;
  margin-top: 56px;
  padding: 28px 32px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.content-page .cta-banner h2 { margin: 0; font-size: clamp(22px, 2.2vw, 26px); }
.content-page .cta-banner p { max-width: 60ch; margin: 6px 0 0; color: var(--text-secondary); }
.content-page .cta-banner .btn-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-fill);
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
  transform: none;
}
.content-page .cta-banner .btn-green:hover { color: #fff; background: var(--accent-fill-hover); transform: none; }

@media (max-width: 900px) {
  .gx-contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .gx-contact-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 0; }
  .gx-contact-list dt { padding-top: 0; }
  .gx-contact-list dd { font-size: 18px; }
  .gx-contact-media { border-radius: 20px; }
  .content-page .cta-banner { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .content-page .cta-banner .btn-green { width: 100%; }
}

/* Footer: il preventivo in evidenza con una tinta tenue */
.ft-action-accent { background: rgba(31, 111, 224, 0.12); border-color: rgba(91, 157, 255, 0.35); }
.ft-action-accent:hover { background: rgba(31, 111, 224, 0.2); border-color: rgba(91, 157, 255, 0.55); }
.ft-action-accent .ft-action-icon { color: #fff; background: var(--accent-fill); }

/* Labs: una riga sottile sotto lo strumento */
.lb-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 20px;
  font-size: 14.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lb-cta a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); text-decoration: none; }
.lb-cta a svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.lb-cta a:hover { color: var(--accent-hover); }
.lb-cta a:hover svg { transform: translateX(3px); }

@media (max-width: 640px) {
  .gx-quote { flex-direction: column; align-items: stretch; padding: 18px; }
  .gx-quote .gx-btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   BANNER COOKIE (compare solo con servizi facoltativi attivi)
   "Accetta" e "Rifiuta" hanno lo stesso peso; la X equivale a rifiutare.
═══════════════════════════════════════════════════════════════ */
.cookie-banner-inner { position: relative; padding-right: 56px; }
.cookie-banner-x {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  cursor: pointer;
}
.cookie-banner-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.cookie-banner .cookie-btn-accept { min-width: 120px; }
.cookie-services { color: var(--text-muted); }
.ft-legal-btn {
  padding: 4px 0;
  font-family: var(--font-family);
  font-size: 13.5px;
  color: var(--text-secondary);
  background: none;
  border: 0;
  cursor: pointer;
}
.ft-legal-btn:hover { color: #fff; }
@media (max-width: 640px) {
  .ft-legal-btn { font-size: 13px; }
  .cookie-banner-inner { padding-right: 0; }
  .cookie-banner-x { top: -4px; }
}

/* Avviso informativo (solo cookie tecnici): nessuna X, un solo pulsante */
.cookie-notice .cookie-banner-inner { padding-right: 0; }
.cookie-notice .cookie-btn-accept { min-width: 140px; }
@media (max-width: 640px) {
  .cookie-notice .cookie-banner-actions .cookie-btn { width: 100%; }
}

/* Modulo preventivi: nota privacy sotto la casella, allineata al testo */
.prev-privacy-note { margin: 6px 0 0 28px; }

/* Tabelle legali larghe (informativa privacy): sotto 820px ogni riga diventa una scheda,
   con l'intestazione della colonna ripresa da data-label */
@media (max-width: 820px) {
  .legal-table-stack { display: block; overflow: visible; background: none; border: 0; border-radius: 0; font-size: 14px; }
  .legal-table-stack thead { display: none; }
  .legal-table-stack tbody { display: grid; gap: 12px; }
  .legal-table-stack tr {
    display: block; padding: 6px 16px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .legal-page .legal-table-stack td { display: block; padding: 10px 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .legal-page .legal-table-stack tr td:last-child { border-bottom: 0; }
  .legal-table-stack td::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  }
  .legal-table-stack td:first-child { font-size: 15px; color: var(--text-primary); }
  .legal-table-stack td:first-child::before { display: none; }
}

/* La regola mobile ".prev-field input { min-height: 44px }" allungava anche la casella
   privacy, che finiva disallineata dal testo: resta 18px (l'etichetta intera è cliccabile) */
.prev-field .checkbox-label input[type="checkbox"] { min-height: 0; height: 18px; padding: 0; }
