/* ═══════════════════════════════════════════════════════
   Péndulo Invertido DQN — Tema IBERO
   Blanco limpio · Rojo #C8102E
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ibero: #C8102E;
  --ibero-dark: #9b0b23;
  --ibero-pale: #fdf0f2;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════ */
.side-bar {
  background: rgb(234.8, 236.82, 244.9) !important;
  border-right: 1px solid #C8102E !important;
}

.site-title {
  color: #1c1c1e !important;
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  border-bottom: 1px solid #c8c9d4 !important;
  background: rgb(234.8, 236.82, 244.9) !important;
}

.nav-list .nav-list-link {
  color: #444 !important;
  font-family: 'IBM Plex Sans', sans-serif !important;
  font-size: 0.875rem !important;
}

.nav-list .nav-list-link:hover {
  color: #1c1c1e !important;
  background: rgba(200, 16, 46, 0.08) !important;
}

.nav-list .nav-list-link.active {
  color: #C8102E !important;
  background: rgba(200, 16, 46, 0.12) !important;
  font-weight: 600 !important;
  border-radius: 0 4px 4px 0 !important;
  border-left: 3px solid #C8102E !important;
}

.nav-list .nav-list-item>.nav-list-link {
  color: #333 !important;
  font-weight: 500 !important;
}

