/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Variáveis do Index */
  --teal:     #0d9488;
  --teal-d:   #0f766e;
  --teal-l:   #ccfbf1;
  --teal-xl:  #f0fdfa;
  --amber:    #f59e0b;
  --amber-l:  #fef3c7;
  --slate:    #0f172a;
  --slate-m:  #334155;
  --slate-l:  #64748b;
  --white:    #ffffff;
  --surface:  #f8fafc;
  --border:   #e2e8f0;
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-xl:32px;
  --shadow-s: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-m: 0 4px 16px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  --shadow-l: 0 20px 60px rgba(15,23,42,.12), 0 8px 24px rgba(15,23,42,.06);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--slate);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-d); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ── Lang selector ── */
.lang-bar, .language-selector {
  position: absolute; top: 16px; right: 16px; z-index: 100;
}
.lang-bar select, .language-selector select {
  font-family: var(--font); font-size: .8rem; font-weight: 600;
  padding: 6px 10px; border-radius: var(--radius-s);
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--slate-m); cursor: pointer;
  transition: border-color .2s;
}
.lang-bar select:focus, .language-selector select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

/* ── Layout de Documentação ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

.content {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
  margin-bottom: 40px;
  border: 1px solid var(--border);
}

/* ── Tipografia de Conteúdo ── */
h1, h2, h3, h4 { color: var(--slate); margin-bottom: 16px; font-weight: 700; }
h1 { font-size: 2.5rem; letter-spacing: -0.02em; color: var(--teal-d); margin-bottom: 24px; }
h2 { font-size: 1.8rem; margin-top: 32px; border-bottom: 1px solid var(--border); padding-bottom: 8px; color: var(--slate); }
h3 { font-size: 1.4rem; margin-top: 24px; color: var(--slate-m); }
p { margin-bottom: 16px; color: var(--slate-l); }
ul, ol { margin-bottom: 16px; padding-left: 24px; color: var(--slate-l); }
li { margin-bottom: 8px; }

/* ── Hero Simples (Banner) ── */
.hero {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, var(--teal-xl) 0%, var(--surface) 100%);
  margin-bottom: 0;
}
.hero h1 { margin-bottom: 16px; color: var(--teal-d); }
.hero p { font-size: 1.2rem; color: var(--slate-l); max-width: 600px; margin: 0 auto; }

/* ── Botão Voltar ── */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--slate-m);
  font-weight: 600;
  margin-bottom: 24px;
  transition: all .2s;
}
.back-link:hover {
  border-color: var(--teal);
  color: var(--teal-d);
  transform: translateX(-4px);
}

/* ── Cards de Documentação (Menu) ── */
.docs-grid, .doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.doc-link, .doc-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  transition: all .3s ease;
  box-shadow: var(--shadow-s);
  height: 100%;
  color: var(--slate);
  text-decoration: none;
}
.doc-link:hover, .doc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-m);
  border-color: var(--teal-l);
  color: var(--teal-d);
}
.doc-link svg, .doc-card svg {
  width: 48px; height: 48px;
  color: var(--teal);
  margin-bottom: 16px;
}
.doc-card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}
.doc-link h3, .doc-card h3 { font-size: 1.2rem; margin-bottom: 8px; color: inherit; }
.doc-link p, .doc-card p { font-size: 0.9rem; color: var(--slate-l); margin-bottom: 0; }

/* ── Histórico / Timeline ── */
.timeline {
  position: relative;
  padding: 20px 0;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}
.version-section {
  position: relative;
  padding-left: 32px;
  margin-bottom: 48px;
}
.version-section::before {
  content: '';
  position: absolute; left: -9px; top: 0;
  width: 16px; height: 16px;
  background: var(--teal);
  border-radius: 50%;
  border: 4px solid var(--surface);
}
.version-title {
  display: flex; align-items: center; gap: 12px;
  margin-top: -6px; margin-bottom: 16px;
}
.version-badge {
  background: var(--teal-l); color: var(--teal-d);
  font-size: 0.75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 99px;
  text-transform: uppercase;
}

/* ── Utilitários ── */
.highlight {
  background: var(--teal-xl);
  border-left: 4px solid var(--teal);
  padding: 16px;
  margin: 24px 0;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.warning {
  background: var(--amber-l);
  border-left: 4px solid var(--amber);
  padding: 16px;
  margin: 24px 0;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: #78350f;
}

/* ── Footer (Padronizado) ── */
footer {
  background: var(--slate); color: rgba(255,255,255,.6);
  padding: 48px 24px 32px; font-size: .875rem;
  text-align: center;
  margin-top: auto; /* Ensure footer stays at bottom if content is short */
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 32px;
  justify-content: center; align-items: center;
  text-align: center;
  flex-direction: column;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand { font-weight: 800; color: var(--white); font-size: 1.1rem; margin-bottom: 6px; }
.footer-tagline { font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer-links a { color: rgba(255,255,255,.6); transition: color .2s; }
.footer-links a:hover { color: var(--teal-l); }
.footer-bottom {
  max-width: 1100px; margin: 24px auto 0;
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  font-size: .8rem; color: rgba(255,255,255,.3);
}

/* ── Tabelas ── */
table { width: 100%; border-collapse: collapse; margin: 24px 0; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
th { background: var(--teal-xl); color: var(--teal-d); font-weight: 700; }
tr:hover { background: var(--surface); }

@media (max-width: 768px) {
  .container { padding: 20px 16px; }
  .content { padding: 24px; }
  h1 { font-size: 2rem; }
  .doc-grid { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
