/* ============================================================
   article.css — Revista Pediatría (HTML)
   Misma identidad que el PDF: Aptos, filetes azules #005798, caja
   gris #D0D4DD, enlaces #275B9B, texto 10/11.
   Las fuentes se sirven desde fonts/ junto al .html (o la Aptos
   instalada en el equipo del lector). Sin Aptos Light: el peso 300
   usa Aptos Regular, como en el PDF.
   ============================================================ */
@font-face { font-family: "Aptos PED"; src: local("Aptos"), url("fonts/Aptos-Regular.ttf"); font-weight: 300 400; font-style: normal; }
@font-face { font-family: "Aptos PED"; src: local("Aptos Italic"), url("fonts/Aptos-Italic.ttf"); font-weight: 300 400; font-style: italic; }
@font-face { font-family: "Aptos PED"; src: local("Aptos Bold"), url("fonts/Aptos-Bold.ttf"); font-weight: 700; font-style: normal; }
@font-face { font-family: "Aptos PED"; src: local("Aptos Bold Italic"), url("fonts/Aptos-BoldItalic.ttf"); font-weight: 700; font-style: italic; }

:root {
  --ped-blue: #005798;
  --ped-link: #275B9B;
  --ped-box: #D0D4DD;
  --ped-head: #D0D4DD;   /* fondo de la cabecera de tablas */
  --ped-folio: #C6C6C6;
  --ped-text: #000000;
  --ped-bg: #FFFFFF;
  --ped-pend: #D7263D;
  --ped-serif: "Aptos PED", "Aptos", "Segoe UI", Arial, sans-serif;
  --ped-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: #EEF0F3; }
body {
  margin: 0;
  color: var(--ped-text);
  background: #EEF0F3;
  font-family: var(--ped-serif);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.ped-article {
  max-width: 820px;
  margin: 24px auto;
  padding: 36px 48px 40px;
  background: var(--ped-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
a { color: var(--ped-link); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
.pendiente { color: var(--ped-pend); }

/* ---- Banda superior (filete negro + logos + caja gris + filete azul) ---- */
.ped-band {
  display: grid;
  grid-template-columns: 21% 1fr 15.5%;
  gap: 7%;
  align-items: center;
  border-top: 1px solid #000;
  border-bottom: 1px solid var(--ped-blue);
  padding: 16px 0 16px;
}
.ped-logo, .ped-logo-right { width: 100%; height: auto; display: block; }
.ped-box {
  background: var(--ped-box);
  text-align: center;
  font-family: var(--ped-sans);
  padding: 8px 6px;
}
.ped-box p { margin: 0; }
.ped-cite-line { font-size: 11px; font-weight: 300; }
.ped-journal { font-size: 26px; font-weight: 700; line-height: 1.35; }
.ped-issn { font-size: 10px; font-weight: 300; }

/* ---- Títulos y autores ---- */
.ped-front { text-align: center; border-bottom: 1px solid var(--ped-blue); padding-bottom: 14px; }
.ped-type { text-align: left; font-weight: 700; font-size: 11px; margin: 10px 0 2px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.ped-doi { font-weight: 400; }
.ped-title { font-size: 22px; line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
.ped-title-en { font-size: 18px; margin: 0 0 16px; }
.ped-authors { font-style: italic; font-size: 15px; margin: 0 0 12px; }
.ped-authors sup { font-size: 0.6em; }
.ped-affiliations { list-style: none; padding: 0; margin: 0; font-size: 12.5px; line-height: 1.35; }
.ped-affiliations sup { font-size: 0.6em; }
/* ícono ORCID oficial (images/orcid.png) */
img.orcid { height: 0.8em; width: auto; margin-left: 2px; vertical-align: super; }

/* ---- Información del artículo + Resumen/Abstract ---- */
.ped-abstracts {
  display: grid;
  grid-template-columns: 26% 1fr;
  column-gap: 2.8%;
  row-gap: 22px;
  padding: 14px 0 24px;
}
.ped-info { font-size: 10.5px; font-weight: 300; line-height: 1.2; }
.ped-info p { margin: 0 0 8px; }
.ped-info-title { text-transform: uppercase; }
.ped-kw-title { font-weight: 700; margin-top: 18px !important; margin-bottom: 0 !important; }
.ped-kw { list-style: none; padding: 0; margin: 0; font-style: italic; }
/* columna estrecha + sin guiones: justificada abriría huecos grandes
   entre palabras (los navegadores no ajustan como TeX) → a la izquierda */
.ped-abstract { font-size: 12px; line-height: 1.4; text-align: left; hyphens: manual; text-wrap: pretty; }
.ped-abstract h2 {
  font-size: 10.5px; text-transform: uppercase; margin: 0 0 6px; padding-bottom: 4px;
  border-bottom: 0.75px solid #000;
}
.ped-abstract p { margin: 0; }

/* ---- Cuerpo ----
   Pautas de la revista: sin partición de palabras (hyphens: manual) y
   sin huecos: justificado solo en pantallas anchas (en móvil, sin
   guiones, el justificado abriría ríos de blanco → alineado a la
   izquierda); párrafos y figuras no se parten al imprimir. */
.ped-body { text-align: justify; hyphens: manual; text-wrap: pretty; }
.ped-body p { margin: 0; text-indent: 1.13em; orphans: 3; widows: 3; break-inside: avoid; }
.ped-body h1, .ped-body h2, .ped-body h3 { font-size: 15px; font-weight: 700; margin: 1.5em 0 1.5em; }
.ped-body h2 { font-style: italic; }
.ped-body figure { margin: 1.5em auto; text-align: center; break-inside: avoid; }
.ped-body figure img { max-width: 69%; height: auto; }
.ped-body figcaption { margin-top: 0.4em; text-align: center; }
.ped-body figcaption::before { font-weight: 700; }
.ped-body table {
  margin: 1.5em auto; border-collapse: collapse; font-size: 13.5px; line-height: 1.4;
  border-top: 0.5px solid #000; border-bottom: 0.5px solid #000; break-inside: avoid;
  text-align: left;
}
.ped-body table caption { caption-side: top; font-weight: 700; padding-bottom: 4px; }
/* cabecera de tabla: negrita obligatoria y fondo propio (pauta de la revista) */
.ped-body thead th, .ped-body thead td {
  border-bottom: 0.5px solid #000; background: var(--ped-head); font-weight: 700;
}
.ped-body th, .ped-body td { padding: 2px 8px; vertical-align: top; }
.ped-body th:first-child, .ped-body td:first-child { text-align: left; }
.ped-body .table-wrap { overflow-x: auto; }
.references ol { padding-left: 0; list-style: none; counter-reset: ref; }
.references li { counter-increment: ref; position: relative; padding-left: 2.1em; margin-bottom: 1.1em; text-indent: 0; }
.references li::before { content: "(" counter(ref) ")"; position: absolute; left: 0; }
.footnotes { font-size: 12px; border-top: 0.5px solid #999; margin-top: 2em; }

/* ---- Pie ---- */
.ped-footer { border-top: 1px solid var(--ped-blue); margin-top: 32px; padding-top: 12px; font-size: 11px; font-weight: 300; }
.ped-footer p { margin: 0 0 3px; }

@media (max-width: 640px) {
  .ped-article { margin: 0; padding: 16px; box-shadow: none; }
  .ped-body, .ped-abstract { text-align: left; }
  .ped-band { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ped-box { grid-column: 1 / -1; grid-row: 2; }
  .ped-logo-right { justify-self: end; width: 60%; }
  .ped-abstracts { grid-template-columns: 1fr; }
  .ped-body figure img { max-width: 100%; }
}

@media print {
  html, body { background: #fff; }
  .ped-article { box-shadow: none; margin: 0; max-width: none; }
}
