/* ═══════════════════════════════════════
   Battle Class — GitPages Theme
   Arquitetura e Desenho de Software
   UnB/FGA 2026.1 · G6
   ═══════════════════════════════════════ */

:root {
  --theme-color: #2B6BE6;
  --bc-gold: #FFD700;
  --bc-gold-dark: #E6B800;
  --bc-blue: #2B6BE6;
  --bc-blue-dark: #1A3FA0;
  --bc-blue-light: #4A90FF;
  --bc-bg: #F0F4FF;
  --bc-surface: #fff;
  --bc-surface2: rgba(43,107,230,0.035);
  --bc-text: #1E293B;
  --bc-muted: #64748B;
  --bc-radius: 14px;
  --bc-shadow: 0 4px 20px rgba(43,107,230,0.12);
  --bc-border: rgba(43,107,230,0.1);
  --bc-h1: #1A3FA0;
}


/* ── Body ── */
body {
  font-family: 'Nunito', sans-serif !important;
  background: var(--bc-bg) !important;
  padding-top: 76px !important;
}

/* ── Top Bar ── */
#bc-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 76px;
  background: linear-gradient(90deg, #12276e 0%, #1A3FA0 40%, #2B6BE6 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 300;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

#bc-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

#bc-hamburger {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s;
}
#bc-hamburger:hover { background: rgba(255,255,255,0.15); }

#bc-topbar-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

#bc-topbar-sep {
  color: rgba(255,255,255,0.35);
  font-size: 16px;
}

#bc-topbar-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bc-topbar-right {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
}


/* Empurra sidebar e conteúdo para baixo do topbar */
.sidebar,
body > .sidebar,
.app-sidebar {
  top: 76px !important;
  height: calc(100vh - 76px) !important;
  transition: left 0.25s ease !important;
}

/* Desktop: sidebar fechada */
body.bc-sidebar-closed .sidebar,
body.bc-sidebar-closed body > .sidebar {
  left: -300px !important;
}
body.bc-sidebar-closed .content,
body.bc-sidebar-closed section.content {
  margin-left: 0 !important;
  left: 0 !important;
  transition: margin-left 0.25s ease, left 0.25s ease;
}
body.bc-sidebar-closed .markdown-section {
  margin-left: auto !important;
  margin-right: auto !important;
}
.content { transition: margin-left 0.25s ease, left 0.25s ease; }

