:root {
  /* Variabili del Site Creator, usate dalle pagine già pronte in pages/ */
  --color1: #ffba01; --color1_25: #ffeec0; --color1_50: #ffdd80; --color1_75: #ffcb41; --color1_125: #bf8c01;
  --color2: #193380; --color2_25: #c6ccdf; --color2_50: #8c99c0; --color2_75: #5366a0; --color2_125: #132660; --color2_150: #0d1a40;
  --font1: "Montserrat"; --font2: "Lato";
  --yellow: #ffba01;
  --yellow-light: #ffdd80;
  --blue: #193380;
  --blue-dark: #132660;
  --red: #d93a2b;
  --ink: #1b1f2a;
  --muted: #5b6275;
  --line: #e7e9ef;
  --bg-soft: #f6f7fa;
  --radius: 14px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--ink); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--blue); margin: 0 0 .5em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.section { padding: 48px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.placeholder { background: var(--bg-soft); border: 1px dashed #c6ccdf; border-radius: var(--radius); padding: 18px 20px; color: var(--muted); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--yellow); }
.eyebrow { display: block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* Bottoni */
.btn { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: .95rem; padding: 10px 22px; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(25, 51, 128, .18); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--blue); border-radius: 999px; }

/* Testata */
.site-header { border-top: 8px solid var(--yellow); background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .06); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo img { height: 48px; width: auto; }
.menu { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.menu a { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.menu a:hover { background: var(--bg-soft); }
.menu a[aria-current] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2.5px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 900px) {
  .header-inner { justify-content: center; position: relative; }
  .menu-btn { display: block; position: absolute; left: 0; }
  .menu { display: none; position: absolute; top: 100%; left: -16px; right: -16px; background: #fff; flex-direction: column; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
  .open .menu { display: flex; }
  .menu a { padding: 12px; font-size: 1rem; }
  .open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .open .menu-btn span:nth-child(2) { opacity: 0; }
  .open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* Testa della home: carosello a sinistra, calendario a destra */
.home-top { display: grid; gap: 24px; margin-top: 32px; align-items: stretch; }
@media (min-width: 980px) { .home-top { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: 640px; } .home-top .home-cal { grid-column: 2; min-height: 0; } }
.home-top #ag-slider { min-width: 0; }

/* Slideshow in home: lo stesso del sito attuale (bande colorate leggermente storte) */
#ag-slider.ag-slider { --ag-height: 460px; --ag-height-mobile: 360px;
  position: relative; overflow: hidden; width: 100%; height: 100%; min-height: var(--ag-height); border-radius: 14px; background: var(--color2, #193380); }
#ag-slider .ag-track { position: absolute; inset: 0; }
#ag-slider .ag-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s;
  background-size: cover; background-position: center; display: flex; align-items: flex-end; text-decoration: none !important; }
#ag-slider .ag-slide.is-active { opacity: 1; visibility: visible; }
#ag-slider .ag-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 60%); }
#ag-slider .ag-caption { position: relative; margin: 0 0 50px 68px; width: calc(100% - 136px); }
#ag-slider .ag-band { position: relative; display: table; max-width: 100%; padding: 7px 16px 8px; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(0,0,0,.28); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
#ag-slider .ag-b1 { z-index: 2; transform: rotate(-1deg); min-width: 40%; background: var(--color2, #193380);
  color: #fff !important; font-family: var(--font1, "Montserrat"), sans-serif; font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem); padding: 9px 18px 10px; }
#ag-slider .ag-b2 { z-index: 3; transform: rotate(1.3deg); min-width: 50%; margin: -6px 0 0 26px; background: var(--color1, #ffba01);
  color: var(--color2_150, #0d1a40) !important; font-weight: 700; font-size: clamp(1rem, 1.8vw, 1.25rem); }
#ag-slider .ag-b3 { z-index: 1; transform: rotate(-1.2deg); margin: -5px 0 0 10px; background: #fff;
  color: var(--color2, #193380) !important; font-size: .95rem; }
#ag-slider .ag-btn { display: inline-block; margin: 16px 0 0 10px; padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: #fff; color: var(--color2_150, #0d1a40) !important; box-shadow: 0 6px 16px rgba(0,0,0,.28); transition: transform .2s; }
#ag-slider .ag-slide:hover .ag-btn { transform: translateY(-2px); }
#ag-slider .ag-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: rgba(0,0,0,.35); color: #fff; font-size: 28px; line-height: 40px; transition: background .2s; }
#ag-slider .ag-nav:hover { background: rgba(0,0,0,.6); }
#ag-slider .ag-prev { left: 12px; }
#ag-slider .ag-next { right: 12px; }
#ag-slider .ag-dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
#ag-slider .ag-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.5); transition: background .2s, transform .2s; }
#ag-slider .ag-dot.is-active { background: var(--color1, #ffba01); transform: scale(1.3); }
@media (max-width: 640px) {
  #ag-slider.ag-slider { min-height: var(--ag-height-mobile); }
  #ag-slider .ag-caption { margin: 0 16px 42px; width: calc(100% - 32px); }
  #ag-slider .ag-b2 { margin-left: 14px; }
  #ag-slider .ag-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { #ag-slider .ag-slide { transition: none; } }

/* (vecchio riquadro calendario) */
.card { background: #fff; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(25, 51, 128, .09); padding: clamp(20px, 4vw, 36px); }
.calendar .section-title { color: var(--blue); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: .85rem; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.events { list-style: none; margin: 0 0 24px; padding: 0; }
.events li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ev-date { width: 44px; text-align: center; flex: none; line-height: 1.1; }
.ev-date b { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--blue); }
.ev-date span { font-size: .72rem; color: var(--muted); letter-spacing: .1em; }
.ev-body { border-left: 3px solid var(--ec); padding-left: 12px; }
.ev-title { margin: 0; font-weight: 700; color: var(--blue); }
.ev-meta { margin: 0; font-size: .88rem; color: var(--muted); }

/* Onde */
.band { position: relative; height: 96px; overflow: hidden; margin: 8px 0; }
.band svg { position: absolute; top: 0; left: 0; width: 200%; height: 100%; }
.band-l1 { animation: band-flow 26s linear infinite; }
.band-l2 { animation: band-flow 18s linear infinite reverse; }
@keyframes band-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 640px) { .band { height: 64px; } .band svg { width: 400%; } @keyframes band-flow { to { transform: translateX(-50%); } } }
@media (prefers-reduced-motion: reduce) { .band svg { animation: none; } }

/* Schede articolo */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; margin-bottom: 32px; }
.post-card { display: flex; flex-direction: column; }
.post-img { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--sc); }
.post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-img img { transform: scale(1.04); }
.post-img-fallback { display: grid; place-items: center; height: 100%; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--sc-on); background: repeating-linear-gradient(-45deg, rgba(255,255,255,.08) 0 18px, transparent 18px 40px); }
.chip { position: absolute; top: 12px; left: 12px; background: var(--sc); color: var(--sc-on); font-family: var(--font-head); font-weight: 700; font-size: .75rem; padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.chip-static { position: static; display: inline-block; margin-bottom: 14px; }
/* più settori sulla stessa scheda: le etichette una accanto all'altra */
.chips { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip { position: static; }
.post-body h3 { font-size: 1.2rem; margin: 16px 0 6px; }
.post-body h3 a { color: var(--blue); text-decoration: none; }
.post-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.post-sub { margin: -4px 0 8px; font-family: var(--font-head); font-weight: 600; font-size: .98rem; line-height: 1.35; color: var(--blue-dark); opacity: .8; }
.post-meta { color: #bf8c01; font-size: .92rem; margin: 0 0 8px; }
.post-excerpt { color: var(--muted); margin: 0; font-size: .95rem; }

/* Versetto e settori */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.partner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 22px 22px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.partner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.partner:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(25, 51, 128, .35); border-color: transparent; }
.partner:hover::before { transform: scaleX(1); }
.partner .eyebrow { margin: 0; }
.partner-logo { display: block; height: 58px; width: 100%; max-width: 230px; object-fit: contain; margin: 4px 0; }
.partner-mono { background: var(--blue); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.partner-text { font-size: .92rem; color: var(--muted); }
.partner-go { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--blue); }
.partner:hover .partner-go span { display: inline-block; transform: translateX(3px); transition: transform .2s; }

/* Pagine blog */
.page-head { background: var(--blue); color: #fff; padding: 48px 0 40px; }
.page-head h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head p { margin: 0; opacity: .85; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters a { border: 1.5px solid var(--sc, var(--blue)); color: var(--ink); text-decoration: none; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.filters a[aria-current] { background: var(--sc, var(--blue)); color: #fff; }
.filters a[aria-current][style*="ffba01"] { color: var(--ink); }

/* Articolo */
.article-head { padding: 48px 0 24px; }
.article-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.subtitle { font-size: 1.2rem; color: var(--muted); margin: 0 0 12px; }
.article-cover { margin: 0 auto 32px; }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }
.prose { font-size: 1.1rem; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--yellow); font-style: italic; color: var(--muted); }
.prose figure { margin: 1.8em 0; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin: 1.5em 0; }
.prose figcaption { font-size: .9rem; color: var(--muted); text-align: center; margin-top: 6px; }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: "* * *"; color: var(--muted); letter-spacing: .4em; }
.prose figure img, .prose img { border-radius: 10px; margin-inline: auto; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .3em; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.prose tr:first-child td { background: var(--bg-soft); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-block: 32px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 24px 0 48px; border-top: 1px solid var(--line); margin-top: 32px; }
.share span { font-weight: 700; margin-right: 6px; }
.share a, .share button { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: #fff; color: var(--blue); padding: 6px 14px; border-radius: 999px; text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--blue); }

/* Piede */
.site-footer { margin-top: 48px; }
.wave { display: block; width: 100%; height: 60px; fill: var(--blue); }
.footer-body { background: var(--blue); color: #e8ecf8; padding: 24px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer-title { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--yellow); }
.footer-head { font-family: var(--font-head); font-weight: 700; color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0 0 20px; padding: 0; }
.site-footer a { color: #e8ecf8; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.copyright { font-size: .82rem; opacity: .7; margin-top: 24px; }
code { background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* Pagine già pronte (blocchi del Site Creator) */
.legacy { padding: 8px 16px 32px; }
.legacy-banner { padding-top: 16px; padding-bottom: 0; }
/* stessa larghezza del resto del sito (.wrap = 1120px): i blocchi già pronti erano larghi 1100px */
.legacy > section { max-width: 1120px !important; margin-left: auto !important; margin-right: auto !important; }

/* Bilancio di sostenibilità in home */
.bil-teaser { display: grid; gap: 24px; align-items: center; text-decoration: none; color: #fff; background: linear-gradient(125deg, var(--blue), var(--color2_150)); border-radius: 22px; padding: clamp(24px, 4vw, 44px); box-shadow: 0 22px 50px -24px rgba(13,26,64,.6); transition: transform .2s; }
.bil-teaser:hover { transform: translateY(-3px); }
@media (min-width: 860px) { .bil-teaser { grid-template-columns: 1.3fr 1fr; } }
.bil-teaser .eyebrow { color: var(--yellow); }
.bil-teaser h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.bil-teaser p { color: rgba(255,255,255,.85); max-width: 560px; }
.bil-numbers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bil-numbers li { display: flex; align-items: baseline; gap: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 12px 18px; }
.bil-numbers b { font-family: var(--font-head); font-size: 2rem; color: var(--yellow); }
.bil-numbers span { color: rgba(255,255,255,.85); }


/* ---- Citazione di Qoelet e settori: "il tempo di ogni cosa", tre tappe di un unico cammino ---- */
/* alone caldo dietro la citazione: sfuma su tutti i lati e il resto è trasparente,
   così l'ombra del riquadro del Bilancio sopra non viene tagliata dritta */
.tempi { position: relative; padding: 72px 0 80px; overflow: hidden; background:
  radial-gradient(ellipse 820px 240px at 50% 240px, #fff0c4 0, rgba(255,240,196,.6) 45%, rgba(255,240,196,0) 100%); }
.tempi-verse { position: relative; margin: 0 auto 56px; max-width: 820px; text-align: center; }
.tempi-verse::before { content: "\201C"; position: absolute; left: 50%; top: -58px; transform: translateX(-50%);
  font: 800 11rem/1 var(--font-head); color: var(--yellow); opacity: .35; pointer-events: none; }
.tempi-verse blockquote { position: relative; margin: 0; }
.tempi-verse p { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  line-height: 1.3; color: var(--blue); text-wrap: balance; }
.tempi-verse figcaption { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
.tempi-verse figcaption::before, .tempi-verse figcaption::after { content: ""; width: 36px; height: 3px; border-radius: 2px; background: var(--yellow); }

.tempi-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
/* la linea del tempo: dal blu dell'ACR al rosso degli adulti */
.tempi-list::before { content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #193380, #ffba01 50%, #d93a2b); opacity: .9; }
.tempo { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.tempo-mark { position: relative; z-index: 1; display: grid; place-items: center; min-width: 58px; height: 58px; padding: 0 10px;
  border-radius: 999px; background: var(--sc); color: var(--sc-on); border: 5px solid #fff; box-shadow: 0 4px 14px rgba(25,51,128,.18);
  font-family: var(--font-head); font-size: .95rem; line-height: 1; grid-auto-flow: column; }
.tempo-mark b { font-size: 1.3rem; font-weight: 800; }
.tempo-card { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: var(--ink); flex: 1; }
.tempo-photo { position: relative; isolation: isolate; margin: 6px 0 0; }
.tempo-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 18px; background: var(--sc);
  transform: rotate(calc(-3deg + var(--i) * 3deg)) translate(6px, 8px); transition: transform .35s ease; }
.tempo-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px;
  box-shadow: 0 16px 34px -18px rgba(13,26,64,.55); transition: transform .35s ease; background: var(--bg-soft); }
.tempo-age { position: absolute; left: -6px; bottom: 16px; padding: 6px 14px; background: var(--sc); color: var(--sc-on);
  font: 800 .9rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .04em; transform: rotate(-3deg);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); }
.tempo-body { display: flex; flex-direction: column; flex: 1; padding: 26px 6px 0; }
.tempo-body h3 { font-size: 1.6rem; margin: 0 0 8px; color: var(--blue); }
.tempo-body h3::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--sc); transition: width .35s; }
.tempo-text { flex: 1; margin: 0 0 14px; color: var(--muted); }
.tempo-go { font-weight: 700; color: var(--blue); }
.tempo-go span { display: inline-block; transition: transform .2s; }
.tempo-card:hover .tempo-photo img, .tempo-card:focus-visible .tempo-photo img { transform: translateY(-6px); }
.tempo-card:hover .tempo-photo::before, .tempo-card:focus-visible .tempo-photo::before { transform: rotate(calc(-5deg + var(--i) * 5deg)) translate(10px, 12px); }
.tempo-card:hover h3::after, .tempo-card:focus-visible h3::after { width: 88px; }
.tempo-card:hover .tempo-go span { transform: translateX(4px); }
.tempo-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 8px; border-radius: 18px; }

/* Telefono: la linea del tempo diventa verticale, a sinistra */
@media (max-width: 760px) {
  .tempi { padding: 56px 0 64px; background: radial-gradient(ellipse 360px 210px at 50% 210px, #fff0c4 0, rgba(255,240,196,.6) 45%, rgba(255,240,196,0) 100%); }
  .tempi-verse { margin-bottom: 40px; }
  .tempi-verse::before { font-size: 8rem; top: -44px; }
  .tempi-list { grid-template-columns: 1fr; gap: 40px; padding-left: 50px; }
  .tempi-list::before { left: 19px; right: auto; top: 10px; bottom: 10px; width: 4px; height: auto;
    background: linear-gradient(180deg, #193380, #ffba01 50%, #d93a2b); }
  .tempo { display: block; position: relative; }
  .tempo-mark { position: absolute; left: -50px; top: 0; min-width: 42px; height: 42px; border-width: 4px; padding: 0 6px; font-size: .75rem; }
  .tempo-mark b { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tempo-photo::before, .tempo-photo img, .tempo-body h3::after, .tempo-go span { transition: none; }
}

/* ---- Ultimi articoli di un settore, dentro le pagine Giovani/ACR/Adulti (templates/_settore-blog.php) ---- */
.sb { --sb-ink: #0d1a40; --sb-blue: #193380; --sb-muted: #5366a0; }
.sb-head { margin: 0 0 30px; }
.sb-b1, .sb-b2 { position: relative; display: table; margin: 0; padding: 8px 18px 9px; line-height: 1.15; font-family: var(--font-head); font-weight: 700;
  box-shadow: 0 6px 16px rgba(13,26,64,.18); }
.sb-b1 { z-index: 2; transform: rotate(-1deg); background: var(--sb-blue); color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.5rem); min-width: min(40%, 100%); }
.sb-b2 { z-index: 3; transform: rotate(1.2deg); margin: -6px 0 0 24px; background: var(--sc); color: var(--sc-on); font-size: clamp(1rem, 1.9vw, 1.3rem); }
.sb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.sb-grid.sb-solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.sb a { text-decoration: none !important; color: inherit; }
/* !important: le pagine già pronte hanno regole per gli h3 con l'id (#gv-giovani h3) che altrimenti vincerebbero */
.sb h3 { font-family: var(--font-head); font-weight: 700; color: var(--sb-blue) !important; margin: 0 !important; line-height: 1.25 !important; }
.sb-date { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sb-muted); margin-bottom: 6px; }
.sb-by { display: block; margin-top: 6px; font-size: .92rem; color: #bf8c01; }
.sb-noimg { display: grid; place-items: center; width: 100%; height: 100%; background: var(--sc); color: var(--sc-on);
  font-family: var(--font-head); font-weight: 800; font-size: 2rem;
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.1) 0 18px, transparent 18px 40px); }

/* articolo in evidenza */
.sb-main { display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(13,26,64,.10); transition: transform .25s, box-shadow .25s; }
.sb-img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sc);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%); }
.sb-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.sb-main-body { display: flex; flex-direction: column; flex: 1; padding: 4px 26px 24px; }
.sb-main h3 { font-size: clamp(1.3rem, 2.3vw, 1.7rem) !important; }
.sb-ex { margin: 12px 0 0 !important; color: var(--sb-muted); }
.sb-go { margin-top: auto; padding-top: 16px; font-weight: 700; color: var(--sb-blue); }
.sb-go span { display: inline-block; transition: transform .2s; }
.sb-main:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(13,26,64,.16); }
.sb-main:hover .sb-img img { transform: scale(1.04); }
.sb-main:hover .sb-go span { transform: translateX(4px); }

/* altri articoli */
.sb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sb-item { display: flex; align-items: center; gap: 18px; padding: 14px; background: #fff; border-radius: 16px;
  box-shadow: 0 6px 24px rgba(13,26,64,.08); transition: transform .2s, box-shadow .2s; }
.sb-thumb { position: relative; flex: 0 0 116px; height: 96px; }
.sb-thumb::before { content: ""; position: absolute; inset: 0; border-radius: 12px; background: var(--sc); transform: rotate(-4deg); transition: transform .25s; }
.sb-list li:nth-child(even) .sb-thumb::before { transform: rotate(4deg); }
.sb-thumb img, .sb-thumb .sb-noimg { position: relative; width: 100%; height: 100%; border-radius: 12px; }
.sb-thumb img { display: block; object-fit: cover; }
.sb-thumb .sb-noimg { font-size: 1.6rem; }
.sb-item-body { min-width: 0; }
.sb-item h3 { font-size: 1.05rem !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sb-item:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 12px 30px rgba(13,26,64,.15); }
.sb-item:hover .sb-thumb::before { transform: rotate(-8deg); }
.sb-list li:nth-child(even) .sb-item:hover .sb-thumb::before { transform: rotate(8deg); }
.sb-all-li { margin-top: auto; padding-top: 4px; }
.sb-all { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 999px; background: var(--sc); color: var(--sc-on) !important;
  font-weight: 700; box-shadow: 0 8px 22px rgba(13,26,64,.18); transition: transform .2s; }
.sb-all:hover { transform: translateY(-2px); }
.sb-solo-all { margin: 22px 0 0; }
.sb a:focus-visible { outline: 3px solid var(--sb-blue); outline-offset: 4px; }

@media (max-width: 860px) {
  .sb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sb-b2 { margin-left: 12px; }
  .sb-main-body { padding: 4px 18px 20px; }
  .sb-item { gap: 14px; padding: 12px; }
  .sb-thumb { flex-basis: 92px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .sb *, .sb-main, .sb-item { transition: none !important; }
}

/* sottotitolo degli articoli nella sezione "Dal blog" delle pagine (!important per le regole con l'id delle pagine) */
.sb-sub { margin: 6px 0 0 !important; font-family: var(--font-head); font-weight: 600; line-height: 1.35; color: var(--sb-ink); opacity: .75; }
.sb-main .sb-sub { font-size: 1.08rem; }
.sb-item .sb-sub { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* l'ultimo articolo in grande, in cima alla pagina accanto al titolo (<!-- ultimo-articolo -->) */
.sb-hero { position: relative; isolation: isolate; margin: 14px 8px 8px; }
.sb-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: var(--sc); transform: rotate(2.2deg) translate(6px, 6px); transition: transform .3s; }
.sb-hero:hover::before { transform: rotate(3.4deg) translate(8px, 8px); }
.sb-hero .sb-main { box-shadow: 0 18px 44px -12px rgba(13,26,64,.35); }
.sb-hero .sb-img { aspect-ratio: 16 / 9; }
.sb-hero .sb-ex { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-flag { position: absolute; z-index: 2; left: -10px; top: -14px; padding: 6px 14px; background: var(--sb-blue); color: #fff;
  font: 700 .78rem/1.2 var(--font-head); letter-spacing: .1em; text-transform: uppercase; transform: rotate(-3deg); box-shadow: 0 6px 16px rgba(13,26,64,.3); }

/* gli articoli seguenti, in fila (<!-- ultimi-articoli --> quando c'è anche l'ultimo in grande) */
.sb-strip { padding-top: 8px !important; }
.sb-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 18px; }
.sb-k { margin: 0 !important; font: 700 clamp(1.15rem, 2vw, 1.4rem)/1.2 var(--font-head) !important; color: var(--sb-blue) !important; }
.sb-k::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--sc); }
.sb-more { font-weight: 700; color: var(--sb-blue) !important; }
.sb-more span { display: inline-block; transition: transform .2s; }
.sb-more:hover span { transform: translateX(4px); }
.sb-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sb-row .sb-item { height: 100%; }
@media (max-width: 900px) { .sb-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .sb-hero { margin: 16px 4px 4px; } }

/* ---- "Filo Diretto" (il blog): titolo scritto a mano, con un filo che lo sottolinea ---- */
.filo { position: relative; display: table; margin: 0 auto 6px; padding: 0 10px 14px; font: 700 clamp(2.6rem, 6vw, 3.8rem)/1 "Caveat", cursive;
  color: var(--blue); letter-spacing: .01em; }
.filo:not(.center) { margin-left: 0; }
.filo-w { display: inline-block; transform: rotate(-3deg); padding: 0 .08em; }
.filo-line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 18px; overflow: visible; }
.filo-line path { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 0; }
/* animazione: prima si scrive la parola (da sinistra a destra), poi si tende il filo */
.filo.js .filo-w { clip-path: inset(-20% 100% -20% 0); }
.filo.js .filo-line path { stroke-dashoffset: 340; }
.filo.js.is-written .filo-w { clip-path: inset(-20% -5% -20% 0); transition: clip-path 1.4s cubic-bezier(.55,.1,.35,1); }
.filo.js.is-written .filo-line path { stroke-dashoffset: 0; transition: stroke-dashoffset .9s ease-out 1.1s; }
.filo-sub { margin: 0 0 30px; color: var(--muted); }
.filo-light { color: #fff; }
.page-head h1.filo { color: #fff; font-size: clamp(2.8rem, 7vw, 4.2rem); margin-bottom: 8px; }
.filo-sector { margin: 0 0 10px !important; opacity: 1 !important; }
.filo-sector span { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--sc); color: var(--sc-on); font: 700 .9rem var(--font-head); transform: rotate(-2deg); }
@media (prefers-reduced-motion: reduce) {
  .filo.js .filo-w { clip-path: none; }
  .filo.js .filo-line path { stroke-dashoffset: 0; }
}

/* ---- Articoli: foto in griglia e foto ingrandita ---- */
.prose .photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1.8em 0; }
.prose .photo-grid figure { margin: 0; }
.prose .photo-grid img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .photo-grid figure:only-child, .prose .photo-grid figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.prose .photo-grid figure:last-child:nth-child(odd) img { aspect-ratio: 16 / 9; }
@media (max-width: 520px) { .prose .photo-grid { grid-template-columns: 1fr; } .prose .photo-grid img { aspect-ratio: auto; } }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(13, 26, 64, .92); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* ---- Articoli in HTML copiati dal vecchio sito: le classi di Bootstrap e del Site Creator che usano ----
   (il Site Creator caricava Bootstrap; qui ne rifacciamo solo i pezzi usati, e solo dentro l'articolo) */
.prose .container { width: 100%; padding: 0; margin: 0; max-width: none; }
.prose .row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.prose .row > * { padding: 0 10px; width: 100%; }
.prose .row.g-0 { margin: 0; } .prose .row.g-0 > * { padding: 0; }
.prose .col { flex: 1 0 0; }
.prose .col-12 { flex: 0 0 auto; width: 100%; }
@media (min-width: 768px) { .prose .col-md-8 { flex: 0 0 auto; width: 66.666%; } .prose .d-md-flex { display: flex !important; } }
@media (min-width: 992px) { .prose .col-lg-4 { flex: 0 0 auto; width: 33.333%; } .prose .col-lg-6 { flex: 0 0 auto; width: 50%; } }
.prose .d-flex { display: flex; } .prose .d-inline-block { display: inline-block; } .prose .d-none { display: none; }
.prose .gap-4 { gap: 1.5rem; } .prose .flex-shrink-0 { flex-shrink: 0; }
.prose .align-items-center { align-items: center; } .prose .align-items-start { align-items: flex-start; } .prose .justify-content-center { justify-content: center; }
.prose .mb-0 { margin-bottom: 0 !important; } .prose .mb-1 { margin-bottom: .25rem !important; } .prose .mb-2 { margin-bottom: .5rem !important; }
.prose .mb-4 { margin-bottom: 1.5rem !important; } .prose .mb-5 { margin-bottom: 3rem !important; } .prose .mt-4 { margin-top: 1.5rem !important; }
.prose .my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; } .prose .py-5 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.prose .text-center { text-align: center; } .prose .text-uppercase { text-transform: uppercase; }
.prose .text-muted, .prose .text-secondary { color: var(--muted) !important; } .prose .text-dark { color: var(--ink) !important; }
.prose .fw-light { font-weight: 300; } .prose .fw-semibold { font-weight: 600; } .prose .fs-5 { font-size: 1.2rem; } .prose .small, .prose small { font-size: .875em; }
.prose h5, .prose h6 { font-family: var(--font-head); color: var(--blue); margin: 0 0 .4em; }
.prose h6 { font-size: 1rem; }
.prose .img-fluid { max-width: 100%; height: auto; }
.prose .rounded-circle { border-radius: 50% !important; }
.prose hr.border-light { border: 0; border-top: 1px solid var(--line); }
.prose hr.border-light::after { content: none; }
.prose .btn-primary { background: var(--blue); color: #fff !important; text-decoration: none; }
.prose .btn-xl { padding: 14px 28px; font-size: 1.05rem; }
.prose .koButtons { margin: 1.2em 0; } .prose .koButtons a:not(.btn) { display: inline-block; font-weight: 700; padding: 10px 22px; border-radius: 8px; background: var(--yellow); color: var(--ink); text-decoration: none; }
.prose .koSeparator { height: 3px; width: 80px; background: var(--yellow); margin: 1em 0; border-radius: 2px; }
.prose .kimgRatio1 { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; }
.prose .kimgRatio1 img { width: 100%; height: 100%; object-fit: cover; }
.prose .avviso { display: block; }

/* ---- Home: riquadro "I nostri loghi" (porta a /identita-visiva) ---- */
.loghi-band { padding: 8px 0 56px; }
.loghi-card { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 26px 34px; border-radius: 20px; color: #fff; text-decoration: none;
  transition: transform .25s; }
/* fondo blu (::after) e cartoncino giallo inclinato dietro (::before) */
.loghi-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 20px; background: var(--blue); box-shadow: 0 16px 40px -14px rgba(13,26,64,.45); }
.loghi-card::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: 20px; background: var(--yellow); transform: rotate(-1.2deg) translate(-6px, 6px); transition: transform .3s; }
.loghi-card:hover { transform: translateY(-3px); }
.loghi-card:hover::before { transform: rotate(-2deg) translate(-9px, 9px); }
.loghi-art { position: relative; width: 150px; height: 96px; flex: none; }
.loghi-art img { position: absolute; top: 50%; width: 56px; height: auto; padding: 8px; border-radius: 14px; box-shadow: 0 8px 18px rgba(0,0,0,.25); transition: transform .3s; }
.loghi-art .l1 { left: 0; background: #fff; transform: translateY(-50%) rotate(-8deg); z-index: 2; }
.loghi-art .l2 { left: 46px; background: #0d1a40; transform: translateY(-55%) rotate(3deg); z-index: 3; }
.loghi-art .l3 { left: 92px; background: var(--yellow); transform: translateY(-45%) rotate(9deg); z-index: 1; }
.loghi-card:hover .l1 { transform: translateY(-58%) rotate(-12deg); }
.loghi-card:hover .l3 { transform: translateY(-38%) rotate(13deg); }
.loghi-txt .eyebrow { color: var(--yellow); margin-bottom: 4px; }
.loghi-txt h2 { color: #fff; margin: 0 0 4px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.loghi-p { color: rgba(255,255,255,.85); }
.loghi-go { flex: none; padding: 12px 22px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; white-space: nowrap; }
.loghi-go span { display: inline-block; transition: transform .2s; }
.loghi-card:hover .loghi-go span { transform: translateX(4px); }
@media (max-width: 760px) {
  .loghi-card { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 22px; }
  .loghi-go { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .loghi-card, .loghi-card::before, .loghi-art img { transition: none; } }

/* ---- Piè di pagina: logo AC e "Sito ospitato da Infomaniak" ---- */
.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-logo img { display: block; width: 210px; height: auto; }
.copyright { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.hosted { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 6px; font-size: .85rem; color: inherit; text-decoration: none; opacity: .85; transition: opacity .2s; }
.hosted:hover { opacity: 1; }
.hosted img { display: block; width: 175px; height: auto; }
