/**
 * Spoortix Theme — stili blocchi custom + template CPT (upgrade premium).
 *
 * @package Spoortix_Theme
 * @since 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════════
 * BADGE
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-badge,
.spoortix-corsi-embed__badge,
.spoortix-eventi-prossimi__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.35em 0.9em;
	border-radius: 9999px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1.4;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--heading);
}

.sp-badge--sport,
.spoortix-corsi-embed__badge--sport {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	border: 1px solid rgb(0 102 204 / 0.15);
}

.sp-badge--open,
.spoortix-corsi-embed__badge--iscrizioni {
	background: #dcfce7;
	color: #166534;
	border: 1px solid rgb(22 163 74 / 0.2);
}

.sp-badge--open::before,
.spoortix-corsi-embed__badge--iscrizioni::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #16a34a;
	animation: sp-pulse-dot 2s infinite;
}

.sp-badge--closed {
	background: #f3f4f6;
	color: #6b7280;
}

@keyframes sp-pulse-dot {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.3); }
}

/* ═══════════════════════════════════════════════════════════════════════
 * TABELLA RESPONSIVE
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1.5rem;
	border-radius: 14px;
	border: 1px solid var(--wp--preset--color--subtle);
}

.sp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.sp-table th,
.sp-table td {
	padding: 1rem 1.25rem;
	text-align: left;
}

.sp-table th {
	background: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--neutral-600);
	border-bottom: 1px solid var(--wp--preset--color--subtle);
}

.sp-table tbody tr {
	border-bottom: 1px solid var(--wp--preset--color--subtle);
	transition: background 0.2s;
}

.sp-table tbody tr:last-child { border-bottom: none; }

.sp-table tbody tr:hover {
	background: var(--wp--preset--color--muted);
}

/* ═══════════════════════════════════════════════════════════════════════
 * NOTICE
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-notice,
.spoortix-corsi-embed__notice,
.spoortix-eventi-prossimi__notice,
.spoortix-news-latest__notice {
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--accent-soft);
	border-left: 4px solid var(--wp--preset--color--accent);
	color: #9a3412;
	border-radius: 8px;
	margin: 2rem 0;
	font-size: 0.9375rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/orari-struttura
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-orari-struttura {
	margin-block: clamp(2rem, 6vw, 4rem);
}

.sp-orari {
	max-width: 760px;
	margin-inline: auto;
}

.sp-orari__tabella {
	width: 100%;
	border-collapse: collapse;
	background: var(--wp--preset--color--base);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
	border: 1px solid var(--wp--preset--color--subtle);
}

.sp-orari__tabella th,
.sp-orari__tabella td {
	padding: 1.1rem 1.5rem;
	text-align: left;
	border-bottom: 1px solid var(--wp--preset--color--subtle);
}

.sp-orari__tabella tr:last-child th,
.sp-orari__tabella tr:last-child td {
	border-bottom: none;
}

.sp-orari__tabella th {
	background: var(--wp--preset--gradient--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	border-bottom: none;
}

.sp-orari__giorno--oggi {
	background: var(--wp--preset--color--primary-light);
	font-weight: 600;
}

.sp-orari__giorno--oggi td:first-child::before {
	content: 'OGGI';
	display: inline-block;
	margin-right: 0.75rem;
	padding: 0.15em 0.6em;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border-radius: 9999px;
	vertical-align: middle;
}

.sp-orari__chiuso {
	color: var(--wp--preset--color--neutral-400);
	font-style: italic;
}

.sp-orari__nota {
	margin-top: 1.25rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--neutral-600);
	text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/numeri-stats
 * Il render PHP usa .spoortix-numeri-stats__* (non .sp-stats__*)
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-numeri-stats,
.spoortix-numeri-stats {
	margin-block: clamp(3rem, 8vw, 6rem);
	text-align: center;
}

/* Flex wrap centrato: funziona con 1, 2, 3, 4, 6+ items e resta sempre al centro */
.spoortix-numeri-stats__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 2rem;
	max-width: 1200px;
	margin-inline: auto;
}

.spoortix-numeri-stats__item {
	flex: 0 1 220px;
	min-width: 180px;
}

@media (max-width: 500px) {
	.spoortix-numeri-stats__item {
		flex: 1 1 100%;
	}
}

.spoortix-numeri-stats__item {
	padding: 1.5rem 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	position: relative;
}

/* Divider verticali rimossi: con flex-wrap creavano artefatti visivi */

