/* Componenti — portati da docs/redesign.html, mobile-first.
   Enhance-up in fondo con @media (min-width:760px). */

/* ---------- HEADER ---------- */
header.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    border-bottom: 1.5px solid var(--line-strong);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: var(--space-3);
    min-width: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.brand b {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.02em;
}

.brand span {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 9.5px;
    letter-spacing: .06em;
    opacity: .7;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tessera {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
    background: var(--ink);
    color: var(--paper);
    padding: calc(var(--space-2) + 1px) var(--space-4);
    border-radius: 100px;
    text-decoration: none;
    white-space: nowrap;
}

.tessera:active {
    transform: translateY(1px);
}

/* ---------- BURGER + OFFCANVAS ---------- */
.menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper-2);
    color: var(--ink);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .12s ease;
}

.menu-toggle:active {
    transform: scale(.96);
}

.burger {
    display: grid;
    gap: var(--space-1);
    width: 18px;
}

.burger i {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .2s ease, width .32s cubic-bezier(.4, 0, .2, 1);
}

.burger i:nth-child(1) {
    width: 18px;
}

.burger i:nth-child(2) {
    width: 14px;
    justify-self: end;
}

.burger i:nth-child(3) {
    width: 18px;
}

.menu-toggle[aria-expanded="true"] .burger i:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    width: 18px;
}

.menu-toggle[aria-expanded="true"] .burger i:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .burger i:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.offcanvas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1), visibility .35s;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.offcanvas-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.offcanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: 100%;
    height: 100dvh;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .42s cubic-bezier(.4, 0, .2, 1);
}

.offcanvas.is-open {
    transform: translateX(0);
}

.offcanvas-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--gutter);
    border-bottom: 1.5px solid var(--line);
}

.offcanvas-head span {
    font-size: 12px;
    letter-spacing: .02em;
    opacity: .65;
}

.offcanvas-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, transform .12s ease;
}

.offcanvas-close:active {
    transform: scale(.94);
    background: var(--paper-2);
}

.offcanvas-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6) var(--gutter);
}

.offcanvas-nav ul {
    list-style: none;
    display: grid;
    gap: var(--space-2);
}

.offcanvas-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: var(--space-3) var(--space-4);
    border-radius: 12px;
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -.02em;
    text-decoration: none;
    border: 1.5px solid transparent;
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.4, 0, .2, 1), background-color .15s ease, border-color .15s ease;
}

.offcanvas.is-open .offcanvas-nav a {
    opacity: 1;
    transform: translateX(0);
}

.offcanvas.is-open .offcanvas-nav li:nth-child(1) a { transition-delay: .06s; }
.offcanvas.is-open .offcanvas-nav li:nth-child(2) a { transition-delay: .1s; }
.offcanvas.is-open .offcanvas-nav li:nth-child(3) a { transition-delay: .14s; }
.offcanvas.is-open .offcanvas-nav li:nth-child(4) a { transition-delay: .18s; }
.offcanvas.is-open .offcanvas-nav li:nth-child(5) a { transition-delay: .22s; }

.offcanvas-nav a:hover,
.offcanvas-nav a:focus-visible {
    border-color: var(--line-strong);
    background: var(--paper-2);
}

.offcanvas-nav a[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
}

.offcanvas-foot {
    padding: var(--gutter);
    border-top: 1.5px solid var(--line);
    display: grid;
    gap: var(--space-4);
}

.offcanvas-foot .tessera {
    text-align: center;
    display: block;
}

/* ---------- THEME PICKER ---------- */
.theme-picker {
    display: grid;
    gap: var(--space-2);
}

.theme-picker-label {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .08em;
    opacity: .6;
}

.theme-picker-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    padding: var(--space-1);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    min-height: 52px;
    padding: var(--space-2) var(--space-1);
    border: 1.5px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 9.5px;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .12s ease;
}

.theme-option svg {
    width: 18px;
    height: 18px;
    opacity: .75;
}

