/* Brand hubs + chips (J3) — additive UI only */

/*
 * Center logo + H1 on hubs only.
 * Beats style.css body:not(.single-post) .entry-header .entry-title { text-align:left }
 */
body.mh-brand-hub-page .inside-article > .entry-header,
body.mh-brand-hub-page .entry-header,
body.mh-brand-hub-page .inside-article > .entry-header .entry-title,
body.mh-brand-hub-page .entry-header .entry-title,
body.mh-brand-hub-page h1.entry-title {
  text-align: center !important;
  text-align-last: center !important;
}

.mh-brand-hub__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.85rem;
}

.mh-brand-hub__logo {
  display: block;
  width: auto;
  max-width: min(280px, 78%);
  height: 52px;
  object-fit: contain;
  object-position: center;
  filter: none !important; /* official color marks */
}

.mh-brand-hub__logo--roundel {
  width: 88px;
  height: 88px;
  max-width: 88px;
  max-height: 88px;
  aspect-ratio: 1 / 1;
}

/*
 * Mercedes star — fixed square wrap + img fill.
 * Base .mh-brand-hub__logo { height:52px; width:auto } must not win.
 */
.mh-brand-hub__logo-wrap--mercedes {
  width: 88px;
  height: 88px;
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
}

.mh-brand-hub__logo.mh-brand-hub__logo--mercedes {
  box-sizing: border-box;
  width: 88px !important;
  height: 88px !important;
  max-width: 88px !important;
  max-height: 88px !important;
  min-width: 88px !important;
  min-height: 88px !important;
  flex: 0 0 88px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  align-self: center;
}

/*
 * Mercedes star SVG is light (#f2f2f2) so it reads on night UI.
 * Invert only in light theme (glyph → near-black).
 */
html[data-mh-theme="light"] .mh-brand-hub__logo--ink {
  filter: invert(1) !important;
}

@media (prefers-color-scheme: light) {
  html:not([data-mh-theme="dark"]) .mh-brand-hub__logo--ink {
    filter: invert(1) !important;
  }
}

body.mh-brand-hub-page .entry-header .entry-title,
body.mh-brand-hub-page h1.entry-title {
  margin-top: 0.15rem;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mh-brand-hub__crumb {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  opacity: 0.85;
  text-align: center !important;
}

.mh-brand-hub__crumb a {
  text-decoration: none;
}

/* Intro plate — full width of article column (same as feed cards) */
.mh-brand-hub__intro {
  margin: 0 0 1.75rem;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--mh-accent, #f87800) 28%, var(--mh-border, #3a3a3a));
  border-radius: 6px;
  background: color-mix(in srgb, var(--mh-surface-2, #2a2a2a) 55%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 4%, transparent);
}

html[data-mh-theme="light"] .mh-brand-hub__intro {
  background: color-mix(in srgb, #f87800 5%, #f4f4f6);
  border-color: color-mix(in srgb, #f87800 22%, #d0d0d4);
}

.mh-brand-hub__summary {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--mh-text, inherit);
  opacity: 1;
}

.mh-brand-hub__meta {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.mh-brand-hub__history-title {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mh-accent, #f87800);
}

.mh-brand-hub__history {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: 0.95;
}

.mh-brand-hub__feed-title {
  margin: 0 0 1rem;
  padding-top: 0.35rem;
  font-size: 1.15rem;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mh-brands-index__intro {
  margin: 0 0 1.25rem;
  opacity: 0.9;
}

.mh-brands-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.mh-brands-index__item {
  padding: 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mh-brands-index__link {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
}

.mh-brands-index__summary {
  margin: 0.35rem 0 0;
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.4;
}

.mh-brand-hub__list {
  display: grid;
  gap: 1.5rem;
  margin: 0.5rem 0 1.5rem;
}

.mh-brand-hub__card {
  margin: 0;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mh-brand-hub__thumb {
  display: block;
  margin: 0 0 0.75rem;
  overflow: hidden;
  border-radius: 4px;
}

.mh-brand-hub__thumb img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* No-photo plate inside hub cards (single link, full-bleed) */
.mh-brand-hub__thumb--fallback {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
}

.mh-brand-hub__thumb--fallback .mh-featured-fallback__plate {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.mh-brand-hub__thumb--fallback .mh-featured-fallback__img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
}

.mh-brand-hub__title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.mh-brand-hub__title a {
  text-decoration: none;
}

.mh-brand-hub__excerpt {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.45;
}

.mh-brand-hub__empty {
  margin: 1rem 0;
  opacity: 0.8;
}

.mh-brand-hub__pager {
  margin: 1.5rem 0 0.5rem;
}

.mh-brand-hub__pager .page-numbers {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mh-brand-hub__pager .page-numbers a,
.mh-brand-hub__pager .page-numbers span {
  display: inline-block;
  min-width: 2rem;
  padding: 0.35rem 0.55rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.mh-brand-hub__pager .page-numbers .current {
  font-weight: 600;
}

.mh-brand-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  font-size: 0.9rem;
}

.mh-brand-chips__label {
  opacity: 0.7;
  margin-right: 0.25rem;
}

.mh-brand-chips__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mh-brand-chips__link {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 2px;
}

.mh-brand-chips__link:hover,
.mh-brand-chips__link:focus-visible {
  border-color: currentColor;
}
