/*
  jats-rac.css
  Hoja de estilos para visualización HTML de artículos JATS/XML
  Basada en NLM/NCBI Journal Publishing 3.0 — revisada y mejorada
  RevisCiencia
*/

/* ============================================================
   VARIABLES Y RESET
   ============================================================ */

:root {
  --color-primary:     #ab0534;
  --color-primary-dark:#94022b;
  --color-accent:      #016695;
  --color-link:        #4849ab;
  --color-link-visited:#7cbef7;
  --color-bg-body:     #6994b0;
  --color-bg-article:  #ffffff;
  --color-bg-th:       #ab0534;
  --color-bg-td:       #d5bbb8;
  --color-border:      #e3e3e5;
  --color-text:        #1a1a1a;
  --font-sans:         "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
                       "Roboto", "Oxygen-Sans", "Ubuntu", "Helvetica Neue", sans-serif;
  --font-serif:        Georgia, "Times New Roman",  serif;
  --max-article:       1400px;
  --radius:            0.45rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============================================================
   BODY Y CONTENEDOR PRINCIPAL
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  padding: 1em;
  background-color: var(--color-bg-body);
  color: var(--color-text);
}

.articleCtn {
  margin: 1.5em auto;
  padding: 3em 4em;
  width: 95%;
  max-width: var(--max-article);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-article);
}

/* ============================================================
   TIPOGRAFÍA GENERAL
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  display: block;
  margin-top: 0;
  margin-bottom: 0.5em;
  /*font-family: var(--font-sans);*/
  font-family: helvetica !important;
  font-weight: bold;
  color: var(--color-primary);
  line-height: 1.2;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0;
}

p.first { margin-top: 0; }

ul, ol { margin-top: 0.5em; }

li { margin-top: 0.5em; margin-bottom: 0; }
li > p { margin-top: 0.2em; margin-bottom: 0; }

/* ============================================================
   FRONT: SECCIÓN, TÍTULOS, AUTORES
   ============================================================ */

div.subject {
  font-size: 1em;
  font-weight: bold;
  text-align: left;
  color: var(--color-accent);
  margin-bottom: 0.5em;
}

.document-title {
  text-align: center;
  line-height: 1.2;
  font-size: 1.25em;
  font-weight: bold;
  color: var(--color-primary);
  padding-top: 1.2em;
}

.document-subtitle {
  text-align: center;
  line-height: 1.2;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--color-primary);
}

.document-title-trans {
  text-align: center;
  font-style: italic;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--color-primary);
  padding-top: 1em;
  padding-bottom: 1em;
}