.theme-option[aria-pressed="true"] {
    background: var(--paper);
    border-color: var(--line-strong);
    box-shadow: 0 2px 8px rgba(26, 18, 10, .07);
}

.theme-option[aria-pressed="true"] svg {
    opacity: 1;
}

.theme-option:active {
    transform: scale(.96);
}

/* ---------- HERO ---------- */
/* Fullwidth: .hero NON ha la classe .wrap (a differenza del resto del sito) e
   sta fuori da qualunque contenitore con max-width, cosi' la foto arriva a
   bordo pagina. Il testo dentro vive in una .wrap interna, che riprende il
   padding-block qui (altrimenti perso non condividendo piu' l'elemento). */
/* SFONDO PROVVISORIO: foto placeholder (assets/img/hero-provvisorio.jpg),
   da sostituire con la scelta definitiva. Testo fissato su un chiaro
   costante (non var(--ink), che segue il tema) perche' sta sopra una
   fotografia, non sopra la carta piatta. Overlay scuro fisso (non
   var(--overlay), che e' piu' leggero e pensato per superfici piccole) per
   restare leggibile anche su una foto piena larghezza, in qualunque tema. */
.hero {
    position: relative;
    background-image: linear-gradient(180deg, rgba(12, 9, 6, .62), rgba(12, 9, 6, .7)), url("../img/hero-provvisorio.jpg");
    background-size: cover;
    background-position: center 35%;
    color: #F5EFE4;
}

.hero .wrap {
    padding-block: var(--space-9) var(--space-7);
}

.hero .eyebrow {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: .05em;
    opacity: .75;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--eventi);
    display: inline-block;
    animation: pulse 2.4s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

.hero h1 {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: clamp(44px, 13vw, 62px);
    line-height: .9;
    letter-spacing: -.03em;
}

.hero h1 em {
    font-style: normal;
    /* base, non -fill: qui il colore e' testo IN PRIMO PIANO sopra la foto
       dell'hero (sfondo scuro), serve la variante piu' chiara, non quella
       scurita' pensata per fare da sfondo a testo bianco. */
    color: var(--eventi);
}

.hero p {
    font-size: 17px;
    margin-top: var(--space-5);
    max-width: 30ch;
    color: rgba(245, 239, 228, .82);
}

.hero .status {
    margin-top: var(--space-6);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(26, 22, 17, .38);
    border: 1.5px solid rgba(245, 239, 228, .3);
    border-radius: 100px;
    padding: calc(var(--space-2) - 1px) var(--space-3);
}

.hero .status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1FA45A;
    font-style: normal;
}

.hero .status.closed i {
    background: #B0453B;
}

/* ---------- SECTION SCAFFOLD ---------- */
section {
    padding: var(--space-8) 0;
    border-top: 1.5px solid var(--line-strong);
}

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.sec-head h2 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.02em;
    min-width: 0;
}

.sec-head .idx {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12px;
    opacity: .55;
    letter-spacing: .04em;
    flex-shrink: 0;
}

/* ---------- BACHECA (signature) ---------- */
.bacheca {
    background: var(--bacheca-bg);
    color: var(--bacheca-fg);
    border-radius: var(--radius);
    overflow: hidden;
}

.bacheca .bh {
    padding: var(--space-4) var(--space-4) var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bacheca .bh span {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .08em;
    opacity: .6;
}

.ev {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--bacheca-line);
    align-items: center;
    text-decoration: none;
}

.ev:active {
    background: var(--bacheca-hover);
}

.ev .date {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.25;
    opacity: .85;
}

.ev .date b {
    display: block;
    font-size: 20px;
    font-weight: 500;
    opacity: 1;
}

.ev .body .tag {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .06em;
    padding: 2px calc(var(--space-2) - 1px);
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 5px;
    color: #fff;
}

.tag.sociale {
    background: var(--sociale-fill);
}

.tag.formazione {
    background: var(--formazione-fill);
}

.tag.eventi {
    background: var(--eventi-fill);
}

.tag.altre {
    background: var(--altre-attivita-fill);
}

