/* La Casa di Berta ODV – foglio di stile del sito */

:root {
  /* Palette ricavata dal logo (blu #3c5aa3) */
  --bg: #f7f9fd;
  --surface: #ffffff;
  --surface-tint: #eaf0fa;
  --ink: #1d2640;
  --muted: #525d78;
  --line: #dde4f1;

  --brand: #3c5aa3;        /* blu del logo: icone, numeri, spunte */
  --brand-strong: #2f4a8f; /* blu scuro: link e pulsanti */
  --brand-hover: #233a73;
  --warm: #f2b441;         /* ambra: solo per "Dona ora" */
  --warm-hover: #e5a22a;
  --dark: #1b2747;         /* blu notte: piè di pagina e fasce scure */
  --on-dark: #c9d2e8;      /* testo secondario sulle parti scure */

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 39, 71, .06), 0 8px 24px rgba(27, 39, 71, .08);
  --container: 1120px;
  --font: "Epilogue", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
/* Titoli che seguono un testo: più aria sopra */
p + h2, ul + h2, p + h3, ul + h3 { margin-top: 1.6em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.narrow { max-width: 68ch; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Testo letto solo dai lettori di schermo */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-donate { background: var(--warm); color: var(--dark); }
.btn-donate:hover { background: var(--warm-hover); color: var(--dark); }
.btn-outline { border-color: currentColor; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--surface-tint); color: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Intestazione ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 253, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo img { height: 56px; width: auto; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  white-space: nowrap;
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem;
}
.nav a:not(.btn):hover { background: var(--surface-tint); }
.nav a[aria-current="page"] { color: var(--brand-strong); }
.nav .btn { margin-left: 8px; white-space: nowrap; }

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-weight: 700; font-size: 1rem; color: var(--ink); cursor: pointer;
}

@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; }
  .nav a:not(.btn) { padding: 12px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Apertura (hero) ---------- */
.hero { padding: 48px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-tint); color: var(--brand-strong); font-weight: 700; font-size: .9rem;
}
.hero .lead { font-size: 1.25rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3.4; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.page-hero { padding: 56px 0 40px; }
.page-hero .lead { font-size: 1.25rem; color: var(--muted); max-width: 60ch; }

@media (max-width: 860px) {
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { order: -1; aspect-ratio: 16 / 10; }
}

/* ---------- Sezioni ---------- */
.section { padding: 72px 0; }
.section-warm { background: var(--surface-tint); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media img { border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Schede ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: 1rem; }
.card-body .more { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-block; padding: 4px 0; }
.card-body .more::after { content: " →"; }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
a.card { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
@media (prefers-reduced-motion: no-preference) { a.card:hover { transform: translateY(-3px); } }
a.card:hover { box-shadow: 0 2px 4px rgba(27,39,71,.06), 0 14px 32px rgba(27,39,71,.12); color: inherit; }
a.card:hover .more { text-decoration: underline; }

.icon-badge {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-tint); color: var(--brand-strong); margin-bottom: 14px;
}
.icon-badge svg { width: 24px; height: 24px; }

/* ---------- Dati di pagamento ---------- */
.data-list { margin: 0; display: grid; gap: 4px; }
.data-list dt { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.data-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.data-list dd.mono { word-spacing: .1em; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.copy-btn {
  margin-top: 12px; background: none; border: 2px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer;
}
.copy-btn:hover { border-color: var(--ink); }

/* ---------- Elenchi ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li {
  /* spunta disegnata come sfondo (cerchio blu del logo con segno bianco) */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='11' fill='%233c5aa3'/%3E%3Cpath d='M6.5 11.2l3 3 6-6.4' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left .3em / 22px 22px no-repeat;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 32px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.steps li {
  position: relative; padding: 22px 24px 22px 76px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.steps .step-n {
  position: absolute; left: 22px; top: 20px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800;
}
.steps p { margin: 0; }

/* ---------- Riquadri ---------- */
.callout {
  background: var(--surface); border-left: 6px solid var(--brand); border-radius: var(--radius-sm);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.callout p:last-child { margin-bottom: 0; }

.cta-band {
  background: var(--dark); color: #fff; border-radius: 28px; padding: 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { margin: 0 0 .25em; }
.cta-band p { margin: 0; color: var(--on-dark); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .cta-band { padding: 32px 24px; } }

/* ---------- Contatti ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list a {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.contact-list a:hover { color: var(--brand-strong); }
.contact-list small { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; }
.contact-list .icon-badge { margin: 0; flex: none; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 56px 0 32px; margin-top: 72px; font-size: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 1rem; color: #fff; letter-spacing: 0; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer-grid ul a { display: inline-block; padding: 4px 0; }
.footer-logo { background: #fff; border-radius: 12px; padding: 8px 12px; display: inline-block; margin-bottom: 16px; }
.footer-logo img { height: 44px; width: auto; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1);
}
.social a:hover { background: var(--brand); }
.social svg { width: 20px; height: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 40px; padding-top: 20px; font-size: .9rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
/* link dentro una riga di testo: sottolineati, per non dipendere solo dal colore */
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cani in adozione ---------- */
.dog-card-media { position: relative; }
.dog-badge {
  position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; background: var(--warm); color: var(--dark);
}
.dog-badge-adottato { background: var(--brand); color: #fff; }
.dog-facts { color: var(--muted); font-weight: 600; }
.card-body .dog-facts { font-size: .95rem; margin-bottom: .5em; }
.dog-cards-small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.dog-cards-small .card-body p:not(.dog-facts) { display: none; }

.dog-back { margin-bottom: 12px; font-size: 1rem; }
.dog-gallery { display: grid; gap: 10px; }
.dog-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.dog-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dog-thumbs a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 3px solid transparent; }
.dog-thumbs a[aria-current="true"] { border-color: var(--brand); }
.dog-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.dog-info { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.dog-box-title { font-size: 1.3rem; }
.dog-subhead { font-size: 1rem; margin: 1.2em 0 .6em; color: var(--muted); }
.dog-subhead:first-of-type { margin-top: .4em; }
.dog-info .checklist, .crosslist, .questionlist { gap: 8px; font-size: 1rem; }
.crosslist, .questionlist { list-style: none; padding: 0; margin: 0; display: grid; }
.crosslist li, .questionlist li { position: relative; padding-left: 34px; background: left .2em / 22px 22px no-repeat; }
.crosslist li {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='11' fill='%23525d78'/%3E%3Cpath d='M7.5 7.5l7 7M14.5 7.5l-7 7' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.questionlist li {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='11' fill='%23a86b00'/%3E%3Ctext x='11' y='16' text-anchor='middle' font-family='sans-serif' font-size='14' font-weight='700' fill='white'%3E%3F%3C/text%3E%3C/svg%3E");
}
.dog-needs { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 1rem; }

/* ---------- Fondo cassa emergenze (GoFundMe) ---------- */
.emergency-band {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px 24px; align-items: center;
  background: #fdf3dc; border: 1px solid #f2d79a; border-left: 6px solid var(--warm);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 24px;
}
.emergency-band h3 { margin: 0 0 .3em; }
.emergency-band p { margin: 0; font-size: 1rem; }
.emergency-band .icon-badge { margin: 0; background: #fff; color: #8a5a00; }
@media (max-width: 760px) {
  .emergency-band { grid-template-columns: 1fr; }
  .emergency-band .btn { justify-self: start; }
}

/* Riferimento normativo sotto l'elenco delle attività dei volontari */
.volunteer-law { margin: 28px 0 0; font-size: 1rem; color: var(--muted); max-width: 70ch; }
