/*
 * WordPress core block-library GALLERY styles (verbatim subset from
 * block-library/style.css, WP 6.x). On live these ship whenever a
 * `wp-block-gallery` block is present; our capture of wp-core-early.css included
 * the generic `.is-layout-flex` rules but NOT the gallery's per-column widths, so
 * the 5 images on /the-team-partnership/ each took a full row and stacked
 * vertically. Scoped entirely to `.wp-block-gallery` — touches nothing else
 * (Rule 1). Loaded right after wp-core-early.css to sit with the WP core block CSS.
 */
.wp-block-gallery.has-nested-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  position: relative;
  width: calc(50% - 8px);
}
.wp-block-gallery.has-nested-images figure.wp-block-image > a,
.wp-block-gallery.has-nested-images figure.wp-block-image > div:not(.components-drop-zone) {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin: 0;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
  display: block;
  height: auto;
  max-width: 100%;
  width: auto;
}
.wp-block-gallery.columns-1.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: 100%;
}
.wp-block-gallery.columns-2.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: calc(50% - 8px);
}
.wp-block-gallery.columns-3.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: calc(33.33333% - 10.66667px);
}
.wp-block-gallery.columns-4.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: calc(25% - 12px);
}
.wp-block-gallery.columns-5.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: calc(20% - 12.8px);
}
.wp-block-gallery.columns-6.has-nested-images figure.wp-block-image:not(#individual-image) {
  width: calc(16.66667% - 13.33333px);
}
/* is-cropped: equal-height, object-fit cover (the live look). */
.wp-block-gallery.is-cropped figure.wp-block-image:not(#individual-image) a,
.wp-block-gallery.is-cropped figure.wp-block-image:not(#individual-image) div:not(.components-drop-zone) {
  display: flex;
}
.wp-block-gallery.is-cropped figure.wp-block-image:not(#individual-image) a,
.wp-block-gallery.is-cropped figure.wp-block-image:not(#individual-image) img {
  flex: 1 0 0%;
  height: 100%;
  object-fit: cover;
  width: 100%;
}
/* Mobile: WP core collapses galleries to a 2-up (then the theme's own <=780
   column stacking applies to the surrounding panels, not this figure grid). */
@media (max-width: 599px) {
  .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: calc(50% - 8px);
  }
}