.tag.a,
.tag.assemblea {
    background: #948A7A;
    color: var(--ink);
}

.ev .body h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -.01em;
}

.ev .body p {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11.5px;
    opacity: .65;
    margin-top: 2px;
}

.bacheca .all {
    padding: var(--space-4) var(--space-4);
    text-align: center;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12.5px;
    letter-spacing: .04em;
    border-top: 1px solid var(--bacheca-line);
    display: block;
    text-decoration: none;
}

.empty {
    padding: var(--space-4);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12.5px;
    opacity: .7;
}

/* ---------- FILTRI + ATTIVITA' ---------- */
.chips {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: 4px;
    margin: -2px calc(-1 * var(--gutter)) var(--space-5);
    padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12.5px;
    white-space: nowrap;
    border: 1.5px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    padding: var(--space-2) var(--space-4);
    border-radius: 100px;
    cursor: pointer;
    text-transform: lowercase;
    min-height: 40px;
}

.chip[aria-pressed="true"] {
    background: var(--ink);
    color: var(--paper);
}

.cards {
    display: grid;
    gap: var(--space-3);
}

.card {
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    padding: var(--space-4);
    position: relative;
    background: var(--paper);
    transition: transform .12s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:active {
    transform: scale(.99);
}

.card .tag {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .06em;
    padding: 2px var(--space-2);
    border-radius: 100px;
    color: #fff;
    display: inline-block;
}

.card[data-ambito="sociale"] {
    border-left: 5px solid var(--sociale);
}

.card[data-ambito="formazione"] {
    border-left: 5px solid var(--formazione);
}

.card[data-ambito="eventi"] {
    border-left: 5px solid var(--eventi);
}

.card[data-ambito="altre-attivita"] {
    border-left: 5px solid var(--altre-attivita);
}

.card h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 20px;
    margin: var(--space-3) 0 var(--space-1);
    letter-spacing: -.01em;
}

.card p {
    font-size: 14px;
    color: var(--muted);
}

.card .meta {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11.5px;
    margin-top: var(--space-3);
    opacity: .7;
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.card .meta span::after {
    content: "·";
    margin-left: 6px;
    opacity: .4;
}

.card .meta span:last-child::after {
    content: "";
}

.hidden {
    display: none;
}

/* ---------- CANALI ---------- */
.lead {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: var(--space-5);
    max-width: 34ch;
}

.chan {
    display: grid;
    gap: var(--space-3);
}

.ch {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: var(--space-3);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    padding: var(--space-4);
    align-items: start;
    text-decoration: none;
}

.ch .ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: "Public Sans", system-ui, sans-serif;
    font-weight: 500;
    font-size: 15px;
    color: #fff;
}

.ch h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 16px;
}

.ch .role {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10.5px;
    letter-spacing: .04em;
    opacity: .6;
}

.ch p {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 4px;
}

.news {
    margin-top: 14px;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: var(--space-4);
    overflow-x: clip;
}

.news h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.news p {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: var(--space-3);
}

.news .row {
    display: flex;
    gap: var(--space-2);
    min-width: 0;
}

.news input {
    flex: 1 1 0;
    min-width: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 100px;
    padding: var(--space-3) var(--space-4);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
    background: var(--paper);
    color: var(--ink);
}

.news input::placeholder {
    color: var(--placeholder);
}

.news button {
    flex-shrink: 0;
    background: var(--ink);
    color: var(--paper);
    border: none;
    border-radius: 100px;
    padding: 0 var(--space-5);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12.5px;
    cursor: pointer;
    min-height: 44px;
}

/* ---------- SPAZI ---------- */
.spazi {
    display: grid;
    gap: var(--space-3);
}

.sp {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    border-top: 1px solid var(--line);
    padding: var(--space-4) 2px;
    text-decoration: none;
    min-width: 0;
}

.spazi .sp:first-child {
    border-top: none;
}

.sp > div {
    min-width: 0;
}

.sp h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 19px;
    overflow-wrap: anywhere;
}

