/* ============================================================
   S. Antonio ODV — Foglio di stile condiviso
   Organizzazione di Volontariato · Terzo Settore (D.Lgs. 117/2017)
   Paletta: blu petrolio, verde salvia, arancione caldo, grigio antracite
   ============================================================ */

:root {
  --petrol: #2C5F6F;
  --petrol-dark: #214A58;
  --petrol-deep: #183943;
  --petrol-light: #4E8798;
  --petrol-50: #EAF1F4;
  --sage: #8FAF8B;
  --sage-dark: #6E8F6A;
  --sage-50: #EEF3ED;
  --orange: #E8894A;
  --orange-dark: #D6732F;
  --orange-50: #FBF0E6;
  --ink: #2B2B2B;
  --ink-soft: #57554F;
  --bg: #F6F4EF;
  --white: #FFFFFF;
  --border: #E4E0D8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(44, 95, 111, 0.10);
  --shadow-lg: 0 16px 44px rgba(44, 95, 111, 0.18);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; height: auto; vertical-align: middle; }

a { color: var(--petrol); text-decoration: none; }
a:hover { color: var(--petrol-dark); }

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.22;
  font-weight: 700;
  color: var(--petrol-dark);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 22px; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(232, 137, 74, 0.35); }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }

.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--sage-dark); color: #fff; }

.btn-outline { background: transparent; color: var(--petrol); border-color: var(--petrol); }
.btn-outline:hover { background: var(--petrol); color: #fff; }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

.btn-dark { background: var(--petrol); color: #fff; }
.btn-dark:hover { background: var(--petrol-dark); color: #fff; }

.btn svg { flex: 0 0 auto; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(44, 95, 111, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--petrol-dark);
}
.brand:hover { color: var(--petrol-dark); }
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--petrol), var(--petrol-light));
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-name { font-weight: 800; font-size: 1.18rem; line-height: 1.1; color: var(--petrol-dark); }
.brand-name small { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage-dark); }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 4px; }
.nav-links a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.nav-links a:hover { color: var(--petrol); background: var(--petrol-50); }
.nav-links a.active { color: var(--petrol-dark); background: var(--petrol-50); }

.nav-dona { margin-left: 6px; }
.nav-dona .btn { padding: 0.6rem 1.2rem; font-size: 0.95rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--petrol);
  border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--petrol);
  border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
}

/* Mobile menu */
.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; margin: 0; padding: 10px 18px 16px; }
.nav-mobile a {
  display: block;
  padding: 0.85rem 0.6rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
}
.nav-mobile a.active { color: var(--petrol); }
.nav-mobile .nav-mobile-dona { padding: 14px 0 4px; }
.nav-mobile .btn { width: 100%; }

@media (min-width: 1024px) { .nav-mobile { display: none !important; } }

/* ---------- Hero (home) ---------- */
.hero {
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(232, 137, 74, 0.14), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(143, 175, 139, 0.22), transparent 55%),
    linear-gradient(180deg, var(--petrol-50), var(--bg));
  overflow: hidden;
}
.hero-inner {
  display: grid;
  gap: 36px;
  align-items: center;
  padding: 56px 0 64px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--petrol-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); }
.hero h1 { margin-bottom: 0.45em; }
.hero h1 .hl { color: var(--petrol-light); }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-note { margin-top: 18px; font-size: 0.88rem; color: var(--ink-soft); }
.hero-note a { font-weight: 600; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(100%, 520px); height: auto; }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; padding: 84px 0 92px; }
}

/* ---------- Sections ---------- */
.section { padding: 66px 0; }
.section-alt { background: var(--white); }
.section-tint { background: var(--petrol-50); }

.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 10px;
}
.section-head .lead { color: var(--ink-soft); font-size: 1.06rem; }

/* ---------- Cards grid ---------- */
.cards-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards-grid.cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 960px) { .cards-grid.cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.card-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--sage-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0; }

