/*!
 * Formazione riconosciuta — stili
 * Allineato con i token del Blog Magazine.
 * Layout: tabella 2 colonne desktop, card impilate mobile (<768px).
 */

:root {
	--teal-700: #0e9aa7;
	--teal-600: #0a7d88;
	--teal-50:  #e6f4f6;
	--pink-500: #e6007e;
	--pink-600: #c8006c;
	--ink-900:  #14242e;
	--ink-700:  #3a4a55;
	--ink-500:  #6c7984;
	--ink-200:  #c7cfd4;
	--line:     #e6e9ec;
	--bg-2:     #f6f8f9;
	--white:    #ffffff;

	--radius:    2px;
	--radius-lg: 6px;

	--shadow-sm: 0 1px 2px rgba(20, 36, 46, 0.04);
	--shadow-md: 0 4px 12px rgba(20, 36, 46, 0.08);
}

/* Layout pagina */
.certo-formazione-page {
	background: var(--white);
	padding: 48px 0 96px;
}

.certo-formazione-header {
	margin: 0 0 32px;
}

h1.certo-formazione-title {
	color: var(--ink-900);
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
	padding: 0;
}

/* Skip link */
.certo-skip-link {
	background: var(--ink-900);
	color: var(--white);
	padding: 8px 16px;
	text-decoration: none;
	border-radius: var(--radius);
	display: inline-block;
	margin-bottom: 16px;
}

.certo-skip-link:focus {
	outline: 2px solid var(--teal-700);
	outline-offset: 2px;
}

/* Wrapper tabella */
.certo-formazione-table-wrap {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

/* Tabella */
.certo-formazione-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.certo-formazione-table thead {
	background: var(--teal-50);
}

.certo-formazione-table thead th {
	color: var(--ink-900);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 16px 24px;
	text-align: left;
	border-bottom: 2px solid var(--teal-700);
}

.certo-formazione-table thead .certo-col-action {
	width: 28%;
	text-align: center;
}

.certo-formazione-table tbody tr {
	border-bottom: 1px solid var(--line);
	transition: background-color 160ms ease, box-shadow 160ms ease;
}

.certo-formazione-table tbody tr:last-child {
	border-bottom: 0;
}

.certo-formazione-table tbody tr:hover,
.certo-formazione-table tbody tr:focus-within {
	background: var(--bg-2);
	box-shadow: inset 4px 0 0 0 var(--teal-700);
}

/* Cella info */
.certo-formazione-cell-info {
	padding: 24px;
	vertical-align: top;
}

.certo-formazione-course-title {
	color: var(--ink-900);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 16px;
	padding: 0;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.certo-formazione-titlerow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	text-align: left;
}

.certo-formazione-meta-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
}

.certo-meta-piece {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}

.certo-meta-label {
	color: var(--ink-500);
	font-weight: 500;
}

.certo-meta-value {
	color: var(--ink-900);
	font-weight: 500;
}

.certo-meta-sep {
	display: inline-block;
	color: var(--ink-200);
	font-weight: 400;
	padding: 0 16px;
	user-select: none;
}

.certo-meta-row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 12px;
	align-items: baseline;
	font-size: 15px;
	line-height: 1.5;
}

.certo-meta-row dt {
	color: var(--ink-500);
	font-weight: 500;
	margin: 0;
}

.certo-meta-row dd {
	color: var(--ink-900);
	font-weight: 500;
	margin: 0;
}

.certo-meta-bonus dd {
	font-weight: 400;
}

.certo-bonus-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.certo-bonus-list li {
	color: var(--ink-700);
	font-size: 14px;
	padding-left: 16px;
	position: relative;
}

.certo-bonus-list li::before {
	content: "✓";
	color: var(--teal-700);
	font-weight: 700;
	position: absolute;
	left: 0;
}

/* Cella CTA */
.certo-formazione-cell-action {
	padding: 24px;
	vertical-align: middle;
	text-align: center;
	width: 28%;
}

