/* ============================================
   EVENTI
   Percorso: wp-content/plugins/f-c-event-manager/assets/css/events.css (dalla 1.5.0 il CSS degli eventi e' nel plugin)
   Caricato solo su /eventi/, pagine evento, tipologie e homepage (se ci sono eventi).
   Colori e animazioni coerenti con style.css (--fc-rise, fc-rise).
   Versione 2: colori e font in un solo punto (variabili qui sotto), nessuna regola doppia.
   I nomi delle classi sono rimasti identici: i template del plugin FC Event Manager non cambiano.
   ============================================ */

:root {
	/* Colori degli eventi: per cambiarli basta modificare questi valori. */
	--fc-ev-brand: #971a1d;      /* bordeaux del sito */
	--fc-ev-brand-dark: #7a1417; /* hover */
	--fc-ev-tint: #fcf4f4;       /* fondo rosato */
	--fc-ev-tint-soft: #fdf8f8;
	--fc-ev-tint-line: #eed8d9;
	--fc-ev-line: #e2e2e2;
	--fc-ev-text: #444;

	/* Distanza dal bordo alto dello schermo del riquadro laterale fisso (se il tema ha un menu fisso, alza il valore). */
	--fc-ev-sticky-top: 100px;

	/* Font dei titoli degli eventi (e dei grandi numeri): lo stesso Playfair Display usato dal resto del sito.
	   Se vuoi che segua esattamente le impostazioni di Astra, scrivi:  --fc-ev-heading-font: inherit; */
	--fc-ev-heading-font: "Playfair Display", Georgia, serif;
}

/* Titoli: un'unica regola per il font. Il corpo del testo eredita sempre dal sito. */
.fc-event__title,
.fc-event__section-title,
.fc-event__subhead,
.fc-event__speaker-name,
.fc-event__day-title,
.fc-event__aside-title,
.fc-events__title,
.fc-events__section-title,
.fc-event-card__title,
.fc-event-card__day {
	font-family: var(--fc-ev-heading-font);
}

/* ============================================
   SCHEDA EVENTO
   ============================================ */

.fc-event {
	/* width:100% serve perché il contenitore del tema può essere flex: senza, con margin auto il main
	   si restringe al contenuto (stretto quando manca l'immagine hero). */
	width: 100%;
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 60px;
}

/* ---------- Hero ---------- */

.fc-event__hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	padding: 36px 0 40px;
	align-items: start;
}

/* Soprattitolo (scheda e archivio) */
.fc-event__eyebrow,
.fc-events__eyebrow {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fc-ev-brand);
}

.fc-event__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}

/* Etichetta di stato: testo + bordo, mai solo colore. */
.fc-event__badge {
	display: inline-block;
	padding: 3px 10px;
	border: 2px solid currentColor;
	border-radius: 4px;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: var(--fc-ev-text);
	background-color: #fff;
}

.fc-event__badge--ongoing {
	color: var(--fc-ev-brand);
}

.fc-event__badge--concluded {
	border-style: dashed;
}

.fc-event__badge--cancelled {
	color: var(--fc-ev-brand-dark);
	border-style: double;
	border-width: 4px;
}

.fc-event__title {
	font-size: 2rem;
	line-height: 1.15;
	margin: 0 0 12px;
}

.fc-event__subtitle {
	font-size: 1.15rem;
	line-height: 1.5;
	color: var(--fc-ev-text);
	margin: 0 0 22px;
}

.fc-event__facts {
	display: grid;
	gap: 12px;
	margin: 0 0 24px;
	padding: 18px 20px;
	background-color: var(--fc-ev-tint);
	border: 1px solid var(--fc-ev-tint-line);
	border-left: 4px solid var(--fc-ev-brand);
	border-radius: 8px;
}

.fc-event__fact {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fc-event__fact dt {
	min-width: 84px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--fc-ev-brand);
}

.fc-event__fact dd {
	margin: 0;
	font-weight: 600;
	color: #222;
}

.fc-event__actions {
	margin: 0 0 8px;
}

.fc-event__note {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--fc-ev-text);
}

.fc-event__media {
	margin: 0;
	border-radius: 10px;
	overflow: hidden;
	background-color: #f1e8e8;
	box-shadow: 0 6px 20px rgba(151, 26, 29, 0.1);
}

/* Mostra la locandina intera, senza ritagli. */
.fc-event__media img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Sezioni ---------- */

.fc-event__section {
	padding: 40px 0;
	border-top: 1px solid var(--fc-ev-line);
}

.fc-event__section > * {
	max-width: 760px;
}

.fc-event__section-title {
	font-size: 1.5rem;
	margin: 0 0 16px;
}

.fc-event__subhead {
	font-size: 1.1rem;
	margin: 24px 0 10px;
}

