/**
 * IB Mission Statement — IB Programme Recognition (logos + PYP model).
 * Overrides shared `.literacy-body__gallery` rules that square-crop photos.
 */

/* —— Section —— */
.literacy-body__gallery.ib-mission-statement-gallery {
  --ib-mission-logo-max-h: 7.5rem;
  --ib-mission-model-max-h: 28rem;
  --ib-mission-model-max-w: 42rem;
}

.literacy-body__gallery.ib-mission-statement-gallery > .wp-block-heading,
.literacy-body__gallery.ib-mission-statement-gallery .wp-block-heading.has-text-align-center {
  margin-top: 0;
  margin-bottom: 1.75rem;
}

/* —— Columns layout —— */
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row,
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row {
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-left: auto;
  margin-right: auto;
  align-items: flex-start;
}

.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row .wp-block-column,
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row .wp-block-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* —— Image blocks: full reset vs literacy gallery (no square crop / heavy shadow) —— */
.literacy-body__gallery.ib-mission-statement-gallery .wp-block-column .wp-block-image {
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.literacy-body__gallery.ib-mission-statement-gallery .wp-block-image img {
  /* Overrides .literacy-body__gallery .wp-block-image img (square crop) */
  width: auto;
  max-width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* Two-up logos: fixed visual height so both columns align */
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row .wp-block-image img {
  max-height: var(--ib-mission-logo-max-h);
}

/* PYP model diagram: bounded size, centred */
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row .wp-block-image {
  margin-bottom: 1.25rem;
}

.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row .wp-block-image img {
  max-height: min(var(--ib-mission-model-max-h), 70vh);
  max-width: min(100%, var(--ib-mission-model-max-w));
}

/* Captions under logos / model */
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row h4.wp-block-heading,
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row h4.wp-block-heading {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #111827;
}

.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row p,
.literacy-body__gallery.ib-mission-statement-gallery .ib-mission-model-row p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #4b5563;
  max-width: 22rem;
}

/* Narrow screens: stack logo row comfortably */
@media (max-width: 600px) {
  .literacy-body__gallery.ib-mission-statement-gallery {
    --ib-mission-logo-max-h: 6rem;
    --ib-mission-model-max-h: 22rem;
  }

  .literacy-body__gallery.ib-mission-statement-gallery .ib-mission-logo-row .wp-block-column {
    margin-bottom: 0.5rem;
  }
}
