/* ==========================================================
   Pagina NETWORK 3U Vision, proposta C1 "Su misura"
   Tutte le classi hanno il prefisso nw- per non interferire
   con il tema WordPress. Header e footer del sito esclusi.
   Colori dalla Logo Guide 2026: Pure Orange #de5307 (RAL 2004),
   Slate Grey #4f5358 (RAL 7015).
   ========================================================== */
body { margin: 0; }
body:has(.nw-dialog[open]) { overflow: hidden; }

.nw-page {
  --nw-orange: #de5307;        /* Pure Orange, RAL 2004 */
  --nw-orange-text: #b84405;   /* arancio per testi piccoli (contrasto) */
  --nw-orange-hover: #8f3504;
  --nw-slate: #4f5358;         /* Slate Grey, RAL 7015 */
  --nw-slate-hover: #3d4146;
  --nw-ink: #2c3034;
  --nw-muted: #5f646a;
  --nw-on-slate: #e6e7e9;
  --nw-light: #f4f5f6;
  --nw-light-hover: #eaecee;
  --nw-placeholder: #e1e4e7;
  --nw-line: #e0e2e5;
  --nw-peach: #fbe6da;
  --nw-ok: #2f7a4f;
  --nw-ok-bg: #e4f1e9;
  --nw-wait: #8a5200;
  --nw-wait-bg: #fdf0dc;

  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  color: var(--nw-ink);
  background: #ffffff;
  font-size: 1.0625rem;
  line-height: 1.55;
}
.nw-page *, .nw-page *::before, .nw-page *::after { box-sizing: border-box; }
.nw-page h1, .nw-page h2, .nw-page h3, .nw-page p, .nw-page ul { margin: 0; }
.nw-page a { color: var(--nw-orange-text); }
.nw-page a:hover { color: var(--nw-orange-hover); }
.nw-page a:focus-visible, .nw-page button:focus-visible, .nw-page iframe:focus-visible {
  outline: 3px solid var(--nw-orange); outline-offset: 3px;
}
.nw-page button { font: inherit; color: inherit; cursor: pointer; }

.nw-wrap { max-width: 82.5rem; margin: 0 auto; }
.nw-section { padding: 4.5rem 1.5rem; }

/* Titoli e testi */
.nw-eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.875rem; font-weight: 900; letter-spacing: 0.18em;
  color: var(--nw-orange-text);
}
.nw-h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; font-weight: 900;
  color: var(--nw-slate); text-wrap: balance;
}
.nw-h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem); line-height: 1.2; font-weight: 900;
  color: var(--nw-slate); text-wrap: balance;
}
.nw-lead { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--nw-slate); max-width: 38rem; }

/* Pulsanti */
.nw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.nw-page .nw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0 1.75rem; border-radius: 8px; border: 0;
  font-weight: 900; font-size: 1.125rem; line-height: 1.2; text-decoration: none;
  background: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.nw-page .nw-btn svg { width: 1.15em; height: 1.15em; flex: none; }
