/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================================================== */
:root {
  --primary-color: #004d26;       /* Verde institucional */
  --primary-hover: #003319;
  --secondary-color: #2b7a4b;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #212529;
  --text-muted: #6c757d;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ==========================================================================
   2. NAVBAR
   ========================================================================== */
.navbar {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   3. BLOCO DE CRÉDITOS
   ========================================================================== */
.header-creditos-box {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 1.5rem;
  font-size: 0.875rem;
}

.creditos-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.author-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.author-link:hover {
  text-decoration: underline;
}

.divisor {
  margin: 0 0.4rem;
  color: var(--text-muted);
}

.creditos-label {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

/* ==========================================================================
   4. ESTRUTURA E CONTEÚDO PRINCIPAL
   ========================================================================== */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

h1 {
  font-size: 2rem;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.4rem;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 2rem 0;
}

blockquote {
  background-color: #eef7f2;
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

code {
  background-color: #f1f3f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

pre {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* ==========================================================================
   5. AJUSTE DE IMAGENS (PROPORCIONAIS E CENTRALIZADAS)
   ========================================================================== */
.img-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
  text-align: center;
}

/* Garante que nenhuma imagem ultrapasse a tela nem fique gigante */
.img-container img {
  max-width: 100%;
  height: auto;
  max-height: 480px; /* Limita a altura para fotos não ocuparem a tela toda */
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ==========================================================================
   6. TABELAS
   ========================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

th {
  background-color: var(--primary-color);
  color: #ffffff;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* ==========================================================================
   7. RODAPÉ E NAVEGAÇÃO SECUNDÁRIA
   ========================================================================== */
.btn-navigation {
  margin-top: 2rem;
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--primary-hover);
}

.top-link {
  text-align: right;
  margin-top: 1rem;
}

.top-link a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}


/* Estilo geral do container de créditos */
.header-creditos-box {
  background-color: #f8f9fa; /* Ajuste conforme a cor do seu tema */
  padding: 10px 15px;
  font-size: 0.9rem;
  border-bottom: 1px solid #dee2e6;
}

.creditos-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.creditos-linha {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* Permite quebrem de linha se o espaço acabar */
  gap: 5px;
}

.creditos-label {
  font-weight: bold;
  margin-right: 5px;
}

.creditos-itens {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.divisor {
  color: #6c757d;
}

/* Regra específica para celulares (telas menores que 768px) */
@media (max-width: 768px) {
  .creditos-linha {
    flex-direction: column; /* Coloca o rótulo (Autoras/Orientadores) em cima e os nomes embaixo */
    align-items: flex-start;
    margin-bottom: 8px;
  }
  
  .creditos-itens {
    flex-direction: column; /* Cada nome de autor/orientador fica em sua própria linha */
    align-items: flex-start;
    gap: 2px;
  }

  .divisor {
    display: none; /* Oculta os pontos divisores em formato coluna no celular, pois cada um já estará em uma linha */
  }
}