.sp p {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11.5px;
    opacity: .7;
    margin-top: 2px;
}

.sp .go {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 18px;
}

/* ---------- PARTECIPA ---------- */
.part {
    background: var(--eventi);
    color: #fff;
    border-radius: var(--radius);
    padding: var(--space-6);
}

.part h2 {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 27px;
    line-height: 1;
    letter-spacing: -.02em;
}

.part p {
    font-size: 15px;
    margin: var(--space-3) 0 var(--space-5);
    opacity: .92;
}

.part .btns {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Il pannello .part ha sempre lo sfondo viola (--eventi) in chiaro E scuro,
   quindi il pulsante pieno usa colori fissi: in dark mode --surface-bright e
   --ink coincidono (#F4EDE3) e il testo sparirebbe. */
.part a {
    background: #FAF4EB;
    color: #1A1611;
    text-align: center;
    padding: var(--space-3);
    border-radius: 100px;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
    letter-spacing: .02em;
    text-decoration: none;
}

.part a.ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .6);
}

/* ---------- SOSTIENICI (donazioni + 5x1000) ---------- */
.sostieni {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.donate-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    padding: var(--space-6);
    background: var(--paper-2);
}

.donate-card .dc-tag {
    align-self: flex-start;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 100px;
    border: 1.5px solid var(--line-strong);
    color: var(--muted-strong);
}

.donate-card h3 {
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 21px;
    line-height: 1.05;
    letter-spacing: -.01em;
    margin-top: var(--space-2);
}

.donate-card p {
    font-size: 15px;
    color: var(--muted-strong);
    margin-bottom: var(--space-2);
}

.dc-btn {
    margin-top: auto;
    align-self: flex-start;
    background: var(--sociale-fill);
    color: #fff;
    text-decoration: none;
    padding: var(--space-3) var(--space-5);
    border-radius: 100px;
    font-size: 14px;
    letter-spacing: .01em;
}

.dc-cf {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
}

.dc-cf-label {
    width: 100%;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.dc-cf-code {
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 19px;
    letter-spacing: .06em;
    color: var(--ink);
}

.dc-copy {
    margin-left: auto;
    cursor: pointer;
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--line-strong);
    border-radius: 100px;
    padding: var(--space-1) var(--space-3);
    font-size: 12px;
    letter-spacing: .02em;
}

.dc-copy:hover {
    background: var(--line-strong);
    color: var(--paper);
}

.dc-copy.copied {
    background: var(--sociale);
    border-color: var(--sociale);
    color: #fff;
}

@media (min-width: 760px) {
    .sostieni {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- CONTENUTO / PROSA (single, page) ---------- */
.prose {
    font-size: 16px;
    line-height: 1.65;
    max-width: 62ch;
    overflow-wrap: anywhere;
}

.prose h2 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 24px;
    margin: var(--space-7) 0 var(--space-3);
    letter-spacing: -.01em;
}

.prose h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 19px;
    margin: var(--space-6) 0 var(--space-2);
}

.prose p {
    margin: 0 0 var(--space-4);
}

.prose a {
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.prose ul,
.prose ol {
    margin: 0 0 var(--space-4) var(--space-6);
}

.page-hero h1 {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: clamp(34px, 9vw, 52px);
    line-height: .95;
    letter-spacing: -.02em;
}

.page-hero .kicker {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: .05em;
    opacity: .7;
    margin-bottom: var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.detail-list {
    list-style: none;
    display: grid;
    gap: var(--space-2);
    margin: var(--space-5) 0;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
}

.detail-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-list li b {
    min-width: 0;
    opacity: .6;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: .04em;
}

.btn-inline {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    padding: var(--space-3) var(--space-5);
    border-radius: 100px;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
    text-decoration: none;
    margin-top: var(--space-2);
}

/* ---------- PAGINAZIONE ---------- */
.pagination {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-7);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 13px;
}

.pagination .page-numbers {
    padding: var(--space-2) var(--space-3);
    border: 1.5px solid var(--line-strong);
    border-radius: 100px;
    text-decoration: none;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.pagination .current {
    background: var(--ink);
    color: var(--paper);
}

/* ---------- FOOTER ---------- */
footer.site-footer {
    border-top: 1.5px solid var(--line-strong);
    padding: var(--space-8) 0 var(--space-8);
    margin-top: var(--space-2);
}

footer .fbrand {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 22px;
}

footer .fsub {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .05em;
    opacity: .7;
    margin: var(--space-2) 0 var(--space-5);
}

footer .fdonate {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-5);
    padding: var(--space-3) var(--space-5);
    border-radius: 100px;
    background: var(--sociale-fill);
    color: #fff;
    text-decoration: none;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 14px;
    letter-spacing: .01em;
}

footer .fnav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin: 0 0 var(--space-5);
    font-size: 14px;
}

