/* relazionelegge10.it — foglio di stile (studio tecnico, sobrio) */

:root {
  --blu: #0f3d5c;
  --blu-scuro: #0a2a40;
  --accento: #1d6fa5;
  --accento-chiaro: #e8f1f7;
  --testo: #22303c;
  --testo-chiaro: #5b6b78;
  --sfondo: #ffffff;
  --sfondo-soft: #f4f6f8;
  --bordo: #dde4ea;
  --errore: #b3261e;
  --ok: #1e6b40;
  --raggio: 6px;
  --ombra: 0 1px 3px rgba(10, 42, 64, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--testo);
  background: var(--sfondo);
  line-height: 1.65;
  font-size: 1rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Accessibilità */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blu); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--accento); outline-offset: 2px; }

/* Header */
.site-header {
  background: var(--blu-scuro);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: #fff; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--accento); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 0.98rem; }
.brand-text small { color: #b9cbdb; font-size: 0.78rem; }

.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.15rem; }
.site-nav a {
  display: block; padding: 0.45rem 0.7rem; border-radius: 4px;
  color: #dbe7f0; text-decoration: none; font-size: 0.92rem;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-nav a.attivo { background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 600; }
.site-nav a.nav-cta {
  background: var(--accento); color: #fff; font-weight: 600; margin-left: 0.35rem;
}
.site-nav a.nav-cta:hover { background: #2481bd; }

.nav-toggle, .nav-label { display: none; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--accento-chiaro) 0%, #ffffff 100%); padding: 3.2rem 0 2.6rem; }
.hero-kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accento); margin-bottom: 0.8rem;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.25; color: var(--blu-scuro); max-width: 21em; }
.hero p.lead { margin-top: 1rem; font-size: 1.1rem; color: var(--testo-chiaro); max-width: 40em; }
.hero-azioni { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Bottoni */
.btn {
  display: inline-block; padding: 0.7rem 1.3rem; border-radius: var(--raggio);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--accento);
}
.btn-primario { background: var(--accento); color: #fff; }
.btn-primario:hover { background: #2481bd; border-color: #2481bd; }
.btn-secondario { background: transparent; color: var(--accento); }
.btn-secondario:hover { background: var(--accento-chiaro); }

/* Sezioni */
.sezione { padding: 2.6rem 0; }
.sezione-sfondo { background: var(--sfondo-soft); }
.sezione-titolo {
  font-size: 1.5rem; color: var(--blu-scuro); margin-bottom: 0.4rem;
}
.sezione-sottotitolo { color: var(--testo-chiaro); margin-bottom: 1.6rem; max-width: 42em; }

/* Griglia di schede */
.griglia { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .griglia-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .griglia-3 { grid-template-columns: repeat(3, 1fr); }
  .griglia-4 { grid-template-columns: repeat(4, 1fr); }
}
.scheda {
  background: #fff; border: 1px solid var(--bordo); border-radius: var(--raggio);
  padding: 1.3rem; box-shadow: var(--ombra);
}
.scheda h3 { font-size: 1.06rem; color: var(--blu); margin-bottom: 0.5rem; }
.scheda p { font-size: 0.94rem; color: var(--testo-chiaro); }
.scheda a { color: var(--accento); font-weight: 600; text-decoration: none; }
.scheda a:hover { text-decoration: underline; }
.scheda .scheda-link { display: inline-block; margin-top: 0.6rem; font-size: 0.92rem; }

/* Pagina di contenuto */
.pagina { padding: 2.4rem 0 2.8rem; }
.pagina h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); color: var(--blu-scuro); margin-bottom: 1.2rem; }
.pagina h2 { font-size: 1.3rem; color: var(--blu); margin: 2rem 0 0.7rem; }
.pagina h3 { font-size: 1.08rem; color: var(--blu); margin: 1.4rem 0 0.5rem; }
.pagina p { margin-bottom: 1rem; max-width: 46em; }
.pagina ul, .pagina ol { margin: 0 0 1.1rem 1.3rem; }
.pagina li { margin-bottom: 0.45rem; max-width: 44em; }
.pagina a { color: var(--accento); }
.sottomenu-servizio { margin: 0 0 1.6rem; padding: 0.9rem 1.1rem; background: var(--accento-chiaro); border-left: 4px solid var(--accento); border-radius: 4px; font-size: 0.93rem; }
.sottomenu-servizio a { font-weight: 600; }

/* Provincia (pillore) */
.pill {
  display: inline-block; background: var(--accento-chiaro); color: var(--blu);
  border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.82rem; margin: 0 0.3rem 0.4rem 0;
}

/* CTA finale */
.cta-finale {
  background: var(--blu-scuro); color: #fff; border-radius: var(--raggio);
  padding: 1.8rem; margin: 2.4rem 0;
}
.cta-finale h2 { color: #fff; margin-top: 0; }
.cta-finale p { color: #c7d6e2; margin-bottom: 1.2rem; }
.cta-finale .btn-primario { background: #fff; color: var(--blu-scuro); border-color: #fff; }
.cta-finale .btn-primario:hover { background: #e8f1f7; }

/* Form */
.form-contatti { max-width: 620px; }
.campo { margin-bottom: 1.1rem; }
.campo label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.3rem; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"],
.campo select, .campo textarea {
  width: 100%; padding: 0.65rem 0.75rem; font: inherit; color: var(--testo);
  border: 1px solid var(--bordo); border-radius: 4px; background: #fff;
}
.campo textarea { min-height: 140px; resize: vertical; }
.campo .aiuto { font-size: 0.82rem; color: var(--testo-chiaro); margin-top: 0.25rem; }
.campo-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; }
.campo-check input { margin-top: 0.3rem; }
.campo-hp { position: absolute; left: -9999px; }
.messaggio-esito { padding: 0.9rem 1.1rem; border-radius: 4px; margin-bottom: 1.4rem; }
.esito-ok { background: #e7f3ec; color: var(--ok); border: 1px solid #bfe0cc; }
.esito-errore { background: #fbeae9; color: var(--errore); border: 1px solid #eec5c2; }

/* FAQ */
.faq { margin: 1.2rem 0; }
.faq details { border: 1px solid var(--bordo); border-radius: 4px; margin-bottom: 0.6rem; background: #fff; }
.faq summary {
  cursor: pointer; padding: 0.85rem 1rem; font-weight: 600; color: var(--blu);
  list-style-position: inside;
}
.faq details[open] summary { border-bottom: 1px solid var(--bordo); }
.faq details p { padding: 0.85rem 1rem; margin: 0; }

/* Footer */
.site-footer { background: var(--blu-scuro); color: #c7d6e2; margin-top: 2.5rem; }
.footer-grid {
  display: grid; gap: 2rem; padding: 2.4rem 1.25rem 1.5rem;
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-titolo { color: #fff; font-weight: 600; margin-bottom: 0.6rem; }
.footer-blocco p, .footer-blocco li { font-size: 0.9rem; }
.footer-territorio { margin-top: 0.5rem; }
.footer-lista { list-style: none; }
.footer-lista li { margin-bottom: 0.4rem; }
.footer-lista a { color: #9fc1da; text-decoration: none; }
.footer-lista a:hover { color: #fff; text-decoration: underline; }
.footer-link-privacy { margin-top: 0.9rem; }
.footer-note { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.1rem; padding-bottom: 1.4rem; }
.footer-note p { font-size: 0.8rem; color: #8fa9bd; }
.footer-legal-links { margin-bottom: 0.6rem; }
.footer-legal-links a { color: #9fc1da; text-decoration: none; }
.footer-legal-links a:hover { color: #fff; text-decoration: underline; }

/* Menu mobile (checkbox, senza JavaScript) */
@media (max-width: 920px) {
  .nav-label {
    display: flex; align-items: center; gap: 0.5rem;
    cursor: pointer; padding: 0.5rem; border-radius: 4px;
  }
  .nav-label:hover { background: rgba(255, 255, 255, 0.12); }
  .nav-burger, .nav-burger::before, .nav-burger::after {
    content: ""; display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  }
  .nav-burger::before { transform: translateY(-7px); }
  .nav-burger::after { transform: translateY(5px); }
  .site-nav { display: none; width: 100%; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-bottom: 0.6rem; }
  .site-nav a { padding: 0.65rem 0.7rem; }
  .site-nav a.nav-cta { margin-left: 0; text-align: center; }
}
