/* DM FC Corsi 1.3.0 — scheda corso.
   Stessi token del child theme FC: bordeaux #971a1d / #7a1417, fondi #fdf8f8 e #f6e4e4,
   bordi #e2e2e2, colonna 960px, titoli con il font del tema (Playfair Display).
   Il plugin non dipende dal child theme: i pulsanti hanno gli stessi valori di .fc-button. */

.dmfc,
.dmfc-single {
	--dmfc-brand: #971a1d;
	--dmfc-brand-dark: #7a1417;
	--dmfc-brand-soft: #f6e4e4;
	--dmfc-bg: #fdf8f8;
	--dmfc-line: #e2e2e2;
	--dmfc-ink: #333;
	--dmfc-muted: #666;
	color: var(--dmfc-ink);
	line-height: 1.65;
}
.dmfc *, .dmfc *::before, .dmfc *::after,
.dmfc-single *, .dmfc-single *::before, .dmfc-single *::after { box-sizing: border-box; }

/* ---------- Pagina corso (templates/single-corso.php) ---------- */
.dmfc-single {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px 60px;
}

.dmfc-hero {
	text-align: center;
	padding: 60px 0 44px;
}
.dmfc-eyebrow {
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--dmfc-brand);
	margin: 0 0 14px;
}
.dmfc-title {
	font-size: 2.5rem;
	line-height: 1.2;
	margin: 0 0 16px;
}
.dmfc-lead {
	font-size: 1.15rem;
	color: #444;
	max-width: 680px;
	margin: 0 auto 20px;
	line-height: 1.6;
}
.dmfc-meta {
	font-size: .95rem;
	color: var(--dmfc-muted);
	margin: 0 0 28px;
}
.dmfc-hero .dmfc-actions { justify-content: center; margin: 0; }

.dmfc-notice {
	max-width: 680px;
	margin: 0 auto 28px;
	padding: 14px 20px;
	background: var(--dmfc-bg);
	border: 1px solid var(--dmfc-line);
	border-left: 4px solid var(--dmfc-brand);
	border-radius: 8px;
	text-align: left;
}

/* Sezioni */
.dmfc-section {
	padding: 40px 0;
	border-top: 1px solid var(--dmfc-line);
}
.dmfc-section > * {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
.dmfc-section-title,
.dmfc-block h2 {
	font-size: 1.6rem;
	margin: 0 0 20px;
}
.dmfc-section > .dmfc-section-title { margin: 0 auto 20px; }
.dmfc-section p { margin-top: 0; }
.dmfc-section p + p { margin-top: 14px; }

/* Elenchi: spunta bordeaux per gli obiettivi, punto bordeaux per il programma */
.dmfc-richtext ul,
.dmfc-richtext ol { margin: 0 0 14px; padding-left: 22px; }
.dmfc-richtext li { margin-bottom: 8px; line-height: 1.55; }
.dmfc-richtext li::marker { color: var(--dmfc-brand); }

.dmfc-section--goals .dmfc-richtext ul {
	list-style: none;
	padding-left: 0;
}
.dmfc-section--goals .dmfc-richtext ul > li {
	position: relative;
	padding-left: 36px;
	margin-bottom: 14px;
}
.dmfc-section--goals .dmfc-richtext ul > li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--dmfc-brand-soft);
	color: var(--dmfc-brand);
	font-size: .8rem;
	font-weight: 700;
}
.dmfc-richtext ul ul { margin-top: 8px; }

/* Link nel testo */
.dmfc a:not(.dmfc-btn),
.dmfc-single a:not(.dmfc-btn) { color: var(--dmfc-brand); }
.dmfc a:not(.dmfc-btn):hover, .dmfc a:not(.dmfc-btn):focus,
.dmfc-single a:not(.dmfc-btn):hover, .dmfc-single a:not(.dmfc-btn):focus { color: var(--dmfc-brand-dark); }

