.mk-brand-band { display: block; overflow: hidden; min-height: 130px; padding: 0 !important; }
.mk-brand-band .mk-brand-track { display: flex; width: max-content; align-items: center; animation: mk-brand-scroll var(--mk-brand-duration, 80s) linear infinite; }
.mk-brand-band:hover .mk-brand-track { animation-play-state: paused; }
.mk-brand-band .mk-brand-set { display: flex; flex: none; align-items: center; }
.mk-brand-band .mk-brand-band-item { display: grid; place-items: center; flex: none; width: 260px; height: 128px; padding: 7px 12px; }
.mk-brand-band .mk-brand-band-item img { display: block; max-width: 100%; width: 100%; height: 114px; object-fit: contain; filter: grayscale(1) brightness(1.3); opacity: .9; transition: filter .3s, opacity .3s; }
.mk-brand-band .mk-brand-band-item:hover img { filter: none; opacity: 1; }

/* Quiet, continuous brand rail shared by the home and portfolio shortcodes. */
.mk-brand-showcase {
  position: relative;
  display: block;
  height: 164px;
  min-height: 164px;
  overflow: hidden;
  padding: 15px 0 !important;
  box-sizing: border-box;
  background: transparent;
}
.mk-brand-showcase-stage {
  position: relative;
  height: 134px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.mk-brand-showcase-track {
  display: flex;
  width: max-content;
  align-items: center;
  will-change: transform;
}
.mk-brand-showcase-track.is-ready {
  animation: mk-brand-showcase-flow var(--mk-brand-showcase-duration, 34s) linear infinite;
}
.mk-brand-showcase:hover .mk-brand-showcase-track,
.mk-brand-showcase:focus-within .mk-brand-showcase-track { animation-play-state: paused; }
.mk-brand-showcase-set {
  display: flex;
  flex: none;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
}
.mk-brand-showcase-item {
  display: flex;
  flex: 0 0 200px;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
  width: 200px;
  height: 130px;
  padding: 9px;
  box-sizing: border-box;
  background: #1b2427;
  border: 1px solid #344449;
  border-radius: 6px;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .22);
  transition: border-color .3s, background-color .3s, box-shadow .3s;
  color: inherit;
  text-decoration: none;
}
.mk-brand-showcase-item:focus-visible,
.mk-with__grid .mk-with__logo:focus-visible { outline: 2px solid #24acc5; outline-offset: 4px; }
.mk-brand-showcase-item:hover {
  background: #253236;
  border-color: rgba(19, 164, 190, .72);
  box-shadow: 0 11px 28px rgba(0, 0, 0, .34);
}
.mk-brand-showcase-item::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 90px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05), inset 0 0 10px rgba(0, 0, 0, .08);
  transition: box-shadow .3s;
  z-index: 2;
}
.mk-brand-showcase-item:hover::after {
  box-shadow: inset 0 0 0 1px rgba(19, 164, 190, .15), inset 0 0 9px rgba(0, 0, 0, .07);
}
.mk-brand-showcase .mk-brand-showcase-item img.mk-brand-logo {
  display: block;
  width: 100% !important;
  max-width: 160px !important;
  height: 90px !important;
  max-height: 90px !important;
  margin: 0 !important;
  object-fit: contain;
  border-radius: 4px;
  filter: grayscale(1) contrast(.9);
  opacity: .86;
  transition: filter .35s, opacity .35s;
}
.mk-brand-showcase .mk-brand-showcase-item:hover img.mk-brand-logo { filter: none; opacity: 1; }

/* A display-only, uniform gray treatment for flat-background logo artwork. */
.mk-with__grid .mk-with__logo { position: relative; color: inherit; text-decoration: none; }
.mk-brand-showcase-item .mk-brand-neutral-layer,
.mk-with__grid .mk-with__logo .mk-brand-neutral-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: block;
  flex: none;
  pointer-events: none;
  background-color: #e2e5e7;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  box-shadow: inset 0 0 9px rgba(0, 0, 0, .09);
  opacity: 1;
  transition: opacity .35s;
}
.mk-brand-showcase-item:hover .mk-brand-neutral-layer,
.mk-with__grid .mk-with__logo:hover .mk-brand-neutral-layer { opacity: 0; }

