/* =========================================
   Tema escuro — ajustes finos (Darkly)
   Autor: Blog do Marcellini
   Revisão: 2025-10-24
   ========================================= */

/* ---------- Paleta e tokens ---------- */
:root {
  --bg: #0f1116;
  --panel: #161b25;
  --panel-2: #1b2230;
  --border: #273040;
  --text: #e9eef7;
  --muted: #b8c1d4;
  --brand: #6ea8fe;
  --accent: #f3a065;

  --success: #6fd17a;
  --info: #75a7ff;
  --warning: #e8c06f;
  --danger: #f17a54;

  --shadow-soft: 0 6px 18px rgba(0,0,0,.25);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
}

/* ---------- Corpo e tipografia ---------- */
html, body { background: var(--bg) !important; }
body {
  color: var(--text) !important;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: .2px;
  margin-top: 1.6rem;
}

/* ---------- Links e foco ---------- */
a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .9; text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
a:visited { color: #9abdfd; }

/* ---------- Navbar ---------- */
.navbar, .navbar-dark, .navbar-inverse {
  background-color: #0b0d12 !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.navbar .navbar-brand, .navbar a, .navbar .nav-link { color: var(--text) !important; }
.navbar .nav-link:hover { color: var(--brand) !important; }

/* ---------- Figuras e imagens ---------- */
.quarto-figure, figure, .figure {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: .6rem .6rem .8rem;
}
.figure-caption, figcaption { color: var(--muted); font-size: .95rem; }
img { border-radius: var(--radius-sm); max-width: 100%; height: auto; }

/* ---------- Painéis, callouts e cards ---------- */
.card, .panel, .callout {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: none;
}
/* Cabeçalho do callout + correção de contraste (Darkly) */
.callout .callout-header,
.callout[data-collapse="true"] summary {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
}
.callout .callout-title,
.callout .callout-header > .callout-title-container,
.callout .callout-header > .callout-title-container > .callout-title {
  background: transparent !important;
  color: var(--text) !important;
}
.callout[data-collapse="true"] summary:hover { color: var(--brand) !important; }
/* Cores por tipo */
.callout-note      { border-left: 4px solid var(--info) !important; }
.callout-tip       { border-left: 4px solid var(--success) !important; }
.callout-important { border-left: 4px solid var(--brand) !important; }
.callout-warning   { border-left: 4px solid var(--warning) !important; }
.callout-danger    { border-left: 4px solid var(--danger) !important; }

/* ---------- Tabelas ---------- */
table.table, table.quarto-table, .table {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius);
  overflow: hidden;
}
.table > thead > tr > th {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: #1a2030;
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: rgba(255,255,255,0.02); }
.table > :not(caption) > * > * { border-bottom: 1px solid var(--border); }

/* ---------- Código (inline e blocos) ---------- */
code {
  background: var(--panel-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: .1rem .35rem;
  font-family: "Fira Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em;
}
pre, .sourceCode, pre.sourceCode {
  background: var(--panel-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: .85rem 1rem !important;
  overflow: auto;
}
pre code, .sourceCode code { color: var(--text) !important; }
.sourceCode .linenos, .sourceCode .lineno { color: var(--muted) !important; }

/* Contraste: baseline claro + tokens (Pandoc/Quarto) */
.sourceCode span, pre code > span { color: var(--text) !important; }
code span.co, .sourceCode span.co { color: var(--muted) !important; font-style: italic; } /* comments */
code span.pp, .sourceCode span.pp { color: #9abdfd !important; }                          /* preproc */
code span.at, .sourceCode span.at { color: #cfd2d8 !important; }                          /* attr */
code span.al, .sourceCode span.al { color: var(--danger) !important; font-weight: 600; }  /* alerts */
code span.kw, .sourceCode span.kw,
code span.cf, .sourceCode span.cf,
code span.im, .sourceCode span.im { color: #a9c3ff !important; font-weight: 600; }        /* keywords/import */
code span.st, .sourceCode span.st,
code span.ss, .sourceCode span.ss,
code span.ch, .sourceCode span.ch { color: var(--accent) !important; }                    /* strings */
code span.dv, .sourceCode span.dv,
code span.bn, .sourceCode span.bn,
code span.fl, .sourceCode span.fl { color: #e8c06f !important; }                          /* numbers */
code span.fu, .sourceCode span.fu { color: #9fe2ff !important; }                          /* functions */
code span.ty, .sourceCode span.ty,
code span.cl, .sourceCode span.cl,
code span.va, .sourceCode span.va,
code span.vs, .sourceCode span.vs,
code span.cn, .sourceCode span.cn { color: #ffd29f !important; }                          /* types/vars */
code span.op, .sourceCode span.op { color: #cfd2d8 !important; }                           /* operators */

/* Compatibilidade highlight.js (se ativo) */
.hljs { color: var(--text) !important; background: var(--panel-2) !important; }
.hljs-keyword { color: #a9c3ff !important; font-weight: 600; }
.hljs-string  { color: var(--accent) !important; }
.hljs-number  { color: #e8c06f !important; }
.hljs-comment { color: var(--muted) !important; font-style: italic; }
.hljs-title, .hljs-function { color: #9fe2ff !important; }
.hljs-literal, .hljs-symbol { color: #ffd29f !important; }
.hljs-operator { color: #cfd2d8 !important; }

/* Botão copiar e seleção */
.quarto-copy-button, .code-copy-button {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
}
.quarto-copy-button:hover { color: var(--text) !important; border-color: var(--brand) !important; }
pre::selection, code::selection, .sourceCode ::selection {
  background: rgba(110, 168, 254, 0.28);
  color: var(--text);
}

/* ---------- Rodapé ----------- */
.footer, .page-footer, .quarto-page-footer {
  color: var(--muted) !important;
  border-top: 1px solid var(--border);
  background: #0b0d12;
}

/* ---------- Separadores e citações ---------- */
hr { border-top: 1px solid var(--border); opacity: .7; }
blockquote {
  color: var(--muted);
  border-left: 4px solid var(--brand);
  background: rgba(255,255,255,0.02);
  padding: .6rem 1rem;
  border-radius: 6px;
}

/* ---------- Scroll suave ---------- */
html { scroll-behavior: smooth; }

/* =========================================
   NAQUIZ — estilos de quiz
   ========================================= */
.question, .naquiz-question {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0 1.2rem 0;
  box-shadow: none;
}
.question > p:first-child,
.naquiz-question > p:first-child {
  margin: 0 0 .6rem 0;
  font-weight: 700;
  color: var(--text);
}
.choices, .naquiz-choices { margin-top: .6rem; display: grid; gap: .6rem; }
.choice, .naquiz-choice {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .8rem;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover, .naquiz-choice:hover { border-color: var(--brand); }
.choice:focus-within, .naquiz-choice:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.correct-choice, .naquiz-correct {
  border-color: var(--success) !important;
  box-shadow: inset 0 0 0 1px rgba(111, 209, 122, .35);
}
.wrong-choice, .naquiz-wrong {
  border-color: var(--danger) !important;
  box-shadow: inset 0 0 0 1px rgba(241, 122, 84, .25);
}
.naquiz-feedback, .choice small { color: var(--muted); }
.question input[type="radio"],
.question input[type="checkbox"],
.naquiz-question input[type="radio"],
.naquiz-question input[type="checkbox"] { accent-color: var(--brand); }

/* =========================================
   TOC e Sidebar — fundo escuro integrado
   ========================================= */
.sidebar, .quarto-sidebar, .quarto-sidebar-content,
#quarto-sidebar, .toc-sidebar, .toc-left, nav#toc,
#TOC, .quarto-page-column-toc {
  background: var(--bg) !important;
  border-right: 1px solid var(--border) !important;
  color: var(--text) !important;
}
#TOC, nav#toc, .toc-active {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.8rem;
}
#TOC a, nav#toc a, .toc a { color: var(--muted) !important; text-decoration: none; }
#TOC a:hover, nav#toc a:hover, .toc a:hover { color: var(--brand) !important; }
#TOC h2, .toc-title, .quarto-sidebar h2 {
  color: var(--text) !important;
  font-weight: 700;
  margin-bottom: .6rem;
}
.quarto-page-column-toc, .page-columns .page-navigation { background: var(--bg) !important; }

/* ---------- Extras UX ---------- */
.btn, .btn-primary { border-radius: 10px; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { filter: brightness(1.05); }
.badge, .label {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
}
kbd {
  background: #1b2230;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.35);
}
* { scrollbar-color: #3a4255 #0f1116; }

/* =====================================
   Hero banner + título introdutório
   ===================================== */

.hero-banner {
  --banner-ratio: calc(1920 / 560);
  width: 100%;
  max-width: 1920px;
  margin: 0 auto 1.25rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.35);
  background: #0b0e12;
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: var(--banner-ratio);
  object-fit: cover;
  object-position: left 30%;
}

/* Ajuste de altura em telas menores */
@media (max-width: 992px) {
  .hero-banner { --banner-ratio: calc(1920 / 720); }
  .hero-banner img { object-position: left 28%; }
}

/* -------------------------------
   Bloco de título e subtítulo
   ------------------------------- */
.intro-title {
  text-align: center;
  margin: 3rem auto 2rem auto;
  max-width: 900px;
}
.intro-title h1 {
  font-family: "Fira Code", "Inter", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #e9eef7;
  margin-bottom: 0.75rem;
}
.intro-title p {
  font-size: 1.15rem;
  color: #b8c1d4;
  line-height: 1.6;
  margin: 0;
}

/* Versão mobile */
@media (max-width: 768px) {
  .intro-title h1 { font-size: 1.8rem; }
  .intro-title p  { font-size: 1rem; }
}

/* ====== Animações suaves ====== */
@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-zoom {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: scale(1); }
}

/* Aplica ao banner e ao bloco de título */
.hero-banner,
.intro-title {
  opacity: 0;                /* estado inicial antes da animação */
  animation-fill-mode: forwards;
  will-change: opacity, transform;
}

/* Sequência sutil: banner primeiro, depois título */
.hero-banner {
  animation: fade-zoom 600ms ease-out 60ms forwards;
}
.intro-title {
  animation: fade-slide-up 600ms ease-out 220ms forwards;
}

/* Acessibilidade: desativa se o usuário prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .hero-banner, .intro-title {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.intro-title h1 { animation: fade-slide-up 600ms ease-out 260ms forwards; opacity:0; }
.intro-title p  { animation: fade-slide-up 600ms ease-out 360ms forwards; opacity:0; }

/* ====== Rodapé do site ====== */
.site-footer {
  text-align: center;
  font-size: 0.95rem;
  color: #b8c1d4;
  border-top: 1px solid #273040;
  padding: 2.5rem 0 2rem 0;
  margin-top: 3rem;
  background: linear-gradient(180deg, rgba(15,17,22,0) 0%, rgba(15,17,22,0.6) 50%, rgba(15,17,22,1) 100%);
}

.site-footer a {
  color: #6ea8fe;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #f3a065;
  text-decoration: underline;
}

.site-footer strong {
  color: #e9eef7;
  font-weight: 600;
}

@media (max-width: 768px) {
  .site-footer {
    font-size: 0.85rem;
    padding: 2rem 1rem;
  }
}

/* ====== Rodapé com assinatura luminosa ====== */
.site-footer {
  text-align: center;
  font-size: 0.95rem;
  color: #b8c1d4;
  border-top: 1px solid rgba(110,168,254,0.3); /* linha luminosa */
  padding: 2.5rem 0 2rem 0;
  margin-top: 4rem;
  background: linear-gradient(180deg, rgba(15,17,22,0) 0%, rgba(15,17,22,0.7) 60%, rgba(15,17,22,1) 100%);
  backdrop-filter: blur(4px);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Logo + título */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.footer-logo svg {
  animation: glow 3s ease-in-out infinite alternate;
}

/* Animação de brilho suave no ícone */
@keyframes glow {
  from { stroke: rgba(110,168,254,0.8); }
  to   { stroke: rgba(243,160,101,0.8); }
}

/* Links */
.site-footer a {
  color: #6ea8fe;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #f3a065;
  text-decoration: underline;
}

/* Título */
.site-footer strong {
  color: #e9eef7;
  font-weight: 600;
}

@media (max-width: 768px) {
  .site-footer {
    font-size: 0.85rem;
    padding: 2rem 1rem;
  }
  .footer-logo svg {
    width: 20px;
    height: 20px;
  }
}

.credits {
  text-align: center;
  font-size: 0.85rem;
  color: #8f98aa;
  margin: 2.5rem auto 1.5rem auto;
}

.intro-block {
  max-width: 780px;
  margin: 2.5rem auto 3rem auto;
  font-size: 1.1rem;
  color: #d0d4e0;
}

.timeline {
  list-style: none;
  padding-left: 0;
  max-width: 780px;
  margin: 2.5rem auto;
}
.timeline li::before {
  content: "•";
  color: var(--accent);
  margin-right: 0.6rem;
  font-weight: bold;
}

.section-intro {
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
  color: #b8c1d4;
  margin: 2.5rem auto 2rem auto;
  max-width: 820px;
}

.section-intro {
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
  color: #b8c1d4;
  margin: 2.5rem auto 2rem auto;
  max-width: 820px;
  line-height: 1.6;
}

/* ===============================
   Frase de transição — seção intro
   =============================== */
.section-intro {
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
  color: #b8c1d4;
  margin: 2.5rem auto 2rem auto;
  max-width: 820px;
  line-height: 1.6;
  opacity: 0;                     /* estado inicial */
  animation: fade-in-up 1.2s ease-out 0.4s forwards;
  will-change: opacity, transform;
}

/* Animação: fade + leve deslocamento vertical */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Acessibilidade: respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  .section-intro {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Ajuste tipográfico da navbar (tema Darkly) */
.navbar-dark .navbar-nav .nav-link {
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* =========================================
   TOC Fixo Inteligente (Darkly integrado)
   ========================================= */

/* Container lateral fixo */
.quarto-page-column-toc {
  position: sticky;
  top: 6rem;                   /* distância do topo da viewport */
  align-self: flex-start;      /* mantém o TOC no início da coluna */
  height: calc(100vh - 8rem);  /* ocupa o restante da tela */
  overflow-y: auto;            /* rola internamente se for grande */
  scrollbar-width: thin;
  scrollbar-color: #3a4255 #0f1116;
  padding-right: 0.5rem;
}

/* Ajuste do painel interno */
nav#toc, #TOC {
  margin-top: 0.25rem;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 0.8rem;
}

/* Links do TOC com realce de seção ativa */
#TOC a.is-active,
nav#toc a.is-active {
  color: var(--accent) !important;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

/* Evita fixação em telas pequenas */
@media (max-width: 992px) {
  .quarto-page-column-toc {
    position: static;
    height: auto;
    overflow: visible;
  }
}

.quarto-page-column-toc {
  scroll-behavior: smooth;
}

/* =========================================
   Título fixo do TOC (Darkly)
   ========================================= */
.quarto-page-column-toc {
  position: sticky;
  top: 6rem;
  align-self: flex-start;
  height: calc(100vh - 8rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a4255 #0f1116;
  padding-right: 0.5rem;
  scroll-behavior: smooth;
}

/* Cabeçalho do TOC */
.toc-title, 
#TOC h2 {
  position: sticky;
  top: 0;
  background: var(--panel);
  padding: 0.6rem 0.8rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
  color: var(--brand) !important;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  z-index: 5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

/* Área interna do TOC */
nav#toc, #TOC {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.8rem;
  margin-top: 0.3rem;
}

/* Links normais e ativos */
#TOC a, nav#toc a {
  color: var(--muted);
  text-decoration: none;
  display: block;
  padding: 0.15rem 0;
}
#TOC a:hover, nav#toc a:hover {
  color: var(--brand);
}
#TOC a.is-active, nav#toc a.is-active {
  color: var(--accent) !important;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

/* Responsividade */
@media (max-width: 992px) {
  .quarto-page-column-toc {
    position: static;
    height: auto;
    overflow: visible;
  }
  .toc-title {
    position: static;
    box-shadow: none;
    border-bottom: none;
  }
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link.show {
  color: #f3a065 !important;
  font-weight: 600;
}

/* Força o título do TOC para "📑 Sumário", ignorando a string padrão */
.toc-title, #TOC h2 {
  text-transform: none !important;     /* remove o uppercase automático */
  font-size: 0 !important;             /* “apaga” o texto atual visualmente */
  line-height: 0 !important;
  position: relative;
}

.toc-title::after, #TOC h2::after {
  content: "📑 Sumário";
  font-size: 1rem;                     /* título visível */
  line-height: 1.2;
  display: block;
  color: var(--brand);                 /* sua cor ciano */
}

.toc-title::after, #TOC h2::after {
  content: "📑 Sumário";
  font-size: 1rem;
  line-height: 1.2;
  display: block;
  color: var(--brand);
  border-bottom: 1px solid rgba(110,168,254,0.35);
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}

/* =========================================
   Estilo especial — Callout Guia de Leitura
   ========================================= */
.callout-tip h3:first-of-type {
  text-align: center;
  color: var(--brand);
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  position: relative;
}

/* Linha luminosa ciano abaixo do título */
.callout-tip h3:first-of-type::after {
  content: "";
  display: block;
  width: 60%;
  height: 2px;
  margin: 0.4rem auto 0 auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(110,168,254,0.7) 50%,
    transparent 100%
  );
  border-radius: 2px;
}

/* Linha luminosa com brilho animado sob o título do callout */
.callout-tip h3:first-of-type::after {
  content: "";
  display: block;
  width: 60%;
  height: 2px;
  margin: 0.4rem auto 0 auto;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(110,168,254,0.15) 35%,
    rgba(110,168,254,0.85) 50%,
    rgba(110,168,254,0.15) 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: glow-sweep 10s ease-in-out infinite;
}

/* Anima o “facho” de luz atravessando a linha */
@keyframes glow-sweep {
  0%   { background-position: 200% 0; }
  50%  { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Acessibilidade: desativa animação se o usuário preferir menos movimento */
@media (prefers-reduced-motion: reduce) {
  .callout-tip h3:first-of-type::after {
    animation: none !important;
  }
}

/* ===========================
   Ajustes responsivos do banner
   =========================== */

@media (max-width: 768px) {
  .hero-text {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    padding: 1.5rem 1rem !important;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    display: block;
    margin-top: 0.4rem;
  }
}

/* Ajusta margens e padding das figuras (banner incluído) */
.quarto-figure {
  margin: 0 auto 0 auto !important; /* remove margens extras */
  padding: 0 !important;             /* remove padding interno */
}

.quarto-figure img {
  display: block;
  margin: 0 auto !important;
  border-radius: 12px;
  max-height: 480px;     /* mantém proporção harmoniosa */
  object-fit: cover;
}

img[alt*="Linha do tempo"] {
  max-height: 850px;
  width: auto !important;
}

img[alt*="Osso de Ishango"] {
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

img[alt*="Osso de Ishango"] {
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  margin-bottom: 1em;
}

/* ==== Estilo para figuras museológicas e diagramas ==== */

img[fig-cap], figure img {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 0 12px rgba(0,0,0,0.45);
  margin: 1.5em auto;
}

figcaption {
  font-size: 0.9em;
  color: var(--muted);
  text-align: center;
  margin-top: 0.4em;
}

/* === Bloco de introdução / epígrafe === */
.intro-block {
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--brand, #6ea8fe);
  border-radius: 8px;
  padding: 1.4em 1.6em;
  margin: 2.5em auto;
  max-width: 900px;
  color: var(--muted, #b8c1d4);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
}

.intro-block strong {
  color: var(--text, #e9eef7);
}

.intro-block em {
  color: var(--accent, #f3a065);
}

.intro-block::before {
  content: "💭 ";
  font-size: 1.3rem;
  color: var(--brand, #6ea8fe);
  vertical-align: middle;
}

.intro-block blockquote {
  margin: 0;
  padding: 0;
}

.intro-block {
  animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Epígrafes — História da Computação (com gradientes por Era)
   ========================================================== */

/* Base geral */
.intro-block {
  border-left: 4px solid var(--brand, #6ea8fe);
  border-radius: 8px;
  padding: 1.4em 1.6em;
  margin: 2.5em auto;
  max-width: 900px;
  color: var(--muted, #b8c1d4);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(3px);
  animation: fadeIn 1.2s ease-out;
  background: rgba(255, 255, 255, 0.02);
}

.intro-block strong {
  color: var(--text, #e9eef7);
}

.intro-block em {
  color: var(--accent, #f3a065);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Variações cromáticas e ícones por Era
   ========================================================== */

/* Parte 1 — Raízes Antigas */
.intro-block.raizes::before {
  content: "🏺 ";
  font-size: 1.3rem;
  color: #f3a065;
  vertical-align: middle;
}
.intro-block.raizes {
  border-left-color: #f3a065;
  background: linear-gradient(135deg, rgba(243,160,101,0.08) 0%, rgba(70,50,30,0.12) 100%);
}

/* Parte 2 — Era Mecânica */
.intro-block.mecanica::before {
  content: "⚙️ ";
  font-size: 1.3rem;
  color: #6fd17a;
  vertical-align: middle;
}
.intro-block.mecanica {
  border-left-color: #6fd17a;
  background: linear-gradient(135deg, rgba(111,209,122,0.08) 0%, rgba(25,50,30,0.12) 100%);
}

/* Parte 3 — Era Digital */
.intro-block.digital::before {
  content: "💾 ";
  font-size: 1.3rem;
  color: #6ea8fe;
  vertical-align: middle;
}
.intro-block.digital {
  border-left-color: #6ea8fe;
  background: linear-gradient(135deg, rgba(110,168,254,0.10) 0%, rgba(20,35,60,0.14) 100%);
}

/* Parte 4 — Revolução Pessoal */
.intro-block.pessoal::before {
  content: "🖥️ ";
  font-size: 1.3rem;
  color: #9c7cff;
  vertical-align: middle;
}
.intro-block.pessoal {
  border-left-color: #9c7cff;
  background: linear-gradient(135deg, rgba(156,124,255,0.08) 0%, rgba(45,35,70,0.14) 100%);
}

/* Parte 5 — Era das Redes */
.intro-block.redes::before {
  content: "🌐 ";
  font-size: 1.3rem;
  color: #57c0b6;
  vertical-align: middle;
}
.intro-block.redes {
  border-left-color: #57c0b6;
  background: linear-gradient(135deg, rgba(87,192,182,0.08) 0%, rgba(25,50,55,0.14) 100%);
}

/* Parte 6 — Era da Inteligência */
.intro-block.inteligencia::before {
  content: "🤖 ";
  font-size: 1.3rem;
  color: #e8c06f;
  vertical-align: middle;
}
.intro-block.inteligencia {
  border-left-color: #e8c06f;
  background: linear-gradient(135deg, rgba(232,192,111,0.08) 0%, rgba(60,50,20,0.12) 100%);
}

/* ===== Rodapé (page-footer) ===== */
footer a {
  color: #6ea8fe; /* azul suave padrão Quarto-darkly */
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

footer a:hover {
  color: #9dc5ff; /* tom mais claro ao passar o mouse */
  text-shadow: 0 0 6px rgba(110,168,254,0.6);
}

footer {
  font-size: 0.95rem;
  color: var(--muted, #b8c1d4);
  letter-spacing: 0.02em;
}

