/* ============================================================
   SIREH — stile del sito pubblico e del pannello di amministrazione
   Tipografia: Montserrat (auto-ospitato, font variabile) con
   Noto Sans Armenian per il testo armeno.
   ============================================================ */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans Armenian";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/noto-sans-armenian.woff2") format("woff2");
  unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17;
}

:root {
  --ink: #22292f;
  --ink-soft: #5a6570;
  --paper: #faf8f5;
  --white: #ffffff;
  --line: #e5e0d7;
  --primary: #0f4c5c;
  --primary-dark: #0a3542;
  --primary-deep: #072530;
  --accent: #c1552e;
  --accent-dark: #a04423;
  --accent-soft: #f6e8e0;
  --gold: #d9a441;
  --ok: #2e7d32;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(31, 41, 51, 0.08);
  --shadow-lift: 0 8px 24px rgba(31, 41, 51, 0.14);
  /* Montserrat ovunque; Noto Sans Armenian copre i glifi armeni */
  --font-sans: "Montserrat", "Noto Sans Armenian", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-sans);
  --font-head: var(--font-sans);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

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

/* --------- gerarchia tipografica (Montserrat, pesi differenti) --------- */

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: 1.18;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.3rem; font-weight: 800; margin: 0 0 0.6rem; }
h2 { font-size: 1.55rem; font-weight: 700; margin: 0 0 0.8rem; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 0 0 0.4rem; }
h4 { font-size: 1rem; font-weight: 600; margin: 0 0 0.3rem; }

a { color: var(--primary); }
p { margin: 0 0 1em; }

.kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 780px; }
.muted, .muted-link { color: var(--ink-soft); }
.muted-link { text-decoration: none; }
.muted-link:hover { text-decoration: underline; }

/* ---------------- header ---------------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand { text-decoration: none; display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand-logo { width: 42px; height: 42px; flex-shrink: 0; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.1;
  color: var(--primary-dark);
  text-transform: uppercase;
}
.brand-tagline {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav { display: flex; gap: 0.15rem; flex-wrap: wrap; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}
.site-nav a:hover { background: var(--paper); }
.site-nav a.active { background: var(--primary); color: var(--white); }

/* bottone Donate: distinto dalle voci di menu ma coerente */
.site-nav a.nav-donate,
.nav-donate {
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  margin-left: 0.35rem;
}
.site-nav a.nav-donate:hover { background: var(--accent-dark); color: var(--white); }
.site-nav a.nav-donate.active { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--primary-deep), var(--primary) 60%, #14707f);
  color: var(--white);
  padding: 5.5rem 0 5rem;
  isolation: isolate;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero::after {
  /* velo scuro per garantire il contrasto del testo sulle fotografie */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(7, 37, 48, 0.88) 20%, rgba(7, 37, 48, 0.55) 60%, rgba(7, 37, 48, 0.35));
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  max-width: 780px;
  margin-bottom: 1rem;
}
.hero .kicker { color: var(--gold); }
.hero-subtitle { max-width: 640px; font-size: 1.12rem; font-weight: 400; opacity: 0.95; }
.hero-subtitle p { margin-bottom: 0.5em; }
.hero-actions { margin-top: 2rem; display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

.slideshow-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: rgba(7, 37, 48, 0.55);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 0.95rem;
  cursor: pointer;
  display: none;
}
.hero.has-slideshow .slideshow-toggle { display: block; }

/* ---------------- sezioni ---------------- */

.section { padding: 3.6rem 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background: linear-gradient(150deg, var(--primary-deep), var(--primary-dark));
  color: rgba(255, 255, 255, 0.92);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .kicker { color: var(--gold); }
.section-dark a:not(.btn) { color: var(--white); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.section-head h2 { margin-bottom: 0; }

.page-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 2.8rem 0 2.2rem;
}
.page-intro { max-width: 740px; color: var(--ink-soft); font-size: 1.08rem; }
.page-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.6rem 0 0; }
.breadcrumb { margin: 0 0 0.8rem; font-size: 0.9rem; font-weight: 500; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.grid-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }

