/* ============================================================
   Tema compartilhado — Programação Concorrente e Distribuída
   Prof. Newton Miyoshi · Centro Universitário Barão de Mauá
   Otimizado para projetor (tema claro, alto contraste, sala clara)
   ============================================================ */

:root {
  /* Cores — claro, alto contraste para projetor fraco */
  --bg:        #ffffff;
  --ink:       #16202b;   /* texto principal, quase preto */
  --muted:     #56657a;   /* texto secundário */
  --brand:     #0b5fab;   /* azul — sistemas distribuídos / Docker */
  --brand-dk:  #084a86;
  --brand-2:   #0f766e;   /* teal — acento */
  --accent:    #c2410c;   /* laranja — destaque, com parcimônia */
  --surface:   #f2f6fa;   /* fundo de cartões */
  --surface-2: #e7eef5;
  --line:      #cfdae6;   /* bordas */
  --code-bg:   #1b2532;   /* blocos de código (escuro, alto contraste) */
  --code-ink:  #e8edf2;
  --ok:        #15803d;
  --warn:      #b45309;

  /* Tipografia */
  --font-body: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", Consolas, "SFMono-Regular", Menlo, monospace;
}

/* ---------- Base ---------- */
.reveal {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: .002em;
}
.reveal .slides { text-align: left; }
.reveal .slides section { height: 100%; }

.reveal ::selection { background: #ffe08a; color: var(--ink); }

/* Fundo geral claro */
.reveal-viewport { background: #eef2f6; }
.reveal .slides > section,
.reveal .slides > section > section { line-height: 1.35; }

/* ---------- Títulos ---------- */
.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 .5em 0;
  letter-spacing: -.01em;
  text-transform: none;
}
.reveal h1 { font-size: 1.9em; }
.reveal h2 { font-size: 1.5em; }
.reveal h3 { font-size: 1.18em; color: var(--brand-dk); }
.reveal h4 { font-size: 1em; color: var(--muted); font-weight: 600; }

/* Kicker — rótulo de seção acima do título */
.reveal .kicker {
  display: inline-block;
  font-size: .5em;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6em;
}

/* ---------- Layout de slide de conteúdo ---------- */
.reveal .slide-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 6px 10px 22px;   /* folga inferior p/ número do slide */
}
.reveal .slide-body.center { justify-content: center; }

/* ---------- Listas ---------- */
.reveal ul, .reveal ol { margin: 0 0 .4em 1.1em; }
.reveal ul { list-style: none; margin-left: 0; padding-left: 0; }
.reveal ul > li {
  position: relative;
  padding-left: 1.1em;
  margin: .34em 0;
}
.reveal ul > li::before {
  content: "";
  position: absolute;
  left: .05em; top: .52em;
  width: .42em; height: .42em;
  background: var(--brand);
  border-radius: 2px;
}
.reveal ul ul { margin: .2em 0 .2em .2em; }
.reveal ul ul > li { font-size: .92em; color: var(--muted); }
.reveal ul ul > li::before {
  background: transparent;
  border: 2px solid var(--brand-2);
  width: .34em; height: .34em; border-radius: 50%;
  top: .5em;
}
.reveal ul ul ul > li::before { background: var(--line); border: none; }
.reveal ol { margin-left: 1.2em; }
.reveal ol > li { margin: .34em 0; padding-left: .2em; }
.reveal li > strong { color: var(--brand-dk); }

