/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tema oscuro simple */
body {
    background: #050816;
    color: #e5e7eb;
}

/* Barra superior */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #111827;
    background: rgba(15, 23, 42, 0.95);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: #a5b4fc;
}

/* Switch de idioma */
.lang-switcher {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    border: 1px solid #4b5563;
    background: #111827;
    color: #e5e7eb;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.lang-btn:hover {
    background: #1f2937;
    border-color: #6366f1;
    transform: translateY(-1px);
}

.lang-btn.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #020617;
}

/* Navegación */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: #020617;
    border-bottom: 1px solid #111827;
}

.main-nav a {
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: none;
    position: relative;
    padding-bottom: 0.15rem;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #22c55e;
    transition: width 0.2s;
}

.main-nav a:hover {
    color: #e5e7eb;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Contenido */
.content {
    max-width: 980px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}

/* Secciones */
.section {
    margin-bottom: 2.5rem;
}

.section h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #f9fafb;
}

.section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #f9fafb;
}

.section h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    color: #e5e7eb;
}

.section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d1d5db;
}

/* Listas */
.list {
    list-style: none;
    margin-left: 0;
}

.list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: #d1d5db;
}

.list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 0;
    color: #22c55e;
}

/* Contacto */
.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    border-top: 1px solid #111827;
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    background: #020617;
}

/* Responsive */
@media (max-width: 640px) {
    .content {
        margin-top: 1.5rem;
    }

    .section h1 {
        font-size: 1.6rem;
    }

    .section h2 {
        font-size: 1.2rem;
    }

    .main-nav {
        gap: 0.6rem;
        font-size: 0.85rem;
    }
}

.section {
  margin: 3rem auto;
  max-width: 1000px;
  padding: 0 1.5rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.diagram-container {
  margin: 1.5rem 0 3rem 0;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.7); /* ajusta según tu tema */
  overflow-x: auto;
}

.diagram-container .mermaid {
  min-width: 320px;
}


.lang-active { text-decoration: underline; font-weight: 600; }
