/* Civitus SPA — stylesheet
   Palette: blu Civitus #142850 (campionato dal logo/pulsante dell'immagine hero) /
   carta #F7F5F1 / blu segnale #2B5D8F / oro #A87C3F / bordo #DEDACE
*/

:root {
  --ink: #142850;
  --ink-2: #1B3563;
  --paper: #F7F5F1;
  --signal: #2B5D8F;
  --gold: #A87C3F;
  --gold-soft: #C9A15F;
  --border: #E1DDD1;
  --ink-soft: #566178;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(20, 40, 80, 0.06), 0 1px 2px rgba(20, 40, 80, 0.08);
  --shadow-md: 0 8px 24px rgba(20, 40, 80, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, Segoe UI, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.22rem; }

p { max-width: 62ch; color: var(--ink-soft); }

a { color: var(--signal); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--ink); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(20, 40, 80, 0.08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand span { color: var(--gold); }
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
nav.main-nav a:hover { color: var(--signal); text-decoration: none; border-bottom-color: var(--border); }
nav.main-nav a.current { color: var(--ink); border-bottom-color: var(--gold); }
.nav-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 760px) {
  nav.main-nav { display: none; width: 100%; }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 2px; padding: 18px 0 6px; }
  nav.main-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  nav.main-nav a.current { border-bottom: 1px solid var(--border); }
  .site-header .wrap { flex-wrap: wrap; }
  .nav-toggle { display: block; }
}

/* Hero (testo) */
.hero { padding: 60px 0 56px; }
.hero .eyebrow {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 56ch;
}

/* Hero image banner */
.hero-image {
  line-height: 0;
  position: relative;
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-image-cta {
  position: absolute;
  left: 3.6%;
  top: 60.3%;
  width: 20.2%;
  height: 11.2%;
  border-radius: 999px;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.hero-image-cta:hover,
.hero-image-cta:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
  outline: none;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--ink-2); text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 11.5px 26px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--white); text-decoration: none; }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }

.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) and (min-width: 761px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { position: relative; padding-bottom: 12px; margin-bottom: 10px; }
.card h3::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 34px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
section.alt .card { box-shadow: none; border-color: var(--border); }
section.alt .card:hover { box-shadow: var(--shadow-sm); }

/* Card come link cliccabile (Persone / Famiglie / Professionisti / Imprese) */
a.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.card-link:hover { text-decoration: none; color: inherit; }
a.card-link p { margin-bottom: 4px; }
.card-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--signal);
  transition: transform 0.15s ease;
}
a.card-link:hover .card-more { transform: translateX(3px); color: var(--ink); }

/* Dove siamo (mappa) */
.where-map {
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.where-map iframe { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) {
  .where-map { height: 300px; }
}

/* Due mappe affiancate (Sede Legale + Sede Operativa) */
.where-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}
.where-map-grid h3 { margin-bottom: 12px; font-size: 1.05rem; }
.where-map-sm { height: 260px; }
@media (max-width: 760px) {
  .where-map-grid { grid-template-columns: 1fr; }
  .where-map-sm { height: 260px; }
}

/* Form */
form.contact-form { max-width: 560px; margin-top: 24px; }
form.contact-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
form.contact-form input,
form.contact-form textarea,
form.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form.contact-form input:focus,
form.contact-form textarea:focus,
form.contact-form select:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(43, 93, 143, 0.12);
  outline: none;
}
form.contact-form textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.form-status { padding: 13px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.95rem; }
.form-status.ok { background: #E7F0E6; color: #2C5A2A; border: 1px solid #B9D6B6; }
.form-status.err { background: #F5E4DE; color: #8A3B23; border: 1px solid #E3B6A4; }

/* Info blocks (privacy / arbitro / reclami / whistleblowing) */
.doc-body h2 { margin-top: 2em; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body ul { color: var(--ink-soft); }

/* Obblighi informativi (disclosure box) */
.disclosure-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 30px 34px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}
.disclosure-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 18px;
}
.disclosure-list {
  display: grid;
  grid-template-columns: 220px 1fr;
  row-gap: 13px;
  column-gap: 20px;
  margin: 0;
}
.disclosure-list dt {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.disclosure-list dd {
  margin: 0;
  color: var(--ink);
}
@media (max-width: 620px) {
  .disclosure-list { grid-template-columns: 1fr; row-gap: 4px; }
  .disclosure-list dt { margin-top: 10px; }
}
.disclosure-note {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #C9D2E0;
  padding: 48px 0 32px;
  margin-top: 40px;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }

.site-footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
.site-footer h4 { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.85rem; color: #EDE7D8; margin: 0 0 12px; letter-spacing: 0.02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #AEBBD1; font-size: 0.92rem; }
.site-footer a:hover { color: var(--white); }
/* Obblighi informativi (riga compatta in fondo al footer, sotto le colonne) */
.legal-line {
  font-size: 0.8rem;
  line-height: 1.7;
  color: #8D9AB5;
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
}
.legal-line a { color: #AEBBD1; text-decoration: underline; }
.legal-line a:hover { color: var(--white); }
