/* Keep the footer sections inside the shared global page gutter. */
.site-above-footer-wrap,
.site-primary-footer-wrap {
	padding-inline: var(--cie-section-padding-inline);
}

.site-above-footer-wrap .ast-builder-grid-row-container-inner {
	width: 100%;
}

/* Stack the footer navigation beneath its brand block on tablet. */
@media only screen and (min-width: 768px) and (max-width: 1084px) {
	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1.35fr) minmax(0, 1.4fr);
		column-gap: clamp(12px, 1.5625vw, 20px);
		row-gap: clamp(32px, 4.167vw, 45px);
	}

	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .site-footer-primary-section-1 {
		grid-column: 1 / -1;
	}
}

/* Let the footer navigation keep its natural width on tighter desktop screens. */
@media only screen and (min-width: 1085px) and (max-width: 1199px) {
	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row {
		grid-template-columns:
			clamp(240px, 22.17vw, 266px)
			minmax(0, 1fr)
			minmax(0, 0.75fr)
			minmax(0, 1.6fr)
			minmax(0, 1.5fr);
		column-gap: clamp(12px, 1.25vw, 15px);
	}
}

/* Continue the phone stack through the gap in Astra's 545–767px grid rules. */
@media only screen and (max-width: 767px) {
	.site-primary-footer-wrap[data-section="section-primary-footer-builder"] .ast-builder-grid-row {
		grid-template-columns: minmax(0, 1fr);
		gap: clamp(24px, 4.167vw, 32px);
	}
}