/* Chiusura con invito al contatto */
.dmfc-cta {
	text-align: center;
	background: var(--dmfc-bg);
	border-radius: 8px;
	padding: 48px 24px;
	border-top: none;
	margin-top: 24px;
}
.dmfc-section.dmfc-cta > .dmfc-section-title { text-align: center; }
.dmfc-section.dmfc-cta > p { max-width: 560px; color: #444; margin: 0 auto 24px; }
.dmfc-section.dmfc-cta > .dmfc-actions { justify-content: center; margin: 0 auto; }

/* ---------- Elementi condivisi (anche scheda in shortcode) ---------- */

/* Badge (usati dallo shortcode e dagli archivi) */
.dmfc-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.dmfc-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 700;
	line-height: 1.4;
	background: var(--dmfc-brand-soft);
	color: var(--dmfc-brand);
}
.dmfc-badge--area { background: var(--dmfc-brand-soft); color: var(--dmfc-brand); }
.dmfc-badge--target { background: transparent; border: 1px solid #eed8d9; color: var(--dmfc-brand); }
.dmfc-badge--su_richiesta { background: var(--dmfc-brand); color: #fff; }
.dmfc-badge--archivio { background: #8a8f98; color: #fff; }

/* Dati chiave (shortcode) */
.dmfc-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2.5rem;
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	background: var(--dmfc-bg);
	border: 1px solid var(--dmfc-line);
	border-radius: 8px;
}
.dmfc-facts dt {
	margin: 0;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--dmfc-brand);
}
.dmfc-facts dd { margin: .125rem 0 0; font-weight: 600; }

.dmfc-block { margin: 0 0 2rem; }
.dmfc-block h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--dmfc-line); }
.dmfc-block ul, .dmfc-block ol { padding-left: 1.25rem; }
.dmfc-block li { margin-bottom: .375rem; }
.dmfc-block li::marker { color: var(--dmfc-brand); }

