/* 1. Base Framework Setup */
	.sp-layout-page {
	display: block; /* Falls back to plain full width rows if side columns are empty */
	width: 100%;
}

.sp-col-left, .sp-col-right {
	
}

.sp-col {
	min-width: 0;
}

/* 2. Standard 3-Column Desktop Grid Framework */
@media (min-width: 992px) {
	.sp-layout-page {
		display: grid !important;
		grid-template-columns: 12% 1fr 12%;
		gap: 0%;
		padding-top: 0%;
		align-items: start;
	}

	.sp-layout-page .sp-col-center {
		display: block !important;
		margin: 0 !important;
		padding: 0 !important;
		margin-top: calc(-4vh) !important;
	}
	
	/* 3. THE MAGIC FIX: Dynamic Empty Structural Overrides */
	/* If a sub-page leaves the block wrappers completely empty, collapse the grid track layout to 100% width automatically */
	.sp-layout-page:not(:has(.sp-block-wrap)) {
		display: block !important;
	}
	
	.sp-layout-page:not(:has(.sp-block-wrap)) .sp-col-center {
		margin-top: 0 !important; /* Disables the -4vh on non-portal pages */
		width: 100% !important;   /* Forces normal wide display tracking */
	}

	/* Extra safety for legacy browsers lacking full ':has()' support */
	.sp-col-left[style*='display: none'],
	.sp-col-left[style*='display:none'] {
		display: none !important;
		grid-column: 1 / 1;
	}
}