/* Guida Sunshine Act — Congrest Design System */

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f7fafc;
  color: #2d3748;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: #3182ce; text-decoration: none }
a:hover { text-decoration: underline }

/* link dentro il testo: devono vedersi come link */
.panel p a, .panel li a, .alert-box a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #90cdf4;
  font-weight: 600;
}
.panel p a:hover, .panel li a:hover, .alert-box a:hover { text-decoration-color: #3182ce }

/* ---------- Header ---------- */
.header {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.header h1 { font-size: 20px; font-weight: 700; letter-spacing: -.2px }
.header h1 a { color: #fff }
.header h1 a:hover { text-decoration: none; opacity: .9 }
.header .meta { font-size: 13px; opacity: .78; margin-top: 1px }
.header .logo { height: 38px; margin-right: 13px; border-radius: 5px }
.header .brand { display: flex; align-items: center }

/* ---------- Nav ---------- */
.nav {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e2e8f0;
  padding: 0 24px;
  display: flex;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav a {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.nav a.active { color: #1a365d; border-bottom-color: #3182ce }
.nav a:hover { color: #3182ce; background: #f7fafc; text-decoration: none }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 32px 20px 8px }
.narrow { max-width: 840px }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 320px at 85% -10%, rgba(49,130,206,.16), transparent 60%),
    linear-gradient(135deg, #f7fafc 0%, #e8f4f8 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 64px 24px 58px;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #1a365d, #3182ce 55%, #90cdf4);
}
.hero-inner { max-width: 1180px; margin: 0 auto; position: relative }
.hero h2 {
  font-size: 42px; font-weight: 700; color: #1a365d;
  line-height: 1.15; letter-spacing: -1px; margin-bottom: 18px; max-width: 900px;
}
.hero p { font-size: 19px; color: #4a5568; max-width: 780px }
.hero .cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(26,54,93,.22);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26,54,93,.28);
}
.btn.ghost {
  background: #fff; color: #1a365d; border-color: #cbd5e0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.btn.ghost:hover { background: #f7fafc; border-color: #3182ce; color: #2c5282 }

/* ---------- Panels ---------- */
.panel {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 30px 32px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(26,54,93,.05);
  transition: box-shadow .18s;
}
.panel:hover { box-shadow: 0 4px 18px rgba(26,54,93,.08) }
.panel h2 {
  font-size: 25px; font-weight: 700; color: #1a365d;
  letter-spacing: -.4px; line-height: 1.25;
  margin-bottom: 16px; padding-bottom: 12px; position: relative;
}
.panel h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #3182ce, #90cdf4);
}
.panel h3 { font-size: 18px; font-weight: 700; color: #2d3748; margin: 24px 0 10px }
.panel p { margin-bottom: 14px }
.panel ul, .panel ol { margin: 0 0 14px 4px; padding-left: 20px }
.panel li { margin-bottom: 9px }
.panel li::marker { color: #3182ce; font-weight: 700 }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 22px;
  border-top: 4px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(26,54,93,.05);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(26,54,93,.12) }
.card .num { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -1px }
.card .label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-top: 6px; color: #718096;
}
.card .sub { font-size: 14px; margin-top: 10px; color: #4a5568; line-height: 1.55 }
.card.red    { border-top-color: #dc2626 } .card.red .num    { color: #dc2626 }
.card.orange { border-top-color: #ea580c } .card.orange .num { color: #ea580c }
.card.yellow { border-top-color: #ca8a04 } .card.yellow .num { color: #ca8a04 }
.card.green  { border-top-color: #16a34a } .card.green .num  { color: #16a34a }
.card.blue   { border-top-color: #3182ce } .card.blue .num   { color: #3182ce }
.card.purple { border-top-color: #7c3aed } .card.purple .num { color: #7c3aed }

/* ---------- Alerts ---------- */
.alert-box {
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 20px;
  font-size: 15.5px;
  line-height: 1.65;
  border-left-width: 4px;
  border-left-style: solid;
}
.alert-red    { background: #fef2f2; border: 1px solid #fecaca; border-left-color: #dc2626; color: #991b1b }
.alert-orange { background: #fff7ed; border: 1px solid #fed7aa; border-left-color: #ea580c; color: #9a3412 }
.alert-green  { background: #f0fdf4; border: 1px solid #bbf7d0; border-left-color: #16a34a; color: #166534 }
.alert-blue   { background: #eff6ff; border: 1px solid #bfdbfe; border-left-color: #2563eb; color: #1e40af }
.alert-box strong { font-weight: 700 }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px }
.badge.attenzione { background: #fef9c3; color: #ca8a04 }
.badge.ok { background: #f0fdf4; color: #16a34a }
.badge.info { background: #eff6ff; color: #2563eb }

/* ---------- Tables ---------- */
.scroll-x { overflow-x: auto; border: 1px solid #edf2f7; border-radius: 10px; margin-bottom: 6px }
table { width: 100%; border-collapse: collapse; font-size: 15px }
thead th {
  background: #f7fafc; padding: 14px 14px; text-align: left;
  font-weight: 600; color: #4a5568; font-size: 13px;
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 2px solid #e2e8f0;
}
tbody td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: top }
tbody tr:last-child td { border-bottom: none }
tbody tr:hover { background: #f8fafc }
.text-right { text-align: right }

/* ---------- Citazione della norma ---------- */
.norma {
  position: relative;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3182ce;
  border-radius: 0 10px 10px 0;
  padding: 20px 24px 18px 30px;
  margin: 18px 0;
  font-size: 15.5px;
  color: #4a5568;
  font-style: italic;
}
.norma::before {
  content: "\201C";
  position: absolute; left: 10px; top: 2px;
  font-size: 46px; line-height: 1; color: #cbd5e0; font-family: Georgia, serif;
}
.norma cite {
  display: block; margin-top: 12px; font-size: 13px; font-style: normal;
  font-weight: 700; color: #2d3748; letter-spacing: .2px;
}

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(135deg, #1a365d 0%, #22406b 100%);
  color: #cbd5e0;
  padding: 44px 24px 32px;
  margin-top: 44px;
  font-size: 14.5px;
  line-height: 1.7;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.footer a { color: #90cdf4 }
.footer h4 {
  color: #fff; font-size: 13px; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 1px;
}
.footer .disclaimer {
  grid-column: 1 / -1;
  margin-top: 12px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13px; opacity: .8;
}

/* ---------- Form ---------- */
.form-row { margin-bottom: 18px }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #2d3748 }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  border: 1px solid #cbd5e0; border-radius: 8px; background: #fff; color: #2d3748;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: #3182ce; box-shadow: 0 0 0 3px rgba(49,130,206,.15);
}
.form-hint { font-size: 13px; color: #718096; margin-top: 5px }
button.btn { cursor: pointer; font-family: inherit }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 16px }
  .cards { grid-template-columns: 1fr }
  .hero { padding: 40px 20px 36px }
  .hero h2 { font-size: 29px; letter-spacing: -.5px }
  .hero p { font-size: 17px }
  .panel { padding: 22px 20px }
  .panel h2 { font-size: 21px }
  .container { padding: 22px 16px 4px }
  .btn { width: 100%; text-align: center }
}

/* ---------- Hero a due colonne con illustrazione ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr);
  gap: 48px;
  align-items: center;
}
.hero-art svg { width: 100%; height: auto; max-width: 380px; display: block; margin-left: auto }
.hero-art { filter: drop-shadow(0 18px 34px rgba(26,54,93,.16)) }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px }
  .hero-art svg { max-width: 260px; margin: 0 auto }
}

/* ---------- Banner consenso cookie ---------- */
#banner-consenso {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(26,54,93,.22);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  font-size: 14.5px; line-height: 1.6; color: #4a5568;
}
#banner-consenso .bc-testo { flex: 1; min-width: 260px }
#banner-consenso strong { color: #1a365d }
#banner-consenso .bc-azioni { display: flex; gap: 10px; flex-shrink: 0 }
#banner-consenso .btn { padding: 10px 20px; font-size: 14px }
@media (max-width: 620px) {
  #banner-consenso { flex-direction: column; align-items: stretch; gap: 14px }
  #banner-consenso .bc-azioni { justify-content: stretch }
  #banner-consenso .bc-azioni .btn { flex: 1 }
}

/* Rimando al servizio: la guida spiega, il supporto e' di Congrest */
.panel.supporto { background: #f0f9ff; border-left: 4px solid #0284c7 }
.panel.supporto h2::after { background: #0284c7 }

/* Data dell'ultimo aggiornamento della pagina. E' un fatto, non una promessa:
   la genera pubblica-guida.sh dalla data reale del file, quindi non puo' mentire. */
.aggiornamento{font-size:13px;color:#6b7280;margin:0 0 10px;text-align:center}

/* Tabella dei dati mancanti e note della pagina "Qualità dei dati" (17/09/2026). */
.tabella{width:100%;border-collapse:collapse;margin:14px 0 10px;font-size:15px}
.tabella th{text-align:left;background:#12395c;color:#fff;padding:8px 10px;font-weight:600}
.tabella td{border-bottom:1px solid #e4e9ee;padding:8px 10px}
.tabella tr:nth-child(even) td{background:#fafbfc}
.nota{font-size:14px;color:#5a6b7a;font-style:italic}
.panel.rimando{border-left:4px solid #f0a500;background:#fffdf7}