/* Pulsanti: stessi valori di .fc-button del child theme */
.dmfc-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 2rem 0; }
.dmfc .dmfc-btn,
.dmfc-single .dmfc-btn {
	display: inline-block;
	padding: 12px 26px;
	border: 2px solid var(--dmfc-brand);
	border-radius: 4px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.dmfc .dmfc-btn--primary, .dmfc .dmfc-btn--primary:visited,
.dmfc-single .dmfc-btn--primary, .dmfc-single .dmfc-btn--primary:visited {
	background: var(--dmfc-brand);
	color: #fff;
}
.dmfc .dmfc-btn--primary:hover, .dmfc .dmfc-btn--primary:focus,
.dmfc-single .dmfc-btn--primary:hover, .dmfc-single .dmfc-btn--primary:focus {
	background: var(--dmfc-brand-dark);
	border-color: var(--dmfc-brand-dark);
	color: #fff;
}
.dmfc .dmfc-btn--ghost, .dmfc .dmfc-btn--ghost:visited,
.dmfc-single .dmfc-btn--ghost, .dmfc-single .dmfc-btn--ghost:visited {
	background: transparent;
	color: var(--dmfc-brand);
}
.dmfc .dmfc-btn--ghost:hover, .dmfc .dmfc-btn--ghost:focus,
.dmfc-single .dmfc-btn--ghost:hover, .dmfc-single .dmfc-btn--ghost:focus {
	background: var(--dmfc-brand);
	color: #fff;
}
.dmfc .dmfc-btn:focus-visible,
.dmfc-single .dmfc-btn:focus-visible { outline: 3px solid var(--dmfc-brand-dark); outline-offset: 2px; }

/* Corsi correlati */
.dmfc-related { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--dmfc-line); }
.dmfc-single .dmfc-related { margin-top: 0; }
.dmfc-related h2 { font-size: 1.25rem; margin: 0 0 16px; }
.dmfc-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dmfc-related li { margin: 0; }
.dmfc-related a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 16px 20px;
	background: var(--dmfc-bg);
	border: 1px solid var(--dmfc-line);
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	transition: box-shadow .2s ease, transform .2s ease;
}
.dmfc-related a:hover, .dmfc-related a:focus {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

/* Etichette delle aree */
.dmfc-areas { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; }
.dmfc-areas > li { margin: 0; }
.dmfc .dmfc-chip, .dmfc .dmfc-chip:visited {
	display: inline-block;
	padding: 8px 18px;
	background: #fff;
	border: 1px solid #eed8d9;
	border-radius: 20px;
	color: var(--dmfc-brand);
	text-decoration: none;
	font-size: .92rem;
	font-weight: 600;
}
.dmfc a.dmfc-chip:hover, .dmfc a.dmfc-chip:focus, .dmfc a.dmfc-chip[aria-current],
.dmfc a.dmfc-chip:visited:hover, .dmfc a.dmfc-chip:visited[aria-current] { background: var(--dmfc-brand); border-color: var(--dmfc-brand); color: #fff; }
.dmfc-archive .dmfc-hero { padding-bottom: 28px; }
.dmfc-archive__areas { padding: 0 0 36px; }
.dmfc-archive .dmfc-cta { margin-top: 0; }

/* Elenco a schede */
.dmfc-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.dmfc-list__items > li { margin: 0; }
.dmfc .dmfc-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: 100%;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--dmfc-line);
	border-radius: 8px;
	color: var(--dmfc-ink);
	text-decoration: none;
	transition: box-shadow .2s ease, transform .2s ease;
}
.dmfc .dmfc-card:hover, .dmfc .dmfc-card:focus {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
	color: var(--dmfc-ink);
}
.dmfc-card__area {
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--dmfc-brand);
}
.dmfc .dmfc-card .dmfc-card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; color: var(--dmfc-ink); }
.dmfc .dmfc-card:hover .dmfc-card__title, .dmfc .dmfc-card:focus .dmfc-card__title { color: var(--dmfc-brand); }
.dmfc-card__text { font-size: .95rem; line-height: 1.5; color: #444; flex-grow: 1; }
.dmfc-card__meta { font-size: .85rem; color: var(--dmfc-muted); }

@media (max-width: 900px) { .dmfc-list__items { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
	.dmfc-list__items { grid-template-columns: 1fr; }
	.dmfc-title { font-size: 1.9rem; }
	.dmfc-hero { padding: 40px 0 28px; }
	.dmfc-actions .dmfc-btn { width: 100%; }
	.dmfc-facts { flex-direction: column; gap: .75rem; }
	.dmfc-cta { padding: 36px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.dmfc-related a, .dmfc .dmfc-card, .dmfc .dmfc-btn, .dmfc-single .dmfc-btn { transition: none; }
}

/* Percorso in fondo alla pagina (1.3.1): stesso aspetto di .fc-breadcrumb--bottom del child theme.
   Usato solo se il tema non fornisce fc_breadcrumb(). */
.dmfc-breadcrumb { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--dmfc-line); font-size: .88rem; color: var(--dmfc-muted); }
.dmfc-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.dmfc-breadcrumb li { margin: 0; }
.dmfc-breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #bbb; }
.dmfc-breadcrumb a { color: var(--dmfc-muted); text-decoration: none; }
.dmfc-breadcrumb a:hover { color: var(--dmfc-brand); text-decoration: underline; text-underline-offset: 3px; }
.dmfc-breadcrumb [aria-current="page"] { color: #222; font-weight: 600; }

/* Riga dati a etichette (1.3.1) */
/* Scheda dati sotto il titolo (stessa grafica dei riquadri data/ora/luogo degli eventi):
   riquadro con filo bordeaux a sinistra, etichetta in maiuscoletto + valore. */
.dmfc-facts--hero {
	display: block;
	max-width: 560px;
	margin: 24px auto 28px;
	padding: 18px 24px;
	text-align: left;
	background: var(--dmfc-bg);
	border: 1px solid var(--dmfc-brand-soft);
	border-left: 4px solid var(--dmfc-brand);
	border-radius: 8px;
}
.dmfc-facts--hero .dmfc-facts__row { display: grid; grid-template-columns: 140px 1fr; gap: 4px 16px; align-items: baseline; padding: 7px 0; }
.dmfc-facts--hero .dmfc-facts__row + .dmfc-facts__row { border-top: 1px solid var(--dmfc-brand-soft); }
.dmfc-facts--hero dt { margin: 0; font-size: .78rem; }
.dmfc-facts--hero dd { margin: 0; font-size: 1rem; font-weight: 600; color: var(--dmfc-ink); }
.dmfc-facts--hero .dmfc-facts__row--code dd { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.dmfc a.dmfc-facts__link, .dmfc a.dmfc-facts__link:visited { color: var(--dmfc-brand); text-decoration: none; }
.dmfc a.dmfc-facts__link:hover, .dmfc a.dmfc-facts__link:focus-visible { color: var(--dmfc-brand-dark); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
	.dmfc-facts--hero { padding: 14px 18px; }
	.dmfc-facts--hero .dmfc-facts__row { grid-template-columns: 1fr; gap: 0; }
}
