/*
  jats-ayp.css / Hoja de estilos optimizada para A&P Continuidad
  Basada en la estructura HTML del artículo
*/

/* ============================================================
   VARIABLES Y RESET - 4 COLORES PRINCIPALES
   ============================================================ */

:root {
  /* 4 colores del sistema */
  --azul-oscuro: #2c3d4f;      /* Títulos del artículo, elementos destacados */
  --azul-claro: #96B0DE;       /* Enlaces, variación más clara */
  --gris-oscuro: #303030;      /* Cuerpo del texto principal */
  --gris-claro: #6c757d;       /* Sección "cómo citar" y textos secundarios */
  
  /* Colores funcionales (derivados) */
  --color-bg-body: #E3DEDE;
  --color-bg-article: #FCFCFC;
  --color-border: #e3e3e5;
  
  /* Tipografía base - solo 4 tamaños */
  --text-base: 1rem;           /* Cuerpo del artículo - 16px aprox */
  --text-sm: 0.875rem;         /* Pequeño: referencias, notas, metadatos - 14px */
  --text-lg: 1.125rem;         /* Grande: subtítulos, resúmenes - 18px */
  --text-xl: 1.375rem;         /* Extra grande: título principal - 22px */
  --text-aling: justify;
  --font-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  
  --max-article: 90%;
  --radius: 0.45rem;
}

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

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

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

.articleCtn {
  margin: 1.5em auto;
  padding: 2em 7em;
  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 - SOLO 4 TAMAÑOS
   ============================================================ */

/* Título principal del artículo (document-title) */
.document-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--azul-oscuro);
  line-height: 1.3;
  text-align: right;
  padding-top: 1.2em;
}

/* Subtítulos del artículo */
.document-subtitle,
.document-title-trans {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--azul-oscuro);
  line-height: 1.4;
  text-align: right;
}

.document-title-trans {
  font-weight: 400;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}
.document-subtitle-trans {
  font-weight: 400;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  font-size: 0.9em;
}

/* Títulos de sección (h2.section-title) */
h2.section-title,
.section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--azul-oscuro);
  margin-top: 2.3em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

/* Subtítulos de sección (h3, h4) */
h3.subsection-title,
h4.subsection-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--azul-oscuro);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.4;
}

h3.subsection-title {
  font-style: italic;
  font-weight: 500;
}

h4.subsection-title {
  font-weight: 500;
}

/* Cuerpo del texto */
p {
  font-size: var(--text-base);
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 0.8em;
  color: var(--gris-oscuro);
  text-align: justify;
}

/* Textos más pequeños: metadatos, journal, referencias, notas */
.journal,
div.info-journal,
div.metadata-group,
.aff,
.ref-list,
.fn-group,
.fn,
.author-notes,
div.license,
div.como-citar,
.branding,
div.panel p {
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ============================================================
   ENLACES - USO DEL AZUL CLARO
   ============================================================ */

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

a:visited {
  color: var(--azul-claro);
  opacity: 0.8;
}

a:hover {
  color: var(--azul-oscuro);
  text-decoration: underline;
}

/* ============================================================
   FRONT MATTER: JOURNAL, METADATOS
   ============================================================ */

div.journal {
   
  color: var(--gris-oscuro);
  margin-bottom: 2em;
  margin-top: 2em;
}
div.journal p {text-align: right;}

.journal-title {
  font-weight: 700;
  font-style: italic;
  color: var(--azul-oscuro);
}

div.subject {
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: right;
  color: var(--gris-claro);
  margin-bottom: 0.3em;
  margin-top: 3em;
}

.block-titles {
  padding-bottom: 2em;
}

/* Autores */
.autor {
  font-weight: 700;
}
.contrib-list {
    margin-top: 3em;
  margin-bottom: 2em;
}
.contrib-block {
  margin-bottom: 2em;
}

div.info-journal {
  padding-top: 1em;
  padding-right: 2em;
  font-size: 1em;
  
}
div.info-journal p {text-align: justify;}



div.info-obra {
  padding-top: 1em;
  padding-right: 2em;
  font-size: 1em;
}

/* Basado en font-size normal de 16px = 12pt */
/* 1.5pt = 0.125em, 1pt = 0.0833em */

.info-obra .section {
    margin-bottom: 0.125em;
    margin-top: 0.125em;
}

.info-obra .section:first-child {
    margin-top: 0;
}

.info-obra .section:last-child {
    margin-bottom: 0;
}

.info-obra .section-title {
    margin-bottom: 0.0833em;
}

.info-obra .section p {
    margin-top: 0;
    margin-bottom: 0;
}

.info-obra .section p + p {
    margin-top: 0;
}

/*div.info-obra {
  padding-top: 1em;
  padding-right: 2em;
  font-size: 1em;
}
div.info-obra .section {
    border-top: 1.2rem;
    line-height: 1em;
    text-align: left;
    }
div.info-obra .section-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--azul-oscuro);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
  
 }
 div.info-obra p {
     line-height: 1;
     
 }*/

/* ============================================================
   SECCIÓN "CÓMO CITAR" - GRIS CLARO
   ============================================================ */

div.como-citar {
    padding-bottom: 2em;
    padding-top: 2em;
  color: var(--gris-claro);
 text-align: justify;
}

div.como-citar p {text-align: justify;
}
div.como-citar a {
  color: var(--gris-claro);
  text-decoration: none;
  
}

div.como-citar a:hover {
  color: var(--azul-claro);
}

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

div.abstract {
  text-align: justify;
  margin-bottom: 1em;
  font-size: var(--text-base);
}

div.abstract .section-title {
  font-weight: 700;
  color: var(--azul-oscuro);
}

/* ============================================================
   REFERENCIAS BIBLIOGRÁFICAS - ESPACIADO CORREGIDO
   ============================================================ */

div.ref-list {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

div.ref-list h2 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--azul-oscuro);
  margin-bottom: 1em;
}