.prose h2 { margin-top: 1.8rem; }
.prose { max-width: 70ch; }
.lead { font-size: 1.14rem; color: var(--ink-soft); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.rounded-image { border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-cover { width: 100%; margin-bottom: 1.4rem; }

/* ---------------- bottoni ---------------- */

.btn {
  display: inline-block;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.93rem;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.4;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--primary); color: var(--white); }
.btn-secondary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.hero .btn-ghost { color: var(--white); }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.hero .btn-ghost:hover, .section-dark .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.section-dark .btn-ghost { color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-small { padding: 0.3rem 0.75rem; font-size: 0.84rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: inherit; font-family: inherit; text-decoration: underline; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.text-link { text-decoration: none; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

/* ---------------- card ---------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.card-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  position: relative;
}
.card-image-placeholder {
  background:
    radial-gradient(circle at 75% 20%, rgba(217, 164, 65, 0.25), transparent 45%),
    linear-gradient(140deg, var(--primary), #14707f);
}
.card-body { padding: 1.15rem 1.25rem 1.3rem; }
.card-meta {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.card-body p { margin: 0.45rem 0 0; color: var(--ink-soft); font-size: 0.93rem; }

/* card in evidenza: la prima più grande quando lo spazio lo consente */
.cards-featured { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------------- badge di stato dei workshop ---------------- */

.status-badge {
  display: inline-block;
  padding: 0.14rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.status-in-progress { background: #e3eff2; color: var(--primary-dark); border-color: #c6dde3; }
.status-registration-open { background: #e6f4ea; color: #1e6b24; border-color: #c9e7d0; }
.status-completed { background: #efece6; color: var(--ink-soft); border-color: var(--line); }

/* ---------------- home: ambiti di attività ---------------- */

.fields-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.field-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow);
}
.field-card:nth-child(2) { border-top-color: var(--primary); }
.field-card:nth-child(3) { border-top-color: var(--gold); }
.field-card:nth-child(4) { border-top-color: var(--primary-dark); }
.field-card h3 { font-size: 1.02rem; }
.field-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0.4rem 0 0; }

/* ---------------- home: statistiche ---------------- */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number {
  display: block;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1.1;
}
.stat-label { color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; }

.cta-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  text-align: center;
}
.cta-box p { max-width: 640px; margin-left: auto; margin-right: auto; }

.searchbar { display: flex; gap: 0.6rem; max-width: 540px; margin: 1.2rem auto 0; }
.searchbar input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
  font-family: var(--font-sans);
}

/* striscia di loghi delle organizzazioni (home / hub) */
.logo-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.4rem;
}
.logo-strip a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.95rem 0.35rem 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.logo-strip a:hover { border-color: var(--primary); }
.section-dark .logo-strip a { border-color: transparent; }
.logo-strip .assoc-logo { width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; }

/* ---------------- archivio organizzazioni ---------------- */

.archive-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
}

.filters-panel { position: sticky; top: 76px; }
.filters-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.filters-box summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary-dark);
}
.filters-box summary::-webkit-details-marker { display: none; }
.filters-box summary::after { content: "▾"; font-size: 0.8rem; color: var(--ink-soft); }
.filters-box[open] summary::after { content: "▴"; }
.filters-body { padding: 0 1.1rem 1.1rem; }

.filter-group { margin-top: 1rem; }
.filter-group > .filter-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.filter-group select, .filter-group input[type="search"] {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: var(--font-sans);
  background: var(--white);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag-cloud a {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud a.active { background: var(--accent); border-color: var(--accent); color: var(--white); }
.tag-cloud .tag-count { color: var(--ink-soft); font-size: 0.72rem; margin-left: 0.15rem; }
.tag-cloud a.active .tag-count { color: rgba(255, 255, 255, 0.8); }

.filters-actions { margin-top: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; }

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.results-count { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; margin: 0; }
.results-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.per-page-form { display: inline-flex; align-items: center; gap: 0.45rem; }
.per-page-form label { color: var(--ink-soft); font-size: 0.78rem; font-weight: 600; }
.per-page-form select {
  padding: 0.35rem 1.8rem 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--white);
  font: inherit;
  font-size: 0.8rem;
}

.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--white); }
.view-toggle button {
  padding: 0.35rem 0.9rem;
  border: 0;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.active { background: var(--primary); color: var(--white); }
.association-view[hidden] { display: none; }
[data-association-results-content] { transition: opacity 150ms ease; }
[data-association-results-content][aria-busy="true"] { opacity: 0.55; pointer-events: none; }

.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.15rem 0.4rem 0.15rem 0.75rem;
  text-decoration: none;
}
.chip .chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  font-style: normal;
}
.chip:hover .chip-x { background: rgba(0, 0, 0, 0.16); }

