/* ===== Reset básico ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ===== Layout principal ===== */
.container {
  display: flex;
  min-height: 100vh;
  max-width: 1500px;
  margin: auto;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 450px;
  flex-shrink: 0;
  background: #f0f9ff;
  border-right: 1px solid #bae6fd;
  padding: 2rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar ul { list-style: none; padding-left: 0; }
.sidebar li { margin: 0.8rem 0; }
.sidebar a {
  color: #0369a1;
  text-decoration: none;
  font-weight: 500;
}
.sidebar a:hover { text-decoration: underline; }



.menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;

  background: white;   /* aquí */
  color: black;        /* aquí */
  border: 1px solid #ccc;
  border-radius: 6px;
}


/* ===== Contenido centrado ===== */
.content {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 1200px;
  line-height: 1.7;
}

/* ===== Tipografía ===== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background: #f9fafb;
  color: #1f2933;
  margin: 0;
  padding: 0;
}

/* ===== Headings ===== */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #0c4a6e;
}
h1 { font-size: 2.4rem; border-bottom: 2px solid #bae6fd; padding-bottom: 0.5rem; }
h2 { font-size: 1.8rem; border-bottom: 1px solid #bae6fd; padding-bottom: 0.3rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; color: #075985; }

/* ===== Links ===== */
a { color: #0284c7; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
a:visited { color: #0369a1; }

/* ===== Inline code ===== */
code {
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro",
               Consolas, monospace;
  background: #e0f2fe;
  color: #000000;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ===== Code blocks ===== */
pre {
  background: #e0f2fe;
  color: #000000;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid #bae6fd;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* ===== Blockquotes ===== */
blockquote {
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  color: #1e3a8a;
  border-radius: 4px;
}

/* ===== Tables ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}
th, td { border: 1px solid #e5e7eb; padding: 0.6rem 0.8rem; text-align: left; }
th { background: #f1f5f9; font-weight: 600; }
tr:nth-child(even) { background: #fafafa; }

/* ===== Images ===== */
img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; border-radius: 6px; }

/* ===== Horizontal rule ===== */
hr { border: none; border-top: 1px solid #e5e7eb; margin: 3rem 0; }

/*---esto es para cuando se usa móvil*/
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;   /* mismo ancho que tu sidebar */
    width: 300px;
    height: 100vh;
    background: #f4f6f8;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

  .sidebar.active {
    left: 0;
  }

  .content {
    padding: 4rem 1rem 1rem 1rem;
  }

}
