/* ============================================================
   VALORE CASA — FOGLIO DI STILE DELLE GUIDE
   Deriva dallo stile di index.html. Non modificare index.html.
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

:root {
  --navy:       #0D1B4B;
  --navy-mid:   #1B2B6B;
  --navy-light: #243580;
  --blue:       #2D4DE0;
  --blue-h:     #1f38c8;
  --ice:        #eef2f9;
  --ice-dark:   #dde5f4;
  --white:      #ffffff;
  --border:     #e2e8f5;
  --text:       #0e0e1a;
  --muted:      #5e5e72;
}

h1,h2,h3,h4,.ls { font-family: 'League Spartan', sans-serif; line-height: 1.05; }

.wrap    { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.wrap-sm { max-width: 820px;  margin: 0 auto; padding: 0 32px; }
.sec     { padding: 110px 0; }

/* ---------- BOTTONI ---------- */
.btn {
  display: inline-block;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 18px 36px;
  border: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-primary       { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-h); }
.btn-ghost         { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.btn-ghost:hover   { border-color: #fff; background: rgba(255,255,255,.07); }

/* ---------- ETICHETTA ---------- */
.label {
  display: flex; align-items: center; gap: 12px;
  font-family: 'League Spartan', sans-serif;
  font-size: .68rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 18px;
}
.label::before { content: ''; display: block; width: 24px; height: 1.5px; background: var(--blue); flex-shrink: 0; }
.label-white { color: rgba(255,255,255,.45); }
.label-white::before { background: rgba(255,255,255,.35); }

/* ---------- NAVBAR ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  padding: 24px 0;
  background: rgba(13,27,75,.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background .35s, padding .35s, box-shadow .35s;
}
.nav.stuck { background: rgba(13,27,75,.92); padding: 14px 0; box-shadow: 0 2px 40px rgba(0,0,0,.25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-img { height: 40px; width: auto; display: block; margin: 0; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-family: 'League Spartan', sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.65); transition: color .2s;
}
.nav-links a:hover, .nav-links a.current { color: #fff; }
.nav-cta {
  font-family: 'League Spartan', sans-serif;
  font-weight: 700; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; padding: 11px 24px; border: 1.5px solid rgba(255,255,255,.3);
  transition: all .2s; flex-shrink: 0; cursor: pointer;
}
.nav-cta:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 310; }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: #fff; transition: transform .25s, opacity .25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; background: var(--navy); z-index: 290;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  transform: translateX(100%); transition: transform .35s ease;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.5rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.7); transition: color .2s;
}
.nav-mobile a:hover { color: #fff; }
.nav-mobile .btn { font-size: .75rem; padding: 17px 34px; margin-top: 8px; }

/* ---------- TESTATA DELLA GUIDA ---------- */
.g-head { background: var(--navy); padding: 190px 0 84px; position: relative; }
.g-head-inner { max-width: 820px; }
.g-breadcrumb {
  font-size: .72rem; color: rgba(255,255,255,.35); margin-bottom: 28px; letter-spacing: .04em;
}
.g-breadcrumb a { color: rgba(255,255,255,.5); transition: color .2s; }
.g-breadcrumb a:hover { color: #fff; }
.g-head h1 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 500; color: #fff; line-height: 1.06;
  letter-spacing: -.025em; margin-bottom: 26px;
}
.g-standfirst {
  font-size: 1.05rem; line-height: 1.75; color: rgba(255,255,255,.58); max-width: 680px;
}
.g-meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 36px; padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .74rem; color: rgba(255,255,255,.34); letter-spacing: .05em;
}
.g-meta strong { color: rgba(255,255,255,.6); font-weight: 500; }

/* ---------- CORPO DELL'ARTICOLO ---------- */
.g-body { background: #fff; padding: 84px 0 96px; }
.g-layout { display: grid; grid-template-columns: 240px 1fr; gap: 72px; align-items: start; max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* le colonne della griglia devono poter rimpicciolire sotto il contenuto */
.g-layout > * { min-width: 0; }
.g-article, .g-toc { min-width: 0; max-width: 100%; }

.g-toc { position: sticky; top: 124px; }
.g-toc-title {
  font-family: 'League Spartan', sans-serif;
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #9aaabe; margin-bottom: 18px;
}
.g-toc ol { list-style: none; counter-reset: toc; }
.g-toc li { counter-increment: toc; border-left: 1px solid var(--border); }
.g-toc a {
  display: block; padding: 9px 0 9px 16px; margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: .82rem; line-height: 1.45; color: var(--muted); transition: color .2s, border-color .2s;
}
.g-toc a::before { content: counter(toc) ". "; color: #c8d6ec; font-weight: 600; }
.g-toc a:hover { color: var(--blue); border-left-color: var(--blue); }

.g-article { max-width: 720px; }
.g-article p, .g-article li, .g-article h2, .g-article h3 { overflow-wrap: break-word; }
.g-article h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 600; color: var(--navy); letter-spacing: -.02em;
  line-height: 1.16; margin: 56px 0 20px; scroll-margin-top: 110px;
}
.g-article h2:first-child { margin-top: 0; }
.g-article h3 {
  font-size: 1.08rem; font-weight: 700; color: var(--text);
  letter-spacing: -.01em; margin: 34px 0 12px;
}
.g-article p { font-size: .975rem; line-height: 1.82; color: var(--muted); margin-bottom: 18px; }
.g-article p strong { color: var(--text); font-weight: 600; }
.g-article a:not(.btn) { color: var(--blue); border-bottom: 1px solid rgba(45,77,224,.28); transition: border-color .2s; }
.g-article a:not(.btn):hover { border-bottom-color: var(--blue); }
.g-article ul, .g-article ol { list-style: none; margin: 0 0 22px; }
.g-article li {
  position: relative; padding: 9px 0 9px 26px;
  font-size: .94rem; line-height: 1.72; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.g-article li:last-child { border-bottom: none; }
.g-article li strong { color: var(--text); font-weight: 600; }
.g-article ul li::before {
  content: ''; position: absolute; left: 4px; top: 19px;
  width: 6px; height: 6px; background: var(--blue);
}
.g-article ol { counter-reset: gol; }
.g-article ol li { counter-increment: gol; }
.g-article ol li::before {
  content: counter(gol); position: absolute; left: 0; top: 9px;
  font-family: 'League Spartan', sans-serif; font-size: .78rem; font-weight: 700; color: var(--blue);
}

/* Riquadro di richiamo */
.g-box {
  background: var(--ice); border-top: 2px solid var(--blue);
  padding: 30px 32px; margin: 34px 0;
}
.g-box-label {
  font-family: 'League Spartan', sans-serif;
  font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 12px;
}
.g-box p { font-size: .93rem; margin-bottom: 0; }
.g-box p + p { margin-top: 12px; }
.g-box.warn { border-top-color: #d9822b; background: #fdf7f0; }
.g-box.warn .g-box-label { color: #b5651d; }

/* Tabella */
.g-table-wrap { overflow-x: auto; margin: 32px 0; }
.g-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); font-size: .875rem; min-width: 560px; }
.g-table th {
  background: var(--navy); color: #fff; text-align: left;
  font-family: 'League Spartan', sans-serif; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 15px 18px;
  border-left: 1px solid rgba(255,255,255,.1);
}
.g-table th:first-child { border-left: none; }
.g-table td { padding: 16px 18px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); color: var(--muted); line-height: 1.6; vertical-align: top; }
.g-table td:first-child { border-left: none; color: var(--text); font-weight: 600; }
.g-table tbody tr:nth-child(odd) { background: #f7f9fc; }

/* Fonti */
.g-sources { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }
.g-sources-title {
  font-family: 'League Spartan', sans-serif;
  font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #9aaabe; margin-bottom: 16px;
}
.g-sources li { font-size: .84rem; padding: 7px 0 7px 26px; }
.g-sources li::before { top: 17px; background: #c8d6ec; }

/* ---------- FAQ ---------- */
.faq { background: var(--ice); padding: 96px 0; }
.faq-header { max-width: 640px; margin-bottom: 48px; }
.faq h2 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 500; letter-spacing: -.02em; }
.faq-list { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left; padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  font-family: 'League Spartan', sans-serif; font-weight: 700; font-size: .975rem;
  color: var(--text); gap: 24px; transition: color .2s;
}
.faq-q:hover { color: var(--blue); }
.faq-chevron { flex-shrink: 0; width: 18px; height: 18px; position: relative; transition: transform .25s; }
.faq-chevron::before, .faq-chevron::after {
  content: ''; position: absolute; top: 50%; width: 9px; height: 1.5px; background: currentColor; transition: transform .25s;
}
.faq-chevron::before { right: 50%; transform: translateY(-50%) rotate(45deg); transform-origin: right; }
.faq-chevron::after  { left: 50%;  transform: translateY(-50%) rotate(-45deg); transform-origin: left; }
.faq-item.open .faq-chevron::before { transform: translateY(-50%) rotate(-45deg); transform-origin: right; }
.faq-item.open .faq-chevron::after  { transform: translateY(-50%) rotate(45deg);  transform-origin: left; }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 0 24px; font-size: .9rem; line-height: 1.78; color: var(--muted); }
.faq-a-inner strong { color: var(--text); }

/* ---------- CTA FINALE ---------- */
.cta-final { background: var(--navy); padding: 118px 0; text-align: center; position: relative; overflow: hidden; }
.cta-final h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem); font-weight: 500; color: #fff;
  margin-bottom: 18px; max-width: 700px; margin-left: auto; margin-right: auto;
  line-height: 1.05; letter-spacing: -.025em;
}
.cta-final p { font-size: .975rem; color: rgba(255,255,255,.5); line-height: 1.82; max-width: 520px; margin: 0 auto 44px; }
.cta-final-note { margin-top: 22px; font-size: .7rem; color: rgba(255,255,255,.22); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- FOOTER ---------- */
.footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,.07); padding: 40px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-logo img { height: 40px; width: auto; opacity: .7; margin: 0; }
.footer-info { font-size: .75rem; color: rgba(255,255,255,.28); line-height: 1.9; text-align: center; }
.footer-copy { font-size: .72rem; color: rgba(255,255,255,.18); }

/* ---------- INDICE DELLE GUIDE ---------- */
.gi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.gi-card {
  background: var(--ice); border-top: 2px solid var(--blue);
  padding: 38px 34px; display: flex; flex-direction: column;
  transition: background .25s;
}
a.gi-card:hover { background: var(--ice-dark); }
.gi-cat {
  font-family: 'League Spartan', sans-serif;
  font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.gi-card h2 {
  font-size: 1.12rem; font-weight: 700; color: var(--navy);
  line-height: 1.28; letter-spacing: -.01em; margin-bottom: 12px;
}
.gi-card p { font-size: .89rem; line-height: 1.7; color: var(--muted); flex: 1; }
.gi-more {
  margin-top: 22px; font-family: 'League Spartan', sans-serif;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.gi-card.soon { background: #fff; border: 1px solid var(--border); border-top: 2px solid var(--border); }
.gi-card.soon .gi-cat { color: #9aaabe; }
.gi-card.soon h2 { color: #8a93a8; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .g-layout { grid-template-columns: 1fr; gap: 0; }
  .g-toc { position: static; margin-bottom: 44px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
  .gi-grid { grid-template-columns: 1fr; }
}
/* ---- TABELLE A SCHEDE SU TELEFONO ---- */
@media (max-width: 720px) {
  .g-table-wrap { overflow-x: visible; margin: 26px 0; }
  .g-table { min-width: 0; border: none; display: block; }
  .g-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .g-table tbody { display: block; }
  .g-table tr {
    display: block; background: #fff !important;
    border: 1px solid var(--border); border-top: 2px solid var(--blue);
    margin-bottom: 14px;
  }
  .g-table td { display: block; border: none; border-top: 1px solid var(--border); padding: 15px 18px; }
  .g-table td:first-child {
    border-top: none; background: var(--ice);
    font-size: .95rem; color: var(--navy);
  }
  .g-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: 'League Spartan', sans-serif;
    font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: #9aaabe; margin-bottom: 7px;
  }
}

@media (max-width: 640px) {
  .wrap, .wrap-sm { padding: 0 22px; }
  .g-layout { padding: 0 22px; }
  .nav-logo-img { height: 34px; }
  .nav { padding: 14px 0; }
  .nav-inner { gap: 12px; }
  .nav-cta { display: none; }
  .g-head { padding: 124px 0 56px; }
  .g-toc { margin-bottom: 36px; padding-bottom: 26px; }
  .g-toc a { padding: 7px 0 7px 14px; font-size: .8rem; }
  .g-article h2 { margin: 44px 0 16px; }
  .g-head { padding: 150px 0 60px; }
  .g-body { padding: 60px 0 72px; }
  .faq { padding: 72px 0; }
  .cta-final { padding: 84px 0; }
  .cta-final .btn { width: 100%; text-align: center; }
  .footer-inner { flex-direction: column; gap: 18px; text-align: center; }
  .g-box { padding: 24px 22px; }
}