.nw-page .nw-btn--primary { background: var(--nw-orange); color: #ffffff; }
.nw-page .nw-btn--primary:hover { background: var(--nw-orange-text); color: #ffffff; }
.nw-page .nw-btn--outline { border: 2px solid var(--nw-slate); color: var(--nw-slate); }
.nw-page .nw-btn--outline:hover { background: var(--nw-slate); color: #ffffff; }
.nw-page .nw-btn--dark { background: var(--nw-slate); color: #ffffff; }
.nw-page .nw-btn--dark:hover { background: var(--nw-slate-hover); color: #ffffff; }
.nw-page .nw-btn--sm { min-height: 2.5rem; padding: 0 1.1rem; font-size: 1rem; }
.nw-page .nw-link { font-weight: 900; }
.nw-page .nw-textbtn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0; border: 0; background: none;
  font-weight: 900; color: var(--nw-orange-text); text-decoration: underline; text-underline-offset: 3px;
}
.nw-page .nw-textbtn:hover { color: var(--nw-orange-hover); }
.nw-page .nw-textbtn svg { width: 1.1em; height: 1.1em; flex: none; }

/* 1. Hero */
.nw-hero { padding: 5rem 1.5rem 4rem; }
.nw-hero .nw-wrap { display: flex; flex-direction: column; gap: 1.5rem; }
.nw-hero .nw-actions { margin-top: 0.5rem; }

/* 2. Servizi */
.nw-services { background: var(--nw-slate); color: #ffffff; }
.nw-services .nw-wrap { display: flex; flex-direction: column; gap: 2.5rem; }
.nw-services .nw-h2 { color: #ffffff; }
.nw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2.5rem; }
.nw-card { display: flex; flex-direction: column; gap: 0.75rem; }
.nw-card h3 { font-size: 1.5rem; line-height: 1.25; font-weight: 900; }
.nw-card p { color: var(--nw-on-slate); }
.nw-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; flex: none;
  background: var(--nw-orange); display: grid; place-items: center;
}

/* 3. Mappa interattiva */
.nw-map { padding-bottom: 3rem; }
.nw-map .nw-wrap { display: flex; flex-direction: column; gap: 1.5rem; }
.nw-legend {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; padding: 0; list-style: none;
  font-size: 0.9375rem; font-weight: 700; color: var(--nw-slate);
}
.nw-legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.nw-dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; flex: none; }
.nw-dot--orange { background: var(--nw-orange); }
.nw-dot--slate { background: var(--nw-slate); }
.nw-dot--outline { background: #ffffff; border: 2px solid var(--nw-slate); }
.nw-map-iframe {
  display: block; width: 100%; height: clamp(540px, 80vh, 760px);
  border: 1px solid var(--nw-line); border-radius: 14px; background: #f3f4f6;
  scroll-margin-top: 1.5rem;   /* aumentare se l'header del sito resta fisso in alto */
}
.nw-note { font-size: 0.9375rem; color: var(--nw-muted); }

/* 4. Regioni */
.nw-regions { padding: 1rem 1.5rem 4.5rem; }
.nw-region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.nw-page .nw-region {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.5rem; border-radius: 12px;
  background: var(--nw-light); color: var(--nw-ink); text-decoration: none;
  transition: background-color .15s ease;
}
.nw-page .nw-region:hover { background: var(--nw-light-hover); color: var(--nw-ink); }
.nw-region-name { font-size: 1.375rem; font-weight: 900; }
.nw-region-count { color: var(--nw-muted); }
.nw-region-more { margin-top: 0.5rem; font-weight: 900; color: var(--nw-orange-text); }
.nw-region:hover .nw-region-more { color: var(--nw-orange-hover); }

/* 5. Sede centrale e assistenza tecnica */
.nw-hq { padding-top: 0; }
.nw-hq .nw-wrap { display: flex; flex-direction: column; gap: 3rem; }
.nw-hq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 3rem; align-items: stretch; }
.nw-photo {
  min-height: 20rem; border-radius: 16px; background: var(--nw-placeholder);
  display: grid; place-items: center; padding: 2rem; text-align: center;
  color: var(--nw-slate); font-weight: 700;
}
.nw-hq-text { display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.nw-hq-text .nw-eyebrow { display: block; }
.nw-hq-desc { color: var(--nw-slate); }
.nw-address { font-style: normal; }

/* 6. Diventa partner */
.nw-cta { padding: 3.5rem 1.5rem; background: var(--nw-peach); }
.nw-cta .nw-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nw-cta-text { flex: 1 1 30rem; }
.nw-cta .nw-h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); color: var(--nw-ink); }
.nw-cta p { margin-top: 0.5rem; }

/* ==========================================================
   Finestra (pop up): partner per regione, e box assistenza tecnica
   ========================================================== */
.nw-dialog {
  width: min(40rem, calc(100% - 2rem)); max-width: none;
  max-height: calc(100% - 2rem); max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: #ffffff; color: var(--nw-ink);
  box-shadow: 0 24px 64px rgba(44, 48, 52, .3);
}
.nw-dialog--wide { width: min(50rem, calc(100% - 2rem)); }
.nw-dialog::backdrop { background: rgba(44, 48, 52, .6); }
.nw-dialog[open] { animation: nw-pop .18s ease-out; }
@keyframes nw-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nw-dialog-inner {
  display: flex; flex-direction: column; max-height: inherit;
  border-top: 5px solid var(--nw-orange);
}
.nw-dialog-head {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.75rem 1.75rem 1.25rem;
}
.nw-dialog-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.nw-dialog-head .nw-h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }
.nw-dialog-meta { color: var(--nw-muted); }
.nw-dialog-head .nw-textbtn { align-self: flex-start; margin-top: 0.35rem; }
.nw-page .nw-close {
  flex: none; width: 2.5rem; height: 2.5rem; margin: -0.5rem -0.5rem 0 0;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--nw-light); color: var(--nw-slate);
}
.nw-page .nw-close:hover { background: var(--nw-light-hover); }
.nw-close svg { width: 1.25rem; height: 1.25rem; }
.nw-dialog-body { padding: 0 1.75rem 1.5rem; overflow-y: auto; overscroll-behavior: contain; }
.nw-dialog-foot {
  padding: 1.1rem 1.75rem; background: var(--nw-light); border-top: 1px solid var(--nw-line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.9375rem;
}

/* Box assistenza tecnica (nella sezione sede centrale) */
.nw-assist {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 2rem 3rem; align-items: center;
  padding: 2.25rem; border-radius: 16px; background: var(--nw-light);
  border-top: 5px solid var(--nw-orange);
}
.nw-assist-intro { display: flex; flex-direction: column; gap: 1rem; }
.nw-assist-intro > p:not(.nw-badge) { color: var(--nw-slate); max-width: 34rem; }
.nw-assist-side { display: flex; flex-direction: column; gap: 1rem; }
.nw-page .nw-assist-title { font-size: clamp(1.5rem, 3vw, 1.875rem); }
.nw-assist-head { display: flex; align-items: center; gap: 1rem; }
.nw-assist-head .nw-icon { width: 3rem; height: 3rem; }
.nw-page .nw-assist-local { align-self: flex-start; margin-top: -1.5rem; }
.nw-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--nw-peach);
  color: var(--nw-orange-hover); font-weight: 900; font-size: 0.9375rem;
}
.nw-badge svg { width: 1.1rem; height: 1.1rem; flex: none; }
.nw-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.nw-contact {
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem;
  border: 1px solid var(--nw-line); border-radius: 12px; background: #ffffff;
}
.nw-contact-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nw-muted);
}
.nw-contact-label svg { width: 1.1rem; height: 1.1rem; color: var(--nw-orange); flex: none; }
.nw-page .nw-contact-value {
  font-size: 1.3125rem; font-weight: 900; color: var(--nw-slate); text-decoration: none;
  overflow-wrap: break-word; font-variant-numeric: tabular-nums;
}
.nw-page .nw-contact-value:hover { color: var(--nw-orange-text); }
.nw-contact .nw-actions { gap: 0.6rem; margin-top: 0.5rem; }
.nw-page .nw-copied { background: var(--nw-ok-bg); border-color: var(--nw-ok); color: var(--nw-ok); }
.nw-tip { font-size: 0.9375rem; color: var(--nw-muted); }

