/* =====================================================================
   Calendario eventi mensile (vista CALENDAR / LIST)
   Componente autonomo: tutte le classi sono prefissate "evc-" per non
   interferire con gli stili del sito. Usato dalle pagine eventi-{mese}.
   ===================================================================== */
.evc {
  --evc-crema: #F9F6F0;
  --evc-carta: #FFFDF9;
  --evc-bordeaux: #7B1E27;
  --evc-bordeaux-scuro: #5A141C;
  --evc-marrone: #3A2418;
  --evc-testo-2: #6E5A4E;
  --evc-linea: #E8DFD2;
  --evc-hover: #F3EBE0;
  --evc-ombra: 0 2px 10px rgba(58, 36, 24, .08);
  --evc-serif: 'Playfair Display', Georgia, serif;
  --evc-sans: 'Lato', system-ui, -apple-system, sans-serif;

  max-width: 760px; /* come #lista-eventi: calendario e lista hanno la stessa larghezza */
  margin: 0 auto;
  padding: 16px 16px 8px;
  background: var(--evc-crema);
  color: var(--evc-marrone);
  font-family: var(--evc-sans);
}
.evc *, .evc *::before, .evc *::after { box-sizing: border-box; }
.evc button { font: inherit; color: inherit; cursor: pointer; }
.evc h2, .evc h3 { color: var(--evc-marrone); }

/* ---------- Selettore LISTA / CALENDARIO ---------- */
.evc-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #EFE7DB;
}
.evc-toggle button {
  border: 0;
  background: transparent;
  padding: 10px 0;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--evc-testo-2);
  transition: background .2s, color .2s;
}
.evc-toggle button[aria-pressed="true"] {
  background: var(--evc-bordeaux);
  color: #fff;
  box-shadow: 0 2px 6px rgba(123, 30, 39, .3);
}

/* ---------- Calendario ---------- */
.evc-cal {
  margin-top: 0;
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: var(--evc-carta);
  box-shadow: var(--evc-ombra);
}
.evc-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.evc-cal__mese {
  margin: 0;
  font-family: var(--evc-serif);
  font-size: 1.1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.evc-freccia {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--evc-bordeaux);
  text-decoration: none;
}
.evc-freccia:hover { background: var(--evc-hover); }
.evc-freccia--vuota { visibility: hidden; }
.evc-sett, .evc-griglia {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.evc-sett span {
  padding: 6px 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--evc-testo-2);
}
.evc-griglia { row-gap: 4px; }
.evc-giorno {
  width: 100%;
  max-width: 44px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  font-size: .95rem;
  color: var(--evc-marrone);
  transition: background .15s, color .15s;
}
.evc-giorno:hover { background: var(--evc-hover); }
.evc .evc-giorno--weekend { color: var(--evc-bordeaux); }
.evc-giorno--oggi { box-shadow: inset 0 0 0 1.5px var(--evc-bordeaux); }
.evc .evc-giorno[aria-selected="true"] {
  background: var(--evc-bordeaux);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(123, 30, 39, .35);
}
.evc-giorno--vuoto { visibility: hidden; }
/* Pallino sotto i giorni con almeno un evento (rispetta i filtri attivi) */
.evc-giorno { position: relative; }
.evc-giorno--eventi::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--evc-bordeaux);
}
.evc-giorno--eventi[aria-selected="true"]::after { background: #fff; }

/* ---------- Eventi del giorno / lista ---------- */
.evc-giornata { padding-top: 18px; }
.evc-giornata__titolo, .evc-gruppo__titolo {
  margin: 0;
  font-family: var(--evc-serif);
  font-size: 1.05rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.evc-giornata__sotto {
  margin: 4px 0 12px;
  font-size: .88rem;
  color: var(--evc-testo-2);
}
.evc-gruppo { padding-top: 18px; }
.evc-gruppo__titolo { font-size: .95rem; color: var(--evc-bordeaux); margin-bottom: 10px; }

.evc-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px 12px 14px 0;
  border-left: 4px solid var(--evc-bordeaux);
  border-radius: 14px;
  background: var(--evc-carta);
  box-shadow: var(--evc-ombra);
}
.evc-card__giorno {
  padding-top: 2px;
  text-align: center;
  font-family: var(--evc-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--evc-bordeaux);
}
.evc-card__giorno small {
  display: block;
  margin-top: 4px;
  font-family: var(--evc-sans);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--evc-testo-2);
}
.evc-card__corpo { min-width: 0; }
.evc-card__quando {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--evc-bordeaux);
}
.evc-card__titolo {
  margin: 3px 0 4px;
  font-family: var(--evc-serif);
  font-size: 1.05rem;
  line-height: 1.25;
}
.evc-card__titolo a { color: var(--evc-marrone); text-decoration: none; }
.evc-card__titolo a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.evc-card__luogo {
  overflow: hidden;
  min-width: 0;
  font-size: .86rem;
  color: var(--evc-testo-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.evc-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F1E9DD;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 1px;
  color: var(--evc-testo-2);
}
.evc-vuoto {
  padding: 28px 10px;
  text-align: center;
  font-size: .92rem;
  color: var(--evc-testo-2);
}

/* ---------- Vista LISTA su mobile: stessa larghezza del calendario ----------
   La sezione della lista ha 32px di padding laterale + 16px di #lista-eventi;
   il calendario ha 16px. Su mobile si toglie il padding della sezione. */
@media (max-width: 640px) {
  #evc-lista .sezione.ev-calendario {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .evc * { transition: none !important; }
}
