/*
Theme Name: Museu Zaire
Description: Tema leve do Museu Barco Zaire (Lobito, Benguela). Mantém o visual do site antigo: fundo branco, tipo de letra Poppins, botões grandes e arredondados.
Author: Museu Zaire
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: museu-zaire
*/

:root {
  --mz-red: #F43F3F;
  --mz-dark: #22252A;
  --mz-yellow: #FFC309;
  --mz-blue: #3B82F6;
  --mz-gray: #E5E7EB;
  --mz-gray-text: #A9A9A9;
  --mz-text: #000;
  --mz-radius: 20px;
  --mz-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--mz-text);
  font-family: var(--mz-font);
  font-weight: 400;
  line-height: 1.6;
}

img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- Estrutura (ecrã inteiro, estilo quiosque) ---------- */
.mz-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.mz-split {
  flex-direction: row;
  align-items: center;
  gap: 40px;
}
.mz-split > .mz-col { flex: 1 1 50%; min-width: 0; }
.mz-split > .mz-col.mz-brand { display: flex; flex-direction: column; align-items: center; }

.mz-brand { text-align: center; }
.mz-brand img { width: min(320px, 60vw); height: auto; display: block; margin: 0 auto calc(min(320px, 60vw) * -.14); }
.mz-tagline { position: relative; margin: 0; font-size: 15px; font-weight: 400; color: var(--mz-gray-text); text-align: center; }

