/* Calendario mensile della home (stesso aspetto del sito attuale) */
#ac-cal { --ac-accent: var(--blue, #193380); --ac-yellow: var(--yellow, #ffba01);
  background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.08); padding: 18px 16px 12px;
  font-family: var(--font-body); color: #0D1A40; font-size: 15px; }
#ac-cal, #ac-cal * { box-sizing: border-box; }
#ac-cal .ac-list.ac-fade > * { animation: acFade .35s ease both; }
@keyframes acFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #ac-cal .ac-list.ac-fade > * { animation: none; } }
#ac-cal .ac-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#ac-cal .ac-month { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--ac-accent); text-transform: capitalize; }
#ac-cal .ac-arrow { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f3f8; color: var(--ac-accent); font-size: 22px; line-height: 30px; cursor: pointer; padding: 0; }
#ac-cal .ac-arrow:hover { background: var(--ac-yellow); }
#ac-cal .ac-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#ac-cal .ac-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dde1ea; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .8rem; cursor: pointer; color: #0D1A40; font-family: inherit; }
#ac-cal .ac-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
#ac-cal .ac-chip.is-off { opacity: .4; }
#ac-cal .ac-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
#ac-cal .ac-dow { font-size: .7rem; text-transform: uppercase; color: #8c99c0; padding: 4px 0; font-weight: 700; }
#ac-cal .ac-day { position: relative; aspect-ratio: 1 / 1; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: .85rem; color: #0D1A40; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: inherit; }
#ac-cal .ac-day:hover { background: #f1f3f8; }
#ac-cal .ac-day.is-other { color: #c3c8d6; }
#ac-cal .ac-day.is-today { font-weight: 700; color: var(--ac-accent); box-shadow: inset 0 0 0 2px var(--ac-yellow); }
#ac-cal .ac-day.is-sel { background: var(--ac-accent); color: #fff; }
#ac-cal .ac-dots { display: flex; gap: 2px; height: 6px; margin-top: 2px; }
#ac-cal .ac-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
#ac-cal .ac-list-title { margin: 14px 0 6px; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8c99c0; }
#ac-cal .ac-list { max-height: 340px; overflow-y: auto; }
#ac-cal .ac-ev { display: flex; gap: 10px; padding: 9px 4px; border-top: 1px solid #eef0f5; cursor: pointer; }
#ac-cal .ac-ev:first-child { border-top: 0; }
#ac-cal .ac-date { flex: 0 0 42px; text-align: center; line-height: 1.05; }
#ac-cal .ac-date b { display: block; font-size: 1.25rem; color: var(--ac-accent); font-family: var(--font-head); }
#ac-cal .ac-date span { font-size: .7rem; text-transform: uppercase; color: #8c99c0; }
#ac-cal .ac-info { flex: 1; min-width: 0; border-left: 3px solid #ccc; padding-left: 9px; }
#ac-cal .ac-title { font-weight: 700; line-height: 1.25; }
#ac-cal .ac-meta { font-size: .8rem; color: #5366a0; margin-top: 2px; }
#ac-cal .ac-desc { display: none; font-size: .85rem; margin-top: 6px; white-space: pre-line; color: #0D1A40; }
#ac-cal .ac-ev.is-open .ac-desc { display: block; }
#ac-cal .ac-empty { padding: 14px 4px; color: #8c99c0; font-size: .9rem; }
#ac-cal .ac-link { background: none; border: 0; padding: 6px 4px; color: var(--ac-accent); font-weight: 700; cursor: pointer; font-size: .85rem; font-family: inherit; }
/* ---- aggiungi al tuo calendario ---- */
#ac-cal .ac-sub { margin-top: 10px; border-top: 1px solid #eef0f5; padding-top: 10px; }
#ac-cal .ac-sub-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: .9rem; background: var(--ac-yellow); color: #0d1a40; font-family: inherit; }
#ac-cal .ac-sub-toggle:hover { background: #ffcb41; }
#ac-cal .ac-sub-toggle svg { flex: 0 0 auto; }
#ac-cal .ac-sub-panel { margin-top: 10px; }
#ac-cal .ac-sub-hint { font-size: .8rem; color: #5366a0; margin: 0 0 8px; line-height: 1.4; }
#ac-cal .ac-sub-row { padding: 8px 0; border-top: 1px solid #eef0f5; }
#ac-cal .ac-sub-row:first-of-type { border-top: 0; }
#ac-cal .ac-sub-name { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
#ac-cal .ac-sub-name i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
#ac-cal .ac-sub-btns { display: flex; flex-wrap: wrap; gap: 6px; }
#ac-cal .ac-sub-btns a, #ac-cal .ac-sub-btns button { display: inline-block; border: 1px solid #dde1ea; background: #fff; border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 700; color: var(--ac-accent); text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.4; }
#ac-cal .ac-sub-btns a:hover, #ac-cal .ac-sub-btns button:hover { border-color: var(--ac-accent); background: #f1f3f8; }
#ac-cal .ac-sub-btns .is-done { background: var(--ac-accent); color: #fff; border-color: var(--ac-accent); }

/* ---- nella testata della home, accanto al carosello ---- */
#ac-cal .ac-pdf { display: block; text-align: center; margin-top: 10px; font-size: .85rem; font-weight: 700; color: var(--ac-accent); }
/* Altezze fisse: quando arrivano gli eventi (o si cambia mese) il calendario non cambia misura,
   così non si allunga lo slideshow accanto e la pagina non "salta". Lo spazio che avanza è dell'elenco eventi. */
.home-cal #ac-cal { height: 100%; display: flex; flex-direction: column; }
.home-cal #ac-cal .ac-day { aspect-ratio: auto; height: 38px; }
.home-cal #ac-cal .ac-filters { min-height: 28px; }
.home-cal #ac-cal .ac-grid { min-height: calc(25px + 6 * 40px); align-content: start; }
.home-cal #ac-cal .ac-list { flex: 1 1 0; min-height: 0; max-height: none; }
.home-cal #ac-cal .ac-sub { margin-top: 10px; }
@media (max-width: 979px) {
  .home-cal #ac-cal .ac-day { height: 44px; }
  .home-cal #ac-cal .ac-grid { min-height: calc(25px + 6 * 46px); }
  .home-cal #ac-cal .ac-list { flex: none; height: 280px; }
}
