:root{
  --vp3-blue:#12355b;
  --vp3-blue2:#174a7c;
  --vp3-soft:#edf4fa;
  --vp3-bg:#f5f7f9;
  --vp3-white:#fff;
  --vp3-ink:#18212b;
  --vp3-muted:#59636e;
  --vp3-line:#d8e0e7;
  --vp3-green:#166534;
  --vp3-shadow:0 7px 24px rgba(20,42,63,.08);
}

html{
  scroll-behavior:smooth;
}

body.vp-v3-legacy{
  margin:0;
  background:var(--vp3-bg);
  color:var(--vp3-ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height:1.55;
}

/* Nasconde soltanto eventuale VECCHIA testata globale
   se è header diretto del body.
   I contenuti interni restano invariati. */

body.vp-v3-legacy > header{
  display:none !important;
}

.vp-shell-container{
  width:min(calc(100% - 32px),1180px);
  margin-inline:auto;
}

.vp-shell-skip{
  position:absolute;
  left:-9999px;
}

.vp-shell-skip:focus{
  left:16px;
  top:16px;
  z-index:99999;
  background:#fff;
  color:#000;
  padding:12px;
  border:2px solid var(--vp3-blue);
}

.vp-shell-independent{
  background:#0d2742;
  color:#fff;
  text-align:center;
  padding:7px 16px;
  font-size:.82rem;
}

.vp-shell-top{
  background:#fff;
  border-bottom:1px solid var(--vp3-line);
  position:relative;
  z-index:9000;
}

.vp-shell-head{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.vp-shell-brand{
  display:flex;
  align-items:center;
  gap:14px;
  color:var(--vp3-ink);
  text-decoration:none;
}

.vp-shell-logo{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
}

.vp-shell-logo img{
  display:block;
  max-width:58px;
  max-height:58px;
  width:auto;
  height:auto;
  object-fit:contain;
}

.vp-shell-brandtext strong{
  display:block;
  font-size:1.35rem;
  line-height:1.15;
}

.vp-shell-brandtext small{
  display:block;
  margin-top:3px;
  color:var(--vp3-muted);
  font-size:.86rem;
}

.vp-shell-wa{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 16px;
  border-radius:9px;
  background:var(--vp3-green);
  color:#fff !important;
  text-decoration:none !important;
  font-weight:750;
}

.vp-shell-nav{
  border-top:1px solid var(--vp3-line);
}

.vp-shell-navinner{
  display:flex;
  gap:2px;
  overflow-x:auto;
  scrollbar-width:thin;
}

.vp-shell-nav a{
  color:var(--vp3-ink) !important;
  text-decoration:none !important;
  padding:14px 17px;
  font-weight:650;
  white-space:nowrap;
}

.vp-shell-nav a:hover,
.vp-shell-nav a:focus{
  background:var(--vp3-soft);
}

/* ---------------------------------------------------------
   ARMONIZZAZIONE DEL CONTENUTO ESISTENTE
   senza cambiare i motori delle pagine
   --------------------------------------------------------- */

body.vp-v3-legacy main{
  color:var(--vp3-ink);
}

body.vp-v3-legacy h1,
body.vp-v3-legacy h2,
body.vp-v3-legacy h3{
  color:var(--vp3-ink);
  letter-spacing:-.018em;
}

body.vp-v3-legacy h1{
  letter-spacing:-.035em;
}

body.vp-v3-legacy a{
  text-underline-offset:2px;
}

body.vp-v3-legacy button,
body.vp-v3-legacy input,
body.vp-v3-legacy select,
body.vp-v3-legacy textarea{
  font:inherit;
}

body.vp-v3-legacy img{
  max-width:100%;
}

/*
  Migliora i contenitori più comuni senza imporre
  una struttura HTML nuova alle pagine funzionanti.
*/

body.vp-v3-legacy .card,
body.vp-v3-legacy .box,
body.vp-v3-legacy .panel,
body.vp-v3-legacy .tile,
body.vp-v3-legacy article{
  border-radius:14px;
}

/*
  Footer esistenti:
  per ora NON vengono eliminati.
  Li rendiamo sobri finché non saranno sostituiti
  dal footer comune v3.
*/

body.vp-v3-legacy footer{
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media(max-width:620px){

  .vp-shell-container{
    width:min(calc(100% - 24px),1180px);
  }

  .vp-shell-head{
    min-height:78px;
  }

  .vp-shell-logo{
    width:48px;
    height:48px;
  }

  .vp-shell-logo img{
    max-width:48px;
    max-height:48px;
  }

  .vp-shell-brandtext small{
    display:none;
  }

  .vp-shell-brandtext strong{
    font-size:1.05rem;
  }

  .vp-shell-wa{
    padding:9px 10px;
    font-size:.82rem;
  }

}

@media(prefers-reduced-motion:reduce){

  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    transition:none !important;
    animation:none !important;
  }

}

/* =========================================================
   VIVERE PONDERANO — WORDMARK v3
   ========================================================= */

.vp-brand-lockup{
  display:grid;
  grid-template-columns:auto auto;
  column-gap:.30em;
  align-items:baseline;
  line-height:1;
  letter-spacing:-.045em;
  white-space:nowrap;
}

.vp-brand-vivere{
  font-size:1.62rem;
  font-weight:520;
  color:#174a7c;
}

.vp-brand-ponderano{
  font-size:1.62rem;
  font-weight:820;
  color:#10283f;
}

.vp-brand-lockup small{
  grid-column:1 / -1;
  display:block;
  margin-top:7px;
  color:#687582;
  font-size:.70rem;
  font-weight:600;
  letter-spacing:.055em;
  text-transform:uppercase;
}

@media(max-width:620px){

  .vp-brand-vivere,
  .vp-brand-ponderano{
    font-size:1.20rem;
  }

  .vp-brand-lockup small{
    display:none;
  }
}

/* =========================================================
   VIVERE PONDERANO — WORDMARK DEFINITIVO PAGINE INTERNE
   ========================================================= */

.vp-shell-head{
  min-height:78px;
}

.vp-wordmark{
  display:grid;
  grid-template-columns:auto auto;
  column-gap:.28em;
  align-items:baseline;
  line-height:.94;
  white-space:nowrap;
}

.vp-wordmark-vivere{
  font-size:1.72rem;
  font-weight:450;
  letter-spacing:-.055em;
  color:#174a7c;
}

.vp-wordmark-ponderano{
  font-size:1.72rem;
  font-weight:820;
  letter-spacing:-.055em;
  color:#10283f;
}

.vp-wordmark small{
  grid-column:1 / -1;
  margin-top:8px;
  font-size:.69rem;
  line-height:1.2;
  font-weight:650;
  letter-spacing:.075em;
  text-transform:uppercase;
  color:#687582;
}

@media(max-width:620px){

  .vp-shell-head{
    min-height:70px;
  }

  .vp-wordmark-vivere,
  .vp-wordmark-ponderano{
    font-size:1.28rem;
  }

  .vp-wordmark small{
    display:none;
  }
}