.mz-menu { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.mz-row { display: flex; gap: 16px; }
.mz-row > * { flex: 1 1 0; min-width: 0; }

/* ---------- Botões ---------- */
.mz-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 28px 32px;
  border: 0;
  border-radius: var(--mz-radius);
  font-family: var(--mz-font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--mz-dark);
  box-shadow: 0 0 10px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mz-btn:hover, .mz-btn:focus-visible { transform: translateY(-4px) scale(1.02); box-shadow: 0 6px 22px rgba(0, 0, 0, .35); }
.mz-btn:focus-visible { outline: 3px solid var(--mz-blue); outline-offset: 3px; }
.mz-btn svg { width: 1.2em; height: 1.2em; flex: none; }

.mz-btn--red    { background: var(--mz-red);    box-shadow: 0 0 15px rgba(244, 63, 63, .55); }
.mz-btn--dark   { background: var(--mz-dark);   box-shadow: 0 0 15px rgba(34, 37, 42, .45); }
.mz-btn--yellow { background: var(--mz-yellow); box-shadow: 0 0 15px rgba(255, 195, 9, .6); }
.mz-btn--blue   { background: var(--mz-blue);   box-shadow: 0 0 15px rgba(59, 130, 246, .5); }
.mz-btn--gray   { background: var(--mz-gray); color: #6b7280; font-size: 16px; padding: 18px 24px; box-shadow: none; }
.mz-btn--left   { justify-content: flex-start; text-align: left; }
.mz-btn--sm     { font-size: 16px; padding: 14px 22px; min-height: 0; width: auto; }

/* ---------- Títulos e texto ---------- */
.mz-title { margin: 0 0 8px; font-size: clamp(28px, 5vw, 40px); font-weight: 700; line-height: 1.15; }
.mz-title--center { text-align: center; }
.mz-lead { margin: 0 0 16px; font-weight: 200; font-size: 18px; text-align: center; }

.mz-content { font-weight: 300; font-size: 17px; color: #475569; }
.mz-content p { margin: 0 0 1em; }
.mz-content a { color: #e11d48; }
.mz-content ul, .mz-content ol { padding-left: 1.2em; }
.mz-content figure { margin: 0 0 1em; }
.mz-content img { border-radius: var(--mz-radius); }
.mz-content .wp-block-embed iframe, .mz-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--mz-radius); }

/* ---------- Página de detalhe ---------- */
.mz-detail { align-items: flex-start; }
.mz-detail .mz-col { display: flex; flex-direction: column; gap: 16px; }
.mz-featured { width: 100%; border-radius: var(--mz-radius); display: block; }
.mz-meta { font-size: 14px; color: #6b7280; }
.mz-postnav { display: flex; gap: 12px; flex-wrap: wrap; }

.mz-detail--solo { justify-content: flex-start; padding-top: 48px; max-width: 860px; }
.mz-detail--solo > .mz-col { flex: 1 1 100%; width: 100%; }
.mz-player { width: 100%; }
.mz-player video, .mz-player audio { width: 100%; border-radius: var(--mz-radius); }

.mz-page { max-width: 820px; justify-content: flex-start; padding-top: 48px; align-items: stretch; }

/* ---------- Listas (cartões) ---------- */
.mz-listing { justify-content: flex-start; align-items: stretch; padding-top: 40px; }
.mz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; width: 100%; }
.mz-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: #f9f9f9; border: 1px solid #ddd; border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mz-card:hover, .mz-card:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0, 0, 0, .15); }
.mz-card__thumb { aspect-ratio: 16 / 9; background: var(--mz-dark); display: flex; align-items: center; justify-content: center; color: #fff; }
.mz-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mz-card__thumb svg { width: 56px; height: 56px; opacity: .85; }
.mz-card__body { padding: 16px 18px 20px; }
.mz-card__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: #333; }

.mz-filters { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.mz-filters .mz-btn { width: auto; }
.mz-filters .mz-btn.is-active { background: var(--mz-red); box-shadow: 0 0 15px rgba(244, 63, 63, .55); }

.mz-empty { padding: 24px; text-align: center; color: #6b7280; background: #f9f9f9; border: 1px solid #ddd; border-radius: 10px; width: 100%; }

.mz-pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.mz-pagination a, .mz-pagination span { padding: 8px 14px; border-radius: 10px; background: var(--mz-gray); text-decoration: none; }
.mz-pagination .current { background: var(--mz-dark); color: #fff; }

/* ---------- Seletor de idioma ---------- */
.mz-lang { position: absolute; top: 12px; right: 12px; z-index: 20; }
.admin-bar .mz-lang { top: 44px; }
@media (max-width: 782px) { .admin-bar .mz-lang { top: 58px; } }
.mz-lang ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mz-lang a {
  display: block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; text-transform: uppercase;
  background: var(--mz-gray); color: var(--mz-dark);
}
.mz-lang .current-lang a { background: var(--mz-dark); color: #fff; }
.mz-lang img { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .mz-split { flex-direction: column; gap: 24px; }
  .mz-split > .mz-col { flex-basis: auto; width: 100%; }
  .mz-btn { font-size: 18px; padding: 22px 20px; }
  .mz-row { flex-direction: column; }
  .mz-stage { justify-content: flex-start; padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .mz-btn, .mz-card { transition: none; }
  .mz-btn:hover, .mz-card:hover { transform: none; }
}


/* =====================================================================
   Melhorias de layout (v1.2): espaçamento, leitura e navegação.
   As cores e o tipo de letra não mudam.
   ===================================================================== */

/* Caminho (breadcrumb) */
.mz-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: #6b7280; margin: 0 0 4px; }
.mz-crumbs a { color: inherit; text-decoration: none; }
.mz-crumbs a:hover, .mz-crumbs a:focus-visible { text-decoration: underline; }
.mz-crumbs__sep { opacity: .6; }
.mz-listing .mz-crumbs { justify-content: center; }

/* Páginas interiores: largura e ritmo vertical mais equilibrados */
.mz-stage { gap: 28px; }
.mz-detail, .mz-listing, .mz-page { justify-content: flex-start; padding-top: 48px; padding-bottom: 64px; }
.mz-detail { align-items: flex-start; gap: 48px; max-width: 1120px; }
.mz-detail > .mz-col { flex: 1 1 0; }
.mz-detail > article.mz-col { flex-basis: 56%; }
.mz-detail > aside.mz-col { flex-basis: 44%; position: sticky; top: 24px; }
.mz-detail--solo { max-width: 800px; }

/* Texto confortável de ler */
.mz-title { margin: 0; }
.mz-content { max-width: 66ch; line-height: 1.8; font-size: 18px; }
.mz-content p { margin: 0 0 1.15em; }
.mz-content h2, .mz-content h3 { margin: 1.6em 0 .5em; line-height: 1.25; }
.mz-content figure, .mz-content .wp-block-image { margin: 1.4em 0; }
.mz-content figcaption { font-size: 14px; color: #6b7280; margin-top: 6px; }
.mz-page .mz-content, .mz-detail--solo .mz-content { margin-left: 0; margin-right: 0; max-width: none; width: 100%; }

/* Barra de ações: Anterior | Seguinte em linha, Voltar por baixo, sempre juntos */
.mz-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--mz-gray); }
.mz-postnav { display: flex; gap: 12px; width: 100%; flex-wrap: nowrap; }
.mz-postnav .mz-btn { flex: 1 1 0; width: auto; min-width: 0; }
.mz-postnav .mz-btn:only-child { flex: 0 1 50%; }

/* Listas: grelha uniforme e títulos alinhados */
.mz-grid { gap: 24px; }
.mz-card { height: 100%; }
.mz-card__body { flex: 1 1 auto; display: flex; align-items: center; }
.mz-card__title { overflow-wrap: anywhere; }
.mz-listing > .mz-btn--gray { align-self: center; max-width: 420px; }

/* Menus (início, exposições, multimédia): botões com altura e respiração constantes */
.mz-menu { gap: 18px; }
.mz-btn { min-height: 72px; }
.mz-btn--sm, .mz-btn--gray { min-height: 56px; }
.mz-split { gap: 56px; }

@media (max-width: 860px) {
  .mz-detail { gap: 24px; }
  .mz-detail > article.mz-col, .mz-detail > aside.mz-col { flex-basis: auto; }
  .mz-detail > aside.mz-col { position: static; order: -1; }
  .mz-content { font-size: 17px; line-height: 1.75; }
  .mz-btn { min-height: 64px; }
  .mz-postnav { flex-direction: column; }
  .mz-postnav .mz-btn:only-child { flex-basis: auto; }
}


/* Menus em cartões (Exposições, Multimédia): 2 por linha, iguais e fáceis de tocar */
.mz-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; }
.mz-btn--card {
  flex-direction: column; justify-content: center; gap: 12px;
  min-height: 150px; padding: 22px 14px;
  font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto;
}
.mz-btn--card svg { width: 38px; height: 38px; }
.mz-menu__grid > .mz-btn--card:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; min-height: 96px; }
.mz-menu__grid > .mz-btn--card:last-child:nth-child(odd) svg { width: 32px; height: 32px; }
@media (max-width: 380px) {
  .mz-menu__grid { grid-template-columns: 1fr; }
  .mz-btn--card { flex-direction: row; min-height: 84px; justify-content: flex-start; }
}

/* Imagem que não abre (ficheiro em falta): não deixa buraco */
.mz-content .mz-img-missing { display: none !important; }