footer .fnav a {
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

footer .frow {
    font-size: 14px;
    line-height: 1.7;
}

footer .frow a {
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

footer .legal {
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10.5px;
    opacity: .55;
    margin-top: var(--space-6);
    line-height: 1.6;
}

/* ---------- REVEAL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity .5s ease, transform .5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .dot {
        animation: none;
    }

    .offcanvas,
    .offcanvas-backdrop,
    .offcanvas-nav a,
    .burger i,
    body {
        transition: none;
    }

    .offcanvas-nav a {
        opacity: 1;
        transform: none;
    }
}

/* ---------- DESKTOP (enhance up) ---------- */
@media (min-width: 760px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .chan {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 96px;
    }

    .hero p {
        font-size: 20px;
    }

    .sec-head h2 {
        font-size: 34px;
    }

    .detail-list li {
        flex-direction: row;
        gap: var(--space-2);
    }

    .detail-list li b {
        min-width: 110px;
        padding-top: 2px;
    }
}

/* ---------- TESSERAMENTO — ingresso al flusso ---------- */
.ti-lead {
    font-size: 17px;
    line-height: 1.55;
    color: var(--muted-strong);
    margin-top: var(--space-4);
    max-width: 52ch;
}

.ti-lead b {
    color: var(--ink);
}

/* Tre micro-rassicurazioni "cosa aspettarsi" */
.ti-facts {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
    margin: var(--space-6) 0 var(--space-8);
}

.ti-facts li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
    font-size: 14px;
    line-height: 1.3;
}

.ti-facts svg {
    width: 26px;
    height: 26px;
    flex: none;
    color: var(--sociale);
}

.ti-facts b {
    font-weight: 700;
}

/* La domanda che indirizza */
.ti-h2 {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.ti-sub {
    font-size: 15px;
    color: var(--muted-strong);
    margin: var(--space-2) 0 var(--space-5);
}

.ti-sub b {
    color: var(--ink);
}

/* Gruppo di scelta: fieldset "nudo" + radio nativi nascosti (ma focusabili) */
.age-picker {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.age-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.age-opt {
    flex: 1 1 45%;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    padding: var(--space-5);
    border: 2px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--paper-2);
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

.age-opt .age-ico {
    width: 34px;
    height: 34px;
    color: var(--sociale);
    margin-bottom: var(--space-2);
}

.age-opt b {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 17px;
}

.age-opt > span:last-child {
    font-size: 13px;
    color: var(--muted);
}

.age-opt:hover {
    transform: translateY(-1px);
}

/* Stato selezionato: bordo + anello interno nel colore "sociale" */
.age-radio:checked + .age-opt {
    border-color: var(--sociale);
    box-shadow: inset 0 0 0 1px var(--sociale);
}

/* Focus da tastiera sempre visibile (WCAG) */
.age-radio:focus-visible + .age-opt {
    outline: 2.5px solid var(--sociale);
    outline-offset: 2px;
}

/* Pannelli rivelati dalla scelta — 100% CSS, nessun JavaScript */
.ti-panel {
    flex-basis: 100%;
    width: 100%;
    display: none;
}

#ti-adulto:checked ~ .ti-panel-adulto,
#ti-minore:checked ~ .ti-panel-minore {
    display: block;
}

.ti-card {
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    padding: var(--space-6);
    background: var(--paper);
}

.ti-card-warm {
    background: var(--paper-2);
    border-color: var(--eventi);
}

.ti-card-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -.01em;
    margin-bottom: var(--space-3);
}

.ti-card-title svg {
    flex: none;
    width: 26px;
    height: 26px;
}

.ti-panel-adulto .ti-card-title svg {
    color: var(--sociale);
}

.ti-panel-minore .ti-card-title svg {
    color: var(--eventi);
}

.ti-card-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted-strong);
    margin-bottom: var(--space-4);
}