.nav-list-expander { color: #888 !important; }

/* ════════════════════════════════════════════════════════
   HEADER Y FOOTER
   ════════════════════════════════════════════════════════ */
.main-header {
  background: #ffffff !important;
  border-bottom: 2px solid #C8102E !important;
}

.site-footer { border-top: 2px solid #C8102E !important; }
.site-footer-copyright { color: #888 !important; }

/* ════════════════════════════════════════════════════════
   TIPOGRAFÍA
   ════════════════════════════════════════════════════════ */
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
  color: #1c1c1e !important;
}

.main-content {
  font-size: 1rem !important;
  line-height: 1.8 !important;
  color: #1c1c1e !important;
}

.main-content h1 {
  color: #C8102E !important;
  font-weight: 700 !important;
  font-size: 2rem !important;
  border-bottom: 3px solid #C8102E !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 1.5rem !important;
}

.main-content h2 {
  color: #1c1c1e !important;
  font-weight: 600 !important;
  font-size: 1.3rem !important;
  margin-top: 2.5rem !important;
  padding-bottom: 0.3rem !important;
  border-bottom: 1px solid #e8e8e8 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.main-content h2::before {
  content: "" !important;
  display: inline-block !important;
  width: 5px !important;
  min-width: 5px !important;
  height: 1.1em !important;
  background: #C8102E !important;
  border-radius: 3px !important;
  flex-shrink: 0 !important;
}

.main-content h3 {
  color: #9b0b23 !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  margin-top: 1.75rem !important;
}

.main-content p { color: #1c1c1e !important; }

.main-content a {
  color: #C8102E !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.main-content a:hover {
  color: #9b0b23 !important;
  text-decoration: underline !important;
}

/* ════════════════════════════════════════════════════════
   CÓDIGO INLINE
   ════════════════════════════════════════════════════════ */
.main-content p code,
.main-content li code,
.main-content td code,
.main-content h2 code,
.main-content h3 code {
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.85em !important;
  background: #fdf0f2 !important;
  color: #9b0b23 !important;
  padding: 0.15em 0.45em !important;
  border-radius: 4px !important;
  border: 1px solid #f5cdd3 !important;
  white-space: nowrap !important;
}

/* ════════════════════════════════════════════════════════
   BLOQUES DE CÓDIGO — FIX JUST THE DOCS NESTING
   ════════════════════════════════════════════════════════ */
div.highlighter-rouge {
  background: #f6f8fa !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 8px !important;
  margin: 1.5rem 0 !important;
  overflow-x: auto !important;
  box-shadow: none !important;
}

div.highlighter-rouge>.highlight,
div.highlighter-rouge>figure.highlight {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

figure.highlight,
.highlight {
  background: #f6f8fa !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 8px !important;
  margin: 1.5rem 0 !important;
  overflow-x: auto !important;
  box-shadow: none !important;
}

.highlight pre,
div.highlighter-rouge pre,
figure.highlight pre,
.main-content pre {
  background: transparent !important;
  margin: 0 !important;
  padding: 1.25rem 1.5rem !important;
  overflow-x: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.highlight pre code,
div.highlighter-rouge pre code,
figure.highlight pre code,
.main-content pre code {
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 0.85rem !important;
  line-height: 1.7 !important;
  color: #24292f !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  white-space: pre !important;
  display: block !important;
}

/* Syntax highlighting — GitHub Light */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr { color: #d73a49 !important; font-weight: 600 !important; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #032f62 !important; }
.highlight .c, .highlight .c1, .highlight .cm  { color: #6a737d !important; font-style: italic !important; }
.highlight .nb { color: #005cc5 !important; }
.highlight .nf, .highlight .nc { color: #6f42c1 !important; }
.highlight .mi, .highlight .mf { color: #005cc5 !important; }
.highlight .o  { color: #d73a49 !important; }
.highlight .na { color: #22863a !important; }
.highlight .p  { color: #24292f !important; }

/* ════════════════════════════════════════════════════════
   TABLAS
   ════════════════════════════════════════════════════════ */
.main-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5rem 0 !important;
  font-size: 0.92rem !important;
}

.main-content thead tr { background: #C8102E !important; }

.main-content thead th {
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 0.8rem 1.1rem !important;
  border: none !important;
  letter-spacing: 0.02em !important;
}

.main-content tbody tr { background: #ffffff !important; }
.main-content tbody tr:nth-child(even) { background: #fdf5f6 !important; }
.main-content tbody tr:hover { background: #fce8eb !important; }

.main-content td {
  padding: 0.65rem 1.1rem !important;
  border-bottom: 1px solid #eeeeee !important;
  color: #1c1c1e !important;
}

/* ════════════════════════════════════════════════════════
   BLOCKQUOTES
   ════════════════════════════════════════════════════════ */
.main-content blockquote {
  border-left: 4px solid #C8102E !important;
  background: #fdf0f2 !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 0.9rem 1.3rem !important;
  margin: 1.25rem 0 !important;
  font-style: normal !important;
}

.main-content blockquote p { margin: 0 !important; color: #333 !important; }

.main-content blockquote .highlight,
.main-content blockquote div.highlighter-rouge,
.main-content blockquote figure.highlight {
  border: 1px solid #e1e4e8 !important;
  border-radius: 6px !important;
  margin: 0.75rem 0 0 0 !important;
}

/* ════════════════════════════════════════════════════════
   BOTONES
   ════════════════════════════════════════════════════════ */
.btn-primary {
  background: #C8102E !important;
  border-color: #C8102E !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.btn-primary:hover {
  background: #9b0b23 !important;
  border-color: #9b0b23 !important;
}

.btn-outline {
  background: transparent !important;
  border: 2px solid #C8102E !important;
  color: #C8102E !important;
}

.btn-outline:hover {
  background: #C8102E !important;
  color: #ffffff !important;
}

/* ════════════════════════════════════════════════════════
   IMÁGENES
   ════════════════════════════════════════════════════════ */
.main-content img {
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
  max-width: 100% !important;
  margin: 1.5rem auto !important;
  display: block !important;
}

/* ════════════════════════════════════════════════════════
   AUX LINKS
   ════════════════════════════════════════════════════════ */
.aux-nav-list .aux-nav-list-item a {
  background: #C8102E !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  padding: 0.3rem 0.85rem !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
}

.aux-nav-list .aux-nav-list-item a:hover {
  background: #9b0b23 !important;
  text-decoration: none !important;
}

/* ════════════════════════════════════════════════════════
   SEARCH
   ════════════════════════════════════════════════════════ */
.search-input:focus {
  border-color: #C8102E !important;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15) !important;
}