/* Upcuan v3.3.0.49 - Indexing logos: horizontal, max 4 per row, centered */
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  line-height: 0 !important;
}

/* TinyMCE normally wraps each inserted logo in a <p>. Turn image paragraphs
   into inline flex cells. Four cells fit per row; the next cell wraps. */
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > p:has(img),
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > figure:has(img),
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > a:has(img),
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > img {
  display: inline-flex !important;
  width: calc(25% - 22px) !important;
  min-width: 0 !important;
  max-width: 210px !important;
  min-height: 86px !important;
  margin: 10px !important;
  padding: 4px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  text-align: center !important;
  line-height: normal !important;
}

/* Keep non-image editor content such as the "Indexing" label on its own row. */
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > p:not(:has(img)),
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > h1,
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > h2,
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > h3,
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > h4 {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > p:has(img) a,
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > figure:has(img) a,
.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > a:has(img) {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content img,
.footer .upc-footer-v39 .upc-footer-indexing img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 72px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}

/* Tablet: keep a comfortable two-column layout. */
@media (max-width: 820px) {
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > p:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > figure:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > a:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > img {
    width: calc(50% - 20px) !important;
    max-width: 190px !important;
  }
}

/* Small phones: one logo per row, centered. */
@media (max-width: 440px) {
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > p:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > figure:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > a:has(img),
  .footer .upc-footer-v39 .upc-footer-indexing .upc-footer-rich-content > img {
    width: calc(100% - 20px) !important;
    max-width: 210px !important;
  }
}