.spoortix-numeri-stats__value {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(3.5rem, 9vw, 6rem);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.04em;
	background: linear-gradient(135deg, #4a9eff 0%, #00c6ff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	font-variant-numeric: tabular-nums;
}

.spoortix-numeri-stats__label {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 600;
	color: rgb(255 255 255 / 0.75);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	line-height: 1.3;
}

/* Label su sfondo chiaro */
.has-base-background-color .spoortix-numeri-stats__label,
.has-muted-background-color .spoortix-numeri-stats__label,
body:not(.dark) .spoortix-numeri-stats:not([data-dark]) .spoortix-numeri-stats__label {
	color: var(--wp--preset--color--neutral-600);
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/sponsor-logos
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-sponsor-logos {
	margin-block: clamp(2rem, 6vw, 4rem);
}

.sp-sponsor {
	display: grid;
	gap: 3rem;
	align-items: center;
	justify-items: center;
	max-width: 1200px;
	margin-inline: auto;
	padding: 2rem 0;
}

.sp-sponsor[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.sp-sponsor[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
.sp-sponsor[data-cols="5"] { grid-template-columns: repeat(5, 1fr); }
.sp-sponsor[data-cols="6"] { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 768px) {
	.sp-sponsor[data-cols] {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}
}

.sp-sponsor__item {
	max-width: 160px;
	opacity: 0.55;
	transition: opacity 0.3s, filter 0.3s, transform 0.3s;
}

.sp-sponsor__item img {
	width: 100%;
	height: auto;
	object-fit: contain;
}

.sp-sponsor--grayscale .sp-sponsor__item img {
	filter: grayscale(100%);
	transition: filter 0.4s;
}

.sp-sponsor__item:hover {
	opacity: 1;
	transform: translateY(-4px);
}

.sp-sponsor--grayscale .sp-sponsor__item:hover img {
	filter: grayscale(0%);
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/downloads
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-downloads {
	margin-block: clamp(2rem, 5vw, 3rem);
}

.sp-downloads {
	max-width: 760px;
	margin-inline: auto;
}

.sp-downloads-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sp-downloads-list__item a {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 1.25rem 1.5rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--subtle);
	border-radius: 14px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sp-downloads-list__item a::before {
	content: '';
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	background: var(--wp--preset--color--primary-light);
	border-radius: 10px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230066cc' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z' /%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M13 3v6h6' /%3E%3C/svg%3E");
	background-size: 24px;
	background-repeat: no-repeat;
	background-position: center;
}

.sp-downloads-list__item a::after {
	content: '↓';
	margin-left: auto;
	font-size: 1.25rem;
	color: var(--wp--preset--color--primary);
	transition: transform 0.3s;
}

.sp-downloads-list__item a:hover {
	background: var(--wp--preset--color--muted);
	border-color: var(--wp--preset--color--primary);
	transform: translateX(6px);
}

.sp-downloads-list__item a:hover::after {
	transform: translateY(2px);
}

.sp-downloads-list__size {
	margin-left: auto;
	margin-right: 0.75rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--neutral-400);
	font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/storia-timeline
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-storia-timeline {
	margin-block: clamp(3rem, 8vw, 6rem);
}

.sp-timeline {
	max-width: 760px;
	margin-inline: auto;
	position: relative;
	padding-left: 3rem;
}

.sp-timeline::before {
	content: '';
	position: absolute;
	left: 0.625rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(
		to bottom,
		var(--wp--preset--color--primary) 0%,
		var(--wp--preset--color--primary-light) 100%
	);
}

.sp-timeline__item {
	position: relative;
	padding-bottom: 3rem;
}

.sp-timeline__item:last-child { padding-bottom: 0; }

.sp-timeline__item::before {
	content: '';
	position: absolute;
	left: -2.85rem;
	top: 0.25rem;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wp--preset--color--base);
	border: 4px solid var(--wp--preset--color--primary);
	z-index: 1;
	box-shadow: 0 0 0 6px var(--wp--preset--color--base),
	            0 4px 14px rgb(0 102 204 / 0.25);
}

.sp-timeline__anno {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 800;
	color: var(--wp--preset--color--primary);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
	padding: 0.25em 0.9em;
	background: var(--wp--preset--color--primary-light);
	border-radius: 9999px;
}

.sp-timeline__titolo {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	margin: 0 0 0.75rem;
	letter-spacing: -0.015em;
}

.sp-timeline__descrizione {
	color: var(--wp--preset--color--neutral-600);
	font-size: 1rem;
	line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/contact-info
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-contact-info {
	margin-block: clamp(2rem, 5vw, 3rem);
}

.sp-contact-info {
	display: grid;
	gap: 2.5rem;
	padding: 3rem;
	background: var(--wp--preset--color--muted);
	border-radius: 24px;
	position: relative;
	overflow: hidden;
}

/* Background decoration */
.sp-contact-info::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -10%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, var(--wp--preset--color--primary) 0%, transparent 70%);
	opacity: 0.08;
	pointer-events: none;
}

.sp-contact-info--3-colonne {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	text-align: center;
}

.sp-contact-info--2-colonne {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.sp-contact-info--vertical {
	grid-template-columns: 1fr;
	max-width: 520px;
	margin-inline: auto;
}

.sp-contact-info.sp-dark {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
}

.sp-contact-info.sp-dark a {
	color: var(--wp--preset--color--base);
}

.sp-contact-info__item {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	position: relative;
}

.sp-contact-info--3-colonne .sp-contact-info__item {
	align-items: center;
}

.sp-contact-info__item::before {
	content: '';
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.25rem;
}

.sp-contact-info__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--wp--preset--color--primary);
}

.sp-contact-info.sp-dark .sp-contact-info__label {
	color: var(--wp--preset--color--accent);
}

.sp-contact-info__value {
	font-size: 1.0625rem;
	line-height: 1.5;
	font-weight: 500;
}

.sp-contact-info__value a {
	text-decoration: none;
	transition: opacity 0.2s;
}

.sp-contact-info__value a:hover {
	opacity: 0.7;
}

.sp-contact-info__social {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	gap: 1.25rem;
	padding-top: 2rem;
	border-top: 1px solid var(--wp--preset--color--subtle);
	position: relative;
}

.sp-contact-info.sp-dark .sp-contact-info__social {
	border-color: rgb(255 255 255 / 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════
 * CARD SHARED (corsi/eventi/news)
 * ═══════════════════════════════════════════════════════════════════════ */

.spoortix-corsi-embed__card,
.spoortix-eventi-prossimi__card,
.spoortix-news-latest__card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base);
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
	            box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 0.3s;
	position: relative;
}

.spoortix-corsi-embed__card::before,
.spoortix-eventi-prossimi__card::before,
.spoortix-news-latest__card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--wp--preset--gradient--primary);
	opacity: 0;
	transition: opacity 0.3s;
	pointer-events: none;
	mix-blend-mode: multiply;
	border-radius: inherit;
	z-index: 0;
}

.spoortix-corsi-embed__card:hover,
.spoortix-eventi-prossimi__card:hover,
.spoortix-news-latest__card:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 24px 50px -20px rgba(0, 40, 90, 0.22),
	            0 8px 20px -8px rgba(0, 40, 90, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/corsi-embed
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-corsi-embed,
.spoortix-corsi-embed {
	margin-block: clamp(2rem, 6vw, 4rem);
}

.spoortix-corsi-embed__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.75rem;
}

.spoortix-corsi-embed--list .spoortix-corsi-embed__grid {
	grid-template-columns: 1fr;
	max-width: 760px;
	margin-inline: auto;
}

.spoortix-corsi-embed__thumbnail {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--wp--preset--color--muted);
}

.spoortix-corsi-embed__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spoortix-corsi-embed__card:hover .spoortix-corsi-embed__thumbnail img {
	transform: scale(1.08);
}

.spoortix-corsi-embed__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.75rem;
	position: relative;
	z-index: 1;
}

.spoortix-corsi-embed__badges {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 0.25rem;
}

.spoortix-corsi-embed__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0;
	letter-spacing: -0.015em;
}

.spoortix-corsi-embed__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: color 0.2s;
}

.spoortix-corsi-embed__title a:hover {
	color: var(--wp--preset--color--primary);
}

.spoortix-corsi-embed__link {
	margin-top: auto;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	transition: gap 0.2s;
}

.spoortix-corsi-embed__link:hover {
	gap: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/eventi-prossimi
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-eventi-prossimi,
.spoortix-eventi-prossimi {
	margin-block: clamp(2rem, 6vw, 4rem);
}

.spoortix-eventi-prossimi__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.75rem;
}

.spoortix-eventi-prossimi__thumbnail {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--wp--preset--color--muted);
}

.spoortix-eventi-prossimi__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spoortix-eventi-prossimi__card:hover .spoortix-eventi-prossimi__thumbnail img {
	transform: scale(1.08);
}

.spoortix-eventi-prossimi__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.75rem;
	position: relative;
	z-index: 1;
}

.spoortix-eventi-prossimi__date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.spoortix-eventi-prossimi__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	margin: 0;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.spoortix-eventi-prossimi__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.spoortix-eventi-prossimi__title a:hover {
	color: var(--wp--preset--color--primary);
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/news-latest
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-news-latest,
.spoortix-news-latest {
	margin-block: clamp(2rem, 6vw, 4rem);
}

.spoortix-news-latest__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.75rem;
}

.spoortix-news-latest__thumbnail {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--wp--preset--color--muted);
}

.spoortix-news-latest__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spoortix-news-latest__card:hover .spoortix-news-latest__thumbnail img {
	transform: scale(1.08);
}

.spoortix-news-latest__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.75rem;
	position: relative;
	z-index: 1;
}

.spoortix-news-latest__date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	color: var(--wp--preset--color--primary);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.spoortix-news-latest__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	margin: 0;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.spoortix-news-latest__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.spoortix-news-latest__title a:hover {
	color: var(--wp--preset--color--primary);
}

.spoortix-news-latest__excerpt {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--neutral-600);
	line-height: 1.6;
	margin: 0;
	flex: 1;
}

.spoortix-news-latest__link {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	transition: gap 0.2s;
}

.spoortix-news-latest__card:hover .spoortix-news-latest__link {
	gap: 0.85rem;
}

/* Card cliccabile come bottone */
.spoortix-news-latest__card[role="button"] {
	cursor: pointer;
	user-select: none;
}

.spoortix-news-latest__card[role="button"]:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════
 * BLOCCO: spoortix/gallerie-eventi — grid di card gallerie
 * ═══════════════════════════════════════════════════════════════════════ */

.wp-block-spoortix-gallerie-eventi,
.spoortix-gallerie-eventi {
	margin-block: clamp(2rem, 6vw, 4rem);
}

