/* ============================================
   COMO USAR — Página de documentação / tutorial
   ============================================ */

:root {
  --doc-bg: #fafaf9;
  --doc-surface: #fff;
  --doc-text: #1a1a1a;
  --doc-text-muted: #6b6b6b;
  --doc-accent: #7d2d2d;
  --doc-accent-dark: #6b2222;
  --doc-accent-border: #5a1a1a;
  --doc-border: rgba(0, 0, 0, 0.08);
  --doc-font-serif: 'Cormorant Garamond', Georgia, serif;
  --doc-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --doc-radius: 12px;
  --doc-sidebar-w: 220px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--doc-font-sans);
  background: var(--doc-bg);
  color: var(--doc-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--doc-accent);
  text-decoration: none;
}

a:hover {
  color: var(--doc-accent-dark);
  text-decoration: underline;
}

/* ----- Header ----- */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--doc-border);
  backdrop-filter: blur(12px);
}

.doc-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-header__logo {
  font-family: var(--doc-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--doc-text);
}

.doc-header__logo:hover {
  text-decoration: none;
}

.doc-header__badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--doc-text-muted);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  margin-left: 12px;
}

.doc-header__back:hover {
  text-decoration: none;
}

.doc-header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-width: 0;
  margin-left: 24px;
}

.doc-header__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--doc-text-muted);
}

.doc-header__link:hover {
  color: var(--doc-text);
}

.doc-header__link--cta {
  padding: 8px 16px;
  background: linear-gradient(85deg, #7d2d2d, #6b2222, #722f2f, #6b2222, #853333);
  color: #fff;
  border: 1px solid var(--doc-accent-border);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(125, 45, 45, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.doc-header__link--cta:hover {
  text-decoration: none;
  color: #fff;
  border-color: #4a1515;
  box-shadow: 0 4px 12px rgba(125, 45, 45, 0.3);
  transform: translateY(-1px);
}

/* ----- Hero (topo da doc) ----- */
.doc-hero {
  background: linear-gradient(180deg, #f5f0e8 0%, #faf8f5 50%, var(--doc-bg) 100%);
  padding: 48px 24px 56px;
  border-bottom: 1px solid var(--doc-border);
}

.doc-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.doc-hero__title {
  font-family: var(--doc-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--doc-text);
  margin: 0 0 12px;
  line-height: 1.2;
}

.doc-hero__lead {
  font-size: 1.0625rem;
  color: var(--doc-text-muted);
  margin: 0 0 28px;
  line-height: 1.55;
}

.doc-hero__anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.doc-hero__anchors a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(85deg, #7d2d2d, #6b2222, #722f2f, #6b2222, #853333);
  border: 1px solid var(--doc-accent-border);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(125, 45, 45, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.doc-hero__anchors a:hover {
  text-decoration: none;
  color: #fff;
  border-color: #4a1515;
  box-shadow: 0 4px 12px rgba(125, 45, 45, 0.3);
  transform: translateY(-1px);
}

/* ----- Main layout ----- */
.doc-main {
  padding: 40px 24px 64px;
}

.doc-container {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--doc-sidebar-w) 1fr;
  gap: 48px;
  align-items: start;
}

/* ----- Sidebar (índice) ----- */
.doc-sidebar {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: var(--doc-surface);
  border-radius: var(--doc-radius);
  border: 1px solid var(--doc-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.doc-sidebar__title {
  font-family: var(--doc-font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--doc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.doc-sidebar__list {
  list-style: none;
  counter-reset: doc-sidebar;
}

.doc-sidebar__list li {
  counter-increment: doc-sidebar;
}

.doc-sidebar__list a {
  display: block;
  font-size: 0.9375rem;
  color: var(--doc-text);
  padding: 8px 0;
  border-bottom: 1px solid var(--doc-border);
  transition: color 0.2s;
}

.doc-sidebar__list li:last-child a {
  border-bottom: none;
}

.doc-sidebar__list a:hover {
  color: var(--doc-accent);
  text-decoration: none;
}

.doc-sidebar__list a::before {
  content: counter(doc-sidebar) ".";
  margin-right: 8px;
  color: var(--doc-text-muted);
  font-weight: 500;
}

/* ----- Content ----- */
.doc-content {
  min-width: 0;
}

.doc-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}

.doc-section__title {
  font-family: var(--doc-font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--doc-text);
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(125, 45, 45, 0.2);
}

.doc-section__subtitle {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--doc-text);
}

.doc-section > p {
  margin-bottom: 16px;
  color: var(--doc-text);
}

.doc-steps {
  list-style: none;
  counter-reset: doc-step;
  margin: 16px 0 24px;
}

.doc-steps li {
  counter-increment: doc-step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
}

.doc-steps li::before {
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7d2d2d, #6b2222);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(125, 45, 45, 0.25);
}

.doc-steps li strong {
  font-weight: 600;
}

.doc-list {
  margin: 16px 0 24px;
  padding-left: 24px;
}

.doc-list li {
  margin-bottom: 10px;
}

/* UI elements (botões, links mencionados) */
.doc-ui {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.9em;
  font-weight: 600;
  background: rgba(125, 45, 45, 0.12);
  color: #7d2d2d;
  border-radius: 6px;
  border: 1px solid rgba(125, 45, 45, 0.25);
}

.doc-tip {
  margin: 24px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fdf6f4 0%, #f8ebe8 100%);
  border-radius: var(--doc-radius);
  border-left: 4px solid var(--doc-accent);
}

.doc-tip__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--doc-text-muted);
  margin-bottom: 8px;
}

.doc-tip p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--doc-text);
}

.doc-tip a {
  font-weight: 600;
}

/* ----- Footer ----- */
.doc-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--doc-border);
}

.doc-footer p {
  margin-bottom: 16px;
  color: var(--doc-text-muted);
  font-size: 0.9375rem;
}

.doc-footer__back {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--doc-accent);
}

.doc-footer__back:hover {
  color: var(--doc-accent-dark);
  text-decoration: none;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .doc-header__inner {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .doc-header__badge {
    margin-left: 8px;
  }

  .doc-header__nav {
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--doc-border);
    justify-content: space-between;
  }

  .doc-hero {
    padding: 32px 20px 40px;
  }

  .doc-hero__title {
    font-size: 1.5rem;
  }

  .doc-hero__lead {
    font-size: 1rem;
    margin-bottom: 22px;
  }

  .doc-hero__anchors {
    gap: 8px;
  }

  .doc-hero__anchors a {
    padding: 6px 14px;
    font-size: 0.8125rem;
  }

  .doc-main {
    padding: 24px 16px 48px;
  }

  .doc-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .doc-sidebar {
    position: static;
    padding: 20px;
  }

  .doc-sidebar__title {
    margin-bottom: 12px;
  }

  .doc-section {
    margin-bottom: 36px;
  }

  .doc-section__title {
    font-size: 1.25rem;
  }

  .doc-steps li {
    padding-left: 32px;
    margin-bottom: 12px;
  }

  .doc-tip {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .doc-header__nav {
    gap: 12px;
    padding-top: 10px;
  }

  .doc-header__link--cta {
    padding: 6px 12px;
    font-size: 0.875rem;
  }

  .doc-hero {
    padding: 24px 16px 36px;
  }

  .doc-hero__title {
    font-size: 1.375rem;
  }

  .doc-hero__anchors a {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}
