/* PortalGraf Next · bloques editoriales semánticos · sólo vistas de artículos */
/* Avisos de lectura: notas, consejos y advertencias (no comentarios editoriales). */
body.pg-next .com-content-article__body .pg-note,
body.pg-next .com-content-article__body .pg-tip,
body.pg-next .com-content-article__body .pg-warning {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border-left: 5px solid var(--pg-green, #247449);
  border-radius: 10px;
  background: rgba(36, 116, 73, .07);
  line-height: 1.65;
}

body.pg-next .com-content-article__body .pg-warning {
  border-left-color: var(--pg-orange, #f28c20);
  background: rgba(242, 140, 32, .08);
}

body.pg-next .com-content-article__body .pg-tip {
  background: transparent;
  border: 0;
  border-left: 2px solid #4b876b;
  border-radius: 0;
  padding: .55rem 0 .55rem 1.15rem;
  margin-block: 1.4rem;
}

body.pg-next .com-content-article__body .pg-note strong,
body.pg-next .com-content-article__body .pg-tip strong,
body.pg-next .com-content-article__body .pg-warning strong {
  color: var(--pg-dark, #103d2d);
}

/* PortalGraf: bloques semánticos editoriales v1.3 · 2026-10-10
   Se aplican a las vistas de artículo Joomla sin depender de su contenedor interno. */
body.pg-next.com_content.view-article .pg-sources,
body.pg-next.com_content.view-article .pg-conclusion,
body.pg-next.com_content.view-article .pg-editorial-note {
  box-sizing: border-box;
  max-width: 100%;
  margin: 1.65rem 0;
  padding: 1.15rem 1.3rem;
  border-radius: 10px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* Fuentes: zona documental, menor intensidad visual que el cuerpo. */
body.pg-next.com_content.view-article .pg-sources {
  border: 1px solid #d9e2e9;
  border-top: 2px solid #819bad;
  background: #f7f9fb;
  color: var(--pg-text, #15262a);
  font-size: .88rem;
  line-height: 1.48;
  padding: 1rem 1.15rem;
}
body.pg-next.com_content.view-article .pg-sources a {
  color: #155b95;
  text-decoration: underline;
  text-underline-offset: .16em;
}
body.pg-next.com_content.view-article .pg-sources a:hover,
body.pg-next.com_content.view-article .pg-sources a:focus-visible {
  color: #0c4675;
}
body.pg-next.com_content.view-article .pg-sources ul {
  list-style: none;
  margin: .35rem 0 0 !important;
  padding: 0 !important;
  padding-inline-start: 0 !important;
}
body.pg-next.com_content.view-article .pg-sources ul > li {
  margin: 0 !important;
  padding: .46rem 0;
  border-bottom: 1px solid #e0e7ed;
}
body.pg-next.com_content.view-article .pg-sources ul > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
/* Compatibilidad visual con artículos que aún emplean <ol>. */
body.pg-next.com_content.view-article .pg-sources ol {
  list-style: none;
  margin: .35rem 0 0 !important;
  padding: 0 !important;
  padding-inline-start: 0 !important;
}
body.pg-next.com_content.view-article .pg-sources ol > li {
  margin: 0 !important;
  padding: .46rem 0;
  border-bottom: 1px solid #e0e7ed;
}
body.pg-next.com_content.view-article .pg-sources ol > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Enlaces de fuentes históricas y semánticas: azul editorial coherente. */
body.pg-next.com_content.view-article :is(ol.pg-sources, .pg-bibliography) a {
  color: #155b95;
  text-decoration: underline;
  text-underline-offset: .16em;
}
body.pg-next.com_content.view-article :is(ol.pg-sources, .pg-bibliography) a:is(:hover, :focus-visible) {
  color: #0c4675;
}

/* Conclusión: cierre editorial original, sin recuadro ni acento lateral. */
body.pg-next.com_content.view-article .pg-conclusion {
  border: 0;
  border-top: 2px solid #247449;
  border-radius: 0;
  padding: 1rem 0 .15rem;
  background: transparent;
  color: var(--pg-text, #15262a);
}

/* Conclusión: sin decoración duplicada en su H2. */
body.pg-next.com_content.view-article .com-content-article__body .pg-conclusion > h2:first-child {
  border-left: 0;
  padding-left: 0;
}

/* Nota editorial: intervención del editor, distinta de aviso/consejo. */
body.pg-next.com_content.view-article .pg-editorial-note {
  border: 0;
  border-left: 2px solid #9caab3;
  border-radius: 0;
  background: transparent;
  color: #45535a;
  font-size: .95rem;
  padding: .15rem 0 .15rem 1.05rem;
}

/* Encabezados y espaciado internos coherentes con el artículo. */
body.pg-next.com_content.view-article :is(.pg-sources, .pg-conclusion, .pg-editorial-note) > :is(h2, h3, h4):first-child {
  margin-top: 0;
  margin-bottom: .65rem;
  color: var(--pg-text, #15262a);
  font-size: 1.1rem;
  line-height: 1.35;
}
/* Cierre editorial: título propio por debajo del H2 general, pero claramente visible. */
body.pg-next.com_content.view-article .pg-conclusion > :is(h2, h3, h4):first-child {
  color: #174d40;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}
/* Título documental ligeramente más discreto. */
body.pg-next.com_content.view-article .pg-sources > :is(h2, h3, h4):first-child {
  font-size: 1rem;
  margin-bottom: .35rem;
}
body.pg-next.com_content.view-article :is(.pg-sources, .pg-conclusion, .pg-editorial-note) > :last-child {
  margin-bottom: 0;
}

/* Prioridad final sobre el encabezado general de cajas. */
body.pg-next.com_content.view-article .pg-editorial-note > :is(h2, h3, h4):first-child {
  margin-bottom: .35rem;
}

@media (max-width: 767.98px) {
  body.pg-next.com_content.view-article .pg-note,
  body.pg-next.com_content.view-article .pg-tip,
  body.pg-next.com_content.view-article .pg-warning {
    margin: 1.1rem 0;
    padding: .85rem;
    border-radius: 8px;
  }
  body.pg-next.com_content.view-article .pg-sources,
  body.pg-next.com_content.view-article .pg-conclusion,
  body.pg-next.com_content.view-article .pg-editorial-note {
    margin: 1.2rem 0;
    padding: .9rem 1rem;
    border-radius: 8px;
  }
  body.pg-next.com_content.view-article .pg-editorial-note {
    padding: .1rem 0 .1rem .8rem;
    border-radius: 0;
  }
}


/* Las conclusiones y consejos abiertos conservan su geometría en móvil. */
@media (max-width: 767.98px) {
  body.pg-next.com_content.view-article .pg-conclusion {
    border-radius: 0;
    padding: .85rem 0 .15rem;
  }
  body.pg-next.com_content.view-article .com-content-article__body .pg-tip {
    border-radius: 0;
    padding: .45rem 0 .45rem .95rem;
  }
}

/* Comentario: nota al margen, sin tarjeta ni fondo. La cursiva afecta al texto,
   pero no a títulos y rótulos en strong (que siguen siendo legibles). */
body.pg-next.com_content.view-article .com-content-article__body .pg-comment {
  margin: 1.4rem 0;
  padding: .2rem 0 .2rem 1.05rem;
  border: 0;
  border-left: 2px solid #a4b2bc;
  border-radius: 0;
  background: transparent;
  color: #4a5c65;
  font-style: italic;
  line-height: 1.68;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-comment strong {
  color: #25404d;
  font-style: normal;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-comment > :last-child {
  margin-bottom: 0;
}
/* Nota editorial: texto sobrio; el encabezado mantiene su jerarquía semántica. */
body.pg-next.com_content.view-article .pg-editorial-note > :is(h2,h3,h4):first-child {
  color: #415563;
}
/* Glosario dentro del artículo: definiciones, no fichas ni tarjetas anidadas.
   No afecta al componente independiente de glosario ni a glosarios de módulos. */
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary {
  margin: 1.9rem 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 2px solid #aabfc3;
  background: transparent;
  color: var(--pg-text, #15262a);
}
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary > :is(h2,h3):first-child {
  margin: 0 0 .9rem;
  border: 0;
  padding: 0;
  color: #174d40;
  font-size: clamp(1.12rem,1.6vw,1.4rem);
  line-height: 1.4;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary dl {
  margin: 0;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary dt {
  margin: 0;
  padding: .65rem 0 0;
  border-top: 1px solid #e2e9ec;
  font-weight: 700;
  color: #174d40;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary dt:first-child {
  border-top: 0;
  padding-top: .1rem;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-glossary dd {
  margin: .15rem 0 .75rem;
  line-height: 1.6;
}
/* Ajuste responsive de comentarios editoriales: permanece en blocks.css. */
@media (max-width: 767.98px) {
  body.pg-next.com_content.view-article .com-content-article__body .pg-comment {padding-left: .95rem;}
}

/* v0.5.22 · Numeración bibliográfica. El HTML usa tanto
   <ol class="pg-sources"> como contenedores .pg-sources con <ol> anidado.
   Los marcadores permanecen dentro de la zona acolchada. */
body.pg-next.com_content.view-article ol.pg-sources,
body.pg-next.com_content.view-article .pg-sources ol {
  list-style-type: decimal;
  list-style-position: outside;
  padding-inline-start: 3.15rem !important;
  padding-inline-end: 1.15rem;
}
body.pg-next.com_content.view-article ol.pg-sources > li,
body.pg-next.com_content.view-article .pg-sources ol > li {
  list-style-type: decimal;
  padding-inline-start: .2rem;
}
body.pg-next.com_content.view-article ol.pg-sources > li::marker,
body.pg-next.com_content.view-article .pg-sources ol > li::marker {
  color: #536779;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 575.98px) {
  body.pg-next.com_content.view-article ol.pg-sources,
  body.pg-next.com_content.view-article .pg-sources ol {
    padding-inline-start: 2.85rem !important;
    padding-inline-end: .75rem;
  }
}


/* v0.5.24 · Bibliografía clásica: el h2/h3 adyacente a ol.pg-sources
   forma visualmente una sola tarjeta. No mueve nodos ni altera anclas.
   Aplica solo cuando el encabezado está inmediatamente antes de la lista. */
body.pg-next.com_content.view-article .com-content-article__body :is(h2,h3,h4):has(+ ol.pg-sources) {
  box-sizing: border-box;
  margin: 1.65rem 0 0;
  padding: .95rem 1.3rem;
  border: 1px solid #d9e2e9;
  border-bottom: 1px solid #d9e2e9;
  border-left: 1px solid #d9e2e9;
  border-radius: 10px 10px 0 0;
  background: #eef3f7;
  color: #274b62;
  font-size: 1.13rem;
  font-weight: 700;
  line-height: 1.35;
}
body.pg-next.com_content.view-article .com-content-article__body :is(h2,h3,h4):has(+ ol.pg-sources) + ol.pg-sources {
  margin: 0 0 1.65rem;
  padding-block: .9rem 1rem;
  border: 1px solid #d9e2e9;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #f7f9fb;
}
@media (max-width: 767.98px) {
  body.pg-next.com_content.view-article .com-content-article__body :is(h2,h3,h4):has(+ ol.pg-sources) {
    margin-top: 1.2rem;
    padding: .85rem 1rem;
    border-radius: 8px 8px 0 0;
    font-size: 1.04rem;
  }
  body.pg-next.com_content.view-article .com-content-article__body :is(h2,h3,h4):has(+ ol.pg-sources) + ol.pg-sources {
    margin-top: 0;
    margin-bottom: 1.2rem;
    border-radius: 0 0 8px 8px;
  }
}

/* PortalGraf · Bibliografía semántica — bloque único v1.4.
   El icono es decorativo y se entrega por CSS; Joomla no necesita admitir SVG inline.
   La compatibilidad histórica h2 + ol.pg-sources permanece separada. */
body.com_content.view-article .com-content-article__body .pg-bibliography {
  --pg-bib-ink: #274b62;
  --pg-bib-border: #d9e2e9;
  margin-block: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--pg-bib-border);
  border-radius: .8rem;
  background: #f7f9fb;
}
body.com_content.view-article .com-content-article__body .pg-bibliography__header {
  padding: 1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--pg-bib-border);
  background: #eef3f7;
}
body.com_content.view-article .com-content-article__body .pg-bibliography__heading {
  display: flex;
  align-items: center;
  gap: .65rem;
}
body.com_content.view-article .com-content-article__body .pg-bibliography__heading::before {
  content: "";
  display: block;
  flex: 0 0 1.25rem;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2353748b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%207v14%22%2F%3E%3Cpath%20d%3D%22M3%2018V5a2%202%200%200%201%202-2h3a4%204%200%200%201%204%204%204%204%200%200%201%204-4h3a2%202%200%200%201%202%202v13h-5a4%204%200%200%200-4%203%204%204%200%200%200-4-3z%22%2F%3E%3C%2Fsvg%3E");
}
body.com_content.view-article .com-content-article__body .pg-bibliography__heading > h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-inline-start: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--pg-bib-ink) !important;
  font-size: clamp(1.03rem, 1.4vw, 1.18rem) !important;
  line-height: 1.35;
  font-weight: 700;
}
body.com_content.view-article .com-content-article__body .pg-bibliography__heading > h2::before {
  content: none !important;
  display: none !important;
}
body.com_content.view-article .com-content-article__body .pg-bibliography__description {
  margin: .35rem 0 0 1.9rem !important;
  padding: 0 !important;
  color: #536779;
  font-size: .83rem;
  line-height: 1.45;
}
body.com_content.view-article .com-content-article__body .pg-bibliography > ol.pg-sources {
  box-sizing: border-box;
  margin: 0 !important;
  padding: 1rem 1.4rem 1.15rem 3.4rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  list-style: decimal outside;
  overflow: visible;
}
body.com_content.view-article .com-content-article__body .pg-bibliography > ol.pg-sources > li {
  padding-inline-start: .15rem;
}
@media (max-width: 575.98px) {
  body.com_content.view-article .com-content-article__body .pg-bibliography__header { padding: .9rem .85rem; }
  body.com_content.view-article .com-content-article__body .pg-bibliography > ol.pg-sources {
    padding: .9rem .8rem 1.1rem 2.75rem !important;
  }
}



/* Errores frecuentes: identidad preventiva propia, sin líneas que compitan con conclusión. */
body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors {
  margin: 1.8rem 0 1.9rem;
  padding: 1rem 1.15rem 1.05rem;
  border: 0;
  border-inline-start: 4px solid #e58b28;
  border-radius: 0 9px 9px 0;
  background: #f6f7f5;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors > :is(h2,h3):first-child {
  margin: 0 0 .8rem;
  padding: 0;
  border: 0;
  color: #174d40;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.35;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors > ul {
  margin: .25rem 0 0;
  padding-inline-start: 1.25rem;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors > ul > li {
  padding-block: .28rem;
  line-height: 1.55;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors > ul > li > strong {
  font-weight: 700;
  color: #243c35;
}
@media (max-width: 640px) {
  body.pg-next.com_content.view-article .com-content-article__body .pg-common-errors {
    padding: .85rem .85rem .9rem;
    margin: 1.4rem 0;
  }
}

/* Lecturas relacionadas: navegación complementaria sin acentos ornamentales. */
body.pg-next.com_content.view-article .com-content-article__body .pg-related-reading {
  margin: 1.8rem 0 1.85rem;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-related-reading > :is(h2,h3):first-child {
  font-family: 'Segoe UI',Arial,sans-serif;
  font-size: 1.23rem;
  line-height: 1.3;
  font-weight: 800;
  color: #174d40;
  letter-spacing: 0;
  border: 0;
  padding: 0;
  margin: 0 0 .8rem;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-related-reading > ul {
  margin: .1rem 0 .6rem;
  padding-inline-start: 1.9rem;
}
@media (max-width: 640px) {
  body.pg-next.com_content.view-article .com-content-article__body .pg-related-reading > :is(h2,h3):first-child {
    font-size: 1.12rem;
  }
}


/* v0.5.118 · Créditos y licencias de imágenes: documental, distinto de fuentes. */
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits {
  box-sizing: border-box; max-width: 100%; margin: 1.55rem 0;
  padding: .9rem 1.15rem 1rem; border: 1px solid #dce5e0;
  border-left: 3px solid #8ca99c; border-radius: 9px;
  background: #f7f9f7; color: var(--pg-text,#15262a);
  font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits > :is(h2,h3,h4):first-child {
  margin: 0 0 .65rem; color: var(--pg-dark,#103d2d); font-size: 1.08rem; line-height: 1.3;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits > :is(ul,ol) {
  margin: .35rem 0 0; padding-left: 1.35rem;
}
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits li {margin: .26rem 0;}
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits li:last-child {margin-bottom: 0;}
body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits a {color: #155b95; text-underline-offset: .14em;}
@media (max-width: 767px) {
  body.pg-next.com_content.view-article .com-content-article__body .pg-image-credits {padding: .8rem .85rem; font-size: .9rem;}
}