/* Flex wrap centered: card sempre centrate se meno items delle colonne */
.spoortix-gallerie-eventi__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
}

/* Larghezza card in base al numero di colonne richieste */
.spoortix-gallerie-eventi--cols-1 .spoortix-gallerie-eventi__card { flex: 0 1 min(100%, 520px); }
.spoortix-gallerie-eventi--cols-2 .spoortix-gallerie-eventi__card { flex: 0 1 calc((100% - 1.5rem) / 2); max-width: 480px; }
.spoortix-gallerie-eventi--cols-3 .spoortix-gallerie-eventi__card { flex: 0 1 calc((100% - 3rem) / 3); max-width: 420px; }
.spoortix-gallerie-eventi--cols-4 .spoortix-gallerie-eventi__card { flex: 0 1 calc((100% - 4.5rem) / 4); max-width: 320px; }
.spoortix-gallerie-eventi--cols-5 .spoortix-gallerie-eventi__card { flex: 0 1 calc((100% - 6rem) / 5); max-width: 280px; }

/* Minimi per leggibilita (evita card troppo piccole) */
.spoortix-gallerie-eventi__card {
	min-width: 260px;
}

@media (max-width: 900px) {
	.spoortix-gallerie-eventi__card {
		flex: 0 1 calc((100% - 1.5rem) / 2) !important;
		max-width: none !important;
	}
}

@media (max-width: 500px) {
	.spoortix-gallerie-eventi__card {
		flex: 0 1 100% !important;
	}
}

.spoortix-gallerie-eventi__card {
	display: block;
	background: var(--wp--preset--color--base);
	border-radius: 18px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--wp--preset--color--subtle);
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}

.spoortix-gallerie-eventi__card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.12);
}

.spoortix-gallerie-eventi__thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	background-color: var(--wp--preset--color--muted);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.spoortix-gallerie-eventi__thumb-fallback {
	font-size: 4rem;
	opacity: 0.4;
}

.spoortix-gallerie-eventi__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, transparent 50%, rgb(0 0 0 / 0.55) 100%);
	transition: background 0.3s;
}

.spoortix-gallerie-eventi__card:hover .spoortix-gallerie-eventi__overlay {
	background: linear-gradient(to bottom, rgb(0 102 204 / 0.2) 0%, rgb(0 0 0 / 0.7) 100%);
}

.spoortix-gallerie-eventi__count {
	position: absolute;
	bottom: 1rem;
	right: 1rem;
	background: rgb(255 255 255 / 0.9);
	color: var(--wp--preset--color--primary);
	padding: 0.35rem 0.85rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-family: var(--wp--preset--font-family--heading);
	backdrop-filter: blur(10px);
}

.spoortix-gallerie-eventi__body {
	padding: 1.25rem 1.5rem 1.5rem;
}

.spoortix-gallerie-eventi__date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
	display: block;
}

.spoortix-gallerie-eventi__title {
	font-size: 1.25rem;
	margin: 0 0 0.75rem;
	line-height: 1.3;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--contrast);
}

.spoortix-gallerie-eventi__cta {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	font-size: 0.9375rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	transition: gap 0.2s;
}

.spoortix-gallerie-eventi__card:hover .spoortix-gallerie-eventi__cta {
	gap: 0.8rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CPT: single-sp-galleria
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-galleria-single {
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

.sp-galleria-single__hero {
	position: relative;
	min-height: 55vh;
	display: flex;
	align-items: center;
	padding-block: clamp(3rem, 8vw, 6rem);
	background-color: var(--wp--preset--color--secondary);
	background-size: cover;
	background-position: center;
	color: var(--wp--preset--color--base);
	margin-bottom: clamp(2rem, 6vw, 4rem);
	overflow: hidden;
}

.sp-galleria-single__hero-overlay {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--gradient--hero);
}

.sp-galleria-single__hero-content {
	position: relative;
	z-index: 1;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.sp-galleria-single__date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	padding: 0.35em 1em;
	background: rgb(255 255 255 / 0.15);
	border-radius: 9999px;
	backdrop-filter: blur(10px);
}

.sp-galleria-single__title {
	color: var(--wp--preset--color--base);
	margin: 0;
	font-size: clamp(2.5rem, 7vw, 5rem);
	line-height: 0.95;
	letter-spacing: -0.03em;
	text-shadow: 0 4px 20px rgb(0 0 0 / 0.3);
}

.sp-galleria-single__excerpt {
	max-width: 640px;
	font-size: 1.125rem;
	line-height: 1.5;
	opacity: 0.9;
}

.sp-galleria-single__back {
	margin-top: 1rem;
	color: var(--wp--preset--color--base);
	text-decoration: none;
	font-weight: 600;
	opacity: 0.85;
	transition: opacity 0.2s;
}

.sp-galleria-single__back:hover {
	opacity: 1;
	color: var(--wp--preset--color--base);
}

.sp-galleria-single__body {
	max-width: 1280px;
	margin-inline: auto;
}

.sp-galleria-single__body .wp-block-gallery img {
	cursor: zoom-in;
	transition: transform 0.3s;
	border-radius: 8px;
}

.sp-galleria-single__body .wp-block-gallery img:hover {
	transform: scale(1.03);
}

/* ═══════════════════════════════════════════════════════════════════════
 * LIGHTBOX (Bootstrap modal fullscreen)
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-lightbox .modal-content {
	background: rgb(0 0 0 / 0.95);
	border: none;
	border-radius: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.sp-lightbox__stage {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	max-width: 90vw;
	max-height: 90vh;
}

.sp-lightbox__img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 30px 60px rgb(0 0 0 / 0.5);
	animation: sp-lightbox-img-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sp-lightbox-img-in {
	from { opacity: 0; transform: scale(0.9); }
	to   { opacity: 1; transform: scale(1); }
}

.sp-lightbox__caption {
	color: rgb(255 255 255 / 0.85);
	font-size: 0.95rem;
	text-align: center;
	max-width: 600px;
}

.sp-lightbox__close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgb(255 255 255 / 0.2);
	opacity: 1;
	z-index: 10;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	/* SVG X inline (bianco) — non dipende da Bootstrap btn-close */
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6L6 18M6 6l12 12'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
}

.sp-lightbox__close:hover {
	background-color: rgb(255 255 255 / 0.2);
	transform: rotate(90deg);
}

.sp-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgb(255 255 255 / 0.22);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	z-index: 10;
}

.sp-lightbox__nav svg {
	width: 26px;
	height: 26px;
}

.sp-lightbox__nav:hover {
	background: rgb(255 255 255 / 0.2);
}

.sp-lightbox__nav:active {
	transform: translateY(-50%) scale(0.95);
}

.sp-lightbox__nav--prev { left: 1.5rem; }
.sp-lightbox__nav--next { right: 1.5rem; }

.sp-lightbox__counter {
	position: absolute;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	color: rgb(255 255 255 / 0.7);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 600;
	background: rgb(255 255 255 / 0.1);
	padding: 0.4rem 1rem;
	border-radius: 9999px;
	backdrop-filter: blur(10px);
}

@media (max-width: 600px) {
	.sp-lightbox .modal-content { padding: 1rem; }
	.sp-lightbox__nav { width: 44px; height: 44px; }
	.sp-lightbox__nav--prev { left: 0.5rem; }
	.sp-lightbox__nav--next { right: 0.5rem; }
	.sp-lightbox__close { top: 0.5rem; right: 0.5rem; width: 40px; height: 40px; }
}

/* Cursor zoom su tutte le gallerie core */
.wp-block-gallery img {
	cursor: zoom-in;
}