.certo-formazione-cta {
	background: var(--pink-500);
	color: var(--white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	max-width: 220px;
	min-height: 48px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--radius-lg);
	border: 2px solid var(--pink-500);
	box-shadow: var(--shadow-sm);
	transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.certo-formazione-cta .certo-cta-icon {
	display: inline-flex;
	font-size: 13px;
}

.certo-formazione-cta:hover,
.certo-formazione-cta:focus-visible {
	background: var(--pink-600);
	border-color: var(--pink-600);
	box-shadow: var(--shadow-md);
	color: var(--white);
}

.certo-formazione-cta:focus-visible {
	outline: 3px solid var(--teal-700);
	outline-offset: 2px;
}

.certo-formazione-cta:active {
	transform: translateY(1px);
}

/* Stato vuoto */
.certo-formazione-empty {
	background: var(--bg-2);
	border: 1px dashed var(--line);
	border-radius: var(--radius-lg);
	padding: 48px 24px;
	text-align: center;
}

.certo-formazione-empty-message {
	color: var(--ink-900);
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px;
}

.certo-formazione-empty-hint {
	color: var(--ink-500);
	font-size: 15px;
	font-weight: 400;
	margin: 0;
}

/* Screen reader only */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Accordion (collapser + descrizione + chevron) */
.certo-formazione-collapser {
	display: block;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.certo-formazione-collapser:disabled {
	cursor: default;
}

.certo-formazione-collapser:focus {
	outline: 0;
}

.certo-formazione-collapser:focus-visible {
	outline: 3px solid var(--teal-700);
	outline-offset: 4px;
	border-radius: var(--radius);
}

.certo-formazione-row.is-open .certo-formazione-collapser:focus {
	outline: 0;
}

.certo-formazione-row.is-open .certo-formazione-collapser:focus-visible {
	outline: 0;
}

.certo-formazione-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--teal-50);
	color: var(--teal-700);
	font-size: 12px;
	transition: transform 200ms ease, background-color 200ms ease;
	flex-shrink: 0;
}

.certo-formazione-row.is-open .certo-formazione-chevron {
	transform: rotate(180deg);
	background: var(--teal-700);
	color: var(--white);
}

.certo-formazione-desc-wrap {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 240ms ease, opacity 200ms ease, margin 240ms ease;
	margin-top: 0;
}

.certo-formazione-desc-wrap.is-open {
	max-height: 1200px;
	opacity: 1;
	margin-top: 16px;
}

.certo-formazione-desc {
	color: var(--ink-700);
	font-size: 15px;
	line-height: 1.6;
	padding: 16px 20px;
	background: var(--bg-2);
	border-left: 3px solid var(--teal-700);
	border-radius: 0 var(--radius) var(--radius) 0;
}

.certo-formazione-desc p {
	margin: 0 0 12px;
}

.certo-formazione-desc p:last-child {
	margin: 0;
}

.certo-formazione-desc ul,
.certo-formazione-desc ol {
	margin: 0 0 12px;
	padding-left: 20px;
}

.certo-formazione-desc li {
	margin-bottom: 4px;
}

.certo-formazione-desc a {
	color: var(--teal-700);
	text-decoration: underline;
}

.certo-formazione-desc a:hover,
.certo-formazione-desc a:focus-visible {
	color: var(--teal-600);
}

.certo-formazione-desc strong {
	color: var(--ink-900);
	font-weight: 700;
}

.certo-formazione-bonus {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.certo-bonus-label {
	color: var(--ink-500);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.certo-formazione-bonus .certo-bonus-list {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
}

.certo-formazione-bonus .certo-bonus-list li {
	background: var(--teal-50);
	color: var(--teal-600);
	font-size: 13px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: var(--radius-lg);
	margin: 0;
	padding-left: 10px;
	position: static;
}

.certo-formazione-bonus .certo-bonus-list li::before {
	content: none;
}

/* Mobile: card impilate */
@media (max-width: 768px) {
	.certo-formazione-page {
		padding: 32px 0 64px;
	}

	.certo-formazione-table-wrap {
		border: 0;
		box-shadow: none;
		background: transparent;
	}

	.certo-formazione-table,
	.certo-formazione-table thead,
	.certo-formazione-table tbody,
	.certo-formazione-table tr,
	.certo-formazione-table th,
	.certo-formazione-table td {
		display: block;
		width: 100% !important;
	}

	.certo-formazione-table thead {
		position: absolute;
		left: -9999px;
	}

	.certo-formazione-table tbody tr {
		background: var(--white);
		border: 1px solid var(--line);
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow-sm);
		margin-bottom: 16px;
		padding: 20px;
		display: block;
	}

	.certo-formazione-table tbody tr:hover,
	.certo-formazione-table tbody tr:focus-within {

/* Larghezza 1280px su desktop — sovrascrive .container.container-md */
@media (min-width: 992px) {
	.certo-formazione-page .container.container-md {
		max-width: 1280px;
	}
}
		box-shadow: var(--shadow-md);
	}

	.certo-formazione-cell-info {
		padding: 0 0 16px;
		border-bottom: 1px solid var(--line);
	}

	.certo-formazione-cell-action {
		padding: 16px 0 0;
		width: 100%;
	}

	.certo-meta-row {
		grid-template-columns: 1fr;
		gap: 2px;
		padding: 6px 0;
	}

	.certo-meta-row dt {
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	.certo-meta-row dd {
		font-size: 15px;
	}

	.certo-formazione-cta {
		max-width: none;
	}
}

/* Print */
@media print {
	.certo-formazione-cell-action,
	.certo-skip-link {
		display: none;
	}
}