/* vista a elenco */
.org-list { display: flex; flex-direction: column; gap: 0.9rem; }
.org-row {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.org-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.org-row p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.org-row .tags { margin-top: 0.45rem; }

.assoc-head { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 0.5rem; }
.assoc-logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.assoc-logo-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.4rem; color: var(--white);
  background: var(--primary); border: none;
}
.assoc-logo-lg { width: 84px; height: 84px; font-size: 2.1rem; }
.assoc-detail-head { display: flex; gap: 1.2rem; align-items: center; }

.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; }
.tag, a.tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
}
a.tag:hover { background: var(--accent); color: var(--white); }

.badge {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }

.info-list dt {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}
.info-list dt:first-child { margin-top: 0; }
.info-list dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }
.info-list dd p { margin: 0; }

.link-list { padding-left: 1.2rem; }
.link-list li { margin-bottom: 0.4rem; }

.pagination { display: flex; gap: 1.2rem; justify-content: center; align-items: center; margin-top: 2.2rem; }
.pagination a { text-decoration: none; font-weight: 700; }
.pagination span { color: var(--ink-soft); font-size: 0.92rem; }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 2.5rem 1rem;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------------- gallerie fotografiche + lightbox ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}
.gallery-thumb {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: var(--white);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover img { opacity: 0.88; }
.gallery-thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7, 25, 32, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  margin-top: 0.8rem;
  max-width: 700px;
  text-align: center;
}
.lightbox-counter { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; margin-top: 0.3rem; }
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }

/* ---------------- workshop: dettaglio e materiali ---------------- */

.ws-hero-image { width: 100%; max-height: 420px; object-fit: cover; }

.materials-list { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.material-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.material-kind {
  flex-shrink: 0;
  width: 52px;
  min-width: 52px;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 8px;
  padding: 0.55rem 0.2rem;
  text-transform: uppercase;
}
.material-kind.kind-pdf { background: var(--accent); }
.material-kind.kind-image { background: var(--gold); color: var(--primary-deep); }
.material-kind.kind-link { background: var(--primary-dark); }
.material-main { flex: 1 1 220px; min-width: 0; }
.material-main h3 { margin: 0; font-size: 0.98rem; }
.material-main p { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.material-meta { font-size: 0.78rem; color: var(--ink-soft); font-weight: 500; display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.2rem; }
.material-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ---------------- persone (Who We Are) ---------------- */

.people-nav { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 1rem; }
.people-nav a {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}
.people-nav a:hover { border-color: var(--primary); }
.people-nav a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.people-group { margin-top: 2.6rem; }
.people-group:first-child { margin-top: 0; }
.people-group h2 {
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.2rem;
}
.person-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.person-photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; display: block; }
.person-photo-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  background:
    radial-gradient(circle at 70% 25%, rgba(217, 164, 65, 0.35), transparent 50%),
    linear-gradient(150deg, var(--primary), var(--primary-dark));
  letter-spacing: 0.05em;
}
.person-body { padding: 1rem 1.1rem 1.2rem; }
.person-body h3 { margin-bottom: 0.15rem; font-size: 1.02rem; }
.person-role { color: var(--accent-dark); font-size: 0.84rem; font-weight: 600; margin: 0; }
.person-bio { color: var(--ink-soft); font-size: 0.88rem; margin: 0.5rem 0 0; }
.person-links { margin-top: 0.6rem; display: flex; gap: 0.8rem; font-size: 0.84rem; font-weight: 600; }
.person-links a { text-decoration: none; }
.person-links a:hover { text-decoration: underline; }

/* ---------------- donate ---------------- */

.donate-band { text-align: center; padding: 4rem 0; }
.donate-band h2 { font-size: 1.9rem; font-weight: 800; }
.donate-band p { max-width: 620px; margin: 0 auto 1.6rem; }