/* ═══════════════════════════════════════════════════════════════════════
 * MODAL NEWS (Bootstrap 5)
 * ═══════════════════════════════════════════════════════════════════════ */

/* Animazione ingresso modal — usa keyframes per override Bootstrap default */
.sp-news-modal.fade .modal-dialog {
	transition: none; /* Rimuove la transition default di Bootstrap */
	transform: none;
}

.sp-news-modal.show .modal-dialog {
	animation: sp-modal-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sp-modal-in {
	0% {
		opacity: 0;
		transform: translate3d(0, 60px, 0) scale(0.85);
	}
	60% {
		opacity: 1;
	}
	100% {
		opacity: 1;
		transform: translate3d(0, 0, 0) scale(1);
	}
}

/* Backdrop con fade piu' marcato */
.sp-news-modal ~ .modal-backdrop.fade.show,
.modal-backdrop.fade.show {
	transition: opacity 0.4s ease;
}

.modal-backdrop.show {
	opacity: 0.7;
}

.sp-news-modal .modal-content {
	border: none;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 30px 60px -15px rgb(0 0 0 / 0.3);
}

.sp-news-modal .modal-header {
	border-bottom: 1px solid var(--wp--preset--color--subtle);
	padding: 1.25rem 1.75rem;
	background: var(--wp--preset--color--muted);
	align-items: center;
}

.sp-news-modal__meta {
	display: flex;
	gap: 1rem;
	align-items: center;
	flex-wrap: wrap;
}

.sp-news-modal__date {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--primary);
}

.sp-news-modal__cat {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.25em 0.75em;
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	border-radius: 9999px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.sp-news-modal .btn-close {
	padding: 0.5rem;
	border-radius: 9999px;
	opacity: 0.6;
	transition: opacity 0.2s, transform 0.2s;
}

.sp-news-modal .btn-close:hover {
	opacity: 1;
	transform: rotate(90deg);
}

.sp-news-modal .modal-body {
	padding: 2rem 1.75rem;
}

.sp-news-modal__title {
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--contrast);
}

.sp-news-modal__thumb {
	margin: 0 0 1.75rem;
	border-radius: 14px;
	overflow: hidden;
}

.sp-news-modal__thumb img {
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: cover;
	display: block;
}

.sp-news-modal__content {
	font-size: 1.15rem;
	line-height: 1.75;
	color: var(--wp--preset--color--contrast);
}

.sp-news-modal__content p,
.sp-news-modal__content li {
	font-size: 1.15rem;
	line-height: 1.75;
}

.sp-news-modal__content h2 { font-size: 1.6rem; }
.sp-news-modal__content h3 { font-size: 1.35rem; }
.sp-news-modal__content h4 { font-size: 1.15rem; }

.sp-news-modal__content > * + * {
	margin-top: 1.25rem;
}

.sp-news-modal__content h2,
.sp-news-modal__content h3,
.sp-news-modal__content h4 {
	color: var(--wp--preset--color--contrast);
	margin-top: 2rem;
	margin-bottom: 1rem;
	line-height: 1.3;
}

.sp-news-modal__content a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.sp-news-modal__content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	margin: 1rem 0;
}

.sp-news-modal .modal-footer {
	border-top: 1px solid var(--wp--preset--color--subtle);
	padding: 1.25rem 1.75rem;
	gap: 0.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Footer con singolo bottone a destra */
.sp-news-modal__footer {
	justify-content: flex-end !important;
}

.sp-news-modal__footer > .btn {
	margin: 0 !important;
}

.sp-news-modal .btn {
	border-radius: 9999px;
	padding: 0.6rem 1.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 0.9375rem;
	transition: transform 0.2s, box-shadow 0.2s;
}

.sp-news-modal .btn:hover {
	transform: translateY(-1px);
}

.sp-news-modal .btn-primary {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.sp-news-modal .btn-primary:hover {
	background: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--primary-dark);
}

.sp-news-modal .btn-outline-primary {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.sp-news-modal .btn-outline-primary:hover {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

/* Mobile responsive */
@media (max-width: 600px) {
	.sp-news-modal .modal-dialog {
		margin: 0.75rem;
	}

	.sp-news-modal .modal-header,
	.sp-news-modal .modal-footer {
		padding: 1rem 1.25rem;
	}

	.sp-news-modal .modal-body {
		padding: 1.5rem 1.25rem;
	}

	.sp-news-modal__thumb img {
		max-height: 250px;
	}

	.sp-news-modal .modal-footer,
	.sp-news-modal__footer {
		flex-direction: column-reverse;
		justify-content: stretch !important;
	}

	.sp-news-modal .modal-footer .btn {
		width: 100%;
	}

	.sp-news-modal__footer > .btn-outline-primary {
		margin-right: 0 !important;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sp-news-modal.show .modal-dialog {
		animation: none;
	}
	.sp-news-modal .btn-close {
		transition: none;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
 * CPT: single-sp-corso
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corso-single {
	padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.sp-corso-hero {
	position: relative;
	min-height: 32vh;
	display: flex;
	align-items: center;
	padding-block: clamp(1.5rem, 4vw, 2.75rem);
	background-color: var(--wp--preset--color--secondary);
	background-size: cover;
	background-position: center;
	color: var(--wp--preset--color--base);
	margin-bottom: clamp(1.25rem, 3vw, 2rem);
	overflow: hidden;
}

.sp-corso-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--gradient--hero);
}

.sp-corso-hero__content {
	position: relative;
	z-index: 1;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
}

.sp-corso-hero__title {
	color: var(--wp--preset--color--base);
	margin: 0;
	font-size: clamp(1.85rem, 5.5vw, 3.5rem);
	line-height: 1;
	letter-spacing: -0.03em;
	text-shadow: 0 4px 20px rgb(0 0 0 / 0.3);
}

.sp-corso-hero__eta {
	font-size: 1.05rem;
	font-weight: 500;
	opacity: 0.95;
	letter-spacing: -0.01em;
}

.sp-corso-body,
.sp-torneo-body {
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 3vw, 2rem);
}

/* H2 con underline gradient */
.sp-corso-dettagli h2,
.sp-corso-dettagli h2,
.sp-corso-descrizione h2,
.sp-corso-orari h2,
.sp-corso-listino h2,
.sp-corso-allegati h2,
.sp-torneo-dettagli h2,
.sp-torneo-descrizione h2,
.sp-torneo-tabellone h2,
.sp-torneo-listino h2,
.sp-torneo-allegati h2 {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0;
	margin: 0 0 0.6rem;
	font-size: clamp(1.05rem, 1.7vw, 1.25rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--contrast);
}

.sp-corso-dettagli h2::before,
.sp-corso-descrizione h2::before,
.sp-corso-orari h2::before,
.sp-corso-listino h2::before,
.sp-corso-allegati h2::before,
.sp-torneo-dettagli h2::before,
.sp-torneo-descrizione h2::before,
.sp-torneo-tabellone h2::before,
.sp-torneo-listino h2::before,
.sp-torneo-allegati h2::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 1.2em;
	background: var(--wp--preset--color--primary);
	border-radius: 2px;
	flex-shrink: 0;
}

.sp-corso-dettagli h2::after,
.sp-corso-descrizione h2::after,
.sp-corso-orari h2::after,
.sp-corso-listino h2::after,
.sp-corso-allegati h2::after,
.sp-torneo-dettagli h2::after,
.sp-torneo-descrizione h2::after,
.sp-torneo-tabellone h2::after,
.sp-torneo-listino h2::after,
.sp-torneo-allegati h2::after {
	content: none;
}

.sp-corso-dettagli__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0;
	background: var(--wp--preset--color--muted);
	padding: 0.5rem 0.75rem;
	border-radius: 14px;
	margin: 0;
	border: 1px solid var(--wp--preset--color--subtle);
}

.sp-corso-dettagli__item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.6rem 1rem;
	position: relative;
}

.sp-corso-dettagli__item:not(:last-child)::after {
	content: '';
	position: absolute;
	right: 0;
	top: 20%;
	bottom: 20%;
	width: 1px;
	background: var(--wp--preset--color--subtle);
}

@media (max-width: 768px) {
	.sp-corso-dettagli__item::after { display: none; }
}

.sp-corso-dettagli__item dt {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--wp--preset--color--primary);
}

