/* Section wrapper — photos inset 50px from the canvas edges (grid 1628 wide),
   white, 20px below to the table section's own padding */
.bsw-space-gallery.wp-block-group.alignfull {
	background: #fff;
	padding: 0 50px 20px !important;
	margin-block: 0 !important;
}

/* Grid — 936 + 25 + 667 (normalized so the columns fill 1628 exactly);
   left tile spans both right-hand rows */
.bsw-space-gallery__grid.wp-block-group {
	display: grid;
	grid-template-columns: 936fr 667fr;
	gap: 20px 25px;
}

.bsw-space-gallery__tile.wp-block-group {
	position: relative;
	overflow: hidden;
	margin: 0 !important;
}

.bsw-space-gallery__tile--tall {
	grid-row: 1 / 3;
	aspect-ratio: 936 / 664;
}

.bsw-space-gallery__tile--landscape {
	aspect-ratio: 667 / 324;
}

/* Bottom pair — two squares, 27px apart (as drawn) */
.bsw-space-gallery__pair.wp-block-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 27px;
	margin: 0 !important;
}

.bsw-space-gallery__tile--square {
	aspect-ratio: 1;
}

.bsw-space-gallery__photo.wp-block-image {
	position: absolute !important;
	inset: 0;
	margin: 0 !important;
	line-height: 0;
}

.bsw-space-gallery__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

p.bsw-space-gallery__credit {
	position: absolute !important;
	bottom: 10px;
	right: 10px;
	font-family: var(--wp--preset--font-family--cardo, 'Cardo', serif);
	font-style: italic;
	font-size: 14px;
	color: #fff;
	margin: 0 !important;
	z-index: 1;
}


@media (max-width: 767px) {
	.bsw-space-gallery.wp-block-group.alignfull {
		padding: 0 20px 0 !important;
	}

	/* Single column; the mobile file's own crops (the landscape tile shows
	   more height than the desktop crop) */
	.bsw-space-gallery__grid.wp-block-group {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.bsw-space-gallery__tile--tall {
		grid-row: auto;
		aspect-ratio: 400 / 282;
	}

	.bsw-space-gallery__tile--landscape {
		aspect-ratio: 400 / 229;
	}

	.bsw-space-gallery__pair.wp-block-group {
		gap: 20px;
	}
}
