/* Keep the primary brand mark balanced inside the fixed header in every theme. */
body > header.site-header .brand {
  flex:0 0 auto;
  min-width:220px!important;
  max-width:220px;
  overflow:visible!important;
}

body > header.site-header .brand img {
  display:block;
  width:210px!important;
  max-width:100%!important;
  height:72px!important;
  object-fit:contain!important;
  object-position:left center!important;
  overflow:visible!important;
}

/* Integrate the group brands into the footer instead of presenting them as a
   separate, oversized white page section. Builder-set colours and spacing are
   intentionally overridden so the result remains consistent across themes. */
footer .brand-group {
  grid-column:1 / -1!important;
  display:block!important;
  width:100%!important;
  max-width:1180px!important;
  margin:0 auto 30px!important;
  padding:0 0 28px!important;
  background:transparent!important;
  color:inherit!important;
  border-bottom:1px solid color-mix(in srgb,var(--cms-accent,#ffffff) 24%,transparent)!important;
  box-shadow:none!important;
}

footer .brand-group-heading {
  max-width:720px!important;
  margin:0 auto 20px!important;
  padding:0!important;
  text-align:center!important;
}

footer .brand-group-heading > span {
  color:var(--cms-primary,#e10613)!important;
  font-size:10px!important;
}

footer .brand-group-heading h2 {
  margin:7px 0 6px!important;
  color:#fff!important;
  font-size:clamp(22px,2.3vw,30px)!important;
  line-height:1.15!important;
}

footer .brand-group-heading p {
  margin:0!important;
  color:#aeb9c2!important;
  font-size:13px!important;
  line-height:1.55!important;
}

footer .group-logos {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  width:100%!important;
  max-width:690px!important;
  margin:0 auto!important;
}

footer .group-brand {
  width:100%!important;
  min-height:104px!important;
  padding:12px 14px 10px!important;
  background:linear-gradient(145deg,#fff,#f4f5f6)!important;
  border:1px solid rgba(255,255,255,.32)!important;
  border-radius:10px!important;
  box-shadow:0 10px 24px rgba(0,0,0,.22)!important;
}

footer .group-brand:before {
  height:3px!important;
  background:var(--cms-primary,#1557c0)!important;
}

footer .group-brand small {
  color:var(--cms-dark,#0a244d)!important;
}

footer .group-brand img {
  width:min(100%,240px)!important;
  height:58px!important;
  margin:0 auto!important;
  object-fit:contain!important;
}

footer .group-brand small {
  margin-top:5px!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
}

footer .group-statement {
  max-width:760px!important;
  margin:16px auto 0!important;
  padding:0!important;
  gap:10px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#aeb9c2!important;
  font-size:11px!important;
}

footer .group-statement b {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 15px!important;
  border:1px solid color-mix(in srgb,var(--cms-primary,#1557c0) 75%,white)!important;
  border-radius:999px!important;
  background:var(--cms-primary,#1557c0)!important;
  color:var(--cms-on-primary,#fff)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.2!important;
  letter-spacing:.05em!important;
  text-align:center;
}

@media (max-width:900px) {
  body > header.site-header .brand {
    min-width:190px!important;
    max-width:190px;
  }

  body > header.site-header .brand img {
    width:185px!important;
    height:64px!important;
  }

  footer .brand-group {
    margin-bottom:24px!important;
  }
}

@media (max-width:700px) {
  body > header.site-header .brand {
    min-width:0!important;
    max-width:180px;
  }

  body > header.site-header .brand img {
    width:175px!important;
    height:62px!important;
  }

  footer .brand-group {
    grid-column:1!important;
    margin:0 auto 22px!important;
    padding:0 0 24px!important;
  }

  footer .brand-group-heading {
    margin-bottom:16px!important;
  }

  footer .brand-group-heading h2 {
    font-size:22px!important;
  }

  footer .group-logos {
    grid-template-columns:1fr!important;
    max-width:410px!important;
    gap:10px!important;
  }

  footer .group-brand {
    min-height:86px!important;
    padding:9px 12px 8px!important;
  }

  footer .group-brand img {
    width:min(100%,220px)!important;
    height:48px!important;
  }

  footer .group-brand small {
    margin-top:3px!important;
    font-size:8px!important;
  }

  footer .group-statement {
    flex-direction:column!important;
    margin-top:13px!important;
    text-align:center!important;
  }
}

@media (max-width:380px) {
  body > header.site-header .brand {
    max-width:160px;
  }

  body > header.site-header .brand img {
    width:155px!important;
    height:58px!important;
  }
}