/* ---------- Split / feature rows ---------- */
.split {
  display: grid;
  gap: 34px;
  align-items: center;
  margin-bottom: 56px;
}
.split:last-child { margin-bottom: 0; }
.split-art { display: flex; justify-content: center; }
.split-art svg { width: min(100%, 440px); height: auto; }
.split h3 { font-size: 1.35rem; }
.split .lead { color: var(--ink-soft); }
.split ul.checks { list-style: none; padding: 0; margin: 14px 0 0; }
.split ul.checks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.split ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage-50);
}
.split ul.checks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 6px;
  height: 9px;
  border: solid var(--sage-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse .split-art { order: 2; }
  .split.reverse .split-text { order: 1; }
}

/* ---------- Stats ---------- */
.stats {
  background: linear-gradient(135deg, var(--petrol), var(--petrol-deep));
  color: #fff;
  padding: 58px 0;
}
.stats-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 820px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-number {
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}
.stat-label { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.stat-note { text-align: center; margin-top: 26px; font-size: 0.83rem; color: rgba(255, 255, 255, 0.65); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--orange), var(--orange-dark));
  border-radius: 22px;
  padding: 46px 30px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.92); max-width: 620px; margin: 0 auto 24px; }
.cta-band .btn { background: #fff; color: var(--orange-dark); box-shadow: none; }
.cta-band .btn:hover { background: var(--petrol-50); color: var(--orange-dark); }
.cta-band .btn-outline-light { background: transparent; color: #fff; }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(232, 137, 74, 0.12), transparent 60%),
    linear-gradient(180deg, var(--petrol-50), var(--bg));
  border-bottom: 1px solid var(--border);
  padding: 52px 0 56px;
}
.page-hero h1 { margin-bottom: 0.35em; }
.page-hero .lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 68ch; }
.crumbs { font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--petrol); font-weight: 600; }

/* ---------- Content / prose ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; color: var(--petrol); }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--sage);
  background: var(--sage-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-style: italic;
}
.prose blockquote p { margin: 0; color: var(--ink); }

/* Info / warning callouts */
.callout {
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 1.4em 0;
  border: 1px solid;
}
.callout.info { background: var(--petrol-50); border-color: #C7DCE3; color: var(--petrol-dark); }
.callout.warn { background: var(--orange-50); border-color: #F0C9A4; color: #8A4A18; }
.callout.ok { background: var(--sage-50); border-color: #C9D9C6; color: #42613E; }

/* ---------- Info list (contact data) ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.info-list li:last-child { border-bottom: 0; }
.info-list .ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--petrol-50);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-list strong { color: var(--ink); display: block; }

/* ---------- Contact form ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--petrol-dark);
}
.field .hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 5px; }
.input, .textarea, .select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--petrol-light);
  box-shadow: 0 0 0 3px rgba(44, 95, 111, 0.15);
}
.textarea { min-height: 150px; resize: vertical; }

.form-foot { font-size: 0.83rem; color: var(--ink-soft); margin-top: 14px; }
.form-foot a { font-weight: 600; }

/* ---------- Contact layout ---------- */
.contact-layout { display: grid; gap: 34px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1fr 1fr; } }

/* ---------- Map ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 380px;
}
.map-wrap iframe, .map-wrap .leaflet-container { width: 100%; height: 420px; border: 0; display: block; }

/* ---------- Donation uses ---------- */
.uses-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .uses-grid { grid-template-columns: repeat(2, 1fr); } }
.use-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.use-item .ico {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--orange-50);
  display: flex;
  align-items: center;
  justify-content: center;
}
.use-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.use-item p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Governance (board) ---------- */
.board-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.board-card .role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-50);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.board-card .avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--petrol-50);
  color: var(--petrol);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
}
.board-card h3 { margin-bottom: 0.15em; }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--petrol-deep), #122C35);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 60px;
}
.footer-top {
  display: grid;
  gap: 36px;
  padding: 56px 0 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-top { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer h4 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer p, .footer li { color: rgba(255, 255, 255, 0.78); font-size: 0.94rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: rgba(255, 255, 255, 0.82); }
.footer ul a:hover { color: var(--orange); }
.footer .brand-name { color: #fff; }
.footer .brand-name small { color: var(--sage); }
.footer .footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; }
.footer .footer-contact svg { flex: 0 0 auto; margin-top: 3px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.footer-social a:hover { background: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.75); }
.footer-bottom a:hover { color: var(--orange); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
