:root {
    --haw-content-gutter: clamp(1rem, 2.5vw, 2rem);
}

#content {
    overflow-wrap: anywhere;
}

#content .is-empty-column {
    pointer-events: none;
    background: transparent !important;
    box-shadow: none !important;
}

/* Reserve each image's processed width before lazy loading. Centered galleries
   shrink their columns together within the available content width. */
#content .ce-column {
    width: var(--t3up-media-width, auto);
    max-width: 100%;
}

#content .ce-center .ce-outer,
#content .ce-center .ce-inner {
    position: static;
    float: none;
    width: 100%;
}

#content .ce-center .ce-row {
    display: flex;
    justify-content: center;
}

#content .ce-center .ce-column {
    min-width: 0;
    flex-shrink: 1;
}

/* In-text media must leave room for its accompanying heading and copy. */
#content .ce-intext.ce-nowrap > .ce-gallery {
    max-width: 45%;
}

#content .ce-intext.ce-nowrap.ce-right > .ce-gallery {
    margin-left: 1.5rem;
}

#content .ce-intext.ce-nowrap.ce-left > .ce-gallery {
    margin-right: 1.5rem;
}

#content .ce-intext .ce-gallery img {
    width: auto;
}

@media (max-width: 767.98px) {
    #content .ce-intext.ce-nowrap > .ce-gallery {
        float: none;
        max-width: 100%;
        margin-inline: 0;
    }

    #content .ce-intext.ce-nowrap > .ce-bodytext {
        clear: both;
    }
}

@media (max-width: 991.98px) {
    #content.leftNavigation .subnav {
        order: 2;
    }
}

/* Keep the footer after the complete page, including long content. */
#footer {
    position: relative;
    top: auto;
    bottom: auto;
}

/* Content containers retain the site's configured maximum width. The gutter
   remains present when the outer page padding is disabled at wide viewports. */
#content > .container,
#content.onePager > .content > .opg > .container {
    box-sizing: border-box;
    padding-inline: var(--haw-content-gutter);
}

#content.onePager {
    padding-inline: 0 !important;
}

/* Keep headings available to assistive technology without letting their
   off-screen text enlarge the horizontal scroll area on small screens. */
#content .outof {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0 !important;
}

/* The three editorial teaser cards on the HAW homepage. */
#c828 > .container > .row {
    width: auto !important;
    margin-inline: -0.75rem;
    align-items: stretch;
}

#c828 > .container > .row > .col {
    display: flex;
    min-width: 0;
    padding-inline: 0.75rem;
}

#c828 .frame-textmedia,
#c828 .ce-textpic {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

#c828 .ce-gallery,
#c828 .ce-outer,
#c828 .ce-inner,
#c828 .ce-row,
#c828 .ce-column {
    position: static;
    float: none;
    width: 100%;
    margin: 0;
}

#c828 .ce-gallery {
    flex: 0 0 auto;
}

#c828 figure.image {
    position: relative;
    width: 100%;
    margin: 0;
}

#c828 figure.image > a,
#c828 picture {
    display: block;
    width: 100%;
}

#c828 picture {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

#c828 picture img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

#c828 .frame-layout-2100 picture img {
    object-fit: contain;
    background: #fff;
}

#c828 .image-caption {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    max-width: calc(100% - 1rem);
    margin: 0;
    padding: 0.125rem 0.375rem;
    color: #fff;
    background: rgb(0 0 0 / 70%);
    font-size: 0.75rem;
    line-height: 1.3;
}

#c828 .image-caption br:last-child {
    display: none;
}

#c828 .ce-bodytext {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.25rem;
}

#c828 .ce-bodytext > hr:last-of-type {
    margin-top: auto;
}

#c828 .ce-bodytext > p:last-child {
    margin-bottom: 0;
}