.sp-corso-dettagli__item dd {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.98rem;
	font-weight: 600;
	margin: 0;
	letter-spacing: -0.01em;
}

.sp-corso-cta {
	text-align: center;
	padding: 1.75rem 1.5rem;
	border-radius: 14px;
	position: relative;
	overflow: hidden;
}

.sp-corso-cta--open {
	background: var(--wp--preset--gradient--primary);
	color: var(--wp--preset--color--base);
}

.sp-corso-cta--open::before,
.sp-torneo-cta--open::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -10%;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgb(255 255 255 / 0.15) 0%, transparent 70%);
	pointer-events: none;
}

.sp-corso-cta--open h2 {
	color: var(--wp--preset--color--base);
	position: relative;
}

.sp-corso-cta--open h2::after {
	background: var(--wp--preset--color--accent) !important;
}

.sp-corso-cta--open .wp-block-button__link,
.sp-corso-cta--open .wp-element-button {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	font-weight: 700;
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.2);
}

.sp-corso-cta--open .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

.sp-corso-cta--future {
	background: #fffbeb;
	border: 2px dashed #f59e0b;
	color: #78350f;
}

.sp-corso-cta--closed {
	background: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--neutral-600);
}

/* Pulsante iscrizione disabilitato — corso con iscrizioni chiuse. */
.sp-corso-cta__btn--disabled {
	background: var(--wp--preset--color--neutral-600);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	opacity: .65;
	cursor: not-allowed;
	border: none;
}

.sp-corso-cta h2 {
	margin-bottom: 0.5rem;
}

.sp-corso-cta p {
	margin-bottom: 1rem;
	font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CPT: single-sp-torneo
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-torneo-single {
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

.sp-torneo-hero {
	position: relative;
	min-height: 60vh;
	display: flex;
	align-items: center;
	padding-block: clamp(3rem, 8vw, 6rem);
	background-color: var(--wp--preset--color--secondary);
	background-size: cover;
	background-position: center;
	color: var(--wp--preset--color--base);
	margin-bottom: clamp(2rem, 6vw, 4rem);
	overflow: hidden;
}

.sp-torneo-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--gradient--hero);
}

.sp-torneo-hero__content {
	position: relative;
	z-index: 1;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
}

.sp-torneo-hero__badges {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	justify-content: center;
}

.sp-torneo-hero__title {
	color: var(--wp--preset--color--base);
	margin: 0;
	font-size: clamp(2.5rem, 8vw, 5.5rem);
	line-height: 0.95;
	letter-spacing: -0.04em;
	text-shadow: 0 4px 20px rgb(0 0 0 / 0.3);
}

.sp-torneo-hero__dates {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 600;
	opacity: 0.95;
	letter-spacing: -0.01em;
}

.sp-torneo-tabellone__gara {
	margin-bottom: 2rem;
	padding: 2rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--subtle);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.sp-torneo-tabellone__gara h3 {
	margin-top: 0;
	margin-bottom: 1.25rem;
	font-size: 1.5rem;
}

.sp-torneo-cta {
	text-align: center;
	padding: 3.5rem 2rem;
	border-radius: 20px;
	position: relative;
	overflow: hidden;
}

.sp-torneo-cta--open {
	background: var(--wp--preset--gradient--primary);
	color: var(--wp--preset--color--base);
}

.sp-torneo-cta--open h2 {
	color: var(--wp--preset--color--base);
}

.sp-torneo-cta--future {
	background: #fffbeb;
	border: 2px dashed #f59e0b;
	color: #78350f;
}

.sp-torneo-cta--closed {
	background: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--neutral-600);
}

.sp-torneo-cta h2 {
	margin-bottom: 1rem;
}

.sp-torneo-cta p {
	margin-bottom: 1.75rem;
	font-size: 1.125rem;
}

.sp-card-news__badges {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * RESPONSIVE
 * ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
	.sp-corso-dettagli__grid { padding: 1rem 1.25rem; }
	.sp-corso-hero, .sp-torneo-hero { min-height: 55vh; }
	.sp-contact-info { padding: 1.75rem; border-radius: 16px; }
	.sp-timeline { padding-left: 2.25rem; }
	.sp-timeline__item::before { left: -2.25rem; }
	.sp-corso-cta, .sp-torneo-cta { padding: 2.5rem 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * REDUCED MOTION
 * ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
	.sp-badge--open::before,
	.spoortix-corsi-embed__badge--iscrizioni::before { animation: none; }

	.spoortix-corsi-embed__card,
	.spoortix-eventi-prossimi__card,
	.spoortix-news-latest__card,
	.spoortix-corsi-embed__thumbnail img,
	.spoortix-eventi-prossimi__thumbnail img,
	.spoortix-news-latest__thumbnail img,
	.sp-downloads-list__item a,
	.sp-sponsor__item { transition: none; }

	.spoortix-corsi-embed__card:hover,
	.spoortix-eventi-prossimi__card:hover,
	.spoortix-news-latest__card:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * LINK UTILI — card grid
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-link-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 1fr;
	gap: 1.25rem;
	align-items: stretch;
}

@media (max-width: 900px) {
	.sp-link-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.sp-link-grid {
		grid-template-columns: 1fr;
	}
}

.sp-link-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 1.75rem 1.5rem 1.5rem;
	background: #fff;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: 16px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	height: 100%;
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 0.3s ease,
	            box-shadow 0.4s ease;
}

/* Accent bar top rimossa su richiesta */
.sp-link-card::before {
	content: none;
	display: none;
}

.sp-link-card:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 24px 50px -20px rgba(0, 40, 90, 0.22),
	            0 8px 20px -8px rgba(0, 40, 90, 0.08);
}

.sp-link-card:hover::before {
	transform: scaleX(1);
}

/* Numero ordinale (01, 02, 03) in alto a destra — aggiunto via JS */
.sp-link-card__index {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.5rem;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	pointer-events: none;
	transition: color 0.3s ease;
}

.sp-link-card:hover .sp-link-card__index {
	color: color-mix(in srgb, var(--wp--preset--color--primary) 22%, transparent);
}

.sp-link-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: linear-gradient(135deg,
		var(--wp--preset--color--primary),
		color-mix(in srgb, var(--wp--preset--color--primary) 75%, #000));
	color: #fff;
	box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--wp--preset--color--primary) 50%, transparent);
	flex-shrink: 0;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sp-link-card__icon svg { width: 26px; height: 26px; }
.sp-link-card__icon i { font-size: 1.6rem; line-height: 1; }

.sp-link-card:hover .sp-link-card__icon {
	transform: scale(1.08) rotate(-4deg);
}

.sp-link-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1 1 auto;
	min-width: 0;
}

.sp-link-card__eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.sp-link-card__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

.sp-link-card__desc {
	font-size: 0.875rem;
	line-height: 1.55;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 62%, transparent);
}

.sp-link-card__arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	width: auto;
	height: auto;
	padding: 0;
	margin-top: auto;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.82rem;
	font-weight: 600;
	transition: gap 0.25s ease;
}

