/* =========================================================
   1. PALETA DE COLORES (Edita aquí los códigos hexadecimales)
   ========================================================= */
:root {
  /* MODO CLARO */
  --link-interno-claro: #e11d48;       /* Rojo/Fucsia vibrante (llamativo) */
  --link-interno-claro-hover: #be123c; /* Tono más oscuro al pasar el cursor */
  --link-externo-claro: #64748b;       /* Gris azulado discreto */
  --link-externo-claro-hover: #334155;

  /* MODO OSCURO */
  --link-interno-oscuro: #fb7185;      /* Coral/Rosa neón (muy legible y llamativo en fondo oscuro) */
  --link-interno-oscuro-hover: #fda4af;
  --link-externo-oscuro: #94a3b8;      /* Gris claro sutil */
  --link-externo-oscuro-hover: #cbd5e1;
}

/* =========================================================
   2. REGLAS PARA MODO CLARO (Por defecto)
   ========================================================= */

/* Enlaces INTERNOS (más llamativos, en negrita y subrayado marcado) */
div.prose a:not([href^="http"]),
article a:not([href^="http"]),
main a:not([href^="http"]),
.content-body a:not([href^="http"]) {
  color: var(--link-interno-claro) !important;
  text-decoration-color: var(--link-interno-claro) !important;
  font-weight: 600;
}

div.prose a:not([href^="http"]):hover,
article a:not([href^="http"]):hover,
main a:not([href^="http"]):hover,
.content-body a:not([href^="http"]):hover {
  color: var(--link-interno-claro-hover) !important;
  text-decoration-color: var(--link-interno-claro-hover) !important;
}

/* Enlaces EXTERNOS (empiezan con http/https - estilo más discreto) */
div.prose a[href^="http"],
article a[href^="http"],
main a[href^="http"],
.content-body a[href^="http"] {
  color: var(--link-externo-claro) !important;
  text-decoration-color: var(--link-externo-claro) !important;
  font-weight: 400;
}

div.prose a[href^="http"]:hover,
article a[href^="http"]:hover,
main a[href^="http"]:hover,
.content-body a[href^="http"]:hover {
  color: var(--link-externo-claro-hover) !important;
}

/* =========================================================
   3. REGLAS PARA MODO OSCURO
   ========================================================= */

/* Enlaces INTERNOS en modo oscuro */
html.dark div.prose a:not([href^="http"]),
html.dark article a:not([href^="http"]),
html.dark main a:not([href^="http"]),
html.dark .content-body a:not([href^="http"]),
.dark div.prose a:not([href^="http"]),
.dark article a:not([href^="http"]),
.dark main a:not([href^="http"]),
.dark .content-body a:not([href^="http"]) {
  color: var(--link-interno-oscuro) !important;
  text-decoration-color: var(--link-interno-oscuro) !important;
}

html.dark div.prose a:not([href^="http"]):hover,
html.dark article a:not([href^="http"]):hover,
html.dark main a:not([href^="http"]):hover,
html.dark .content-body a:not([href^="http"]):hover,
.dark div.prose a:not([href^="http"]):hover,
.dark article a:not([href^="http"]):hover,
.dark main a:not([href^="http"]):hover,
.dark .content-body a:not([href^="http"]):hover {
  color: var(--link-interno-oscuro-hover) !important;
  text-decoration-color: var(--link-interno-oscuro-hover) !important;
}

/* Enlaces EXTERNOS en modo oscuro */
html.dark div.prose a[href^="http"],
html.dark article a[href^="http"],
html.dark main a[href^="http"],
html.dark .content-body a[href^="http"],
.dark div.prose a[href^="http"],
.dark article a[href^="http"],
.dark main a[href^="http"],
.dark .content-body a[href^="http"] {
  color: var(--link-externo-oscuro) !important;
  text-decoration-color: var(--link-externo-oscuro) !important;
}

html.dark div.prose a[href^="http"]:hover,
html.dark article a[href^="http"]:hover,
html.dark main a[href^="http"]:hover,
html.dark .content-body a[href^="http"]:hover,
.dark div.prose a[href^="http"]:hover,
.dark article a[href^="http"]:hover,
.dark main a[href^="http"]:hover,
.dark .content-body a[href^="http"]:hover {
  color: var(--link-externo-oscuro-hover) !important;
}

aside nav ul li:not(:has(a[href*="Introducci"])),
.sidebar nav ul li:not(:has(a[href*="Introducci"])),
nav[aria-label="Sidebar"] li:not(:has(a[href*="Introducci"])) {
  display: none !important;
}