/* =========================
   Design tokens
   ========================= */
:root {
  --color-primary: #1f4d2b;
  --color-primary-dark: #1b3f28;
  --color-accent: #3a7d44;

  --color-bg: #f7faf8;
  --color-surface: #ffffff;
  --color-text: #24312a;
  --color-muted: #6b7d73;
  --color-border: #dce5df;

  --code-bg: #1e1e1e;
}

/* =========================
   Reset / base
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* =========================
   Header (minimal, docs-style)
   ========================= */
header {
  height: 104px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

header img {
  height: 68px;
  width: auto;
}

/* =========================
   Layout
   ========================= */
.container {
  display: flex;
  min-height: calc(100vh - 52px);
}

/* =========================
   Navigation
   ========================= */
nav {
  width: 260px;
  padding: 1.25rem 1rem;
  background-color: var(--color-primary-dark);
  color: #e9f5ee;
}

nav h2 {
  margin: 1.5rem 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d6e9dc;
}

nav a {
  display: block;
  padding: 0.35rem 0.6rem;
  margin: 2px 0;
  font-size: 0.9rem;
  color: #e9f5ee;
  text-decoration: none;
  border-radius: 4px;
  opacity: 0.85;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

nav a.active {
  background-color: rgba(255, 255, 255, 0.14);
  opacity: 1;
}

/* =========================
   Main content
   ========================= */
main {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 1100px;
}

/* Limit readable line length */
main p,
main ul,
main ol,
main pre {
  max-width: 75ch;
}

/* =========================
   Headings (content only)
   ========================= */
main h1 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-primary);
}

main h2 {
  margin-top: 3rem;
  font-size: 1.4rem;
  font-weight: 600;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-primary);
}

main h3 {
  margin-top: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

/* =========================
   Text & lists
   ========================= */
main p {
  margin: 1rem 0;
}

main ul,
main ol {
  padding-left: 1.5rem;
}

main li {
  margin: 0.4rem 0;
}

/* =========================
   Code blocks
   ========================= */
pre {
  background: var(--code-bg);
  color: #e6e6e6;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* =========================
   Footer (optional, subtle)
   ========================= */
footer {
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
}

.version-badge {
  margin-left: 0.75rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 4px;
  background-color: #eef4ef;
  color: var(--color-primary);
}

.github-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;       /* centra verticalmente icono y texto */
  gap: 0.4rem;               /* espacio limpio entre icono y texto */
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-muted);
}

.github-link span {
  letter-spacing: 0.02em;
}

.github-link img {
  width: 16px;
  height: 16px;
}

.github-link:hover {
  color: var(--color-primary);
}



/* =========================
   Responsive
   ========================= */
@media (max-width: 900px) {
  nav {
    display: none;
  }

  main {
    padding: 1.5rem;
  }
}

.doc-section {
  max-width: 820px;
}

.doc-section .lead {
  font-size: 1.1rem;
  color: var(--color-muted);
}

.doc-section ul {
  margin: 1rem 0 1.5rem 1.2rem;
}

.doc-section li {
  margin-bottom: 0.6rem;
}

.doc-section .next-step {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-weight: 500;
}

img.diagram {
  display: block;
  max-width: 120%;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.next-step {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-weight: 500;
  color: var(--color-muted);
}

/* ================================
   Code blocks
================================ */

pre {
  background: #0f172a; /* slate-900 */
  color: #e5e7eb;      /* gray-200 */
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0;
  position: relative;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* Inline code */
p code,
li code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  font-size: 0.85em;
}

/* ================================
   Language hints (semantic only)
   Extend later if needed
================================ */

code.language-java::before {
  content: "Java";
}

code.language-bash::before {
  content: "Bash";
}

code.language-json::before {
  content: "JSON";
}

code.language-yaml::before {
  content: "YAML";
}

/* Label styling */
pre code::before {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8; /* slate-400 */
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;

  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;

  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;

  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

pre:hover .copy-btn {
  opacity: 1;
}

.copy-btn.copied {
  background: #2e7d32;
  border-color: #2e7d32;
}

