/* Lasteis – Scheda: foto (mosaico e galleria a tutto schermo) */

body.lstz .lstz-scheda-foto__mos {
	position: relative;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 250px 250px;
	gap: 10px;
	border-radius: 20px;
	overflow: hidden;
}
body.lstz .lstz-scheda-foto__tessera {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--lstz-crema);
	cursor: zoom-in;
	overflow: hidden;
}
body.lstz .lstz-scheda-foto__tessera:first-child { grid-row: span 2; }
body.lstz .lstz-scheda-foto__tessera:focus-visible { outline: 3px solid var(--lstz-blu); outline-offset: -3px; }
body.lstz .lstz-scheda-foto__mos .lstz-scheda-foto__img,
body.lstz .lstz-scheda-foto__mos .lstz-foto-mancante {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: filter .3s ease;
}
body.lstz .lstz-scheda-foto__tessera:hover .lstz-scheda-foto__img { filter: brightness(.88); }

/* Meno di 5 foto: le tessere si allargano come nella bozza */
body.lstz .lstz-scheda-foto__mos--n1 { grid-template-columns: 1fr; }
body.lstz .lstz-scheda-foto__mos--n2 .lstz-scheda-foto__tessera:nth-child(2) { grid-column: span 2; grid-row: span 2; }
body.lstz .lstz-scheda-foto__mos--n3 .lstz-scheda-foto__tessera:nth-child(n+2) { grid-column: span 2; }
body.lstz .lstz-scheda-foto__mos--n4 .lstz-scheda-foto__tessera:nth-child(2) { grid-column: span 2; }

body.lstz .lstz-scheda-foto__mos .lstz-scheda-foto__tutte {
	position: absolute;
	right: 18px;
	bottom: 18px;
	gap: 8px;
	min-height: 42px;
	border-width: 1px;
	font-size: 14px;
}
body.lstz .lstz-scheda-foto__conta {
	display: none;
	position: absolute;
	right: 14px;
	bottom: 14px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 23, 56, .7);
	color: #fff;
	font: 600 12px/1.2 var(--lstz-f-etichette);
}

/* Pulsanti delle stanze */
body.lstz .lstz-scheda-foto__stanze { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
body.lstz .lstz-scheda-foto__chip {
	min-height: 36px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid var(--lstz-linea);
	border-radius: 999px;
	background: #fff;
	color: var(--lstz-testo-3);
	font: 500 13px/1.2 var(--lstz-f-etichette);
	cursor: pointer;
}
body.lstz .lstz-scheda-foto__chip:hover { border-color: var(--lstz-blu); color: var(--lstz-blu); }

/* Galleria a tutto schermo */
body.lstz .lstz-galleria {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 64px 84px 24px;
	border: 0;
	background: rgba(0, 12, 28, .96);
	color: #fff;
}
body.lstz .lstz-galleria[open] { display: flex; align-items: center; justify-content: center; }
body.lstz .lstz-galleria::backdrop { background: rgba(0, 12, 28, .96); }
body.lstz .lstz-galleria__foto {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	height: 100%;
	margin: 0;
	min-width: 0;
}
body.lstz .lstz-galleria .lstz-galleria__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100% - 40px);
	object-fit: contain;
	border-radius: 6px;
}
body.lstz .lstz-galleria__conta { margin: 0; font: 500 14px/1.4 var(--lstz-f-etichette); color: var(--lstz-azzurro); text-align: center; }
body.lstz .lstz-galleria__chiudi,
body.lstz .lstz-galleria__freccia {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	background: rgba(0, 23, 56, .6);
	color: #fff;
	cursor: pointer;
}
body.lstz .lstz-galleria__chiudi:hover,
body.lstz .lstz-galleria__freccia:hover { background: #fff; color: var(--lstz-blu); }
body.lstz .lstz-galleria__chiudi:focus-visible,
body.lstz .lstz-galleria__freccia:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
body.lstz .lstz-galleria__chiudi { top: 16px; right: 16px; }
body.lstz .lstz-galleria__freccia { top: 50%; transform: translateY(-50%); }
body.lstz .lstz-galleria__freccia--prima { left: 16px; }
body.lstz .lstz-galleria__freccia--dopo { right: 16px; }
html.lstz-galleria-aperta { overflow: hidden; }

@media (max-width: 820px) {
	body.lstz .lstz-scheda-foto .lstz-wrap { padding: 0; }
	body.lstz .lstz-scheda-foto__mos { display: block; height: 300px; border-radius: 0; }
	body.lstz .lstz-scheda-foto__tessera:not(:first-child),
	body.lstz .lstz-scheda-foto__mos .lstz-scheda-foto__tutte,
	body.lstz .lstz-scheda-foto__stanze { display: none; }
	body.lstz .lstz-scheda-foto__conta { display: block; }
	body.lstz .lstz-galleria { padding: 64px 0 84px; }
	body.lstz .lstz-galleria__freccia { top: auto; bottom: 16px; transform: none; }
	body.lstz .lstz-galleria__freccia--prima { left: calc(50% - 64px); }
	body.lstz .lstz-galleria__freccia--dopo { right: calc(50% - 64px); }
}
@media (prefers-reduced-motion: reduce) {
	body.lstz .lstz-scheda-foto__mos .lstz-scheda-foto__img { transition: none; }
}
