/* =========== Root & Reset =========== */
:root{
  --header-offset:72px;
    --brand-700:#5a1212; /* colore logo */
    --brand-600:#6c1717;
    --brand-800:#4a0e0e; /* bordeaux più scuro per gradienti */
    --rose-400:#e7b2b2;
    --rose-100:#f7eaea;
  
    --ink:#000000;
    --ink-2:#5b4c4c;
  
    --surface:#ffffff;
    --line:#eadede;
  
    /* Border Radius */
    --radius-sm:8px;
    --radius:12px;
    --radius-lg:16px;
    --radius-xl:20px;
    --radius-full:999px;
    
    /* Spacing */
    --gap-xs:0.5rem;
    --gap-sm:0.75rem;
    --gap:1rem;
    --gap-lg:1.5rem;
    --gap-xl:2rem;
    
    /* Shadows */
    --shadow:0 10px 30px rgba(90,18,18,.10);
    --shadow-soft:0 6px 20px rgba(90,18,18,.08);

    /* Colori spazi */
    --space-diritti: #2563eb;
    --space-scuola: #16a34a;
    --space-dialogo: #9333ea;
    --space-salute: #ec4899;
    --space-comunita: #ea580c;
    --space-relax: #0891b2;
  }

  /* Viewport bassi anche su desktop: evita che il brand finisca fuori schermo */
  @media (max-height: 820px) {
    .hero{
      min-height: 0;
      height: auto;
      align-items: flex-start;
      padding: 24px 0 40px;
    }
    .hero-brand{
      margin-bottom: 0.75rem;
    }
    .hero-brand-logo{
      width: 56px;
      height: 56px;
      border-radius: 14px;
    }
    .hero-brand-text{
      font-size: clamp(24px, 4.5vw, 34px);
    }
  }
  
  :root { --brand-mark-size: 24px; }

  .brand-logo{
    width: var(--brand-mark-size);
    height: var(--brand-mark-size);
    display: inline-block;
    vertical-align: middle;
  }


  .hero, .section {
  /* Offset globale per tutte le sezioni ancorate, per evitare che l'header fisso le copra */
  scroll-margin-top: calc(var(--header-offset) + 20px);
}

