/* Museu ODC 3.0.29 — correção de conflitos do checklist final. */
:root {
  --odc329-black: #100d0b;
  --odc329-surface: #1a130f;
  --odc329-surface-2: #2a1b12;
  --odc329-gold: #d8a83e;
  --odc329-gold-light: #f3d889;
  --odc329-cream: #f4ead8;
  --odc329-line: rgba(216, 168, 62, .38);
  --odc329-content: 1180px;
  --odc329-reading: 780px;
  --odc329-radius: 20px;
  --odc329-focus: 0 0 0 4px rgba(243, 216, 137, .42);
}
html.odc329-final-ready { scroll-behavior: smooth; }
html body :where(a,button,[role="button"]):focus-visible {
  outline: 3px solid var(--odc329-gold-light) !important;
  outline-offset: 3px !important;
  box-shadow: var(--odc329-focus) !important;
}

/* O design system não invade o mapa, a Jornada, cookies, acessibilidade ou controles externos. */
html body:not(.odc300-page-journey):not(.odc21-page-map) :where(.odc24-collection-introduction,.odc18-educational-journey,.odc17-support-page__inner,.odc329-donation) {
  width: min(calc(100% - 32px), var(--odc329-content));
  margin-inline: auto;
}
html body:not(.odc300-page-journey):not(.odc21-page-map) :where(.odc24-collection-introduction__inner,.odc18-educational-journey__content) {
  text-align: center !important;
}
html body .odc24-collection-introduction__eyebrow { display: none !important; }

/* Home: quatro destinos após a remoção dos botões redundantes. */
html body.odc16-page-home .odc25-home-primary-nav {
  grid-template-columns: minmax(0,.92fr) minmax(220px,1.28fr) minmax(0,1fr) minmax(0,.92fr) !important;
  width: min(1120px,calc(100% - 32px)) !important;
  gap: 12px !important;
}
html body.odc16-page-home .odc25-home-primary-nav__button {
  min-width: 0 !important;
  min-height: 72px !important;
  height: auto !important;
  padding: 11px 12px !important;
  font-size: clamp(.78rem,.84vw,.96rem) !important;
  line-height: 1.14 !important;
  letter-spacing: .025em !important;
  word-spacing: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-wrap: balance;
}
@media (max-width: 980px) {
  html body.odc16-page-home .odc25-home-primary-nav { grid-template-columns: repeat(2,minmax(0,1fr)) !important; width: min(720px,calc(100% - 24px)) !important; }
}
@media (max-width: 520px) {
  html body.odc16-page-home .odc25-home-primary-nav { grid-template-columns: 1fr !important; }
  html body.odc16-page-home .odc25-home-primary-nav__button { min-height: 58px !important; }
}