/* Cada referencia como párrafo independiente con espaciado normal */
.ref-list p.ref {
  margin-bottom: 0.2em;
  line-height: 1.5;
}

.ref-mixed-citation,
span.mixed-citation {
  font-size: var(--text-base);
  line-height: 1.5;
}

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

div.banner {
  margin-bottom: 4em;
}

div.panel {
  margin: 1.5em 0;
  text-align: center;
}

div.panel img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

div.panel p {
  text-align: center;
  margin-top: 0.5em;
}

/* ============================================================
   BACK MATTER: NOTAS Y AGRADECIMIENTOS
   ============================================================ */

.article-back {
  margin-top: 2em;
}

/* Notas al pie */
.fn-group {
  margin-top: 0.3em;
/*  padding-top: 1.5em;*/
/*  border-top: 1px solid var(--color-border);*/
  line-height: 1em;
}

.fn {
/*  margin-bottom: 0.1em;*/
}

.fn-label {
  font-weight: 400;
  margin-right: 0.5em;
}

/* Agradecimientos - mismo espaciado que párrafos normales */
.article-back > p {
  margin-bottom: 1em;
}

/* ============================================================
   NOTAS DE AUTOR (author-bio)
   ============================================================ */

.author-notes {
  margin-top: 2rem;
  padding-top: 1.5rem;
/*  border-top: 1px solid var(--color-border);*/
}

.author-bio {
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.author-bio__label {
  font-weight: 700;
}

.author-bio__text,
.author-bio__roles {
  font-size: var(--text-base);
}

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

hr.section-rule {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 80%;
  margin: 1.5em auto;
}

hr.part-rule {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 80%;
  margin: 1.5em auto;
}

/* ============================================================
   LICENCIA Y BRANDING
   ============================================================ */

div.licence {

  padding-top: 1.5em;
  color: var(--gris-oscuro);
  text-align: justify;
}
/*div.license p {text-align: justify;}*/

div.branding {
  margin-top: 2em;
  padding-top: 1em;
  color: var(--gris-claro);
}
div.branding p {text-align: center;
  font-size: var(--text-sm);
}

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

.orcid-link img,
a[href*="orcid"] img {
  vertical-align: middle;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .articleCtn {
    padding: 2em 2.5em;
    width: 98%;
  }
  
  .document-title {
    font-size: calc(var(--text-xl) * 0.95);
  }
}

@media (max-width: 600px) {
  .articleCtn {
    padding: 1.5em 1.2em;
    width: 100%;
    border-radius: 0;
  }
  
  .document-title {
    font-size: calc(var(--text-xl) * 0.85);
  }
  
  .document-title-trans {
    font-size: var(--text-base);
  }
  
  h2.section-title {
    font-size: var(--text-base);
  }
  
  div.panel img {
    min-width: 90%;
  }
}