/* Offset specifico per l'ancora #top: coerente con le altre sezioni */
#top {
  scroll-margin-top: calc(var(--header-offset) + 20px);
}
  
  *{box-sizing:border-box}
  html{
    scroll-behavior:smooth;
    scroll-padding-top: 0;
  }
  html,body{height:100%}
  body{
    margin:0;
    padding-top: var(--header-offset);
    font-family:'Montserrat',system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
    color:var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, #ffe8e1 50%, #ffd4c8 100%);
    background-attachment: fixed;
    line-height:1.65;
    font-size:16px;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    position: relative;
    overflow-x: hidden;
  }
  
  /* Migliora leggibilità testi generali */
  p {
    line-height:1.65;
    margin:0 0 1rem;
    text-align: justify;
  }
  
  /* Ottimizzazioni performance sezioni */
  section {
    contain: layout style;
  }
  
  
  img,svg{max-width:100%;height:auto;display:block}
  a{color:var(--brand-600);text-decoration:none;transition:color .2s ease}
  a:hover{color:var(--brand-700);text-decoration:underline}
  strong{color:var(--brand-700); font-weight:700;}
  em{font-style:italic; color:var(--brand-600);}
  .container{width:min(1120px, 92%); margin-inline:auto}
  
  /* =========== Accessibility =========== */
  .skip-link{
    position:absolute; left:-9999px; top:auto;
    background:#fff; color:#000; padding:.6rem .8rem; border-radius:8px; z-index:1000
  }
  .skip-link:focus{left:1rem; top:1rem}
  
  /* =========== Header =========== */
  .site-header{
    position:fixed; top:0; left:0; right:0; width:100%; z-index:9999; background:rgba(255,250,249,.95);
    border-bottom:1px solid var(--line);
    box-shadow: 0 2px 8px rgba(90,18,18,.05);
  }
  .site-header.menu-open{
    background:rgba(255,255,255,0.98);
  }
  .header-grid{
    display:grid; 
    grid-template-columns:auto 1fr auto auto; 
    align-items:center; 
    gap:2rem; 
    padding:.8rem 0;
  }
  /* Placement: brand left, nav centered, toggle right */
  .header-grid > .brand{ grid-column:1; grid-row:1; justify-self:start; align-self:center; }
  .header-grid > .btn-partecipa-mobile{ display:none; }
  .header-grid > .nav-toggle{ grid-column:4; grid-row:1; justify-self:end; align-self:center; }
  .header-grid > .site-nav{ grid-column:2; grid-row:1; justify-self:center; align-self:center; }
  .header-grid > .btn-sostienici{ grid-column:3; grid-row:1; justify-self:end; align-self:center; }

  /* Layout header su schermi piccoli: logo e toggle in alto, menu su riga sotto */
  @media (max-width: 768px) {
    .header-grid {
      grid-template-columns: auto 1fr auto;
      grid-template-rows: auto auto;
      column-gap: 1rem;
    }
    .header-grid > .brand {
      grid-column: 1;
      grid-row: 1;
    }
    .header-grid > .btn-sostienici{
      grid-column: 2;
      grid-row: 1;
      justify-self: center;
      z-index: 1;
    }
    .header-grid > .nav-toggle {
      grid-column: 3;
      grid-row: 1;
    }
    .header-grid > .site-nav {
      grid-column: 1 / -1;
      grid-row: 2;
      justify-self: stretch;
    }
  }

  @media (max-width: 420px) {
    .header-grid {
      grid-template-columns: auto auto;
      grid-template-rows: auto auto auto;
      row-gap: 0.75rem;
    }
    .header-grid > .brand {
      grid-column: 1;
      grid-row: 1;
    }
    .header-grid > .nav-toggle {
      grid-column: 2;
      grid-row: 1;
      justify-self: end;
    }
    .header-grid > .btn-sostienici{
      grid-column: 1 / -1;
      grid-row: 2;
      justify-self: center;
    }
    .header-grid > .site-nav {
      grid-column: 1 / -1;
      grid-row: 3;
    }
  }
  .brand{
    display:inline-block; 
    font-weight:700; 
    color:var(--brand-700);
    white-space:nowrap;
    line-height:1.5;
  }
  .brand-name{
    display:inline;
    vertical-align:middle;
  }
  
  .site-nav ul{display:flex; gap:1rem; align-items:center; margin:0; padding:0; list-style:none}
  @media (min-width: 841px){
    .site-nav ul{justify-content:center}
  }
  .site-nav a{
    padding:.5rem .7rem; 
    border-radius:10px; 
    transition:background .2s ease, color .2s ease, transform 0.2s ease;
    position: relative;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
  }
  .site-nav a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-700);
    transition: width 0.3s ease, left 0.3s ease;
  }
  .site-nav a:hover{
    background:var(--rose-100); 
    color:var(--brand-700); 
    text-decoration:none;
    transform: translateY(-2px);
  }
  .site-nav a:hover::after {
    width: 80%;
    left: 10%;
  }
  .btn-link{
    background:var(--brand-700); 
    color:#fff !important; 
    border-radius:999px; 
    padding:calc(.75rem + 5px) calc(1.15rem + 5px);
    box-shadow:var(--shadow-soft); 
    font-size:1rem; 
    font-weight:600;
    line-height: 1.5;
    transition:transform .08s ease, background .2s ease, color .2s ease;
    white-space:nowrap;
    display: inline-flex;
    align-items: center;
  }
  .site-nav .btn-link:hover, .site-nav .btn-link:focus-visible{ background: var(--rose-100); color: var(--brand-700) !important; text-decoration:none }
  .btn-link:active{transform:translateY(1px)}

  .btn-card-action{
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--brand-700);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
  }
  .btn-card-action:hover{
    background: var(--rose-100);
    color: var(--brand-700);
    text-decoration: none;
  }

  .footer-inline-link{
    color: inherit;
  }

  .img-border-0{
    border: 0;
  }

  .honeypot{
    display: none;
  }
  
  /* Bottone Partecipa Mobile - Compatto come desktop */
  .btn-partecipa-mobile {
    display:none; /* nascosto su desktop */
    background:var(--brand-700);
    color:#fff !important;
    border-radius:999px;
    padding:0.5rem 0.85rem;
    box-shadow:var(--shadow-soft);
    font-size:0.9rem;
    font-weight:600;
    transition:transform .08s ease, background .2s ease, color .2s ease;
    white-space:nowrap;
  }
  .btn-partecipa-mobile:hover {
    background:var(--rose-100);
    color:var(--brand-700) !important;
    text-decoration:none;
  }
  .btn-partecipa-mobile:active {
    transform:translateY(1px);
  }
  
  .nav-toggle{
    display:none; background:transparent; border:0; cursor:pointer; padding:.4rem; border-radius:10px;
    transition: background .2s ease, transform .15s ease;
  }
  .nav-toggle:hover{
    background:var(--rose-100);
    transform:scale(1.05);
  }
  .nav-toggle:focus-visible{outline:2px solid var(--brand-700)}
  .nav-toggle-bar{display:block; width:24px; height:2px; background:var(--ink); margin:.28rem 0; border-radius:2px}
  
  /* =========== Dropdown Menu =========== */
  .dropdown {
    position: relative;
  }
  
  .dropdown-toggle {
    background: transparent;
    border: none;
    padding: 0.4rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  
  .dropdown-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: background 0.2s ease, transform 0.3s ease, opacity 0.3s ease;
  }
  
  .dropdown-toggle:hover {
    background: var(--rose-100);
    transform: translateY(-2px);
  }
  
  .dropdown-toggle:hover .dropdown-toggle-bar {
    background: var(--brand-700);
  }
  
  .dropdown-toggle:focus-visible {
    outline: 2px solid var(--brand-700);
    outline-offset: 2px;
  }
  
  .dropdown-toggle[aria-expanded="true"] .dropdown-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  
  .dropdown-toggle[aria-expanded="true"] .dropdown-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  
  .dropdown-toggle[aria-expanded="true"] .dropdown-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  
  .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    min-width: 180px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
  }
  
  .dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .dropdown-menu li {
    margin: 0;
    padding: 0;
  }
  
  .dropdown-menu a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 0;
  }
  
  .dropdown-menu a::after {
    display: none;
  }
  
  .dropdown-menu a:hover {
    background: var(--rose-100);
    color: var(--brand-700);
    transform: none;
  }
  
  /* =========== Hero =========== */
  .hero{
    position:relative; isolation:isolate;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(64px, 10vw, 120px) 0 56px;
    overflow-x: hidden;
    overflow-y: visible;
  }
  .hero-inner{display:grid; gap:1.2rem; max-width:820px; margin-top:0}

  @media (min-width: 1024px) and (min-height: 800px) {
    .hero-inner{margin-top:-150px}
  }

  @media (max-height: 700px) {
    .hero{
      min-height: 0;
      height: auto;
      align-items: flex-start;
      overflow: visible;
      padding: 32px 0 40px;
    }
  }
  .hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }
  .hero-brand-logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
  }
  .hero-brand-text {
    font-size: clamp(36px, 4.5vw, 48px);
    font-weight: 900;
    color: var(--brand-700);
    letter-spacing: 0.02em;
  }
  .hero h1{
    font-size: clamp(42px, 6vw, 72px);
    line-height:1.2; letter-spacing:0.28em; color:var(--brand-700); margin:0 0 .2rem;
    font-weight: 800;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15em;
  }
  .hero-box {
    border: 4px solid var(--brand-700);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 820px;
    border-radius: 20px;
  }
  .hero-top {
    display: flex;
    font-weight: 900;
    color: #ffffff;
    background: var(--brand-700);
    padding: 0.4em 1em 0.3em 1em;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
  }
  .hero-bottom {
    display: flex;
    font-weight: 1000;
    color: var(--brand-700);
    background: #ffffff;
    padding: 0.3em 1em 0.4em calc(1em + 0.26em);
    white-space: nowrap;
    letter-spacing: 0.52em;
    justify-content: center;
    text-align: center;
    -webkit-text-stroke: 2px var(--brand-700);
    font-size: 1.05em;
  }
  .lead{font-size:clamp(18px, 2.6vw, 22px); color:var(--brand-600); margin:0}
  .hero-cta{
    display:flex; 
    gap:.8rem; 
    flex-wrap:wrap; 
    margin-top:.4rem;
  }
  .hero-cta .btn-primary {
    animation: cta-pulse 4s ease-in-out infinite;
  }
  @keyframes cta-pulse {
    0%, 100% { box-shadow: var(--shadow); }
    50% { box-shadow: 0 14px 35px rgba(90,18,18,.2); }
  }
  .micro{font-size:15px; color:var(--ink-2); line-height:1.5}
  
  .btn{
    display:inline-flex; align-items:center; justify-content:center; gap:var(--gap-sm);
    padding:.75rem 1.25rem; border-radius:var(--radius); font-weight:600; border:1px solid transparent;
    transition:transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
    cursor:pointer;
    position: relative;
    overflow: hidden;
  }
  .btn-primary{
    background:linear-gradient(135deg, var(--brand-600), var(--brand-700));
    color:#fff !important; 
    box-shadow:var(--shadow);
    position: relative;
    z-index: 1;
  }
  .btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
  }
  .btn-primary:hover{
    transform:translateY(-3px) scale(1.02);
    box-shadow:0 16px 40px rgba(90,18,18,.25);
    color:#fff !important;
    text-decoration: none !important;
  }
  .btn-primary:hover::after {
    opacity: 1;
  }
  .btn-primary:active{transform:translateY(0) scale(0.98);}
  .btn-ghost{
    background:var(--surface); border-color:var(--line); color:var(--ink);
  }
  .btn-ghost:hover{
    background:var(--rose-100);
    border-color:var(--brand-700);
    color:var(--brand-700);
    transform:translateY(-2px);
    box-shadow:var(--shadow-soft);
  }
  .btn-ghost:active{transform:translateY(0)}
  
  /* =========== Sections =========== */
  .section{
    min-height: 100vh;
    padding:72px 0; 
    position: relative; 
    isolation: isolate; 
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .section.tint{
    background:transparent;
  }
  
  
  .section h2{
    font-size: clamp(32px, 4.5vw, 44px); margin:0 0 1rem; letter-spacing:-.02em; color:var(--brand-700); font-weight: 700
  }
  
  h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--brand-700);
    line-height: 1.3;
    margin: 0 0 1rem;
  }
  
  h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-700);
    line-height: 1.4;
    margin: 0 0 0.75rem;
  }
  .section p {
    margin-bottom: 1rem;
    line-height: 1.7;
  }
  .section p:last-of-type {
    margin-bottom: 1.5rem;
  }
  .intro-text {
    font-size: 1.15rem;
    color: var(--brand-600);
    font-weight: 500;
    line-height: 1.65;
    margin-bottom: 1.5rem !important;
  }
  .section-intro{
    color:var(--brand-600); 
    max-width:70ch;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }
  .muted{color:var(--ink-2); font-size: 1rem; font-style: italic; line-height:1.6}

  /* Testo sezioni Chi Siamo e Visione tutto nero */
  #chi-siamo p,
  #chi-siamo .lead,
  #chi-siamo .intro-text,
  #chi-siamo strong,
  #visione p,
  #visione .lead,
  #visione .intro-text,
  #visione strong {
    color: #000000 !important;
  }
  
  .centered-content {
    max-width: 800px;
    margin: 0 auto;
  }
  .centered-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  .centered-content p {
    text-align: justify;
    margin-bottom: 1rem;
  }
  .centered-content p:last-of-type {
    margin-bottom: 1rem;
  }
  .centered-content .intro-text {
    margin-bottom: 1rem !important;
  }
  
  /* Method Section */
  .method-section {
    margin-top: 4rem;
    padding: 2.5rem 0;
    border-top: 2px solid var(--line);
  }
  
  .method-title {
    font-size: clamp(28px, 4vw, 36px);
    color: var(--brand-700);
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
  }
  
  .method-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .method-item {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  
  .method-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(90,18,18,.12);
    border-color: var(--brand-700);
  }
  
  .method-item h4 {
    font-size: 1.25rem;
    color: var(--brand-700);
    font-weight: 700;
    margin: 0 0 1rem;
  }
  
  .method-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    margin: 0;
  }
  
  @media (max-width: 768px) {
    .method-grid {
      grid-template-columns: 1fr;
    }
  }
  
  /* Layout helpers */
  .grid-2{display:grid; gap:2rem; grid-template-columns:1.2fr .8fr}
  @media (max-width: 900px){ .grid-2{grid-template-columns:1fr} }
  
  .panel{
    background:rgba(255,255,255,0.85); border:1px solid var(--line); border-radius:var(--radius-lg);
    padding:1.5rem; box-shadow:var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }
  .panel.note{background:rgba(255,255,255,0.85)}
  .panel-title{margin:.2rem 0 1rem; color:var(--brand-700); font-size: 1.2rem; font-weight: 700;}
  .panel p{font-size:1rem; line-height:1.65; color:var(--ink)}
  .panel .checklist{margin-top: 0.5rem;}
  
  .pill-list{display:flex; gap:.5rem; flex-wrap:wrap; margin:1rem 0 0; padding:0; list-style:none}
  .pill-list li{
    padding:.45rem .8rem; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,0.8); color:var(--ink); font-size:0.95rem; font-weight:500; line-height:1.4;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .pill-list li:hover {
    transform: translateY(-2px);
    background:rgba(255,255,255,0.95);
    border-color: var(--brand-700);
    box-shadow: 0 4px 12px rgba(90,18,18,.1);
  }
  
  /* Badges */
  .badge-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
  }
  .panel .badge-row {
    margin-top: 1.5rem;
  }
  .badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
    color: #fff;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: badge-shine 3s infinite;
  }
  @keyframes badge-shine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
  }
  .badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(90,18,18,.3);
  }
  
  /* Cards */
  .cards{display:grid; gap:var(--gap-lg); grid-template-columns:repeat(3, 1fr); margin-top:var(--gap-lg)}
  .cards.cards-2x2{grid-template-columns:repeat(2, 1fr)}
  .cards.cards-full{grid-template-columns:1fr}
  @media (max-width: 900px){ .cards{grid-template-columns:repeat(2, 1fr)} }
  @media (max-width: 600px){
    .cards{grid-template-columns:1fr}
    .cards.cards-2x2{grid-template-columns:1fr}
  }

  /* Ottimizzazioni layout mobile */
  @media (max-width: 768px) {
    /* Hero più compatta e interamente visibile */
    .hero{
      min-height: 0;
      height: auto;
      align-items: flex-start;
      overflow-x: hidden;
      overflow-y: visible;
      padding: 24px 0 40px;
    }
    .hero-inner{
      margin-top: 0;
      gap: 1rem;
    }
    .hero-brand{
      margin-bottom: 0.75rem;
    }
    .hero-brand-logo{
      width: 56px;
      height: 56px;
      border-radius: 14px;
    }
    .hero-brand-text{
      font-size: clamp(24px, 5vw, 34px);
    }
    .hero h1{
      font-size: clamp(32px, 8vw, 40px);
    }
    .hero-bottom{
      letter-spacing: 0.3em;
      padding-right: 1em;
    }

    /* Sezione Visione: sempre una colonna su mobile */
    #visione .container.grid-2{
      grid-template-columns: 1fr;
      row-gap: 2rem;
    }

    /* Sezioni full height ridotte su mobile per evitare eccessivo spazio vuoto */
    .section{
      min-height: 0;
      height: auto;
      padding: 64px 0;
      align-items: flex-start;
    }
  }
  .card{
    background:rgba(255,255,255,0.85); border:1px solid var(--line); border-radius:var(--radius-lg);
    padding:1.5rem; box-shadow:var(--shadow-soft); 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    cursor:pointer;
  }
  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--brand-700);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  .card:hover{
    transform: translateY(-12px) scale(1.03) rotate(0.5deg);
    box-shadow: 0 24px 48px rgba(90,18,18,.18);
    border-color: var(--brand-700);
    background:rgba(255,255,255,0.95);
  }
  .card:hover::before {
    transform: scaleX(1);
  }
  .card h3{margin:.8rem 0 .5rem; color:var(--brand-700); font-weight: 700}
  .card p{font-size:1rem; line-height:1.65; color:var(--ink); font-weight:400}
  .card a{font-weight:600; transition:color .2s ease}
  .card a:hover{color:var(--brand-700)}
  .card.focus{
    outline:2px solid rgba(90, 18, 18, 0.4); 
    outline:2px solid color-mix(in oklab, var(--brand-700) 30%, white);
    background:rgba(255,255,255,0.7);
    position: relative;
  }
  .card.focus::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600), var(--brand-700));
    background-size: 200% 200%;
    opacity: 0.15;
    animation: gradient-shift 3s ease infinite;
    pointer-events: none;
    z-index: -1;
  }
  @keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  /* Donation bank details box */
  .donation-bank-details {
    color: #000000;
  }
  .donation-bank-details h4,
  .donation-bank-details p,
  .donation-bank-details li {
    color: #000000;
  }
  
  /* Card Icons */
  .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease;
    position: relative;
  }
  .card-icon svg {
    width: 28px;
    height: 28px;
  }
  .card:hover .card-icon {
    transform: scale(1.2) rotate(-5deg) translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  }
  
  .aree-course-panel{
    margin-top:1.25rem;
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:1.25rem;
    align-items:center;
  }

  .aree-course-media{display:flex; justify-content:center; align-items:center;}

  .aree-course-poster{
    display:block;
    margin-top:0;
    max-width: 280px;
    border-radius: var(--radius-lg);
    overflow:hidden;
    border:1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .aree-course-poster:hover{
    transform: translateY(-2px);
    border-color: var(--brand-700);
    box-shadow: 0 12px 30px rgba(90,18,18,.12);
  }
  .aree-course-poster img{display:block; width:100%; height:auto;}

  @media (max-width: 900px){
    .aree-course-panel{grid-template-columns:1fr;}
    .aree-course-media{justify-content:center;}
    .aree-course-poster{max-width: 320px;}
  }

  .lightbox{
    position: fixed;
    inset: 0;
    padding: 24px;
    background: rgba(0,0,0,0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
  }
  .lightbox:target{display:flex;}
  .lightbox img{
    max-width: min(1100px, 95vw);
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 22px 60px rgba(0,0,0,0.45);
    background: white;
  }
  .lightbox-close{
    position: absolute;
    inset: 0;
    cursor: zoom-out;
  }
  .lightbox-close::after{
    content: "×";
    position: absolute;
    top: 14px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 34px;
    line-height: 1;
    border-radius: 999px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.25);
  }
  
  .donations-grid{display:grid; gap:2rem; grid-template-columns:1fr 1fr;}
  @media (max-width: 900px){ .donations-grid{grid-template-columns:1fr} }
  .donations-panel{margin-top:1.25rem;}

  /* Space Colors */
  .space-card[data-space="diritti"] .card-icon { background: rgba(37, 99, 235, 0.15); background: color-mix(in oklab, var(--space-diritti) 15%, white); color: var(--space-diritti); }
  .space-card[data-space="diritti"]::before { background: var(--space-diritti); }
  .space-card[data-space="diritti"] h3 { color: var(--space-diritti); }
  
  .space-card[data-space="scuola"] .card-icon { background: rgba(22, 163, 74, 0.15); background: color-mix(in oklab, var(--space-scuola) 15%, white); color: var(--space-scuola); }
  .space-card[data-space="scuola"]::before { background: var(--space-scuola); }
  .space-card[data-space="scuola"] h3 { color: var(--space-scuola); }
  
  .space-card[data-space="dialogo"] .card-icon { background: rgba(147, 51, 234, 0.15); background: color-mix(in oklab, var(--space-dialogo) 15%, white); color: var(--space-dialogo); }
  .space-card[data-space="dialogo"]::before { background: var(--space-dialogo); }
  .space-card[data-space="dialogo"] h3 { color: var(--space-dialogo); }
  
  .space-card[data-space="salute"] .card-icon { background: rgba(236, 72, 153, 0.15); background: color-mix(in oklab, var(--space-salute) 15%, white); color: var(--space-salute); }
  .space-card[data-space="salute"]::before { background: var(--space-salute); }
  .space-card[data-space="salute"] h3 { color: var(--space-salute); }
  
  .space-card[data-space="comunita"] .card-icon { background: rgba(234, 88, 12, 0.15); background: color-mix(in oklab, var(--space-comunita) 15%, white); color: var(--space-comunita); }
  .space-card[data-space="comunita"]::before { background: var(--space-comunita); }
  .space-card[data-space="comunita"] h3 { color: var(--space-comunita); }
  
  .space-card[data-space="relax"] .card-icon { background: rgba(8, 145, 178, 0.15); background: color-mix(in oklab, var(--space-relax) 15%, white); color: var(--space-relax); }
  .space-card[data-space="relax"]::before { background: var(--space-relax); }
  .space-card[data-space="relax"] h3 { color: var(--space-relax); }
  
  /* Checklist */
  .checklist{
    margin:0; 
    padding-left:0;
    list-style: none;
  }
  .checklist li{
    margin:.75rem 0; 
    font-size:1rem; 
    line-height:1.7; 
    color:var(--ink);
    padding-left: 1.8rem;
    position: relative;
  }
  .checklist li::before{
    content:"✓"; 
    color:var(--brand-700); 
    font-weight:700;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.7;
  }
  
  /* KPIs */
  .kpis{display:grid; grid-template-columns:repeat( auto-fit, minmax(200px,1fr) ); gap:1.5rem; margin-top:2rem}
  .kpi{
    background:rgba(255,255,255,0.85); border:1px solid var(--line); border-radius:var(--radius); 
    padding:1.5rem; text-align:center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor:default;
    position: relative;
    overflow: hidden;
  }
  .kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s ease;
  }
  .kpi:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 16px 40px rgba(90,18,18,.15);
    border-color: var(--brand-700);
    background:rgba(255,255,255,0.95);
  }
  .kpi:hover::before {
    left: 100%;
  }
  .kpi-num{
    font-size: clamp(32px, 6vw, 48px); 
    font-weight:800; 
    color:var(--brand-700); 
    line-height:1;
    font-variant-numeric: tabular-nums;
  }
  .kpi-label{color:var(--brand-600); margin-top:.6rem; font-weight: 500}
  .kpi-context {
    font-size: 0.9rem;
    color: var(--ink-2);
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.5;
  }
  
  /* Progress Bar per KPI */
  .kpi-progress {
    width: 100%;
    height: 6px;
    background: var(--line);
    border-radius: 999px;
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
  }
  .kpi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
    border-radius: 999px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
  }
  .kpi.animated .kpi-progress-fill {
    width: var(--progress, 100%);
  }
  
  .actions-row{margin-top:1rem}
  .link-arrow{
    font-weight:600; 
    transition:color .2s ease, transform .15s ease; 
    display:inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
  }
  .link-arrow::after{
    content:"↗";
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  .link-arrow:hover{
    color:var(--brand-700); 
    transform:translateX(4px);
  }
  .link-arrow:hover::after {
    transform: translate(4px, -4px) scale(1.2);
  }
  
  /* Newsletter */
  .newsletter{
    margin-top:2rem; background:rgba(255,255,255,0.9); border:1px solid var(--line); border-radius:var(--radius);
    padding:1rem; box-shadow:var(--shadow-soft);
  }
  .newsletter label{display:block; font-weight:600; margin-bottom:.5rem}
  .newsletter-row{display:flex; gap:.6rem; flex-wrap:wrap}
  .newsletter input{
    flex:1; min-width:220px; padding:.75rem .9rem; border-radius:12px; border:1px solid var(--line);
    background:rgba(255,255,255,0.95); color:var(--ink);
    transition:border-color .2s ease, box-shadow .2s ease;
  }
  .newsletter input:hover{border-color:var(--brand-600)}
  .newsletter input:focus{outline:2px solid rgba(90, 18, 18, 0.45); outline:2px solid color-mix(in oklab, var(--brand-700) 35%, white); border-color:var(--brand-700)}
  .form-msg{margin:.4rem 0 0; font-size:1rem; line-height:1.5}
  
  /* =========== Footer =========== */
  .site-footer{margin-top:32px; border-top:1px solid var(--line); background:rgba(255,255,255,0.9);}
  .footer-grid{
    display:grid;
    gap:1.25rem;
    grid-template-columns: 1.6fr 1fr 1fr;
    align-items:start;
    padding:24px 0;
  }
  @media (max-width: 1100px){ .footer-grid{grid-template-columns: 1fr 1fr} }
  @media (max-width: 900px){ .footer-grid{grid-template-columns:1fr} }
  .foot-brand{display:grid; gap:.4rem}
  .foot-brand strong{color:var(--brand-700); font-size:1.1rem}
  .foot-links{list-style:none; padding:0; margin:0; display:grid; gap:.5rem}
  .foot-links a{font-size:1rem; font-weight:500; transition:color .2s ease, transform .15s ease; display:inline-block}
  .foot-links a:hover{color:var(--brand-700); transform:translateX(4px)}
  .foot-contact-col{
    display:flex;
    flex-direction:column;
    gap: 0.6rem;
    min-width: 0;
  }

  .foot-contact-title {
    color: var(--brand-700);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
  }
  .foot-meta{
    font-style:normal; 
    color:var(--ink); 
    font-size:1rem; 
    line-height:1.6;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
  .foot-meta a{font-weight:500; transition:color .2s ease}
  .foot-meta a:hover{color:var(--brand-700)}
  .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    transition: color .2s ease, transform .15s ease;
  }
  .contact-item svg {
    flex-shrink: 0;
    color: var(--brand-700);
  }
  .contact-item:hover {
    color: var(--brand-700);
    transform: translateX(2px);
  }
  
  .copyright{
    border-top:1px solid var(--line);
    text-align:center; padding:12px; font-size:.95rem; color:var(--ink-2); background:rgba(255,255,255,0.9); line-height:1.6
  }

  img[src*="shinystat.cgi"],
  a[href*="shinystat.com"] img,
  iframe[src*="shinystat"],
  img[src*="shinystat.com"]{
    display:none !important;
  }
  
  /* =========== Contact Form =========== */
  .contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    margin-top: 2rem;
  }
  
  @media (max-width: 900px) {
    .contact-wrapper {
      grid-template-columns: 1fr;
    }
  }
  
  .contact-form {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
  }
  
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  @media (max-width: 600px) {
    .form-row {
      grid-template-columns: 1fr;
    }
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.95rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  
  .form-group input:hover,
  .form-group textarea:hover {
    border-color: var(--brand-600);
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    outline: 2px solid color-mix(in oklab, var(--brand-700) 35%, white);
    border-color: var(--brand-700);
  }
  
  .form-group textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    font-size: 0.95rem;
  }
  
  .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-700);
    margin-top: 2px;
    flex-shrink: 0;
  }
  
  .checkbox-label span {
    line-height: 1.6;
  }
  
  .checkbox-label a {
    color: var(--brand-600);
    font-weight: 600;
  }
  
  .contact-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  
  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .contact-info-card {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }
  
  .contact-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90,18,18,.1);
    border-color: var(--brand-700);
  }
  
  .contact-info-card svg {
    color: var(--brand-700);
    flex-shrink: 0;
    margin-top: 2px;
  }
  
  .contact-info-card strong {
    display: block;
    color: var(--brand-700);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-info-card p {
    margin: 0;
    color: var(--ink);
    line-height: 1.6;
  }
  
  .contact-info-card a {
    color: var(--ink);
    font-weight: 500;
    transition: color .2s ease;
  }
  
  .contact-info-card a:hover {
    color: var(--brand-700);
  }
  
  /* =========== Breadcrumbs =========== */
  .breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
  }
  
  .breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  
  .breadcrumbs li {
    display: flex;
    align-items: center;
  }
  
  .breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--ink-2);
  }
  
  .breadcrumbs a {
    color: var(--ink-2);
    transition: color .2s ease;
  }
  
  .breadcrumbs a:hover {
    color: var(--brand-700);
  }
  
  .breadcrumbs li[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
  }
  
  /* =========== FAQ =========== */
  .faq-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .faq-category h2 {
    color: var(--brand-700);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--line);
  }
  
  .faq-item {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }
  
  .faq-item:hover {
    box-shadow: var(--shadow-soft);
    border-color: var(--brand-700);
  }
  
  .faq-item summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s ease;
  }
  
  .faq-item summary::-webkit-details-marker {
    display: none;
  }
  
  .faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--brand-700);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
  }
  
  .faq-item[open] summary::after {
    transform: rotate(45deg);
  }
  
  .faq-item summary:hover {
    color: var(--brand-700);
  }
  
  .faq-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    line-height: 1.7;
    color: var(--ink);
  }
  
  .faq-content p {
    margin-bottom: 1rem;
  }
  
  .faq-content ul,
  .faq-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
  }
  
  .faq-content li {
    margin-bottom: 0.5rem;
  }
  
  .faq-content code {
    background: rgba(90,18,18,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
  }
  
  .faq-content .btn {
    margin-top: 1rem;
  }
  
  .cta-box {
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-800) 100%);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 0;
    box-shadow: none;
  }
  
  .cta-box h3 {
    color: white;
    margin-bottom: 1rem;
  }
  
  .cta-box > p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
  }

  .cta-box .donation-card p,
  .cta-box .donation-card li,
  .cta-box .donation-card code {
    color: var(--ink);
  }
 
  .donation-wrap{
    padding: 0;
  }
  .donation-wrap .grid-auto-fit{
    gap: 0;
  }
  .donation-wrap .donation-card{
    border: 3px solid var(--brand-700);
    border-radius: 16px;
    padding: 1.5rem;
  }
  
  .cta-box .btn-primary {
    background: white !important;
    color: var(--brand-700) !important;
  }
  
  .cta-box .btn-primary:hover {
    background: var(--brand-700) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90,18,18,0.3);
  }
  
  /* =========== Trasparenza Page =========== */
  .governance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .governance-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
  }
  
  .governance-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--ink);
  }
  
  .governance-card p {
    margin-bottom: 0.5rem;
  }
  
  .governance-card .micro {
    font-size: 0.85rem;
    color: var(--ink-2);
  }
  
  /* Documents List */
  .documents-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .document-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .document-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-soft);
  }
  
  .document-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
  }
  
  .document-info {
    flex: 1;
  }
  
  .document-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
  }
  
  .document-info p {
    margin-bottom: 0.25rem;
    color: var(--ink);
  }
  
  .document-info .micro {
    font-size: 0.85rem;
    color: var(--ink-2);
  }
  
  /* Info Box */
  .info-box {
    background: rgba(255,255,255,0.95);
    border-left: 4px solid var(--brand-700);
    padding: 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: var(--shadow-soft);
  }
  
  .info-box h3 {
    color: var(--brand-700);
    margin-bottom: 1rem;
  }
  
  .info-box ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
  }
  
  .info-box li {
    margin-bottom: 0.75rem;
  }
  
  /* Timeline */
  .timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 2rem;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-700) 0%, var(--line) 100%);
  }
  
  .timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
  }
  
  .timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--line);
  }
  
  .timeline-item.current::before {
    background: var(--brand-700);
    border-color: var(--brand-700);
    box-shadow: 0 0 0 4px rgba(90,18,18,0.1);
  }
  
  .timeline-item.future::before {
    background: white;
    border-color: var(--ink-2);
  }
  
  .timeline-date {
    font-weight: 700;
    color: var(--brand-700);
    margin-bottom: 0.5rem;
  }
  
  .timeline-content h4 {
    margin-bottom: 0.5rem;
  }
  
  .timeline-content p {
    color: var(--ink);
    margin-bottom: 0.5rem;
  }
  
  .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--ink-2);
    color: white;
    font-size: 0.8rem;
    border-radius: 12px;
    font-weight: 600;
  }
  
  .badge-active {
    background: var(--brand-700);
  }
  
  /* Commitments Grid */
  .commitments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .commitment-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .commitment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
  }
  
  .commitment-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .commitment-card h3 {
    color: var(--brand-700);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
  }
  
  .commitment-card p {
    color: var(--ink);
    line-height: 1.6;
  }
  
  /* =========== Campaigns & Donations =========== */
  .campaigns{
    display:grid; 
    gap:2rem; 
    grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); 
    margin-top:2rem;
  }
  
  .campaign-card{
    background:rgba(255,255,255,0.9); 
    border:1px solid var(--line); 
    border-radius:var(--radius);
    padding:1.5rem; 
    box-shadow:var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    display:flex;
    flex-direction:column;
    position: relative;
    overflow: hidden;
  }
  .campaign-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-700);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
  }
  .campaign-card:hover{
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 48px rgba(90,18,18,.15);
    border-color: var(--brand-700);
    background:rgba(255,255,255,0.98);
  }
  .campaign-card:hover::before {
    transform: scaleY(1);
  }
  
  .campaign-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:1rem;
  }
  
  .campaign-badge{
    display:inline-block;
    padding:0.35rem 0.65rem;
    border-radius:6px;
    font-size:0.75rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.03em;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
  }
  .campaign-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
  }
  .campaign-card:hover .campaign-badge::before {
    left: 100%;
  }
  
  .status-active{
    background:#10b981;
    color:#fff;
  }
  
  .status-funded{
    background:#3b82f6;
    color:#fff;
  }
  
  .status-urgent{
    background:var(--brand-700);
    color:#fff;
    animation: pulse 2s ease-in-out infinite, glow 2s ease-in-out infinite;
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
  }
  
  @keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(90,18,18,0.3); }
    50% { box-shadow: 0 0 20px rgba(90,18,18,0.6), 0 0 30px rgba(90,18,18,0.4); }
  }
  
  .campaign-icon{
    font-size:2rem;
    line-height:1;
    transition: transform 0.3s ease;
    display: inline-block;
  }
  .campaign-card:hover .campaign-icon {
    transform: scale(1.2) rotate(10deg);
  }
  
  .campaign-card h3{
    font-size:1.4rem;
    margin:0 0 0.75rem;
    color:var(--brand-700);
    font-weight:700;
  }
  
  .campaign-desc{
    color:var(--ink);
    margin:0 0 1.5rem;
    line-height:1.65;
  }
  
  .campaign-progress{
    background:rgba(255,255,255,0.6);
    border:1px solid var(--line);
    border-radius:12px;
    padding:1rem;
    margin-bottom:1rem;
  }
  
  .progress-stats{
    display:flex;
    gap:0.5rem;
    align-items:baseline;
    margin-bottom:0.75rem;
  }
  
  .amount-raised{
    font-size:1.5rem;
    font-weight:800;
    color:var(--brand-700);
  }
  
  .amount-goal{
    font-size:1rem;
    color:var(--ink-2);
  }
  
  .progress-bar{
    height:10px;
    background:var(--line);
    border-radius:999px;
    overflow:hidden;
    margin-bottom:0.75rem;
  }
  
  .progress-fill{
    height:100%;
    background:linear-gradient(90deg, var(--brand-600), var(--brand-700));
    border-radius:999px;
    transition:width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progress-shine 2s infinite;
  }
  @keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
  }
  
  .progress-info{
    display:flex;
    justify-content:space-between;
    font-size:0.875rem;
  }
  
  .progress-percent{
    color:var(--brand-700);
    font-weight:600;
  }
  
  .progress-remaining{
    color:var(--ink-2);
  }
  
  .campaign-meta{
    display:flex;
    flex-wrap:wrap;
    gap:1rem;
    padding-top:1rem;
    border-top:1px solid var(--line);
    margin-top:auto;
  }
  
  .meta-item{
    font-size:0.9rem;
    color:var(--ink-2);
    font-weight:500;
  }
  
  /* Campaign Card States */
  .campaign-card[data-status="funded"]{
    opacity:0.9;
  }
  
  .campaign-card[data-status="funded"] .progress-fill{
    background:linear-gradient(90deg, #10b981, #059669);
  }
  
  .campaign-card[data-status="urgent"] .campaign-progress{
    border-color:var(--brand-700);
    background:rgba(250,240,240,0.8);
  }
  
  @media (max-width: 900px){
    .campaigns{
      grid-template-columns:1fr;
    }
  }
  
  /* =========== Small UI =========== */
  [data-elevate]{box-shadow:0 1px 0 rgba(0,0,0,.03)}
  
  /* =========== Responsive Nav =========== */
  @media (max-width: 840px){
    /* Header grid mobile: brand | partecipa | toggle */
    .header-grid {
      grid-template-columns: 1fr auto auto;
      gap: 0.75rem;
      align-items: center;
      padding: 0.6rem 0;
    }
    
    .brand {
      line-height: 1;
    }
    
    .header-grid > .brand{ grid-column:1; justify-self:start; align-self:center; }
    .header-grid > .btn-partecipa-mobile{ grid-column:2; justify-self:center; align-self:center; display:inline-flex; }
    .header-grid > .nav-toggle{ grid-column:3; justify-self:end; align-self:center; }
    .header-grid > .site-nav{ grid-column: 1 / -1; }
    
    .nav-toggle{display:block; position:relative; z-index:10001}
    .site-nav{position:fixed; top: calc(var(--header-offset) + 40px); right: 20px; width:auto; background:rgba(255,255,255,0.98); border:1px solid var(--line); border-radius:12px; padding:1rem 1.2rem; box-shadow:var(--shadow); transform: translateX(120%); opacity:0; transition: transform .25s ease, opacity .25s ease; z-index:10000; pointer-events:none}
    .site-nav.open{transform: translateX(0); opacity:1; pointer-events:auto}
    .site-nav ul{display:flex; flex-direction:column; align-items:flex-end; padding:0; margin:0; gap:0.2rem}
    .site-nav li{list-style:none}
    .site-nav a{display:inline-block; padding:.5rem .8rem; text-align:right; white-space:nowrap}
    
    /* Nascondi il link Partecipa dentro la nav (ora è sempre visibile fuori) */
    .nav-partecipa-desktop {
      display: none !important;
    }
    
    /* Dropdown in Mobile: mostra tutto come lista normale */
    .dropdown-toggle {
      display: none;
    }
    
    .dropdown-menu {
      position: static;
      opacity: 1;
      visibility: visible;
      transform: none;
      background: transparent;
      border: none;
      box-shadow: none;
      padding: 0;
      margin: 0;
    }
    
    .dropdown-menu li {
      list-style: none;
    }
    
    .dropdown-menu a {
      padding: 0.5rem 0.8rem;
      text-align: right;
    }
  }
  
  /* =========== Fade-in Animation (OTTIMIZZATO) =========== */
  .fade-in {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    will-change: auto;
  }
  
  /* =========== Motion Prefs =========== */
  @media (prefers-reduced-motion: reduce){
    .card:hover{transform: none}
    .site-nav{transition:none}
    .fade-in { opacity: 1; transform: none; transition: none; }
    .hero-bg { transition: none !important; }
    .card-icon, .kpi { transition: none; }
  }
  
  /* =========== Utility Buttons =========== */
  .btn:focus-visible{outline:2px solid rgba(90, 18, 18, 0.45); outline:2px solid color-mix(in oklab, var(--brand-700) 35%, white); outline-offset:2px}

/* =========== Utility Classes =========== */

/* Colors */
.text-brand { color: var(--brand-700) !important; }
.text-white { color: white !important; }
.text-ink { color: var(--ink) !important; }
.text-ink-2 { color: var(--ink-2) !important; }

.bg-white { background: white; }
.bg-brand { background: var(--brand-700); }

/* Spacing - Margin Top */
.mt-0 { margin-top: 0 !important; }
.mt-05 { margin-top: 0.5rem; }
.mt-075 { margin-top: 0.75rem; }
.mt-1 { margin-top: 1rem; }
.mt-15 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.mt-25 { margin-top: 2.5rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

/* Spacing - Margin Bottom */
.mb-0 { margin-bottom: 0 !important; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-075 { margin-bottom: 0.75rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-15 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Spacing - Padding */
.p-15 { padding: 1.5rem; }
.p-2 { padding: 2rem; }
.p-25 { padding: 2.5rem; }

/* Layout */
.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 1rem; }
.gap-15 { gap: 1.5rem; }
.gap-2 { gap: 2rem; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

/* Typography */
.font-bold { font-weight: 600; }
.font-extrabold { font-weight: 700; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Display */
.inline-block { display: inline-block; }
.block { display: block; }
.w-full { width: 100%; }

/* Border Radius */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

/* Font Size */
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 0.9rem; }
.text-md { font-size: 0.95rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.2rem; }

/* Line Height */
.leading-relaxed { line-height: 1.8; }

/* Specific Components */
.box-highlight {
  background: linear-gradient(135deg, rgba(90,18,18,0.05) 0%, rgba(90,18,18,0.02) 100%);
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid var(--brand-700);
}

.box-title {
  color: var(--brand-700);
  margin-bottom: 1rem;
}

.box-title-white {
  color: white;
  margin-bottom: 1rem;
}

.impact-box{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: 934px;
  margin-left: auto;
  margin-right: auto;
}

.impact-title{
  color: var(--brand-700);
  margin: 0 0 0.5rem;
}

.impact-subtitle{
  margin: 0.25rem 0;
  color: var(--ink-2);
}

.impact-grid{
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.impact-item{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(90,18,18,0.10);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.impact-amount{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.9rem;
}

.impact-text{
  color: var(--ink);
  line-height: 1.55;
}

.list-spaced {
  margin: 1rem 0 0 1.5rem;
  line-height: 1.8;
}

.donation-impact-grid{
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.donation-impact-intro{
  color: var(--ink);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.donation-impact-align{
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.donation-impact-item{
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem;
  align-items: start;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.donation-impact-amount{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.9rem;
}

.donation-impact-text{
  color: var(--ink);
  line-height: 1.55;
}

/* Campaign specific */
.campaign-info-box {
  background: rgba(90,18,18,0.05);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
}

.campaign-info-title {
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--brand-700);
}

.campaign-list {
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.campaign-cost {
  margin-top: 1rem;
  font-weight: 600;
}

/* Step 1: Badge Classes */
.badge-active {
  background: #16a34a !important;
}

.badge-planned {
  background: var(--ink-2) !important;
}

/* Step 2: Donation Cards */
.donation-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(90,18,18,0.14);
  box-shadow: none;
}

.donation-title {
  color: var(--brand-700);
  margin-bottom: 0.75rem;
}

.donation-text {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.donation-text-sm {
  color: var(--ink);
  font-size: 0.9rem;
  margin: 0;
}

.donation-text-xs {
  color: var(--ink-2);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.donation-block{
  margin-top: 0.75rem;
}

.donation-block-title{
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--brand-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.donation-divider{
  height: 1px;
  background: var(--line);
  margin: 0.9rem 0;
}

.donation-list{
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  text-align: left;
}

.donation-methods{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.donation-method-toggle{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.donation-method-label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(90,18,18,0.20);
  background: rgba(255,255,255,0.8);
  color: var(--brand-700);
  font-weight: 700;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

#donation-method-bonifico:checked + .donation-method-label,
#donation-method-paypal:checked + .donation-method-label{
  background: var(--brand-700);
  color: #fff;
  border-color: var(--brand-700);
}

.donation-method-panels{
  grid-column: 1 / -1;
}

.donation-panel{
  display: none;
}

#donation-method-bonifico:checked ~ .donation-method-panels .donation-panel--bonifico{
  display: block;
}

#donation-method-paypal:checked ~ .donation-method-panels .donation-panel--paypal{
  display: block;
}

.paypal-donate-form{
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.btn-paypal-donate{
  width: 100%;
  max-width: 340px;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
}

/* Step 3: Breadcrumbs Global */
.breadcrumbs {
  margin-top: 2rem;
}

/* Step 4: CTA Enhancements */
.cta-box h2,
.cta-box h3 {
  color: white;
}

.btn-white-brand {
  background: white;
  color: var(--brand-700);
}

.btn-white-brand:hover {
  background: rgba(255,255,255,0.95);
  color: var(--brand-800);
}

/* Step 5: Transparency Box */
.transparency-box {
  margin-top: 4rem;
  padding: 2.5rem;
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* Grid Auto-fit */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grid-center{
  grid-template-columns: minmax(250px, 934px);
  justify-content: center;
}

.paypal-redirect-container{
  max-width: 900px;
}

.paypal-redirect-actions{
  margin-top: 1.25rem;
}

.link-inherit{
  color: inherit;
}