/* Shared display rule: existing and newly published brands use the same
   neutral treatment, while their original uploads remain untouched. */
.mk-with__grid .mk-with__logo img.mk-brand-logo {
  filter: grayscale(1) contrast(.9);
  opacity: .86;
}
.mk-with__grid .mk-with__logo:hover {
  border-color: rgba(19, 164, 190, .72);
}
.mk-with__grid .mk-with__logo:hover img.mk-brand-logo {
  filter: none;
  opacity: 1;
}

.mk-with .mk-with__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.mk-with__eyebrow {
  flex: none;
  margin-bottom: 8px;
  color: #83a6ae;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.4;
  white-space: nowrap;
}
.mk-with .mk-with__lead { margin-bottom: 20px; }
.mk-brand-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: #9ca9ad;
  font-size: 14px;
}
.mk-brand-sort__count { white-space: nowrap; }
.mk-brand-sort__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-brand-sort__button {
  appearance: none;
  padding: 7px 14px;
  border: 1px solid rgba(167, 193, 199, .28);
  border-radius: 5px;
  background: rgba(16, 28, 32, .68);
  color: #ccd5d8;
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.mk-brand-sort__button:hover,
.mk-brand-sort__button:focus-visible {
  border-color: #25a5bd;
  color: #fff;
}
.mk-brand-sort__button[aria-pressed="true"] {
  border-color: #25a5bd;
  background: rgba(25, 155, 180, .13);
  color: #82d3e1;
}
.mk-with .mk-with__grid { margin-top: 22px; }

.mk-brand-band img.mk-brand-logo--cutout { filter: grayscale(1) brightness(0) invert(1); }
.mk-brand-band img.mk-brand-logo--light { filter: grayscale(1); }
.mk-brand-band img.mk-brand-logo--color { filter: none; }
.mk-brand-band .mk-brand-band-item:hover img.mk-brand-logo { filter: none; }

@keyframes mk-brand-scroll { to { transform: translateX(-50%); } }
@keyframes mk-brand-showcase-flow { to { transform: translateX(calc(-1 * var(--mk-brand-loop-distance, 0px))); } }

@media (max-width: 767px) {
  .mk-brand-showcase { height: 128px; min-height: 128px; padding: 12px 0 !important; }
  .mk-brand-showcase-stage { height: 104px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
  .mk-brand-showcase-set { gap: 16px; padding-right: 16px; }
  .mk-brand-showcase-item { flex-basis: 156px; width: 156px; height: 100px; padding: 7px; border-radius: 5px; }
  .mk-brand-showcase-item::after { width: 128px; height: 72px; border-radius: 3px; }
  .mk-brand-showcase .mk-brand-showcase-item img.mk-brand-logo { max-width: 128px !important; height: 72px !important; max-height: 72px !important; border-radius: 3px; }
  .mk-brand-showcase-item .mk-brand-neutral-layer { border-radius: 3px; }
  .mk-brand-band .mk-brand-band-item { width: 190px; height: 96px; padding: 6px; }
  .mk-brand-band .mk-brand-band-item img { height: 84px; }
  .mk-brand-band { min-height: 98px; }
  .mk-with .mk-with__heading { align-items: start; flex-direction: column; gap: 3px; }
  .mk-with__eyebrow { margin-bottom: 0; font-size: 11px; }
  .mk-with .mk-with__lead { margin-bottom: 18px; }
  .mk-with .mk-with__grid { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-brand-showcase-stage { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .mk-brand-showcase-track.is-ready { animation: none; }
  .mk-brand-showcase-set[aria-hidden="true"] { display: none; }
  .mk-brand-showcase-item, .mk-brand-showcase-item img { transition: none; }
  .mk-brand-neutral-layer { transition: none !important; }
  .mk-brand-band .mk-brand-track { animation: none; }
  .mk-brand-band { overflow-x: auto; }
  .mk-brand-band .mk-brand-band-item img { transition: none; }
}