/* Partner per regione */
.nw-group-title {
  font-size: 0.8125rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--nw-muted); margin: 0.25rem 0 0.75rem;
}
.nw-group + .nw-group { margin-top: 1.5rem; }
.nw-plist { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.nw-page .nw-partner {
  width: 100%; text-align: left; border: 1px solid var(--nw-line); border-radius: 12px; background: #ffffff;
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center;
  padding: 1rem 1.1rem;
  transition: border-color .15s ease, background-color .15s ease;
}
.nw-page .nw-partner:hover { border-color: var(--nw-orange); background: #fffaf7; }
.nw-pdot {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  align-self: start;
}
.nw-pdot svg { width: 1.2rem; height: 1.2rem; }
.nw-pdot.agent { border: 2px solid var(--nw-slate); }
.nw-pbody { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.nw-pname { display: flex; align-items: baseline; gap: 0.5rem; font-weight: 900; font-size: 1.0625rem; line-height: 1.3; }
.nw-flag { width: 1.25rem; height: 0.85rem; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(44, 48, 52, .15); position: relative; top: 1px; }
.nw-psub { color: var(--nw-slate); font-size: 0.9375rem; }
.nw-pterr { color: var(--nw-muted); font-size: 0.875rem; }
.nw-ptags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
.nw-tag { font-size: 0.75rem; font-weight: 700; border-radius: 4px; padding: 0.1rem 0.45rem; }
.nw-tag.ok { background: var(--nw-ok-bg); color: var(--nw-ok); }
.nw-tag.wait { background: var(--nw-wait-bg); color: var(--nw-wait); }
.nw-tag.hq { background: var(--nw-peach); color: var(--nw-orange-hover); }
.nw-pgo {
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
  font-weight: 900; font-size: 0.9375rem; color: var(--nw-orange-text);
}
.nw-pgo svg { width: 1rem; height: 1rem; }
.nw-partner:hover .nw-pgo { color: var(--nw-orange-hover); }

/* Mobile */
@media (max-width: 640px) {
  .nw-hero { padding: 3rem 1rem 2.5rem; }
  .nw-section { padding: 3rem 1rem; }
  .nw-regions { padding: 0.5rem 1rem 3rem; }
  .nw-hq { padding-top: 0; }
  .nw-cta { padding: 2.5rem 1rem; }
  .nw-hero .nw-actions .nw-btn, .nw-hq-text .nw-actions .nw-btn { flex: 1 1 100%; }
  .nw-photo { min-height: 14rem; }
  .nw-dialog, .nw-dialog--wide { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .nw-assist { padding: 1.5rem 1.25rem; }
  .nw-page .nw-assist-local { margin-top: -1rem; }
  .nw-dialog-head { padding: 1.25rem 1.25rem 1rem; }
  .nw-dialog-body { padding: 0 1.25rem 1.25rem; }
  .nw-dialog-foot { padding: 1rem 1.25rem; }
  .nw-page .nw-partner { grid-template-columns: auto 1fr; }
  .nw-pgo { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-page *, .nw-dialog[open] { transition: none !important; animation: none !important; }
}