.document-title-notes {
  text-align: center;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Autores */
div.autor {
  font-size: 1em;
  font-weight: normal;
  line-height: 1.4;
  margin-top: 1em;
}

ul.contrib-group.list-inline,
ul.list-inline {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.list-inline li {
  display: inline-block;
  margin: 4px 8px 4px 0;
  font-size: 1em;
}

/* Afiliaciones */
div.afiliacion {
  margin-top: 0.5em;
}

ul.affiliations.list-unstyled,
ul.list-unstyled {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.list-unstyled li {
  list-style: none;
}

.aff {
  font-size: 0.9em;
  line-height: 1.4;
}

/* ============================================================
   ORCID
   ============================================================ */

.orcid {
  font-size: 0.9em;
}

.orcid a,
.orcid a:active,
.orcid a:visited,
.orcid a:hover {
  font-weight: bold;
  text-decoration: none;
  background: none;
}

/* ============================================================
   METADATA: JOURNAL, DOI, FECHAS
   ============================================================ */

div.metadata-group {
  margin-top: 0.5em;
  font-size: 0.9em;
}

div.info-journal {
  padding-top: 2em;
  padding-right: 2em;
  font-size: 0.9em;
}

div.metadata-group > p,
div.metadata-group > div {
  margin-top: 0.5em;
}

div.metadata-area * { margin: 0; }
div.metadata-chunk  { margin-left: 0; }

/* ============================================================
   RESÚMENES Y PALABRAS CLAVE
   ============================================================ */

div.abstract {
  font-family: var(--font-sans);
  font-size: 1em;
  text-align: justify;
  padding: 0;
}

div.abstract .section-title {
  display: inline;
  font-weight: bold;
  color: var(--color-primary);
}

div.abstract .section {
  display: block;
  align-items: baseline;
}

div.abstract p {
  display: inline;
  margin: 0;
}

.abstract-sec-title {
  display: inline;
  font-weight: bold;
  color: var(--color-primary-dark);
}

.abstract-p {
  display: inline;
  margin: 0;
}

/* ============================================================
   CUERPO Y BACK DEL ARTÍCULO
   ============================================================ */

.back,
.article-body {
  font-family: var(--font-serif);
  text-align: justify;
}

div.section,
div.back-section {
  margin-top: 1em;
  margin-bottom: 0.5em;
}

div.section h1 { font-size: 1.2em; font-weight: bold; color: var(--color-primary); font-family: var(--font-sans); }
div.section h2 { font-size: 1em; font-weight: bold; color: var(--color-primary); font-family: var(--font-sans); }
div.section h3 { font-size: 1em; font-weight: bold; color: var(--color-primary); }
div.section h4 { font-size: 0.98em; font-weight: bold; color: var(--color-primary); }
div.section h5 { font-size: 0.92em; font-weight: bold; color: var(--color-primary); }
div.section h6 { font-size: 0.83em; font-weight: bold; color: var(--color-primary); }

h3.main-title       { font-size: 1.2em; font-weight: bold; font-family: var(--font-sans);}
h4.section-title    { font-size: 1em; font-weight: bold; }
h4.subsection-title { font-size: 0.92em; font-style: italic; font-weight: bold; }

.section-title  { color: var(--color-primary); font-family: var(--font-sans);}

.callout-title {
  text-align: right;
  margin-top: 0.5em;
  margin-right: 1em;
  font-size: 1em;
  font-weight: bold;
  color: var(--color-primary);
}

/* ============================================================
   REFERENCIAS BIBLIOGRÁFICAS
   ============================================================ */

div.ref-list {
  font-family: var(--font-serif);
}

div.ref-list h2 {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--color-primary);
}

p.list-unstyled {
  font-size: 0.9em;
  font-family: var(--font-serif);
  text-align: left;
}

/* Cada referencia: número + texto en la misma línea */
span.ref {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin-bottom: 0.6em;
}

.ref-number {
  /*font-weight: bold;*/
  flex-shrink: 0;
  min-width: 1.5em;
}

.ref-mixed-citation,
span.mixed-citation {
  display: inline;
  font-size: 0.95em;
}

.ref-content {
  margin-top: 0;
  padding-left: 2em;
}

.ref-label { margin-top: 0; vertical-align: bottom; }

/* ============================================================
   TABLAS
   ============================================================ */

.table-wrap,

.table-panel {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 1em;
  padding-top: 1em;
}

.table-special {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 1em;
  padding-top: 1em;
}

.table-wrap-foot { padding-top: 0.7em; }

.table-des {
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
  padding-bottom: 1em;
  padding-top: 1em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

tr {
  border-top: 2px solid #fff;
   border-bottom: 2px solid #fff;
   border-left: 0;
   border-right: 0;
}

th {
  background-color: var(--color-bg-th);
  color: white;
  padding: 8px;
  font-family: var(--font-sans);
  line-height: 1.3;
  vertical-align: top;
  font-size: 0.9em;
  border: none;
}

td {
  background-color: var(--color-bg-td);
  padding: 8px;
  font-family: var(--font-sans);
  line-height: 1.3;
  vertical-align: top;
  font-size: 0.9em;
  border: none;
}
.tdth {background-color: var(--color-bg-th);
  color: white;
  padding: 8px;
  font-family: var(--font-sans);
  line-height: 1.3;
  vertical-align: top;
  font-size: 0.9em;
  border: none;}

.borde-bottom {
  border-top: 0;
  border-bottom: 1px solid #fff;
}

.sin-borde {
  border: none !important;
}

/* ============================================================
   FIGURAS E IMÁGENES
   ============================================================ */

div.panel {
  background-color: white;
  font-size: 0.85em;
  padding: 0.5em 1em;
  margin-top: 2em;
  margin-bottom: 2em;
}

div.panel img {
  max-width: 100%;
  min-width: 40%;
  margin-top: 2ex;
  margin-left: auto;
  margin-right: auto;
  display: block;
  transition: transform 0.3s ease;
}

div.panel img:hover {
  transform: scale(1.3);
}

div.panel p { text-align: center; }

div.panel h1,
div.panel h2,
div.panel h3,
div.panel h4 {
  font-size: 1em;
}

.img-izq {
  display: flex;
  align-items: center;
}

.img-izq img {
  margin-right: 15px;
}

div.caption {
  margin-top: 0.5em;
  margin-bottom: 1em;
}

/* ============================================================
   LISTAS Y ELEMENTOS ESPECIALES
   ============================================================ */

div.def-list { border-spacing: 0.25em; }

div.def-list div.cell {
  vertical-align: top;
  border-bottom: thin solid black;
  padding-bottom: 0.5em;
}

div.def-list div.def-list-head { text-align: left; }

div.blockquote {
  font-size: 0.9em;
  margin: 2em 3em;
}

div.blockquote-right {
  font-size: 0.9em;
  text-align: right;
  margin: 2em 0 2em 3em;
}

div.speech {
  margin: 0.5em 1em;
}

div.verse-group {
  margin-left: 1em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

div.verse-group div.verse-group {
  margin-left: 1em;
  margin-top: 0;
  margin-bottom: 0;
}

p.verse-line,
p.citation {
  margin: 0;
  text-indent: 0;
  font-size: 0.9em;
}

p.address-line { margin: 0 0 0 2em; }

/* ============================================================
   FOOTNOTES Y NOTAS
   ============================================================ */

div.fn-group { margin-top: 1em; }

div.fn {
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

.fn-label {
  font-weight: bold;
}

div.footnote { font-size: 0.9em; }

div.note {
  margin-top: 0;
  margin-left: 1em;
  font-size: 0.85em;
}

/* ============================================================
   ARTÍCULO RELACIONADO, CORRESPONDENCIA, LICENCIA
   ============================================================ */

/*aside.related-article {
  margin-top: 1em;
  padding: 0.5em 1em;
  border-left: 3px solid var(--color-accent);
  background-color: #f0f7fb;
  font-size: 0.9em;
}*/

.related-article-note {
  font-style: italic;
}

div.license {
  font-size: 0.85em;
  margin-top: 0.5em;
}

/* ============================================================
   FIRMA (sig-block)
   ============================================================ */

div.sig-block {
  padding-top: 1.5em;
  text-align: right;
  font-weight: bold;
  font-size: 1em;
  font-family: var(--font-sans);
}

div.sig-block-normal {
  padding-top: 1.5em;
  text-align: right;
  font-size: 1em;
  font-family: var(--font-sans);
}

/* ============================================================
   SEPARADORES
   ============================================================ */

hr.part-rule {
  border: none;
  border-top: 1px solid #333;
  width: 70%;
  margin: 2em auto;
}

hr.section-rule {
  border: none;
  border-top: 1px solid #333;
  width: 70%;
  margin: 2.5em auto;
}

/* ============================================================
   ELEMENTOS INLINE Y ESPECIALES
   ============================================================ */

.xref {
  color: black;
}

.xref_href {
  font-size: 0.9em;
}

.generated {
  color: black;
  font-weight: bold;
}

.warning {
  font-size: 0.8em;
  font-family: var(--font-sans);
  color: red;
}

.tex-math { color: green; }

.formula {
  font-family: var(--font-sans);
  font-size: 0.9em;
}

.data { color: black; }

.label {
  font-weight: bold;
  font-family: var(--font-sans);
  font-size: 1.2em;
}

.monospace { font-family: monospace; }
.overline  { text-decoration: overline; }

.named-content { /* heredado del tipo */ }

span.inline-formula { font-style: italic; }

div.disp-formula {
  margin: 1em 0;
  text-align: center;
}

.citain { text-align: right; }

h5.label { margin: 0; }
.h5 label { font-size: 1.3em; }

/* ============================================================
   LINKS
   ============================================================ */

a,
a:active {
  text-decoration: none;
  color: var(--color-link);
}

a:visited {
  color: var(--color-link-visited);
  text-decoration: underline;
}

a:hover {
  color: #000;
  text-decoration: underline;
}

/* ============================================================
   BRANDING / FOOTER
   ============================================================ */

div.branding {
  text-align: center;
  font-size: 0.7em;
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ============================================================ */

@media (max-width: 900px) {
  .articleCtn {
    padding: 2em 2.5em;
    width: 98%;
  }

  div.info-journal {
    padding-right: 0;
  }

  .document-title {
    font-size: 1.15em;
  }

  .document-title-trans {
    font-size: 1em;
  }

  div.sig-block,
  div.sig-block-normal {
    padding-left: 0;
  }

  div.blockquote,
  div.blockquote-right {
    margin-left: 1.5em;
    margin-right: 1.5em;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 600px)
   ============================================================ */

@media (max-width: 600px) {
  body {
    padding: 0.5em;
  }

  .articleCtn {
    padding: 1.5em 1.2em;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .document-title {
    font-size: 1.05em;
    padding-top: 0.8em;
  }

  .document-title-trans,
  .document-subtitle {
    font-size: 0.95em;
  }

  h1 { font-size: 1.3em; }
  h2 { font-size: 1.15em; }
  h3 { font-size: 1.05em; }

  p  { font-size: 0.95em; }

  ul.list-inline li {
    display: block;
    margin: 4px 0;
  }

  div.info-journal {
    padding-top: 1.5em;
    padding-right: 0;
    font-size: 0.85em;
  }

  th, td {
    font-size: 0.8em;
    padding: 6px;
  }

  .table-wrap,
  .table-special,
  .table-des {
    max-width: 100%;
  }

  div.panel img {
    min-width: 80%;
  }

  div.sig-block,
  div.sig-block-normal {
    padding-left: 0;
    text-align: left;
  }

  hr.part-rule,
  hr.section-rule {
    width: 90%;
  }

  div.blockquote,
  div.blockquote-right {
    margin-left: 1em;
    margin-right: 0.5em;
  }
}

/* ============================================================
   RESPONSIVE — MÓVIL PEQUEÑO  (≤ 400px)
   ============================================================ */

@media (max-width: 400px) {
  .articleCtn {
    padding: 1em 0.8em;
  }

  h1 { font-size: 1.1em; }
  p  { font-size: 0.9em; }

  th, td {
    font-size: 0.75em;
    padding: 4px;
  }
}
