/* Base público — blog (legado visual grupos/blog) */
:root {
  --pub-bg: #f4f6f8;
  --pub-text: #222;
  --pub-muted: #5a5a5a;
  --pub-card: #fff;
  --pub-border: #e2e8f0;
  --pub-radius: 10px;
  --pub-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--pub-text);
  background: var(--pub-bg);
  line-height: 1.5;
}

/* Escuro: cinzas — evita #000 + texto preto (UX de leitura) */
body[dark="true"] {
  --pub-bg: #121212;
  --pub-text: #e8e8e8;
  --pub-muted: #a3a3a3;
  --pub-card: #1e1e1e;
  --pub-border: #333;
  --pub-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
  background: var(--pub-bg);
  color: var(--pub-text);
}

/* Conteúdo principal cresce para empurrar o rodapé ao fundo em páginas curtas */
.page-content {
  flex: 1 1 auto;
  width: 100%;
}

.footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 2rem;
  padding-bottom: 1rem;
  background: var(--pub-card);
  border-top: 1px solid var(--pub-border);
  color: var(--pub-muted);
  font-size: 0.88rem;
}

/* Hierarquia tipográfica (sobrescreve reboot do Bootstrap — h1–h6 menores e coerentes) */
.page-content h1 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--pub-text);
  letter-spacing: -0.02em;
}

.page-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1rem 0 0.4rem;
  color: var(--pub-text);
  letter-spacing: -0.02em;
}

.page-content h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.9rem 0 0.35rem;
  color: var(--pub-text);
}

.page-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.85rem 0 0.35rem;
  color: var(--pub-text);
}

.page-content h5,
.page-content h6 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.75rem 0 0.3rem;
  color: var(--pub-text);
  text-transform: none;
  letter-spacing: normal;
}

body[dark="true"] .page-content h1,
body[dark="true"] .page-content h2,
body[dark="true"] .page-content h3,
body[dark="true"] .page-content h4,
body[dark="true"] .page-content h5,
body[dark="true"] .page-content h6 {
  color: inherit;
}

.footer a {
  color: var(--pub-muted);
}

#menu-rodape {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
}

#menu-rodape a {
  text-decoration: none;
  font-weight: 500;
}

#menu-rodape a:hover {
  text-decoration: underline;
}

body[dark="true"] .footer {
  border-top-color: var(--pub-border);
}

body[dark="true"] #menu-rodape a {
  color: #b3b3b3;
}

body[dark="true"] #menu-rodape a:hover {
  color: #f0f0f0;
}

#topBtn {
  display: none;
  position: fixed;
  bottom: 22px;
  right: 18px;
  z-index: 500;
  border: none;
  outline: none;
  background: #262626;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

#topBtn:hover {
  filter: brightness(1.08);
}

.text-secondary {
  color: var(--pub-muted) !important;
}

.boxnovo {
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius);
  box-shadow: var(--pub-shadow);
  padding: 0.85rem;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
}

.boxnovo:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

body[dark="true"] .boxnovo:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