.sp-link-card__arrow::before {
	content: 'Visita il sito';
}

.sp-link-card__arrow svg { width: 16px; height: 16px; }
.sp-link-card__arrow i { font-size: 1.05rem; line-height: 1; transition: transform 0.25s ease; }

.sp-link-card:hover .sp-link-card__arrow {
	gap: 0.7rem;
}

.sp-link-card:hover .sp-link-card__arrow i,
.sp-link-card:hover .sp-link-card__arrow svg {
	transform: translateX(4px);
}

@media (max-width: 560px) {
	.sp-link-card {
		padding: 1.5rem 1.25rem 1.25rem;
	}
	.sp-link-card__index {
		font-size: 2rem;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
 * CORSI DISPONIBILI (fetch AJAX)
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corsi-disponibili {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.sp-corsi-disponibili__loader {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3rem 1rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.9rem;
	letter-spacing: 0.02em;
}

.sp-corsi-disponibili__spinner {
	width: 22px;
	height: 22px;
	border: 2px solid color-mix(in srgb, var(--wp--preset--color--primary) 25%, transparent);
	border-top-color: var(--wp--preset--color--primary);
	border-radius: 50%;
	animation: sp-spin 0.7s linear infinite;
}

@keyframes sp-spin {
	to { transform: rotate(360deg); }
}

.sp-corsi-disponibili__empty,
.sp-corsi-disponibili__error {
	padding: 2.5rem 1rem;
	text-align: center;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	background: color-mix(in srgb, var(--wp--preset--color--primary) 4%, transparent);
	border-radius: 14px;
}

.sp-corsi-disponibili__section {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.sp-corsi-disponibili__section-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.sp-corsi-disponibili__section-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	margin: 0;
}

.sp-corsi-disponibili__section-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 0.5rem;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 14px;
}

.sp-corsi-disponibili__section--conclusi .sp-corsi-disponibili__section-count {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 45%, transparent);
}

.sp-corsi-disponibili__grid {
	display: grid;
	/* 4 box per riga su schermo largo; le colonne si riducono in automatico
	   su schermi più stretti (auto-fill). */
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
}

/* Card singolo corso */
.sp-corso-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 0.25s ease,
	            box-shadow 0.35s ease;
}

.sp-corso-card:hover {
	transform: translateY(-6px);
	border-color: transparent;
	box-shadow: 0 24px 50px -20px rgba(0, 40, 90, 0.22),
	            0 8px 20px -8px rgba(0, 40, 90, 0.08);
}

.sp-corso-card__thumb {
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: color-mix(in srgb, var(--wp--preset--color--primary) 8%, #eef2f7);
}

.sp-corso-card__thumb--placeholder {
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--wp--preset--color--primary) 12%, #eef2f7),
		color-mix(in srgb, var(--wp--preset--color--primary) 4%, #fff)
	);
}

.sp-corso-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem 1.3rem;
	/* Riempie l'altezza disponibile: le card di una riga hanno tutte la
	   stessa altezza (grid) e il corpo si estende fin sotto. */
	flex: 1;
}

.sp-corso-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.sp-corso-card__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.7rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.sp-corso-card__badge--sport {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	color: var(--wp--preset--color--primary);
}

.sp-corso-card__badge--open {
	background: color-mix(in srgb, #16a34a 15%, transparent);
	color: #15803d;
}

.sp-corso-card__badge--cert {
	background: color-mix(in srgb, #d97706 14%, transparent);
	color: #b45309;
	display: inline-flex;
	align-items: center;
}

.sp-corso-card__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
	margin: 0;
}

.sp-corso-card__period,
.sp-corso-card__meta-item {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: 0.875rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 75%, transparent);
}

.sp-corso-card__period-label,
.sp-corso-card__meta-label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
}

.sp-corso-card__meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem 1rem;
	padding-top: 0.35rem;
	border-top: 1px dashed rgba(17, 17, 17, 0.08);
}

/* Voce meta a larghezza piena (es. Frequenza su una riga unica). */
.sp-corso-card__meta-item--full {
	grid-column: 1 / -1;
}

.sp-corso-card__cta {
	margin-top: 0.25rem;
	align-self: flex-start;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	transition: transform 0.25s ease;
}

.sp-corso-card__cta span {
	display: inline-block;
	transition: transform 0.25s ease;
	margin-left: 0.2rem;
}

.sp-corso-card__cta:hover span {
	transform: translateX(4px);
}

/* Azioni card corso: due pulsanti affiancati (Scopri + Iscriviti).
   margin-top:auto li spinge SEMPRE in fondo alla card, così restano
   allineati anche quando una card ha meno informazioni di un'altra. */
.sp-corso-card__actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	flex-wrap: wrap;
}

.sp-corso-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	padding: 0.55rem 1rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
	text-align: center;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
	border: 1.5px solid transparent;
	white-space: nowrap;
}

.sp-corso-card__btn--outline {
	background: transparent;
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 35%, transparent);
	color: var(--wp--preset--color--primary);
}

.sp-corso-card__btn--outline:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.sp-corso-card__btn--primary {
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-color: var(--wp--preset--color--primary);
}

.sp-corso-card__btn--primary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #000);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #000);
	color: #fff;
	transform: translateY(-1px);
}

/* Iscrizioni chiuse: pulsante grigio "disabilitato", non cliccabile,
   senza effetto hover. */
.sp-corso-card__btn--closed,
.sp-corso-card__btn--closed:hover {
	background: var(--wp--preset--color--neutral-600, #6b7280);
	border-color: var(--wp--preset--color--neutral-600, #6b7280);
	color: #fff;
	opacity: .6;
	cursor: not-allowed;
	transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CORSO SINGOLO — header compatto (sostituisce hero)
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corso-header-wrap {
	padding-top: 2rem;
	padding-bottom: 0.25rem;
}

.sp-corso-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	text-align: left;
}

/* Chip "Torna ai corsi" */
.sp-corso-header__back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.9rem 0.45rem 0.75rem;
	margin-bottom: 0.4rem;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 10%, #fff);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 30%, transparent);
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, gap 0.2s ease;
}

.sp-corso-header__back i {
	font-size: 1rem;
	line-height: 1;
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sp-corso-header__back:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 18%, #fff);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
	gap: 0.6rem;
}

.sp-corso-header__back:hover i {
	transform: translateX(-3px);
}

.sp-corso-header__badges {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.sp-corso-header__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.85rem, 4vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--contrast);
	margin: 0;
	text-align: left;
}

.sp-corso-header__eta {
	margin: 0;
	font-size: 0.95rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

/* Banner immagine in evidenza — mostrato solo se l'immagine esiste.
   object-fit: cover + aspect-ratio fissi garantiscono che qualsiasi
   formato sorgente (quadrato/verticale/orizzontale) riempia il banner
   senza buchi e senza deformazioni. */
.sp-corso-header__banner {
	width: 100%;
	margin: 0 0 0.75rem;
	aspect-ratio: 16 / 5;
	max-height: 260px;
	overflow: hidden;
	border-radius: 14px;
	background: var(--wp--preset--color--muted);
}

.sp-corso-header__banner img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}

@media (max-width: 640px) {
	.sp-corso-header__banner {
		aspect-ratio: 16 / 7;
		max-height: 200px;
	}
}

/* Compatta padding del body del corso dopo la rimozione dell'hero */
.sp-corso-body {
	padding-top: 3rem !important;
	padding-bottom: 1.5rem !important;
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1rem, 2.5vw, 1.5rem);
	align-items: start;
}