/* ---------- Texto de apoio ---------- */
.reveal .lead { font-size: 1.15em; color: var(--ink); max-width: 26ch; }
.reveal .muted { color: var(--muted); }
.reveal p { margin: 0 0 .5em; }
.reveal a { color: var(--brand); text-decoration: none; border-bottom: 1px solid #b9d3ea; }
.reveal a:hover { color: var(--brand-dk); }

/* ---------- Slide de título ---------- */
.reveal .titlecard {
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 6%;
  background:
    radial-gradient(1200px 500px at 85% -10%, #e8f1fb 0, rgba(232,241,251,0) 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
}
.reveal .titlecard .course {
  font-size: .58em; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand);
}
.reveal .titlecard h1 { font-size: 2.1em; margin: .25em 0 .1em; }
.reveal .titlecard .sub { font-size: 1.05em; color: var(--muted); margin-bottom: 1.1em; }
.reveal .titlecard .meta { font-size: .78em; color: var(--ink); line-height: 1.6; }
.reveal .titlecard .meta .who { font-weight: 700; }
.reveal .titlecard .rule {
  width: 84px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  margin: .2em 0 1em;
}

/* ---------- Slide divisor de seção ---------- */
.reveal .divider {
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8%;
  background: linear-gradient(135deg, var(--brand-dk) 0%, var(--brand) 100%);
}
.reveal .divider * { color: #fff; }
.reveal .divider .num {
  font-size: .7em; font-weight: 700; letter-spacing: .18em;
  opacity: .75; text-transform: uppercase;
}
.reveal .divider h2 { font-size: 2.1em; color: #fff; margin-top: .1em; }
.reveal .divider p { color: #dbeafd; font-size: .9em; max-width: 30ch; }
.reveal .divider code { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Slide de pergunta ---------- */
.reveal .question {
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; padding: 0 8%;
}
.reveal .question .q-mark {
  font-size: 3em; font-weight: 800; color: var(--brand-2); line-height: .8; margin-bottom: .1em;
}
.reveal .question h2 { font-size: 1.7em; max-width: 20ch; }

/* ---------- Slide de pergunta "estilo quiz" (Quem é... esse Pokémon?) ---------- */
.reveal .quiz {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 8%;
  background: radial-gradient(780px 780px at 50% 40%, #1c2c42 0%, #0a1420 58%, #05090f 100%);
}
.reveal .quiz-caption {
  font-size: .55em; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: #ffd76a; margin-bottom: .7em;
  text-shadow: 0 0 16px rgba(255,215,106,.55);
}
.reveal .quiz-orb {
  width: 4.4em; height: 4.4em; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; margin-bottom: .5em;
  background: radial-gradient(circle at 38% 32%, #16222f 0%, #060a11 72%);
  box-shadow:
    0 0 0 3px rgba(111,179,242,.5),
    0 0 50px 10px rgba(111,179,242,.32),
    inset 0 0 30px rgba(0,0,0,.6);
}
.reveal .quiz-orb span {
  font-size: 2.6em; font-weight: 800; color: #ffd76a;
  text-shadow: 0 0 22px rgba(255,215,106,.7);
}
.reveal .quiz h2 { font-size: 1.45em; max-width: 23ch; color: #f3f6fa; margin-top: .3em; }
.reveal .quiz h2 .qd { color: #6fb3f2; }
.reveal .quiz h2 .qc { color: #5fd9c5; }
.reveal .quiz h2 .qp { color: #ff9a5c; }

/* ---------- Colunas ---------- */
.reveal .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.reveal .cols.c-6-4 { grid-template-columns: 3fr 2fr; }
.reveal .cols.c-4-6 { grid-template-columns: 2fr 3fr; }
.reveal .cols.middle { align-items: center; }

/* ---------- Cartões / grades ---------- */
.reveal .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.reveal .card h3 { margin-top: 0; }
.reveal .grid { display: grid; gap: 16px; }
.reveal .grid.g2 { grid-template-columns: 1fr 1fr; }
.reveal .grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.reveal .grid.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cartão de serviço (recriação de diagrama) ---------- */
.reveal .node {
  background: #fff; border: 2px solid var(--brand);
  border-radius: 10px; padding: 14px 10px; text-align: center;
  font-weight: 600; color: var(--brand-dk);
  box-shadow: 0 2px 0 var(--surface-2);
}
.reveal .node.db { border-color: var(--brand-2); color: var(--brand-2); border-style: dashed; }
.reveal .node small { display:block; font-weight: 500; color: var(--muted); font-size: .7em; }

/* ---------- Badges de taxonomia ---------- */
.reveal .taxo { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: .3em; }
.reveal .taxo .badge {
  border-radius: 12px; padding: 18px 14px; text-align: center; color: #fff;
}
.reveal .taxo .badge b { display:block; font-size: 1.15em; letter-spacing: .04em; }
.reveal .taxo .badge span { font-size: .7em; opacity: .92; }
.reveal .taxo .d { background: linear-gradient(160deg,#0b5fab,#084a86); }
.reveal .taxo .c { background: linear-gradient(160deg,#0f766e,#0b5850); }
.reveal .taxo .p { background: linear-gradient(160deg,#c2410c,#9a3208); }
.reveal .scale-arrow {
  display:flex; align-items:center; justify-content:space-between;
  font-size: .62em; color: var(--muted); font-weight:600; margin-top:.6em;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- Figuras / imagens de conteúdo ---------- */
.reveal figure { margin: 0; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.reveal figure.fill { justify-content: center; align-items: center; }
.reveal figure img {
  display: block; max-width: 100%; max-height: 100%;
  object-fit: contain; margin: 0 auto;
  border-radius: 8px;
}
.reveal figure.framed img {
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(16,32,48,.10);
  background: #fff;
}
.reveal figcaption {
  font-size: .62em; color: var(--muted); text-align: center;
  margin: .5em auto 0; flex: 0 0 auto; max-width: 86%;
}
.reveal .figbox { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }

/* Galeria de imagens — grid-auto-rows:1fr para funcionar também na impressão (PDF) */
.reveal .gallery { display: grid; gap: 12px; height: 100%; grid-auto-rows: minmax(0, 1fr); }
.reveal .gallery.g2 { grid-template-columns: 1fr 1fr; }
.reveal .gallery.g3 { grid-template-columns: 1fr 1fr 1fr; }
.reveal .gallery img {
  width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}

/* ---------- Código ---------- */
.reveal pre {
  width: 100%; margin: .3em 0; box-shadow: none;
  font-size: .58em; line-height: 1.5; display: block;
}
/* texto de apoio logo após um bloco de código não pode colar/sobrepor */
.reveal pre + p, .reveal pre + .muted { margin-top: .9em; }
.reveal pre code {
  background: var(--code-bg); color: var(--code-ink);
  border-radius: 10px; padding: 16px 18px; max-height: 560px;
  border: 1px solid #2c3a4d;
  -webkit-font-smoothing: auto;
}
.reveal code { font-family: var(--font-mono); }

/* Paleta de sintaxe alinhada à identidade do curso — o Monokai base (rosa/verde
   neon, calibrado para o fundo #272822 original) destoa da paleta azul/teal do
   material e tem contraste baixo demais sobre o nosso --code-bg. */
.reveal .hljs-tag,
.reveal .hljs-keyword,
.reveal .hljs-selector-tag,
.reveal .hljs-literal,
.reveal .hljs-strong,
.reveal .hljs-name {
  color: #6fb3f2; /* azul da marca, claro o bastante p/ fundo escuro */
}
.reveal .hljs-string,
.reveal .hljs-bullet,
.reveal .hljs-subst,
.reveal .hljs-title,
.reveal .hljs-section,
.reveal .hljs-emphasis,
.reveal .hljs-type,
.reveal .hljs-built_in,
.reveal .hljs-builtin-name,
.reveal .hljs-selector-attr,
.reveal .hljs-selector-pseudo,
.reveal .hljs-addition,
.reveal .hljs-variable,
.reveal .hljs-template-tag,
.reveal .hljs-template-variable {
  color: #5fd9c5; /* teal da marca, no lugar do verde neon */
}
.reveal .hljs-comment,
.reveal .hljs-quote,
.reveal .hljs-deletion,
.reveal .hljs-meta {
  color: #9d9d8f;
}
.reveal p code, .reveal li code {
  background: var(--surface-2); color: var(--brand-dk);
  padding: .06em .35em; border-radius: 5px; font-size: .86em;
}
.reveal .cmd-caption { font-size: .6em; color: var(--muted); margin: .2em 0 -.1em; font-weight: 600; }

/* ---------- Cartão de link / vídeo ---------- */
.reveal .linkcard {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink);
}
.reveal .linkcard img { width: 320px; border-radius: 10px; border: 1px solid var(--line); }
.reveal .linkcard .lk-k { font-size: .6em; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); }
.reveal .linkcard .lk-t { font-size: 1.05em; font-weight: 700; line-height: 1.2; margin: .15em 0 .3em; }
.reveal .linkcard .lk-u { font-size: .62em; color: var(--brand); word-break: break-all; }

/* ---------- Caixas de destaque ---------- */
.reveal .callout {
  border: 1px solid var(--line); border-left: 6px solid var(--brand);
  background: var(--surface); border-radius: 10px; padding: 14px 18px;
}
.reveal .callout.tip   { border-left-color: var(--brand-2); }
.reveal .callout.warn  { border-left-color: var(--warn); }
.reveal .callout .ct { font-weight: 700; font-size: .8em; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: .2em; }
.reveal .def {
  font-size: 1.08em; line-height: 1.4; border-left: 6px solid var(--brand-2);
  padding: 6px 0 6px 20px; color: var(--ink); font-style: italic;
}

/* ---------- Tabela ---------- */
.reveal table { width: 100%; border-collapse: collapse; font-size: .82em; }
.reveal table th { background: var(--brand); color: #fff; text-align: left; padding: 8px 12px; }
.reveal table td { border-bottom: 1px solid var(--line); padding: 8px 12px; }
.reveal table tr:nth-child(even) td { background: var(--surface); }
/* O highlight.js (data-line-numbers) também gera uma <table> interna (linhas de
   código); sem essa exceção, o zebra-striping acima vazava pra dentro dos blocos
   de código, pintando as linhas pares com um fundo claro por cima do tema escuro. */
.reveal pre table tr:nth-child(even) td { background: transparent; }

/* ---------- Mural de logos ---------- */
.reveal .logo-wall {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center;
  gap: 20px; margin-top: .5em;
}
.reveal .logo-wall figure {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  width: 210px; height: 132px; padding: 16px 14px; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(16,32,48,.07);
}
.reveal .logo-wall figure img { max-height: 66px; max-width: 100%; object-fit: contain; }
.reveal .logo-wall figcaption {
  margin: 12px 0 0; font-size: .58em; font-weight: 600; color: var(--muted); max-width: none;
}

/* ---------- Fluxo/esquema horizontal (ex.: IaC) ---------- */
.reveal .flow { display: flex; align-items: stretch; justify-content: center; gap: 14px; margin: .5em 0; }
.reveal .flow .step {
  flex: 1 1 0; max-width: 250px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px;
  text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.reveal .flow .step .ico { font-size: 2.1em; line-height: 1; margin-bottom: 2px; }
.reveal .flow .step b { color: var(--brand-dk); font-size: 1em; }
.reveal .flow .step small { color: var(--muted); font-size: .72em; line-height: 1.3; }
.reveal .flow .arrow { align-self: center; font-size: 1.9em; color: var(--brand); font-weight: 700; }

/* ---------- Pilha de protocolos (camadas empilhadas) ---------- */
.reveal .protostack {
  flex: 1 1 auto; min-height: 0; margin-top: .5em;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
}
.reveal .protostack .pbox {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand), var(--brand-dk));
  color: #fff; font-weight: 700; font-size: .78em; text-align: center;
  border-radius: 10px; padding: 6px 8px;
  box-shadow: 0 2px 0 rgba(8,74,134,.25);
}
.reveal .protostack .pbox.transport { background: linear-gradient(160deg, var(--brand-dk), #052a49); }

/* ---------- Chips / ferramentas ---------- */
.reveal .chips { display: flex; flex-wrap: wrap; gap: 12px; }
.reveal .chip {
  background: #fff; border: 1.5px solid var(--brand);
  color: var(--brand-dk); font-weight: 600;
  padding: 8px 16px; border-radius: 999px; font-size: .9em;
}

/* ---------- Rodapé / cabeçalho fixos ---------- */
.reveal .slide-number { background: transparent; color: var(--muted); font-size: 20px; right: 12px; bottom: 8px; }
.deck-footer {
  position: fixed; bottom: 10px; left: 16px; z-index: 30;
  font-size: 15px; color: #8797a8; letter-spacing: .02em;
  font-family: var(--font-body); pointer-events: none;
}
.deck-footer b { color: var(--brand); font-weight: 700; }

/* ---------- Barra de progresso ---------- */
.reveal .progress { color: var(--brand); height: 5px; }

/* ---------- Fragmentos ---------- */
.reveal .fragment.highlight-current-blue.current-fragment { color: var(--brand); }

/* Slide numbers só quando útil; controles discretos */
.reveal .controls { color: var(--brand); }