.donate-option { margin-bottom: 1.4rem; }
.donate-option h2 { font-size: 1.15rem; }
.donate-code {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  display: inline-block;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3.5rem;
  padding: 3rem 0 1.6rem;
  font-size: 0.94rem;
}
.site-footer h3 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.site-footer a { color: var(--white); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand .brand-name { color: var(--white); font-size: 1.3rem; }
.footer-text p { margin: 0 0 0.4em; color: rgba(255, 255, 255, 0.75); }
.footer-nav { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-nav a { text-decoration: none; color: rgba(255, 255, 255, 0.85); font-weight: 500; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }
.footer-social { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-social a { text-decoration: none; font-weight: 500; }
.footer-social a:hover { text-decoration: underline; }
.footer-donate { margin-top: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}
.site-footer .muted-link { color: rgba(255, 255, 255, 0.55); font-size: 0.82rem; }

/* ---------------- admin ---------------- */

.admin-body { background: #f1f3f5; }

.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--primary-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 1.4rem 0;
}
.admin-brand { padding: 0 1.4rem 1.2rem; display: flex; flex-direction: column; }
.admin-brand a {
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  text-decoration: none;
}
.admin-brand span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); }

.admin-nav { display: flex; flex-direction: column; }
.admin-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.admin-nav a:hover { background: rgba(255, 255, 255, 0.08); }
.admin-nav a.active { background: var(--accent); color: var(--white); }

.admin-sidebar-footer {
  margin-top: auto;
  padding: 1.2rem 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
}
.admin-sidebar-footer .admin-user { color: rgba(255, 255, 255, 0.45); font-size: 0.82rem; }
.admin-sidebar-footer a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.admin-sidebar-footer a:hover { color: var(--white); }
.admin-sidebar-footer .btn-link { color: rgba(255, 255, 255, 0.7); text-align: left; }

.admin-main { flex: 1; padding: 2rem 2.4rem 3rem; max-width: 1060px; }
.admin-main h1 { font-size: 1.6rem; font-weight: 700; }

.page-title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

.flash { padding: 0.7rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.95rem; }
.flash-ok { background: #e6f4ea; color: var(--ok); border: 1px solid #c9e7d0; }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f6cfcb; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin: 1.4rem 0 2rem; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
  box-shadow: var(--shadow);
}
.quick-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.admin-form fieldset {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem 1.5rem;
  margin: 0 0 1.4rem;
}
.admin-form legend {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
  padding: 0 0.5rem;
}
.admin-form label, .admin-form .field { display: block; margin-bottom: 0.9rem; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.admin-form .field-name { display: block; margin-bottom: 0; }
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="url"],
.admin-form input[type="number"],
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  font-size: 0.97rem;
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--white);
}
.admin-form textarea { resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row label { flex: 1 1 180px; }
.form-row label.grow { flex: 3 1 300px; }

.inline-check { display: flex; align-items: center; gap: 0.45rem; margin: 0.5rem 0; font-weight: 400; }
.inline-check label { display: inline; margin: 0; font-weight: 400; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.1rem 1rem; }

.image-field { display: block; margin-top: 0.3rem; font-weight: 400; }
.image-preview {
  display: block;
  max-height: 110px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 0.4rem;
}

.form-actions { display: flex; gap: 0.8rem; align-items: center; margin: 1.2rem 0; }

.admin-search { display: flex; gap: 0.6rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.admin-search input[type="search"], .admin-search input[type="text"] {
  flex: 1 1 240px;
  max-width: 380px;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  font-size: 0.97rem;
  font-family: var(--font-sans);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th, .admin-table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.admin-table th { background: var(--paper); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.admin-table tr:last-child td { border-bottom: none; }
.actions-cell { display: flex; gap: 0.4rem; align-items: center; }
.actions-cell form { margin: 0; }

.pill { display: inline-block; padding: 0.05rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft); }
.pill-ok { background: #e6f4ea; color: var(--ok); border-color: #c9e7d0; }
.pill-accent { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; margin-left: 0.4rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.2rem; }
.media-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.media-item img { height: 90px; object-fit: contain; width: 100%; }
.media-file-icon { font-size: 3rem; line-height: 90px; }
.media-name { font-size: 0.78rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0.4rem 0; }
.media-actions { display: flex; gap: 0.4rem; justify-content: center; }
.media-actions form { margin: 0; }

.narrow-form { max-width: 480px; }

/* elementi della gestione galleria/materiali (admin) */
.admin-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
.admin-item-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.admin-item-card .image-preview { max-width: 100%; }
.admin-item-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; overflow-wrap: anywhere; }

/* ---------------- login ---------------- */

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-box form { text-align: left; margin-top: 1.2rem; }
.login-box label { display: block; margin-bottom: 0.9rem; font-size: 0.92rem; font-weight: 600; }
.login-box input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-sans);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1024px) {
  .archive-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; }
  .fields-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .grid-2, .grid-detail { grid-template-columns: 1fr; }
  .hero { padding: 3.6rem 0; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 0.8rem;
  }
  .site-nav a { padding: 0.65rem 0.85rem; border-radius: 10px; }
  .site-nav a.nav-donate { margin: 0.35rem 0 0; text-align: center; }
  body.nav-open .site-nav { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .brand-tagline { display: none; }

  .archive-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }

  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 0.8rem 0; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav a { padding: 0.5rem 0.9rem; }
  .admin-sidebar-footer { flex-direction: row; padding-top: 0.6rem; }
  .admin-main { padding: 1.2rem; }
  .admin-table { display: block; overflow-x: auto; }
}