/* Sezioni full-width: Dettagli, Descrizione, Orari, CTA */
.sp-corso-body > .sp-corso-dettagli,
.sp-corso-body > .sp-corso-descrizione,
.sp-corso-body > .sp-corso-orari,
.sp-corso-body > .sp-corso-cta {
	grid-column: 1 / -1;
}

/* Riga affiancata: Listino + Allegati */
.sp-corso-body > .sp-corso-listino  { grid-column: 1; }
.sp-corso-body > .sp-corso-allegati { grid-column: 2; }

@media (max-width: 900px) {
	.sp-corso-body { grid-template-columns: 1fr; }
	.sp-corso-body > * { grid-column: 1 !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * CORSO SINGOLO — box sfondo azzurrino per Descrizione e Listino
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corso-descrizione__box,
.sp-corso-listino__box {
	background: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--subtle);
	border-radius: 14px;
	padding: 0.85rem 1.1rem;
}

/* Listino: padding a 0, celle tabella gestiscono il proprio padding */
.sp-corso-listino__box {
	padding: 0;
	overflow: hidden;
}

@media (max-width: 768px) {
	.sp-corso-descrizione__box {
		padding: 1rem 1.25rem;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
 * LISTINO PREZZI — tabella stile Spoortix
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corso-listino__box .table,
.sp-corso-listino__box table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	background: transparent;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
}

.sp-corso-listino__box thead th {
	background: transparent;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	padding: 0.65rem 1rem;
	border: none;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.sp-corso-listino__box thead th:last-child {
	text-align: right;
}

.sp-corso-listino__box tbody tr {
	background: transparent;
	transition: background 0.2s ease;
}

.sp-corso-listino__box tbody tr:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 4%, transparent);
}

.sp-corso-listino__box tbody tr + tr td {
	border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.sp-corso-listino__box tbody td {
	padding: 0.65rem 1rem;
	vertical-align: middle;
	text-align: left;
	border: none;
	color: var(--wp--preset--color--contrast);
}

.sp-corso-listino__box tbody td:last-child {
	text-align: right;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--wp--preset--color--primary);
	white-space: nowrap;
}

.sp-corso-listino__box tbody td:nth-child(2) {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 75%, transparent);
}

/* Role badges (socio / non socio) */
.sp-corso-listino__box .badge,
.sp-corso-listino__box .badge_socio,
.sp-corso-listino__box .badge_non_socio {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.75rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0;
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);
	color: var(--wp--preset--color--contrast);
	border: none;
}

.sp-corso-listino__box .badge_socio {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	color: var(--wp--preset--color--primary);
}

.sp-corso-listino__box .badge_non_socio {
	background: color-mix(in srgb, #64748b 14%, transparent);
	color: #475569;
}

.sp-corso-listino__box .d-flex.flex-column {
	align-items: flex-start;
}

/* Annulla striping Bootstrap */
.sp-corso-listino__box .table-striped > tbody > tr:nth-of-type(odd) > * {
	background-color: transparent;
	color: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CORSO SINGOLO — documenti allegati (tabella 3 colonne)
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-corso-allegati__box {
	background: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--subtle);
	border-radius: 20px;
	overflow: hidden;
}

.sp-allegati-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	background: transparent;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
}

.sp-allegati-table thead th {
	background: transparent;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	padding: 1rem 1.25rem;
	border: none;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.sp-allegati-table thead th.sp-allegati-table__col-azione {
	text-align: right;
}

.sp-allegati-table thead th.sp-allegati-table__col-tipo {
	width: 180px;
	white-space: nowrap;
}

.sp-allegati-table thead th {
	white-space: nowrap;
}

.sp-allegati-table tbody tr + tr td {
	border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.sp-allegati-table tbody tr {
	position: relative;
	transition: background 0.2s ease;
	cursor: pointer;
}

.sp-allegati-table tbody tr:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 4%, transparent);
}

/* Link "stretched" che copre l'intera riga — tutti gli elementi
   interni (ext, nome, azione) diventano area cliccabile. */
.sp-allegati-table__name::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.sp-allegati-table tbody td {
	padding: 1rem 1.25rem;
	vertical-align: middle;
	border: none;
	color: var(--wp--preset--color--contrast);
}

.sp-allegati-table tbody td:last-child {
	text-align: right;
}

.sp-allegati-table__ext {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	padding: 0.3rem 0.65rem;
	border-radius: 8px;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 10%, transparent);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.sp-allegati-table__name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: color 0.2s ease;
}

.sp-allegati-table__name:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sp-allegati-table__azione {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.75rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sp-allegati-table__azione--download {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	color: var(--wp--preset--color--primary);
}

.sp-allegati-table__azione--sign {
	background: color-mix(in srgb, #d97706 16%, transparent);
	color: #b45309;
}

.sp-allegati-table__azione--accept {
	background: color-mix(in srgb, #6d28d9 14%, transparent);
	color: #6d28d9;
}

/* Mobile: impila le celle con label descrittivi */
@media (max-width: 640px) {
	.sp-allegati-table thead { display: none; }
	.sp-allegati-table tbody tr {
		display: flex;
		flex-direction: column;
		gap: 0.35rem;
		padding: 0.75rem 0;
	}
	.sp-allegati-table tbody tr + tr {
		border-top: 1px solid rgba(17, 17, 17, 0.08);
	}
	.sp-allegati-table tbody tr + tr td { border-top: none; }
	.sp-allegati-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		padding: 0.25rem 1.1rem;
		text-align: left;
	}
	.sp-allegati-table tbody td::before {
		content: attr(data-label);
		font-family: var(--wp--preset--font-family--heading);
		font-size: 0.68rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: color-mix(in srgb, var(--wp--preset--color--contrast) 50%, transparent);
	}
	.sp-allegati-table tbody td:last-child { text-align: right; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * GALLERIA — testo introduttivo (classe `sp-galleria-intro`)
 *
 * Applicabile a un blocco Paragrafo o Gruppo dentro la galleria per
 * distinguerlo visivamente dalle foto. Admin: vedi guida nella single page.
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-galleria-single__body .sp-galleria-intro {
	max-width: 720px;
	margin: 0 auto 2.5rem;
	padding: 0 0 2rem;
	font-size: 1.1rem;
	line-height: 1.65;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 78%, transparent);
	text-align: center;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.sp-galleria-single__body .sp-galleria-intro p:first-child {
	margin-top: 0;
}

.sp-galleria-single__body .sp-galleria-intro p:last-child {
	margin-bottom: 0;
}

.sp-galleria-single__body .sp-galleria-intro h2,
.sp-galleria-single__body .sp-galleria-intro h3 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════
 * STAFF GRID — card membri dal CPT sp-staff
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-staff-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 1fr;
	gap: 2rem;
	align-items: stretch;
}

@media (max-width: 900px) {
	.sp-staff-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
	.sp-staff-grid { grid-template-columns: 1fr; }
}

.sp-staff-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: 20px;
	overflow: hidden;
	height: 100%;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 0.3s ease,
	            box-shadow 0.35s ease;
}

.sp-staff-card:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 25%, transparent);
	box-shadow: 0 24px 50px -24px rgba(0, 40, 90, 0.2);
}

.sp-staff-card__photo {
	position: relative;
	/* Quadrato: box meno alto -> cover ingrandisce meno -> volti meno zoomati. */
	aspect-ratio: 1 / 1;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 5%, #eef2f7);
	overflow: hidden;
}

