.avc-photo-collage {
	--cols: 3;
	--row-h: clamp(260px, 26vw, 520px);
	--gap: var(--photo-gap, 6px);
	--corner: 160px;
	--corner-ground: var(--ltl-white);
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	grid-auto-rows: var(--row-h);
	gap: var(--gap);
	background-color: var(--ltl-night);
}

.avc-photo-collage__tile { position: relative; overflow: hidden; }

.avc-photo-collage__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: var(--ltl-night);
	container-type: size;
}

/* Doubled class beats Elementor's img { height: auto } */
.avc-photo-collage .avc-photo-collage__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 1.4s var(--ease-brand);
}
.avc-photo-collage__tile:hover .avc-photo-collage__img { transform: scale(1.04); }

/* 16:9 iframe that always covers the tile, cropped by the tile. Doubled class beats Elementor's iframe { max-width: 100% }. */
.avc-photo-collage .avc-photo-collage__video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100cqw, 177.78cqh);
	height: max(56.25cqw, 100cqh);
	max-width: none;
	max-height: none;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
	opacity: 0;
	transition: opacity 1s var(--ease-brand);
}
.avc-photo-collage__video.is-ready { opacity: 1; }

/* Vessel: the corner reveals the section ground behind the grid */
.avc-photo-collage__tile.is-vessel { background-color: var(--corner-ground); }
.avc-photo-collage__tile.is-vessel .avc-photo-collage__media { border-radius: 0 0 var(--corner) 0; }

@media (max-width: 1024px) {
	.avc-photo-collage { --corner: 100px; }
	/* Two-up: an odd last tile spans the row */
	.avc-photo-collage__tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.avc-photo-collage__tile:last-child:nth-child(odd) { grid-column: auto; }
	/* Phones skip video; a video tile without a poster is dropped */
	.avc-photo-collage__tile.is-video:not(.has-image) { display: none; }
}