@media (max-width: 640px) {
  .fields-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .cta-box { padding: 1.6rem; }
  .searchbar { flex-direction: column; }
  .searchbar .btn { width: 100%; }
  .assoc-detail-head { flex-direction: row; }
  .org-row { flex-direction: column; gap: 0.6rem; }
  .lightbox .lb-prev { left: 0.3rem; }
  .lightbox .lb-next { right: 0.3rem; }
}

/* ---------------- rifiniture: accessibilità ---------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- selettore lingua ---------------- */

.lang-switch { display: inline-flex; gap: 0.15rem; align-items: center; margin-left: 0.6rem; }
.lang-switch a {
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.lang-switch a:hover { border-color: var(--line); }
.lang-switch a.active { background: var(--primary); color: var(--white); }
.site-nav .lang-switch { border-left: 1px solid var(--line); padding-left: 0.6rem; }

.lang-switch-admin { margin: 0 0 0.3rem; }
.lang-switch-admin a { color: rgba(255, 255, 255, 0.6); }
.lang-switch-admin a.active { background: var(--accent); color: var(--white); }

.login-box .lang-switch { justify-content: center; display: flex; margin: 0.8rem 0 0.3rem; }

/* ---------------- editor multilingua (admin) ---------------- */

.i18n-field { margin-bottom: 1.1rem; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.i18n-field .field-name { display: block; margin-bottom: 0.35rem; }
.i18n-tabs { display: flex; gap: 0.3rem; position: relative; z-index: 1; margin-bottom: -1px; }
.i18n-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--line);
  border-bottom: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  cursor: pointer;
}
.i18n-tab:hover { color: var(--primary-dark); }
.i18n-tab.active {
  background: var(--white);
  color: var(--primary-dark);
  border-color: #cbd2d9;
  border-bottom-color: var(--white);
}
.i18n-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #b3bcc5;
  background: transparent;
}
.i18n-dot.filled { background: #2f9e44; border-color: #2f9e44; }
.admin-form .i18n-pane input[type="text"],
.admin-form .i18n-pane textarea {
  margin-top: 0;
  border-top-left-radius: 0;
}
.i18n-tools { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-top: 0.35rem; }
.i18n-status { font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------------- pagina errore ---------------- */

.error-box { text-align: center; padding: 3.5rem 1.5rem; }
.error-code {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 5rem;
  color: var(--line);
  margin: 0;
  line-height: 1;
}

/* ---------------- statistiche ---------------- */

.day-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 160px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 0.9rem 0.6rem;
  box-shadow: var(--shadow);
}
.day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  min-width: 0;
}
.day-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.day-count { font-size: 0.62rem; color: var(--ink-soft); line-height: 1.4; }
.day-chart-range { margin-top: 0.4rem; font-size: 0.85rem; }

.stats-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; margin-top: 1.2rem; }
.stats-columns h2 { margin-top: 1rem; }
.stats-num { text-align: right; font-variant-numeric: tabular-nums; width: 4.5rem; }
.stats-path { overflow-wrap: anywhere; font-size: 0.88rem; }
.stats-path code { background: var(--paper); padding: 0.1rem 0.4rem; border-radius: 6px; border: 1px solid var(--line); }

@media (max-width: 860px) {
  .stats-columns { grid-template-columns: 1fr; }
  .day-count { display: none; }
  .site-nav .lang-switch { border-left: none; padding-left: 0; }
}