/* Acervo Audiovisual: os cards são destinos, não CTAs genéricos amarelos. */
html body.odc284-audio-hub .odc284-folder-card,
html body .odc284-folder-card {
  background: linear-gradient(145deg,rgba(18,9,5,.98),rgba(52,18,8,.92)) !important;
  color: #fff4dc !important;
  border-color: rgba(239,197,94,.65) !important;
  transform: none;
  filter: none;
}
html body .odc284-folder-card :where(strong,span,small) {
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
html body .odc284-folder-card .odc284-folder-copy strong { color: #efc55e !important; }
html body .odc284-folder-card .odc284-folder-copy span { color: #fff4dc !important; }
html body .odc284-folder-card .odc284-folder-copy small { color: #f1d58f !important; }
html body .odc284-folder-card:hover,
html body .odc284-folder-card:focus-visible {
  transform: translateY(-4px) !important;
  filter: none !important;
  border-color: #efc55e !important;
}

/* Acervo Educativo: remove a coluna vazia e centraliza o textual solicitado. */
html body .odc18-educational-journey { text-align: center !important; }
html body .odc18-educational-journey__eyebrow { text-align: center !important; margin-inline: auto !important; }
html body .odc18-educational-journey__card.odc329-educational-no-media {
  grid-template-columns: minmax(0,1fr) !important;
  justify-items: center !important;
  min-height: 0 !important;
}
html body .odc18-educational-journey__card.odc329-educational-no-media .odc18-educational-journey__media { display: none !important; }
html body .odc18-educational-journey__content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(100%,820px) !important;
  max-width: 820px !important;
  margin-inline: auto !important;
  padding: clamp(1.6rem,4vw,3rem) !important;
  text-align: center !important;
}
html body .odc18-educational-journey__content :where(h2,p,strong) {
  width: 100% !important;
  max-width: 760px !important;
  margin-inline: auto !important;
  text-align: center !important;
  text-align-last: center !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}
html body .odc18-educational-journey__content h2 {
  font-size: clamp(2rem,4vw,3.35rem) !important;
  line-height: 1.08 !important;
  text-wrap: balance;
}
html body .odc18-educational-journey__content p {
  font-size: clamp(1rem,1.35vw,1.24rem) !important;
  line-height: 1.62 !important;
}
html body .odc18-educational-journey__action {
  min-width: min(330px,100%) !important;
  color: #251006 !important;
  -webkit-text-fill-color: #251006 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html body .odc329-educational-prompt,
html body .odc329-educational-empty {
  width: min(100%,760px);
  margin: 1rem auto 1.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--odc329-line);
  border-radius: 14px;
  background: rgba(216,168,62,.08);
  color: var(--odc329-cream);
  text-align: center;
}
html body .odc329-educational-empty { margin-block: 1.5rem 2rem; }
html body .odc329-educational-empty p { text-align: center !important; word-spacing: normal !important; }

/* Jornada: não aplica tratamento de galeria ao cenário e mostra o bloqueio de forma útil. */
html body.odc300-page-journey .odc329-journey-consent {
  width: min(calc(100% - 32px),920px);
  margin: 12px auto 16px;
  padding: 18px 20px;
  border: 1px solid var(--odc329-line);
  border-radius: 16px;
  background: rgba(16,13,11,.97);
  color: var(--odc329-cream);
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.32);
}
html body.odc300-page-journey .odc329-journey-consent[hidden] { display: none !important; }
html body.odc300-page-journey .odc329-journey-consent strong { display: block; margin-bottom: 6px; color: var(--odc329-gold-light) !important; font-size: 1.18rem; }
html body.odc300-page-journey .odc329-journey-consent p { margin: 0 0 12px !important; text-align: center !important; word-spacing: normal !important; }
html body.odc300-page-journey .odc-game.odc329-external-blocked { min-height: 0 !important; }
html body.odc300-page-journey .odc-game.odc329-external-blocked :where(.odc-game__viewport,.odc-game__scene,.odc-game__stage) {
  min-height: 340px !important;
  height: 340px !important;
  max-height: 50vh !important;
}

/* Botões próprios do refinamento. Nada de pintar cards, acessibilidade ou controles do mapa. */
html body .odc329-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .75rem 1.1rem;
  border: 1px solid var(--odc329-gold);
  border-radius: 999px;
  background: linear-gradient(180deg,var(--odc329-gold-light),var(--odc329-gold));
  color: #1b1208 !important;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none !important;
  cursor: pointer;
}
html body .odc329-button:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* Página Apoie o Museu. */
html body .odc329-donation { padding-block: clamp(2.5rem,6vw,5rem); }
html body .odc329-donation__intro { max-width: 820px; margin: 0 auto 2rem; text-align: center; }
html body .odc329-eyebrow { color: var(--odc329-gold-light); font-size: .86rem !important; font-weight: 900; letter-spacing: .16em; }
html body .odc329-donation__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
html body :where(.odc329-donation__card,.odc329-donation__institution,.odc329-donation__use) {
  padding: clamp(1.3rem,3vw,2rem);
  border: 1px solid var(--odc329-line);
  border-radius: var(--odc329-radius);
  background: linear-gradient(145deg,rgba(42,27,18,.94),rgba(16,13,11,.96));
  color: var(--odc329-cream);
}
html body .odc329-donation__card { text-align: center; }
html body .odc329-donation__qr { display: block; width: min(230px,76vw); aspect-ratio: 1; object-fit: contain; margin: 1rem auto; padding: .6rem; border-radius: 14px; background: #fff; }
html body .odc329-copy-status { display: block; min-height: 1.5em; margin-top: .65rem; font-size: .94rem; }
html body .odc329-admin-pending { padding: .85rem; border: 1px dashed rgba(243,216,137,.55); border-radius: 12px; background: rgba(216,168,62,.08); }
html body :where(.odc329-donation__institution,.odc329-donation__use) { margin-top: 1.5rem; }
html body .odc329-donation__institution a { color: var(--odc329-gold-light); }
@media (max-width: 760px) { html body .odc329-donation__grid { grid-template-columns: 1fr; } }

/* Política. */
html body .odc328-policy-table-wrap { overflow-x: auto; margin-block: 1.2rem; }
html body .odc328-policy-table { width: 100%; border-collapse: collapse; min-width: 680px; }
html body .odc328-policy-table :where(th,td) { padding: .8rem; border: 1px solid var(--odc329-line); text-align: left; vertical-align: top; }
html body .odc328-policy-table th { background: rgba(216,168,62,.14); }

/* Mapa: reforço compatível com o plugin 2.3.2. */
html body .odc-mapa-pin--matriz { background: #F0C76A !important; background-color: #F0C76A !important; }
html body .odc-mapa-pin--recente { background: #C66D36 !important; background-color: #C66D36 !important; }
html body .odc-mapa-pin--historica { background: #E6D2A2 !important; background-color: #E6D2A2 !important; }

/* Exposições: somente galerias reais, nunca a Jornada. */
html body :where(.page-exposicoes,.odc21-page-exposicoes) .odc329-exhibition-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
  image-orientation: from-image;
}
html body :where(.page-exposicoes,.odc21-page-exposicoes) :where(.wp-block-gallery,.gallery,.odc-gallery) .odc329-exhibition-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: reduce) {
  html.odc329-final-ready { scroll-behavior: auto; }
  html body .odc329-button { transition: none !important; }
}
