/* =========================================
   PÁGINA DE DOWNLOADS DO BIOMAPA
========================================= */

.downloads-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 16px 80px;
  font-family: "Rawline", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.downloads-table-wrap {
  overflow-x: auto;
  margin-top: 20px;
}

.downloads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.downloads-table thead tr {
  background: #f3f4f6;
}

.downloads-table th {
  padding: 8px;
  border: 1px solid #e5e7eb;
}

.downloads-table td {
  padding: 6px;
  border: 1px solid #e5e7eb;
}

/* Faixa azul do topo */
.downloads-hero {
  background: #2563eb;
  color: #ffffff;
  text-align: center;
  padding: 28px 16px 36px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  margin: 0 -16px 32px;   /* cola nos lados dentro do container */
}

.downloads-title {
  font-size: 24px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.downloads-subtitle {
  max-width: 760px;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.9;
}

/* Linha de cards (Tabela / Legendas / Metodologia) */
.downloads-cards-row {
  display: flex;
  gap: 18px;
  margin: 24px 0 32px;
  flex-wrap: wrap;
}

.downloads-card {
  flex: 1 1 260px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 18px 20px 20px;
  border: 1px solid #e5e7eb;
}

.downloads-card .card-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.downloads-card .card-text {
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 12px;
}

.downloads-card .card-link {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.downloads-card .card-link:hover {
  text-decoration: underline;
}

/* Seções de baixo (Tabela de camadas / Legendas / Metodologia) */
.downloads-section {
  margin-top: 18px;
}

.section-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 20px 24px 24px;
  border: 1px solid #e5e7eb;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.section-intro {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Tabela de camadas */
.camadas-table-wrapper {
  margin-top: 6px;
  overflow-x: auto;
}

.camadas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.camadas-table th,
.camadas-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
}

.camadas-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: #111827;
}

.camadas-table td a {
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
}

.camadas-table td a:hover {
  text-decoration: underline;
}

/* Blocos de legendas (details/summary) */
.legenda-block {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  margin-top: 10px;
  overflow: hidden;
}

.legenda-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legenda-summary::marker {
  content: "";
}

.legenda-summary::after {
  content: "▾";
  font-size: 11px;
  color: #4b5563;
}

.legenda-block[open] .legenda-summary::after {
  content: "▴";
}

.legenda-body {
  padding: 10px 14px 12px;
  font-size: 13px;
  color: #374151;
}

.legenda-subtitle {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.legenda-table-wrapper {
  margin-top: 4px;
  overflow-x: auto;
}

.legenda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.legenda-table th,
.legenda-table td {
  border: 1px solid #e5e7eb;
  padding: 5px 6px;
}

.legenda-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.legenda-note {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

/* Metodologia */
.metodologia-list {
  margin: 8px 0 6px 18px;
  font-size: 13px;
  color: #374151;
}

.metodologia-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Responsivo – empilha os cards no mobile */
@media (max-width: 768px) {
  .downloads-hero {
    border-radius: 0 0 16px 16px;
    margin: 0 -8px 24px;
  }

  .downloads-cards-row {
    flex-direction: column;
  }

  .downloads-card {
    flex: 1 1 auto;
  }

  .section-card {
    padding: 16px 14px 18px;
  }
}
/* Navegação interna da documentação */
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.875rem;
}

.doc-nav-label {
  font-weight: 600;
  color: #4b5563;
  margin-right: 0.5rem;
}

.doc-nav a {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  text-decoration: none;
  color: #1d4ed8;
}

.doc-nav a:hover {
  border-color: #1d4ed8;
  background: #eff6ff;
}

/* Blocos de documentação */
.doc-section {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  padding: 1.5rem 1.75rem;
  margin-top: 1.5rem;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.doc-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.doc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

/* meta do lado direito */
.doc-meta {
  text-align: right;
  font-size: 0.8rem;
  color: #4b5563;
}

.doc-badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  margin-right: 0.3rem;
}

.doc-summary {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

/* tabelas de documentação */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.doc-table thead {
  background: #f3f4f6;
}

.doc-table th,
.doc-table td {
  padding: 0.5rem 0.6rem;
  border: 1px solid #e5e7eb;
  vertical-align: top;
}

.doc-table th {
  font-weight: 600;
  color: #374151;
}

.doc-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.8rem;
  background: #f9fafb;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
}

/* responsivo */
@media (max-width: 768px) {
  .doc-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .doc-meta {
    text-align: left;
  }
}
/* =======================
   TABELAS DE LEGENDAS
   (igual à tabela de camadas)
======================= */

.legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 10px;
}

/* cabeçalho */
.legend-table thead tr,
.legend-table tr:first-child {
  background: #f3f4f6;
}

.legend-table th,
.legend-table td {
  padding: 6px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

/* espaço entre blocos de legenda */
.apps-context h3 {
  margin-top: 32px;
  margin-bottom: 8px;
}

.apps-context p strong {
  font-weight: 600;
}