/* Titolo di un giorno (programma su più giorni) */
.fc-event__day-title {
	font-size: 1.1rem;
	margin: 26px 0 10px;
}

.fc-event__section-title + .fc-event__day-title {
	margin-top: 0;
}

.fc-event__prose p {
	color: var(--fc-ev-text);
	line-height: 1.65;
	margin: 0 0 14px;
}

.fc-event__prose p:last-child {
	margin-bottom: 0;
}

/* Programma: elenco numerato con numeri evidenziati (la numerazione riparte da 1 in ogni elenco). */
.fc-event__steps {
	list-style: none;
	counter-reset: fc-step;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.fc-event__steps li {
	counter-increment: fc-step;
	position: relative;
	padding: 10px 14px 10px 54px;
	background-color: #fff;
	border: 1px solid var(--fc-ev-line);
	border-radius: 8px;
	line-height: 1.5;
	color: #333;
}

.fc-event__steps li::before {
	content: counter(fc-step);
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: var(--fc-ev-brand);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
}

/* Elenco puntato con segno di spunta (es. "Perché partecipare?"). */
.fc-event__checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.fc-event__checks li {
	position: relative;
	padding-left: 32px;
	line-height: 1.5;
	color: var(--fc-ev-text);
}

.fc-event__checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var(--fc-ev-brand);
}

.fc-event__checks li::after {
	content: "";
	position: absolute;
	left: 7px;
	top: calc(0.2em + 4px);
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Relatori (uno o più) */
.fc-event__speaker {
	padding: 22px;
	background-color: var(--fc-ev-tint-soft);
	border: 1px solid var(--fc-ev-line);
	border-radius: 8px;
}

.fc-event__speaker + .fc-event__speaker {
	margin-top: 16px;
}

.fc-event__speaker-name {
	font-size: 1.25rem;
	margin: 0 0 4px;
}

.fc-event__speaker-role {
	margin: 0 0 12px;
	color: var(--fc-ev-brand);
	font-weight: 600;
}

/* Informazioni e Calendario */
.fc-event__info-list {
	display: grid;
	gap: 10px;
	margin: 0 0 24px;
}

.fc-event__info-list > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.fc-event__info-list dt {
	min-width: 110px;
	font-weight: 700;
	color: var(--fc-ev-brand);
}

.fc-event__info-list dd {
	margin: 0;
	color: #333;
}

.fc-event__materials {
	margin: 0;
	padding-left: 20px;
}

.fc-event__materials li {
	margin-bottom: 6px;
}

/* ---------- Layout a due colonne (da 960px) e riquadro laterale ---------- */

.fc-event__layout {
	display: block;
}

.fc-event__aside {
	margin-top: 8px;
}

.fc-event__aside-box {
	padding: 22px;
	background-color: #fff;
	border: 1px solid var(--fc-ev-line);
	border-top: 4px solid var(--fc-ev-brand);
	border-radius: 10px;
	box-shadow: 0 6px 20px rgba(151, 26, 29, 0.08);
}

.fc-event__aside-title {
	font-size: 1.25rem;
	margin: 0 0 14px;
}

/* Nel riquadro l'etichetta sta sempre sopra il valore. */
.fc-event__aside .fc-event__info-list {
	margin: 0 0 18px;
}

.fc-event__aside .fc-event__info-list > div {
	flex-direction: column;
	gap: 2px;
}

.fc-event__aside .fc-event__info-list dt {
	min-width: 0;
	font-size: 0.8rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.fc-event__aside .fc-event__actions {
	margin: 0;
}

.fc-event__aside .fc-button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

/* Link testuali */
.fc-event__link,
.fc-event__link:visited {
	color: var(--fc-ev-brand);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fc-event__link:hover,
.fc-event__link:focus {
	color: var(--fc-ev-brand-dark);
}

.fc-event__link:focus-visible {
	outline: 3px solid var(--fc-ev-brand);
	outline-offset: 3px;
	border-radius: 2px;
}

.fc-event__back {
	margin: 28px 0 0;
}

/* ---------- Animazioni (stesso linguaggio del resto del sito) ---------- */
/* Lo stato nascosto vale solo se reveal.js è attivo (.fc-js). */

.fc-js .fc-ev-reveal:not(.is-visible) {
	opacity: 0;
	transform: translateY(var(--fc-rise));
}

.fc-js .fc-ev-reveal.is-visible {
	animation: fc-rise 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
	animation-delay: var(--fc-delay, 0s);
}

/* ============================================
   ARCHIVIO /eventi/ E CARD EVENTO
   ============================================ */

.fc-events {
	width: 100%;
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px 60px;
}

.fc-events__header {
	margin: 32px 0 8px;
	padding: 40px 24px;
	text-align: center;
	background-color: var(--fc-ev-tint);
	border: 1px solid var(--fc-ev-tint-line);
	border-radius: 10px;
}

.fc-events__eyebrow {
	margin: 0 0 10px;
}

.fc-events__title {
	font-size: 2.2rem;
	line-height: 1.15;
	margin: 0 0 12px;
}

.fc-events__intro {
	max-width: 560px;
	margin: 0 auto;
	font-size: 1.1rem;
	line-height: 1.5;
	color: var(--fc-ev-text);
}

.fc-events__section {
	padding: 44px 0 8px;
}

.fc-events__section--past {
	margin-top: 40px;
	border-top: 1px solid var(--fc-ev-line);
}

.fc-events__section-title {
	font-size: 1.6rem;
	margin: 0 0 8px;
}

.fc-events__section-intro {
	color: var(--fc-ev-text);
	margin: 0 0 24px;
}

.fc-events__section-title + .fc-events__grid,
.fc-events__section-title + .fc-events__empty {
	margin-top: 22px;
}

.fc-events__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.fc-events__empty {
	padding: 26px;
	background-color: var(--fc-ev-tint-soft);
	border: 1px dashed #d9bfc0;
	border-radius: 8px;
}

.fc-events__empty p {
	margin: 0 0 8px;
	color: var(--fc-ev-text);
	line-height: 1.55;
}

.fc-events__empty p:last-child {
	margin-bottom: 0;
}

/* ---------- Card ---------- */

.fc-event-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #fff;
	border: 1px solid var(--fc-ev-line);
	border-top: 4px solid var(--fc-ev-brand);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(151, 26, 29, 0.08);
	transition: box-shadow 0.2s ease;
}

.fc-event-card:hover {
	box-shadow: 0 10px 26px rgba(151, 26, 29, 0.16);
}

/* Eventi passati: bordo tratteggiato oltre all'etichetta testuale. */
.fc-event-card--past {
	border-top: 4px dashed #8a8a8a;
	box-shadow: none;
}

/* Foto intera (16:9). */
.fc-event-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #f1e8e8;
}

.fc-event-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.fc-event-card__placeholder {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--fc-ev-brand);
}