/* ── Sidebar ── */
.sidebar,
body > .sidebar,
.app-sidebar {
  background: linear-gradient(160deg, #1A3FA0 0%, #2B6BE6 55%, #4A90FF 100%) !important;
  border-right: none !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Esconde logo/nome do app na sidebar — já aparece no topbar */
.sidebar .app-name,
.app-name {
  display: none !important;
}

.sidebar .search   { order: 1 !important; }
.sidebar .sidebar-nav { order: 2 !important; flex: 1 !important; overflow-y: auto !important; }

/* Esconde toggle padrão do Docsify */
.sidebar-toggle { display: none !important; }

.sidebar .app-name-link,
.app-name-link {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 26px !important;
  color: var(--bc-gold) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35) !important;
  letter-spacing: 1px !important;
  text-decoration: none !important;
  display: block !important;
  padding: 8px 12px !important;
}

/* Remove tracinhos do Docsify */
.sidebar-nav ul li::before,
.sidebar-nav li::before {
  content: none !important;
  display: none !important;
}

/* Subitens: indentação com linha vertical */
.sidebar-nav ul {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.sidebar-nav ul ul {
  margin-left: 16px !important;
}

.sidebar-nav {
  padding: 0 12px !important;
}

.bc-toggle {
  font-size: 14px;
  opacity: 0.85;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-left: auto;
}


/* Links da sidebar */
.sidebar-nav a,
.sidebar-nav ul li a {
  color: rgba(255,255,255,0.82) !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  transition: color 0.2s, background 0.2s !important;
  text-decoration: none !important;
  margin: 2px 0 !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sidebar-nav a:hover {
  color: var(--bc-gold) !important;
  background: rgba(255,255,255,0.1) !important;
}

.sidebar-nav ul li.active > a[href^="#/"],
.sidebar-nav li.active > a[href^="#/"] {
  color: var(--bc-gold) !important;
  background: rgba(255,215,0,0.12) !important;
  border-radius: 8px !important;
  margin: 2px 8px !important;
  padding: 6px 10px !important;
}

/* Títulos de seção (negrito) na sidebar */
.sidebar-nav p,
.sidebar-nav strong {
  color: rgba(255,255,255,0.45) !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  font-family: 'Nunito', sans-serif !important;
  margin-top: 16px !important;
}

/* Busca na sidebar */
.search {
  border-bottom: 1px solid rgba(255,255,255,0.15) !important;
  padding: 12px 12px 12px !important;
  margin-bottom: 8px !important;
  position: relative !important;
}

.search input {
  font-family: 'Nunito', sans-serif !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1.5px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding-left: 36px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.search input::placeholder { color: rgba(255,255,255,0.45) !important; }

.search .results-panel {
  background: #1A3FA0 !important;
  border-radius: 0 0 12px 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
  padding: 8px 0 !important;
}

.search .results-panel .matching-post {
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  padding: 10px 16px !important;
}

.search .results-panel .matching-post:last-child {
  border-bottom: none !important;
}

.search .results-panel h2 {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 14px !important;
  color: var(--bc-gold) !important;
  margin: 0 0 4px !important;
  border: none !important;
}

.search .results-panel p {
  font-size: 12px !important;
  color: rgba(255,255,255,0.65) !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.search .results-panel em {
  color: var(--bc-gold) !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.search::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

/* ── Área de conteúdo ── */
body,
.content,
section.content {
  background: var(--bc-bg) !important;
}

.markdown-section {
  max-width: 860px !important;
  padding: 40px 76px !important;
  font-family: 'Nunito', sans-serif !important;
  background: var(--bc-bg) !important;
  color: var(--bc-text) !important;
}

/* ── Details / Summary ── */
.markdown-section details {
  background: var(--bc-surface2);
  border: 1px solid var(--bc-border);
  border-radius: 10px;
  margin: 6px 0;
  padding: 0;
  overflow: hidden;
  transition: background 0.2s;
}

.markdown-section details[open] {
  background: var(--bc-surface);
  box-shadow: var(--bc-shadow);
}

.markdown-section summary {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--bc-blue-dark);
  background: rgba(255, 215, 0, 0.15);
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.markdown-section summary::-webkit-details-marker { display: none; }

.markdown-section summary::before {
  content: '▸';
  font-size: 11px;
  color: var(--bc-gold-dark);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.markdown-section details[open] summary::before {
  transform: rotate(90deg);
}

.markdown-section details > *:not(summary) {
  padding: 0 16px 12px;
}

/* ── Títulos ── */
.markdown-section h1 {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 38px !important;
  color: var(--bc-blue-dark) !important;
  letter-spacing: 0.5px !important;
  border-bottom: 3px solid var(--bc-gold) !important;
  padding-bottom: 10px !important;
  margin-bottom: 24px !important;
}

.markdown-section h2 {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 24px !important;
  color: var(--bc-blue-light) !important;
  border-bottom: 2px solid var(--bc-border) !important;
  padding-bottom: 6px !important;
  margin-top: 36px !important;
}

.markdown-section h3 {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 19px !important;
  color: var(--bc-blue) !important;
}

.markdown-section h4 {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: var(--bc-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-family: 'Nunito', sans-serif !important;
}

/* ── Texto e links ── */
.markdown-section p {
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: var(--bc-text) !important;
  font-family: 'Nunito', sans-serif !important;
}

.markdown-section li {
  color: var(--bc-text) !important;
}

.markdown-section a { color: var(--bc-blue-dark) !important; font-weight: 700 !important; }
.markdown-section a:hover { color: var(--bc-gold-dark) !important; }

/* ── Tabelas ── */
.markdown-section .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  border-radius: var(--bc-radius) !important;
  box-shadow: var(--bc-shadow) !important;
}

.markdown-section table {
  display: table !important;
  overflow: visible !important;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: var(--bc-radius) !important;
  overflow: hidden !important;
  font-size: 14px !important;
  font-family: 'Nunito', sans-serif !important;
}

.markdown-section thead tr {
  background: linear-gradient(135deg, var(--bc-blue-dark), var(--bc-blue)) !important;
}

.markdown-section thead th {
  color: #fff !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 12px 16px !important;
  border: none !important;
}

.markdown-section thead th:first-child { border-radius: var(--bc-radius) 0 0 0 !important; }
.markdown-section thead th:last-child  { border-radius: 0 var(--bc-radius) 0 0 !important; }

.markdown-section tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--bc-radius) !important; }
.markdown-section tbody tr:last-child td:last-child  { border-radius: 0 0 var(--bc-radius) 0 !important; }

.markdown-section tbody tr { background: var(--bc-surface) !important; }
.markdown-section tbody tr:nth-child(even) { background: var(--bc-surface2) !important; }
.markdown-section tbody tr:hover { background: rgba(74,144,255,0.1) !important; }

.markdown-section tbody td {
  padding: 10px 16px !important;
  border-top: 1px solid var(--bc-border) !important;
  color: var(--bc-text) !important;
  font-size: 14px !important;
  font-family: 'Nunito', sans-serif !important;
  border-right: none !important;
  border-left: none !important;
}

/* ── Code ── */
.markdown-section code {
  background: rgba(74,144,255,0.15) !important;
  color: var(--bc-blue-light) !important;
  border-radius: 6px !important;
  padding: 2px 7px !important;
  font-size: 13px !important;
}

.markdown-section pre {
  background: #0a0f1a !important;
  border-radius: var(--bc-radius) !important;
  box-shadow: var(--bc-shadow) !important;
}

.markdown-section pre code {
  background: transparent !important;
  color: rgba(255,255,255,0.88) !important;
}

/* ── Blockquote ── */
.markdown-section blockquote {
  background: rgba(74,144,255,0.07) !important;
  border-left: 4px solid var(--bc-blue) !important;
  border-radius: 0 var(--bc-radius) var(--bc-radius) 0 !important;
  padding: 12px 20px !important;
  color: var(--bc-muted) !important;
  font-weight: 700 !important;
}

/* ── Cards da equipe (dark mode override) ── */
.markdown-section div[style*="background:#fff"] {
  background: var(--bc-surface) !important;
}
.markdown-section div[style*="font-weight:800"] {
  color: var(--bc-text) !important;
}
.markdown-section div[style*="color:#888"] {
  color: var(--bc-muted) !important;
}


/* ── Responsivo ── */
@media (max-width: 768px) {
  .markdown-section { padding: 24px 20px !important; }

  /* Sidebar vira overlay no mobile */
  .sidebar,
  body > .sidebar,
  .app-sidebar {
    left: -300px !important;
    z-index: 200 !important;
  }
  body.bc-sidebar-open .sidebar,
  body.bc-sidebar-open body > .sidebar {
    left: 0 !important;
  }

  /* Conteúdo ocupa tela toda no mobile */
  .content,
  section.content {
    margin-left: 0 !important;
    transition: none !important;
  }

  /* Topbar: esconde texto direito em telas muito pequenas */
  #bc-topbar-right {
    display: none;
  }
}
