/*
 * Subset of the WordPress block-library CSS that the original pages depended on
 * (columns, image, heading alignment, latest-posts grid). Selectors are kept
 * identical to WordPress's so the rendered layout matches the source site.
 */
:where(figure) { margin: 0 0 1em; }
html :where(img[class*=wp-image-]) { height: auto; max-width: 100%; }
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }

/* Columns */
.wp-block-columns { box-sizing: border-box; display: flex; flex-wrap: wrap !important; align-items: normal !important; }
@media (min-width: 782px) { .wp-block-columns { flex-wrap: nowrap !important; } }
@media (max-width: 781px) { .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important; } }
@media (min-width: 782px) { .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 0; flex-grow: 1; } }
:where(.wp-block-columns) { margin-bottom: 1.75em; }
.wp-block-column { flex-grow: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
:where(.is-layout-flex) { gap: 0.5em; }
body .is-layout-flex { display: flex; }
.is-layout-flex { flex-wrap: wrap; align-items: center; }
.is-layout-flex > :is(*, div) { margin: 0; }
:where(.wp-block-columns.is-layout-flex) { gap: 2em; }

/* Image */
.wp-block-image > a, .wp-block-image > figure > a { display: inline-block; }
.wp-block-image img { box-sizing: border-box; height: auto; max-width: 100%; vertical-align: bottom; }
.wp-block-image figure { margin: 0; }

/* Latest posts (blog index) */
.wp-block-latest-posts { box-sizing: border-box; }
.wp-block-latest-posts.is-grid { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.wp-block-latest-posts.is-grid li { margin: 0 1.25em 1.25em 0; width: 100%; }
@media (min-width: 600px) { .wp-block-latest-posts.columns-3 li { width: calc(33.33333% - .83333em); } }
