/* Accreditation strip and client logo strip (inc/trust.php). */

/* Accreditations: navy logos in a row on cool grey with an orange top rule,
   under the home hero (David, 02/11: no dark band). */
.mg-accred {
  background: var(--c-surface-alt);
  border-top: 4px solid var(--c-accent);
  padding: 28px 0 22px;
}
.mg-accred__h {
  margin: 0 0 18px; text-align: center;
  font-family: var(--f-body); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent-text);
}
.mg-accred__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
}
.mg-accred__item { display: flex; align-items: center; justify-content: center; }
.mg-accred .mg-logo { display: block; width: auto; max-width: 100%; object-fit: contain; }
/* Heights balance each logo's visual weight, not its file size. */
.mg-accred .mg-logo--dhf { height: 44px; }
.mg-accred .mg-logo--cl { height: 72px; }
.mg-accred .mg-logo--chas { height: 50px; }
.mg-accred .mg-logo--gs { height: 80px; }
.mg-accred .mg-logo--ukca { height: 54px; }
.mg-accred .mg-logo--ce { height: 70px; }
.mg-accred__note {
  margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--c-text);
}
.mg-accred__note a { color: var(--c-accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* Clients: full colour logos moving slowly right to left. */
.mg-clients { position: relative; margin-top: 8px; }
.mg-clients__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mg-clients__track { display: flex; width: max-content; animation: mg-clients-scroll 40s linear infinite; }
.mg-clients__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center;
}
.mg-clients__item {
  flex: none; display: flex; align-items: center; justify-content: center;
  height: 96px; padding: 0 44px;
}
.mg-clients .mg-logo { display: block; width: auto; }
.mg-clients .mg-logo--tall { height: 84px; }
.mg-clients .mg-logo--square { height: 88px; }
.mg-clients .mg-logo--short { height: 38px; }
.mg-clients .mg-logo--thin { height: 30px; }
.mg-clients:hover .mg-clients__track,
.mg-clients:focus-within .mg-clients__track,
.mg-clients.is-paused .mg-clients__track { animation-play-state: paused; }
.mg-clients__pause {
  display: block; margin: 12px auto 0;
  background: none; border: 0; padding: 6px 10px; cursor: pointer;
  font: 600 14px/1.4 var(--f-body); color: var(--c-text-muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.mg-clients__pause:hover { color: var(--c-text); }
.mg-clients__pause:focus-visible { outline: 2px solid var(--c-accent-strong); outline-offset: 2px; }

@keyframes mg-clients-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* David wants it moving for everyone (02/11). Reduced motion gets a slower
   pace instead of a still row; the pause button covers WCAG 2.2.2. */
@media (prefers-reduced-motion: reduce) {
  .mg-clients__track { animation-duration: 80s; }
}

@media (max-width: 900px) {
  .mg-accred__list { justify-content: center; gap: 22px 32px; }
}
@media (max-width: 600px) {
  .mg-accred__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 16px; }
}
@media (max-width: 900px) {
  .mg-accred .mg-logo--dhf { height: 36px; }
  .mg-accred .mg-logo--cl { height: 58px; }
  .mg-accred .mg-logo--chas { height: 40px; }
  .mg-accred .mg-logo--gs { height: 64px; }
  .mg-accred .mg-logo--ukca { height: 44px; }
  .mg-accred .mg-logo--ce { height: 56px; }
  .mg-clients__item { height: 80px; padding: 0 30px; }
  .mg-clients .mg-logo--tall { height: 70px; }
  .mg-clients .mg-logo--square { height: 72px; }
  .mg-clients .mg-logo--short { height: 32px; }
  .mg-clients .mg-logo--thin { height: 26px; }
}

/* Sized to fit a third of a phone screen without squashing. */
@media (max-width: 600px) {
  .mg-accred .mg-logo--dhf { height: 30px; }
  .mg-accred .mg-logo--cl { height: 46px; }
  .mg-accred .mg-logo--chas { height: 36px; }
  .mg-accred .mg-logo--gs { height: 56px; }
  .mg-accred .mg-logo--ukca { height: 40px; }
  .mg-accred .mg-logo--ce { height: 46px; }
}
