:root {
  --brand-primary: #00875f;
  --brand-dark: #00694a;
  --brand-light: #e6f7f1;
  --brand-warning: #fef3c7;
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.6;
}

/* NAVBAR */
.help-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}

.help-nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.logo-badge {
  background-color: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.docs-tag {
  font-size: 0.75rem;
  background-color: var(--brand-light);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Slot para receber a busca quando ancorada no header */
.nav-search-slot {
  flex: 1;
  max-width: 460px;
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.nav-actions {
  flex-shrink: 0;
}

.btn-app {
  background-color: var(--brand-primary);
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn-app:hover {
  background-color: var(--brand-dark);
}

/* HERO / SEARCH */
.help-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 48px 20px;
  text-align: center;
}

.help-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.help-hero h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.help-hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.search-box-wrapper {
  min-height: 52px;
}

/* Estado normal da busca no Hero */
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.search-box:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 135, 95, 0.12);
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
}

/* Estado da busca ancorada e compacta no cabeçalho */
.search-box.is-docked {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background-color: #f8fafc;
  box-shadow: none;
  animation: fadeInDock 0.25s ease forwards;
}

.search-box.is-docked input {
  font-size: 0.88rem;
}

@keyframes fadeInDock {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* LAYOUT (SIDEBAR + CONTEÚDO) */
.help-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 40px 20px;
}

/* SIDEBAR */
.help-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
  height: calc(100vh - 100px);
  overflow-y: auto;
}

.nav-group {
  margin-bottom: 24px;
}

.group-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.nav-group ul {
  list-style: none;
}

.nav-item {
  display: block;
  padding: 6px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: #edf2f7;
  color: var(--text-main);
}

.nav-item.active {
  background-color: var(--brand-light);
  color: var(--brand-primary);
  font-weight: 600;
}

/* CONTEÚDO DOS ARTIGOS */
.help-content {
  flex: 1;
  min-width: 0;
  background-color: #ffffff;
  padding: 36px 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.help-article {
  scroll-margin-top: 85px;
  margin-bottom: 36px;
}

.breadcrumb {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.help-article h2 {
  font-size: 1.45rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.article-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.help-article h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px 0;
}

.help-article p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.help-article ul, .help-article ol {
  margin-left: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.help-article li {
  margin-bottom: 6px;
}

.instruction-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-primary);
  padding: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.instruction-box h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.article-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background-color: #f1f5f9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin: 10px 0;
  display: block;
}

.info-card {
  background-color: var(--brand-light);
  border: 1px solid #bbf7d0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: #14532d;
  font-size: 0.88rem;
  margin: 16px 0;
}

.info-card ul {
  margin-top: 6px;
  margin-bottom: 0;
  color: #14532d;
}

.warning-card {
  background-color: #fffbeb;
  border: 1px solid #fef08a;
  border-left: 4px solid #f59e0b;
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #78350f;
  font-size: 0.88rem;
  margin: 16px 0;
}

.warning-card ul {
  margin-top: 6px;
  margin-bottom: 0;
  color: #78350f;
}

.divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 40px 0;
}

/* BOTÃO VOLTAR AO TOPO (FIXED) */
.btn-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.25s ease-in-out;
  z-index: 99;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background-color: var(--brand-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-back-to-top:active {
  transform: scale(0.95);
}

/* RODAPÉ */
.help-footer {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
}

.help-footer a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.help-footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVIDADE */
@media (max-width: 860px) {
  .help-nav-container {
    gap: 10px;
  }

  .nav-search-slot {
    display: none; /* Em telas menores, mantém o cabeçalho desimpedido */
  }

  .help-layout {
    flex-direction: column;
    padding: 20px 16px;
  }

  .help-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
  }

  .help-content {
    padding: 24px 18px;
  }

  .btn-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ==========================================================================
   3. ESTILOS CSS DO FAQ 
   ========================================================================== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-item[open] {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* Oculta o triângulo padrão nativo do details */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.faq-answer {
  padding: 0 20px 18px 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ol {
  margin-left: 20px;
  margin-top: 8px;
}