.ti-card-text b {
    color: var(--ink);
}

.prep-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 14px;
    margin: var(--space-4) 0 var(--space-2);
}

.prep-heading svg {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--muted-strong);
}

.prep-heading-you {
    margin-top: var(--space-5);
}

.prep-list {
    list-style: none;
    display: grid;
    margin: 0;
}

.prep-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.prep-list li:last-child {
    border-bottom: 0;
}

.prep-ico {
    flex: none;
    width: 24px;
    height: 24px;
    color: var(--muted-strong);
}

/* Rassicurazione "non hai i dati adesso?" */
.ti-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: var(--space-5) 0;
    padding: var(--space-4);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted-strong);
}

.ti-note > svg {
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    color: var(--muted-strong);
}

.ti-note b {
    color: var(--ink);
}

/* Pulsante primario verso il form NocoDB */
.ti-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--sociale-fill);
    color: #fff;
    text-decoration: none;
    border-radius: 100px;
    font-family: "Public Sans", system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

.ti-cta:active {
    transform: translateY(1px);
}

.ti-help {
    margin-top: var(--space-8);
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.ti-help a {
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

@media (min-width: 760px) {
    .ti-facts {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .ti-facts li {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .ti-cta {
        width: auto;
        align-self: flex-start;
    }

    .ti-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .ti-card > * {
        width: 100%;
    }
}

/* ---------- EVENTI — archivio sfogliabile (caroselli) ---------- */

/* Evento in evidenza (hero) */
.ev-hero-wrap {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

.ev-hero {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4 / 5;
    color: #fff;
    text-decoration: none;
    /* --ev-c = colore dell'ambito (o fallback scuro). Lo usano sia il fondo sia
       la sfumatura della foto: la foto "emerge" da una pozza di questo colore. */
    --ev-c: var(--bacheca-bg);
    background-color: var(--ev-c);
}

.ev-hero[data-ambito="sociale"]        { --ev-c: var(--sociale-fill); }
.ev-hero[data-ambito="formazione"]     { --ev-c: var(--formazione-fill); }
.ev-hero[data-ambito="eventi"]         { --ev-c: var(--eventi-fill); }
.ev-hero[data-ambito="altre-attivita"] { --ev-c: var(--altre-attivita-fill); }

.ev-hero-img,
.ev-poster-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Blend foto → colore ambito: maschera l'immagine ai bordi (alpha → 0), così
   sotto affiora il colore pieno. Niente intorbidamento: il colore è solido. */
.ev-poster-img {
    -webkit-mask-image: radial-gradient(100% 94% at 50% 40%, #000 28%, transparent 72%);
            mask-image: radial-gradient(100% 94% at 50% 40%, #000 28%, transparent 72%);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
}

.ev-hero-img {
    -webkit-mask-image: radial-gradient(80% 118% at 66% 42%, #000 34%, transparent 82%);
            mask-image: radial-gradient(80% 118% at 66% 42%, #000 34%, transparent 82%);
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
}

.ev-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .35) 48%, rgba(0, 0, 0, .12) 100%);
}

.ev-hero-content {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-6);
}

.ev-hero-kicker {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .85;
}

.ev-hero-tags {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.ev-hero-title {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: clamp(26px, 7vw, 40px);
    line-height: 1.02;
    letter-spacing: -.02em;
}

.ev-hero-meta {
    font-size: 13px;
    opacity: .9;
}

.ev-hero-ex {
    display: none;
    font-size: 15px;
    line-height: 1.5;
    opacity: .92;
    max-width: 52ch;
}

.ev-hero-cta {
    margin-top: var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: #fff;
    color: #1A1611;
    padding: var(--space-3) var(--space-5);
    border-radius: 100px;
    font-family: "Public Sans", system-ui, sans-serif;
    font-weight: 600;
    font-size: 14px;
}

/* Righe / caroselli */
.ev-rows {
    padding-top: var(--space-2);
    padding-bottom: var(--space-8);
}

.ev-filters {
    margin-top: var(--space-2);
}

.ev-row {
    margin-top: var(--space-6);
}

.ev-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.ev-row-head h3 {
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -.01em;
}

.ev-row-nav {
    display: none;
    gap: var(--space-2);
}

.ev-arrow {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--line-strong);
    border-radius: 100px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, opacity .15s ease;
}

.ev-arrow svg {
    width: 20px;
    height: 20px;
}

.ev-arrow:hover {
    background: var(--ink);
    color: var(--paper);
}

.ev-arrow[disabled] {
    opacity: .3;
    cursor: default;
}

.ev-arrow[disabled]:hover {
    background: var(--paper);
    color: var(--ink);
}

/* Il binario scorre e "sborda" fino ai bordi (gutter negativo) come le chip */
.ev-track {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scroll-padding-left: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ev-track::-webkit-scrollbar {
    display: none;
}

/* Poster */
.ev-poster {
    flex: 0 0 auto;
    width: 150px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--ink);
}

.ev-poster {
    --ev-c: var(--bacheca-bg);
}

.ev-poster[data-ambito="sociale"]        { --ev-c: var(--sociale-fill); }
.ev-poster[data-ambito="formazione"]     { --ev-c: var(--formazione-fill); }
.ev-poster[data-ambito="eventi"]         { --ev-c: var(--eventi-fill); }
.ev-poster[data-ambito="altre-attivita"] { --ev-c: var(--altre-attivita-fill); }

.ev-poster-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--ev-c);
    transition: transform .18s ease, box-shadow .18s ease;
}

.ev-poster-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0) 100%);
}