.fc-event-card__day {
	font-size: 3.4rem;
	font-weight: 700;
	line-height: 1;
}

.fc-event-card__month {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fc-event-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 16px 18px 18px;
}

.fc-event-card__body > p,
.fc-event-card__body > h3 {
	margin: 0;
}

.fc-event-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.fc-event-card__type {
	color: var(--fc-ev-brand);
}

.fc-event-card__video {
	color: #333;
	text-transform: none;
	letter-spacing: 0;
	font-size: 0.8rem;
}

.fc-event-card__date {
	font-weight: 700;
	color: #222;
}

.fc-event-card__time {
	font-weight: 600;
}

.fc-event-card__title {
	font-size: 1.25rem;
	line-height: 1.25;
}

.fc-event-card__text {
	color: var(--fc-ev-text);
	line-height: 1.55;
}

/* Modalità (e costo, iscrizioni chiuse): pillola come nel resto del sito. */
.fc-event-card__info,
.fc-event-card__info--days span {
	padding: 5px 14px;
	border: 1px solid var(--fc-ev-brand);
	border-radius: 999px;
	color: var(--fc-ev-brand);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
}

.fc-event-card__info {
	display: inline-block;
	align-self: flex-start;
	margin: 4px 0 10px;
}

/* Modalità giorno per giorno: il contenitore è neutro, le pillole sono gli span. */
.fc-event-card__info--days {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.fc-event-card__speaker {
	font-size: 0.9rem;
	color: var(--fc-ev-text);
}

.fc-event-card__link {
	align-self: flex-start;
	margin-top: auto;
}

/* Tutta la card è cliccabile, con un solo link per tastiera e screen reader. */
.fc-event-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.fc-event-card:has(.fc-event-card__link:focus-visible) {
	outline: 3px solid var(--fc-ev-brand);
	outline-offset: 3px;
}

/* Riquadro data sopra il titolo (solo homepage). Il testo della data è già nella card. */
.fc-event-card__datechip {
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 54px;
	padding: 8px 12px;
	background-color: var(--fc-ev-tint);
	border: 1px solid var(--fc-ev-tint-line);
	border-radius: 8px;
	color: var(--fc-ev-brand);
	line-height: 1;
}

.fc-event-card__datechip .fc-event-card__day {
	font-size: 1.6rem;
}

.fc-event-card__datechip .fc-event-card__month {
	margin-top: 3px;
	font-size: 0.75rem;
}

/* ---------- Paginazione ---------- */

.fc-events__pagination {
	margin-top: 32px;
}

.fc-events__pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fc-events__pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--fc-ev-line);
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
	color: var(--fc-ev-brand);
}

