/* ============================================================
   ANSAP VENEZIA — Legal pages stylesheet
   Tricolore italiano + navy istituzionale
   Verde #008C45 · Bianco #F4F5F0 · Rosso #CD212A
   ============================================================ */

:root {
  --it-green: #008C45;
  --it-red:   #CD212A;
  --navy:     #0B2140;
  --navy-700: #16325C;
  --accent:   #C8A24A;          /* oro veneziano */
  --ink:      #16202E;
  --muted:    #5A6779;
  --line:     #E2E7EE;
  --soft:     #F6F8FB;
  --white:    #FFFFFF;
  --radius:   14px;
  --shadow:   0 1px 2px rgba(11,33,64,.06), 0 12px 32px -12px rgba(11,33,64,.18);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-size: 16.5px;
}

/* ---------- Barra tricolore ---------- */
.tricolore {
  height: 5px;
  background: linear-gradient(to right,
    var(--it-green) 0 33.33%,
    #FFFFFF      33.33% 66.66%,
    var(--it-red)  66.66% 100%);
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: #fff;
  padding: 30px 0 34px;
  position: relative;
  overflow: hidden;
}
.site-header::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(200,162,74,.20) 0%, transparent 70%);
  pointer-events: none;
}
.header-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 22px;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--it-green), var(--it-red));
  display: grid; place-items: center;
  font-weight: 800; font-size: .82rem; letter-spacing: .5px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.brand-text { line-height: 1.25; }
.brand-text strong { display: block; font-size: 1.02rem; letter-spacing: .04em; }
.brand-text span { font-size: .74rem; color: rgba(255,255,255,.62); letter-spacing: .08em; text-transform: uppercase; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 500;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }

.site-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  margin: 14px 0 10px;
  letter-spacing: -.01em;
}
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200,162,74,.4);
  border-radius: 999px;
  padding: 4px 13px;
}
.header-meta {
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  margin: 0;
  max-width: 620px;
}
.header-meta strong { color: #fff; }

/* ---------- Layout ---------- */
.wrap { max-width: 900px; margin: 0 auto; padding: 48px 24px 90px; }

/* ---------- Indice ---------- */
.toc {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 44px;
}
.toc h2 {
  margin: 0 0 12px;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0; padding: 0;
}
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 34px; }
.toc li { margin-bottom: 6px; font-size: .93rem; break-inside: avoid; }
.toc a { color: var(--navy-700); text-decoration: none; }
.toc a:hover { color: var(--it-red); text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---------- Tipografia ---------- */
h2 {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--navy);
  margin: 3rem 0 1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
  scroll-margin-top: 20px;
}
h2::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 56px; height: 3px;
  background: linear-gradient(to right, var(--it-green) 0 33%, #fff 33% 66%, var(--it-red) 66% 100%);
  border-radius: 2px;
}
h3 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--navy-700);
  margin: 2rem 0 .6rem;
}
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
a { color: var(--navy-700); text-underline-offset: 2px; }
a:hover { color: var(--it-red); }

/* ---------- Tabelle ---------- */
.table-scroll { overflow-x: auto; margin: 1.4em 0; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; min-width: 520px; }
thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 13px 16px;
  text-align: left;
  border: 0;
}
td, tbody th {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
tbody tr:nth-child(even) { background: var(--soft); }
tbody tr:hover { background: #EEF3FA; }

/* ---------- Callout ---------- */
.callout {
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--it-green);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 1.8em 0;
  font-size: .96rem;
}
.callout.warn  { border-left-color: var(--it-red); background: #FDF4F4; border-color: #F4DADC; }
.callout.gold  { border-left-color: var(--accent); background: #FDFAF2; border-color: #EFE4C9; }
.callout strong { color: var(--navy); }

/* ---------- Scheda contatti ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  margin: 1.6em 0;
}
.card-title {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.72);
  padding: 44px 0 34px;
  font-size: .9rem;
}
.footer-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.site-footer strong { color: #fff; }
.footer-nav { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-legal { margin-top: 18px; font-size: .82rem; color: rgba(255,255,255,.48); }

/* ---------- Stampa ---------- */
@media print {
  .site-header { background: #fff !important; color: #000; }
  .site-header h1, .brand { color: #000; }
  .toc, .back-link, .site-footer { display: none; }
  body { font-size: 11pt; }
  thead th { background: #eee !important; color: #000; }
}