.ev-poster-date {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ev-poster-date b {
    font-family: "Bricolage Grotesque";
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -.01em;
}

.ev-poster-tag {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    padding: 3px 9px;
    border-radius: 100px;
    background: rgba(16, 12, 8, .62);
    backdrop-filter: blur(3px);
    color: #fff;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .04em;
}

.ev-poster-soci {
    padding: 2px 8px;
    border-radius: 100px;
    border: 1.5px solid rgba(255, 255, 255, .7);
    color: #fff;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ev-poster .ev-poster-soci {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
}

.ev-poster-overlay {
    position: absolute;
    inset: auto 0 0 0;
    display: block;
    padding: var(--space-3);
    color: #fff;
}

.ev-poster-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Bricolage Grotesque";
    font-weight: 700;
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.ev-poster-meta {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 3px;
    font-family: "Public Sans", system-ui, sans-serif;
    font-size: 11px;
    opacity: .85;
}

/* Nascondi via filtro (chip ambito) */
.ev-poster.is-hidden,
.ev-row.is-hidden {
    display: none;
}

@media (hover: hover) {
    .ev-poster:hover .ev-poster-media {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ev-track {
        scroll-behavior: auto;
    }

    .ev-poster-media {
        transition: none;
    }
}

/* Enhance up: hero più cinematografico, poster più grandi, frecce desktop */
@media (min-width: 760px) {
    .ev-hero {
        aspect-ratio: 16 / 7;
    }

    .ev-hero-content {
        padding: var(--space-8);
        max-width: 640px;
    }

    .ev-hero-ex {
        display: block;
    }

    .ev-poster {
        width: 200px;
    }

    .ev-poster-title {
        font-size: 16px;
    }

    .ev-row-nav {
        display: flex;
    }
}
