/* ---------- Schede grandi (core/group is-style-schede-grandi), Scopri il Museo ----------
 * Misure prese dall'originale (04/11/2026): due schede per riga da 768 px in su, insieme largo
 * l'80% della finestra (1140 px a 1440, 1523 px a 1920), 15 px tra le schede, foto 16:9,
 * titolo bianco centrato da 32 px su banda rossa alta 50 px. Una per riga sui telefoni.
 * Ogni figlio è una scheda: immagine + titolo con link che copre tutta la scheda.
 */

.is-style-schede-grandi {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 0.9375rem;
}
@media (min-width: 48rem) {
	.is-style-schede-grandi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.is-style-schede-grandi > * {
	position: relative;
	margin: 0 !important;
	max-width: none !important;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--rosso);
	color: var(--wp--preset--color--bianco);
}
.is-style-schede-grandi > * > * { max-width: none !important; }

/* Cornice della foto: l'ingrandimento resta dentro. */
.is-style-schede-grandi > * > .wp-block-image {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}
.is-style-schede-grandi > * > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); /* rapido all'inizio: si vede subito */
}
.is-style-schede-grandi > *:is(:hover, :focus-within) > .wp-block-image img { transform: scale(1.15); }

/* Banda del titolo. */
.is-style-schede-grandi > * :is(h2, h3) {
	margin: 0;
	padding: 0.4375rem 1rem;
	min-height: 3.125rem;
	flex-grow: 1; /* titoli su due righe accanto a uno su una: bande alte uguali, testo centrato */
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: var(--wp--preset--font-size--grande);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--bianco);
}
.is-style-schede-grandi > * :is(h2, h3) a {
	color: inherit;
	text-decoration: none;
}
.is-style-schede-grandi > *:hover :is(h2, h3) a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
/* Il link copre tutta la scheda: un solo link per tastiera e lettori di schermo. */
.is-style-schede-grandi > * :is(h2, h3) a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
/* Nell'editor il velo del link impedirebbe di selezionare la foto. */
.block-editor-block-list__layout .is-style-schede-grandi > * :is(h2, h3) a::after { content: none; }

/* Focus: come le altre schede del sito (contorno nero staccato). */
.is-style-schede-grandi > * :is(h2, h3) a:focus-visible { outline: none; }
.is-style-schede-grandi > *:has(a:focus-visible) {
	outline: 0.1875rem solid var(--wp--preset--color--nero);
	outline-offset: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
	.is-style-schede-grandi > * > .wp-block-image img,
	.is-style-schede-grandi > *:is(:hover, :focus-within) > .wp-block-image img {
		transition: none;
		transform: none;
	}
}