.sp-staff-card__photo img {
	width: 100%;
	height: 100%;
	/* cover riempie tutto il box (niente spazi vuoti); object-position: top
	   ancora l'immagine in alto, così testa e viso restano sempre visibili
	   e l'eventuale taglio avviene in basso (busto), mai sulla faccia. */
	object-fit: cover;
	object-position: top;
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sp-staff-card:hover .sp-staff-card__photo img {
	transform: scale(1.04);
}

.sp-staff-card__photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg,
		color-mix(in srgb, var(--wp--preset--color--primary) 12%, #eef2f7),
		color-mix(in srgb, var(--wp--preset--color--primary) 4%, #fff));
	color: color-mix(in srgb, var(--wp--preset--color--primary) 60%, transparent);
	font-size: 4rem;
}

.sp-staff-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.5rem 1.4rem 1.4rem;
	flex: 1;
}

.sp-staff-card__role {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.sp-staff-card__name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--wp--preset--color--contrast);
	margin: 0;
}

.sp-staff-card__bio {
	font-size: 0.9rem;
	line-height: 1.55;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 70%, transparent);
	margin: 0.25rem 0 0;
	/* Troncatura visuale a max 3 righe per card uniformi */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sp-staff-card__qualifications {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.sp-staff-card__qualifications li {
	position: relative;
	padding-left: 1.1rem;
	font-size: 0.85rem;
	line-height: 1.45;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 68%, transparent);
}

.sp-staff-card__qualifications li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
}

.sp-staff-card__contacts {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.sp-staff-card__contact {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 70%, transparent);
	text-decoration: none;
	transition: color 0.2s ease;
}

.sp-staff-card__contact i {
	font-size: 1rem;
	color: var(--wp--preset--color--primary);
}

.sp-staff-card__contact:hover {
	color: var(--wp--preset--color--primary);
}

.sp-staff-empty {
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	background: color-mix(in srgb, var(--wp--preset--color--primary) 4%, transparent);
	border-radius: 14px;
}

.sp-staff-empty a {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CONTATTI FULL — layout pagina contatti
 * ═══════════════════════════════════════════════════════════════════════ */

.sp-contatti-full {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

/* HERO compatto pagina contatti */
.sp-contatti-hero { background: transparent; text-align: left; }

/* Forza i figli dell'hero a comportarsi come alignwide (wideSize=1280 centrato)
   per allinearsi con i panel sotto (stesso left edge). Sovrascrive il layout
   constrained di WP che altrimenti li confina a contentSize=720 centrati. */
.sp-contatti-hero.is-layout-constrained > .sp-contatti-hero__overline,
.sp-contatti-hero.is-layout-constrained > .sp-contatti-hero__title,
.sp-contatti-hero.is-layout-constrained > .sp-contatti-hero__desc {
	max-width: var(--wp--style--global--wide-size, 1280px);
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}
.sp-contatti-hero__overline {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.25rem;
}
.sp-contatti-hero__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.5rem;
}
.sp-contatti-hero__desc {
	font-size: 1.05rem;
	line-height: 1.55;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 65%, transparent);
	margin: 0;
	max-width: 640px;
}

/* 2 PANEL affiancati (Dove trovarci + Contattaci) */
.sp-contatti-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: stretch;
}
@media (max-width: 820px) {
	.sp-contatti-panels { grid-template-columns: 1fr; }
}

.sp-contatti-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem 2rem 1.75rem;
	background: #fff;
	border: 1px solid rgba(17, 17, 17, 0.08);
	border-radius: 22px;
	height: 100%;
	overflow: hidden;
	transition: border-color 0.3s, box-shadow 0.35s, transform 0.35s;
}
.sp-contatti-panel::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), color-mix(in srgb, var(--wp--preset--color--primary) 70%, #000));
}
.sp-contatti-panel:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 25%, transparent);
	box-shadow: 0 24px 50px -24px rgba(0, 40, 90, 0.22);
	transform: translateY(-3px);
}

.sp-contatti-panel__head { display: flex; align-items: center; gap: 1rem; }
.sp-contatti-panel__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px; height: 56px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--wp--preset--color--primary), color-mix(in srgb, var(--wp--preset--color--primary) 72%, #000));
	color: #fff;
	box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent);
	flex-shrink: 0;
}
.sp-contatti-panel__icon i { font-size: 1.5rem; line-height: 1; }
.sp-contatti-panel__eyebrow {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.15rem;
}
.sp-contatti-panel__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	color: var(--wp--preset--color--contrast);
	letter-spacing: -0.01em;
}

.sp-contatti-panel__body { flex: 1; }

.sp-contatti-panel__address {
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 1.25rem;
}

.sp-contatti-panel__hours {
	margin: 0;
	padding-top: 1rem;
	border-top: 1px dashed rgba(17, 17, 17, 0.12);
}
.sp-contatti-panel__hours dt {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	margin-bottom: 0.35rem;
}
.sp-contatti-panel__hours dd {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast);
}

.sp-contatti-panel__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.sp-contatti-panel__list li {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px dashed rgba(17, 17, 17, 0.1);
}
.sp-contatti-panel__list li:last-child { border-bottom: none; }
.sp-contatti-panel__list li > i {
	font-size: 1.25rem;
	color: var(--wp--preset--color--primary);
	flex-shrink: 0;
	width: 32px;
	display: inline-flex;
	justify-content: center;
}
.sp-contatti-panel__list-label {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 55%, transparent);
	margin-bottom: 0.05rem;
}
.sp-contatti-panel__list li a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: color 0.2s;
}
.sp-contatti-panel__list li a:hover { color: var(--wp--preset--color--primary); }

.sp-contatti-panel__actions {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 0.5rem;
}
.sp-contatti-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.65rem 1.1rem;
	border-radius: 9999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
	border: 1.5px solid transparent;
}
.sp-contatti-btn i { font-size: 1rem; }
.sp-contatti-btn--primary {
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-color: var(--wp--preset--color--primary);
}
.sp-contatti-btn--primary:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #000);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 85%, #000);
	color: #fff;
	transform: translateY(-1px);
}
.sp-contatti-btn--outline {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border-color: color-mix(in srgb, var(--wp--preset--color--primary) 35%, transparent);
}
.sp-contatti-btn--outline:hover {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
	border-color: var(--wp--preset--color--primary);
}

/* Animazione cascata fade-up */
.sp-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
	transition-delay: var(--sp-reveal-delay, 0s);
}
.sp-reveal.is-in {
	opacity: 1;
	transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.sp-reveal { opacity: 1; transform: none; transition: none; }
}

/* Social strip a tutta larghezza */
.sp-contatti-social {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: 2rem 2.25rem;
	background: linear-gradient(135deg,
		var(--wp--preset--color--primary),
		color-mix(in srgb, var(--wp--preset--color--primary) 75%, #000));
	color: #fff;
	border-radius: 20px;
	flex-wrap: wrap;
}

.sp-contatti-social__head {
	flex: 1 1 280px;
	min-width: 0;
}

.sp-contatti-social__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
	color: #fff;
	letter-spacing: -0.01em;
}

.sp-contatti-social__desc {
	font-size: 0.9rem;
	line-height: 1.5;
	margin: 0;
	color: rgba(255, 255, 255, 0.85);
}

.sp-contatti-social__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.sp-contatti-social__link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.65rem 1rem;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	color: #fff;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.88rem;
	font-weight: 600;
	transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.sp-contatti-social__link:hover {
	background: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
	transform: translateY(-2px);
}

.sp-contatti-social__link i {
	font-size: 1.2rem;
	line-height: 1;
}

@media (max-width: 640px) {
	.sp-contatti-social {
		flex-direction: column;
		align-items: flex-start;
		padding: 1.5rem;
	}
	.sp-contatti-social__list { width: 100%; }
}
