/* ShieldCo Site Editor — front-end + editor alignment fixes.
 * Loaded after ShieldCo-Theme/style.css on the front end and inside the block editor.
 * Only alignment/spacing rules the theme is missing. Keep this file small and boring. */

/* --- Images ----------------------------------------------------------------- */
.wp-block-image img { max-width: 100%; height: auto; }
.wp-block-image.aligncenter,
.wp-block-image .aligncenter,
figure.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.wp-block-image.aligncenter > img,
.wp-block-image.aligncenter > a > img,
.wp-block-image .aligncenter > img { margin-left: auto; margin-right: auto; }
.wp-block-image.alignleft, .wp-block-image .alignleft { float: left; margin: 0.5em 2em 1em 0; }
.wp-block-image.alignright, .wp-block-image .alignright { float: right; margin: 0.5em 0 1em 2em; }
.wp-block-image.alignwide { max-width: calc(var(--theme-wrap-max-width, 1280px) + 8rem); margin-left: auto; margin-right: auto; }
.wp-block-image.alignfull { max-width: none; width: 100%; }
.wp-block-image figcaption { text-align: center; font-size: 0.9em; color: #555; margin: 0.6em 0 0; }

/* Images inside Genesis Blocks / core columns: centred by default; NEVER resized here
 * (icons and logos live in columns too). Opt in to "fill the column" with class image-fill. */
.gb-block-layout-column-inner > .wp-block-image,
.wp-block-column > .wp-block-image { margin-left: auto; margin-right: auto; }
.wp-block-image.image-fill img { width: 100%; object-fit: cover; }

/* Opt-in: vertically centre a column's content (add class "column-center" to the column). */
.column-center > .gb-block-layout-column-inner,
.wp-block-column.column-center { display: flex; flex-direction: column; justify-content: center; }
/* Opt-in: horizontally centre everything in a block (add class "content-center"). */
.content-center { text-align: center; }
.content-center .wp-block-image, .content-center .wp-block-buttons { justify-content: center; margin-left: auto; margin-right: auto; }

/* --- Galleries --------------------------------------------------------------- */
.wp-block-gallery.aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: 100%; object-fit: cover; }

/* --- Headings, paragraphs, buttons ------------------------------------------- */
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.has-text-align-left { text-align: left; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }
.wp-block-button__link { text-decoration: none; }

/* --- Wide / full alignment for groups, covers, columns ------------------------ */
.alignwide { max-width: calc(var(--theme-wrap-max-width, 1280px) + 8rem); margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
.wp-block-cover.alignfull, .wp-block-group.alignfull { width: 100%; }

/* --- Spacing sanity ----------------------------------------------------------- */
.wp-block-separator { margin: 3rem auto; }
.wp-block-spacer { clear: both; }