.fc-events__pagination a.page-numbers:hover,
.fc-events__pagination a.page-numbers:focus {
	background-color: var(--fc-ev-tint);
	color: var(--fc-ev-brand-dark);
}

.fc-events__pagination a.page-numbers:focus-visible {
	outline: 3px solid var(--fc-ev-brand);
	outline-offset: 2px;
}

/* Pagina corrente: sfondo pieno + sottolineatura (non solo colore). */
.fc-events__pagination .page-numbers.current {
	background-color: var(--fc-ev-brand);
	border-color: var(--fc-ev-brand);
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ============================================
   ARCHIVIO /eventi/ - HEADER CON FOTO
   Si attiva solo con .fc-events__header--photo (aggiunta da
   archive-fc_evento.php quando l'immagine hero esiste).
   Senza immagine resta il riquadro rosato.
   Sopra i 1099px il testo sta in alto sulla foto, nella zona libera
   tra la pianta e l'uomo in piedi; sotto, la foto sta sotto il testo.
   ============================================ */

.fc-events__header.fc-events__header--photo {
	display: grid;
	gap: 24px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	text-align: left;
}

.fc-events__header--photo .fc-events__hero-text {
	text-align: left;
}

.fc-events__header--photo .fc-events__hero-text > * {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
}

.fc-events__header--photo .fc-media {
	aspect-ratio: 16 / 9;
	margin: 0;
	border-radius: 10px;
}

.fc-events__header--photo .fc-media img {
	object-position: 65% center;
}

/* ============================================
   HOMEPAGE - sezione "Prossimi eventi"
   ============================================ */

.fc-home__events .fc-events__grid {
	margin: 28px 0 32px;
	text-align: left;
}

/* ============================================
   TABLET / DESKTOP (tutti i punti di rottura, in ordine)
   ============================================ */

@media (min-width: 640px) {
	.fc-events__grid,
	.fc-events__grid--double {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	/* Un solo evento in programma: card larga, immagine e testo affiancati. */
	.fc-event-card--featured {
		flex-direction: row;
		align-items: stretch;
	}

	.fc-event-card--featured .fc-event-card__media {
		flex: 1 1 46%;
		aspect-ratio: auto;
		min-height: 320px;
	}

	.fc-event-card--featured .fc-event-card__body {
		flex: 1 1 54%;
		justify-content: center;
		gap: 14px;
		padding: 36px;
	}

	.fc-event-card--featured .fc-event-card__title {
		font-size: 1.8rem;
	}

	.fc-event-card--featured .fc-event-card__link {
		margin-top: 8px;
	}
}

@media (min-width: 600px) {
	.fc-event__fact {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 2px 12px;
	}

	.fc-event__info-list > div {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 2px 14px;
	}

	/* Il riquadro laterale resta a etichetta sopra, anche su schermi larghi. */
	.fc-event__aside .fc-event__info-list > div {
		flex-direction: column;
		gap: 2px;
	}
}

@media (min-width: 900px) {
	.fc-event__hero {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		gap: 48px;
		padding: 56px 0;
		align-items: center; /* immagine centrata in verticale rispetto al testo */
	}

	.fc-event__title {
		font-size: 2.6rem;
	}

	.fc-event__section {
		padding: 52px 0;
	}

	.fc-event__section-title {
		font-size: 1.75rem;
	}
}

@media (min-width: 960px) {
	.fc-event__layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 0 56px;
		align-items: start;
	}

	/* Riquadro fisso: resta visibile mentre si scorre (se il tema lo impedisce, scorre normalmente). */
	.fc-event__aside {
		position: sticky;
		top: var(--fc-ev-sticky-top);
		margin-top: 52px;
	}

	.fc-events__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.fc-events__title {
		font-size: 2.6rem;
	}
}

@media (min-width: 1100px) {
	.fc-events__header.fc-events__header--photo {
		gap: 0;
	}

	.fc-events__header--photo > * {
		grid-area: 1 / 1;
	}

	.fc-events__header--photo .fc-events__hero-text {
		position: relative;
		z-index: 2;
		align-self: start;
		max-width: 54%;
		padding: 32px 0 0 26%;
	}

	.fc-events__header--photo .fc-media {
		aspect-ratio: 21 / 9;
	}

	.fc-events__header--photo .fc-media img {
		object-position: center;
	}
}

/* Con 1 evento la griglia resta a una colonna: va DOPO i punti di rottura, per vincere sulle colonne multiple. */
.fc-events__grid--single {
	grid-template-columns: 1fr;
}

@media (prefers-reduced-motion: reduce) {
	.fc-event-card {
		transition: none;
	}
}
