/* Page sections + shared Styling tab. Loaded only where sections are used. */
.ahs-section { position: relative; box-sizing: border-box; }

.ahs-section.ahs-pt-none { padding-top: 0; }
.ahs-section.ahs-pt-sm { padding-top: 1.5rem; }
.ahs-section.ahs-pt-md { padding-top: clamp(2rem, 5vw, 3rem); }
.ahs-section.ahs-pt-lg { padding-top: clamp(3rem, 8vw, 5rem); }
.ahs-section.ahs-pt-xl { padding-top: clamp(4rem, 12vw, 8rem); }
.ahs-section.ahs-pb-none { padding-bottom: 0; }
.ahs-section.ahs-pb-sm { padding-bottom: 1.5rem; }
.ahs-section.ahs-pb-md { padding-bottom: clamp(2rem, 5vw, 3rem); }
.ahs-section.ahs-pb-lg { padding-bottom: clamp(3rem, 8vw, 5rem); }
.ahs-section.ahs-pb-xl { padding-bottom: clamp(4rem, 12vw, 8rem); }

/*
 * Full-width background: the section breaks out of the theme container to
 * the screen edges, and the padding pulls its content back in so it lines up
 * exactly with the page content above and below (whatever the container width).
 */
.ahs-section--full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: max(1.25rem, calc(50vw - 50%));
	padding-right: max(1.25rem, calc(50vw - 50%));
}

/* Boxed section with a background colour: keep text off the box edges. */
.ahs-section.has-background:not(.ahs-section--full):not(.alignfull):not(.alignwide) { padding-inline: 1.5rem; }
html:has(.ahs-section--full) { overflow-x: clip; }

.ahs-section.has-text-color :is(h1, h2, h3, h4, h5, h6, p, li, blockquote):not(.ahs__card-inner *) { color: inherit; }

/* Full-width content section. "Normal" width matches the page content. */
.ahs-content { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.ahs-content__inner { margin-inline: auto; }
.ahs-content--narrow .ahs-content__inner { max-width: 760px; }
.ahs-content--wide .ahs-content__inner {
	width: min(1440px, 100vw - 2.5rem);
	margin-left: calc(50% - min(720px, 50vw - 1.25rem));
}
.ahs-section--full.ahs-content--full { padding-inline: 1.25rem; }
.ahs-content--align-center .ahs-content__inner { text-align: center; }
.ahs-content__inner > :first-child { margin-top: 0; }
.ahs-content__inner > :last-child { margin-bottom: 0; }
.ahs-content__inner img { max-width: 100%; height: auto; }
.ahs-content__inner .alignleft { float: left; margin: 0.5em 1.5em 1em 0; }
.ahs-content__inner .alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.ahs-content__inner .aligncenter { display: block; margin-inline: auto; }
.ahs-content__inner::after { content: ""; display: table; clear: both; }
