/* R36: Show the uploaded NextBridge logo directly on the theme header.
 * Never place a white card behind the logo. Insight logo and footer untouched.
 */
body.ib-brand-nextbridge:not(.insight-exact) .site-header .header-wrap > a.brand,
body.insight-exact.ib-brand-nextbridge .insight-legacy-header .logo > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: 0;
  max-width: 100%;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  outline: 0;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
body.ib-brand-nextbridge:not(.insight-exact) .site-header .header-wrap > a.brand img.brand-img,
body.insight-exact.ib-brand-nextbridge .insight-legacy-header .logo > a img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: min(285px, 100%) !important;
  max-height: 86px !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  visibility: visible !important;
}
/* Dark themes: preserve the original logo colors but subtly outline its
 * letter shapes with light pixels. There is still no background panel. */
body.ib-brand-nextbridge.theme-atelier-noir .site-header .header-wrap > a.brand img.brand-img,
body.ib-brand-nextbridge.theme-cinema .site-header .header-wrap > a.brand img.brand-img {
  filter: drop-shadow(0 0 1px rgba(255,255,255,.95))
          drop-shadow(0 0 3px rgba(255,255,255,.75)) !important;
}
@media (max-width: 640px) {
  body.ib-brand-nextbridge:not(.insight-exact) .site-header .header-wrap > a.brand img.brand-img,
  body.insight-exact.ib-brand-nextbridge .insight-legacy-header .logo > a img {
    max-width: min(260px, 100%) !important;
    max-height: 70px !important;
  }
}

/* R37: Insight's uploaded red/dark logo needs a high-contrast display treatment
 * on the TWO genuinely dark header themes only. Keep the image file intact.
 * The CSS filter creates a crisp white logo without a white card, halo or shadow.
 * Other 11 theme colors, NextBridge, admin and footer remain unchanged.
 */
body.theme-atelier-noir:not(.ib-brand-nextbridge) .site-header .header-wrap > a.brand img.brand-img,
body.theme-cinema:not(.ib-brand-nextbridge) .site-header .header-wrap > a.brand img.brand-img {
  filter: grayscale(1) brightness(0) invert(1) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}
