@charset "UTF-8";
/**
 * =============================================================================
 * IIH - Estudios de Historia Moderna y Contemporánea de México
 * =============================================================================
 *
 * @description  Estilos personalizados para Estudios de Historia Moderna y Contemporánea de México
 * @author       Astra
 * @version      1.1.0
 * @date         2026-05-06
 * @license      Uso interno - Instituto de Investigaciones Históricas - UNAM
 *
 * =============================================================================
 * Todos los colores, fuentes y tamaños están en la sección ":root" más abajo.
 * Para adaptar este archivo a otra revista, solo modifica esas variables.
 *
 * Secciones
 * =============================================================================
 *  1.  Variables globales (:root)
 *  2.  Reset / base tipográfica
 *  3.  Estructura del sitio (head, nav wrappers)
 *  4.  Navegación primaria (#navigationPrimary)
 *  5.  Menú de usuario (#navigationUser)
 *  6.  Barra de búsqueda
 *  7.  Tarjetas flip de revistas (.flip-card)
 *  8.  Tablas generales (.tabla-1)
 *  9.  Botón "volver arriba" (#btnTop)
 * 10.  Responsive (max-width: 768px)
 * 11.  Barra lateral — Bloque "Nuevo Envío"
 * 12.  Barra lateral — Bloque "Premios del CMCH"
 * 13.  Barra lateral — Bloque "SCImago"
 * 14.  Barra lateral — adaptación para n tamaños de pantalla
 * 15.  Barra lateral — Bloques "Redes sociales" y "Visitas"
 * 16.  Límite global de ancho (pantallas ≥ 1400 px)
 * 17.  Barra lateral — centrado general de todos los bloques
 * 18.  Justificación global de textos de contenido
 * 19.  Bloque "Número completo" (.galleys) — reducir espacio vacío
 * 20.  Ícono de licencia Creative Commons en el texto
 * 21.  Indexaciones (pie de página)
 * 22.  Artículo — evitar scroll horizontal en móviles
 * 23.  Texto justificado en móviles
 * 24.  Vista del artículo — texto justificado en todas las pantallas
 * 25.  Cuadro de actividades de IA (#acts-ia) — Políticas editoriales
 * 26.  Menú de usuario — evitar scroll horizontal
 * 27.  Cabecera — imagen de fondo sin deformarse y franja del menú más delgada
 * 28.  Menú móvil — flechas en submenús y submenús cerrados por defecto
 * =============================================================================
 */

/* =============================================================================

   GOOGLE FONTS — SOURCE SERIF 4 (con patines, títulos) + SOURCE SANS 3 (sin patines, cuerpo)

   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;500;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap');

/* =============================================================================
   1. VARIABLES GLOBALES
   Cambia estos valores para adaptar el tema a cualquier revista.
   ============================================================================= */

:root {

  /* --- Paleta de colores --- */
  --color-primary:        #ce0f69;   /* rosa institucional principal */
  --color-primary-dark:   #a00c52;   /* oscuro (fondos de nav) */
  --color-primary-darker: #7A4D00;   /* hover profundo */
  --color-primary-muted:  #d48900;   /* hover suave */
  --color-accent:         #6B5240;   /* acento café (botón flip) */
  --color-accent-hover:   #8a6a52;
  --color-card-bg:        #0D1F3C;   /* fondo tarjeta flip (reverso) */

  --color-white:          #ffffff;
  --color-text-dark:      #1a1a1a;
  --color-text-muted:     #555555;
  --color-border-light:   #e5e5e5;
  --color-border-table:   #b9b6b6;
  --color-bg-no-cover:    #d0d0d0;

  /* --- Tipografía --- */
  --font-primary: 'Source Serif 4', serif;      /* con patines → títulos */
  --font-body:    'Source Sans 3', sans-serif;  /* sin patines → cuerpo de texto */

  --font-size-base:   18px;
  --font-size-sm:     0.875rem;   /* 14px */
  --font-size-xs:     0.8125rem;  /* 13px */
  --line-height-base: 1.65;
  --line-height-text: 1.7;

  /* --- Espaciado y forma --- */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:  12px;
  --radius-pill: 999px;

  /* --- Sombras --- */
  --shadow-sm:  0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md:  0 6px 18px rgba(0, 0, 0, 0.15);
  --shadow-lg:  0 10px 25px rgba(0, 0, 0, 0.12);

  /* --- Transiciones --- */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-flip: 0.6s ease;

  /* --- Layout --- */
  --nav-item-padding:     10px 14px;
  --dropdown-min-width:   240px;
  --search-max-width:     600px;
  --sidebar-width:        25%;
  --content-width:        90%;
  --main-width:           70%;
}


/* =============================================================================
   2. RESET / BASE TIPOGRÁFICA
   ============================================================================= */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Base del sitio: fuente sin patines para legibilidad */
html,
body {
  font-family:  var(--font-body);
  font-size:    var(--font-size-base);
  line-height:  var(--line-height-base);
  color:        var(--color-text-dark);
}

/* ------------------------------------------------------------------
   Títulos: fuente con patines (Source Serif 4)
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6,
.page_title,
.pkp_block h2.title,
.issue_title,
.article_summary_title,
.title,
.subtitle,
.series_title,
.obj_issue_summary .title,
.obj_article_summary .title {
  font-family: var(--font-primary) !important;
}

/* ------------------------------------------------------------------
   Cuerpo de texto: fuente sin patines (Source Sans 3)
   ------------------------------------------------------------------ */
p,
li,
td,
th,
span,
div,
blockquote,
label,
input,
textarea,
select,
.abstract,
.article_summary,
.galley_label,
.description,
.pkp_block .content,
.pkp_structure_sidebar .pkp_block .content {
  font-family: var(--font-body);
}

p {
  font-size:     1rem;
  line-height:   var(--line-height-text);
  margin-bottom: 1rem;
}

small {
  font-size: var(--font-size-sm);
}

/* Links globales */
a,
a:hover,
a:focus,
a:active {
  font-size:       var(--font-size-base) !important;
  font-weight:     400 !important;
  color:           var(--color-primary);
  text-decoration: none !important;
}

/* Botones OJS */
.cmp_button_wire,
.obj_galley_link,
.cmp_button_wire:hover,
.cmp_button_wire:focus,
.obj_galley_link:hover,
.obj_galley_link:focus {
  background: var(--color-primary);
  border:     1px solid var(--color-primary);
  color:      var(--color-white);
}


/* =============================================================================
   3. ESTRUCTURA DEL SITIO
   ============================================================================= */

/* Cabecera global */
.pkp_structure_head {
  background-color: var(--color-primary) !important;
  border-bottom:    1px solid var(--color-primary) !important;
}

/* Barra de navegación del sitio */
.pkp_site_nav_menu {
  background: var(--color-primary) !important;
  background: transparent !important;
}

/* Logo */
@media (min-width: 992px) {
  .pkp_site_name .is_img img {
    max-height: fit-content;
  }

  .pkp_site_name_wrapper {
    height: auto;
    margin: auto;
  }

  .pkp_navigation_user_wrapper {
    width:        100%;
    padding-left:  0;
    padding-right: 0;
  }
}

/* Ancho de contenido principal */
@media (min-width: 992px) {
  .pkp_structure_content {
    width:     var(--content-width) !important;
    max-width: 1400px;
  }

  .pkp_structure_sidebar {
    float:     right;
    width:     var(--sidebar-width);
    max-width: 310px;
  }
}

@media (min-width: 1200px) {
  .pkp_site_name_wrapper,
  .pkp_navigation_primary_wrapper,
  .pkp_navigation_user,
  .pkp_search_mobile,
  .pkp_structure_content,
  .pkp_structure_footer {
    width: 100%;
  }

  .has_site_logo .pkp_head_wrapper {
    width: 100%;
  }

  .pkp_structure_main {
    width:      100%;
    max-width:  1050px;
    box-sizing: border-box;
  }
}

/* Selector de idioma (oculto — se gestiona desde navegación) */
.language-toggle.dropdown {
  display: none;
}


/* =============================================================================
   4. NAVEGACIÓN PRIMARIA (#navigationPrimary)
   ============================================================================= */

.pkp_navigation_primary_wrapper {
  display:        flex;
  flex-direction: column;
}

#navigationPrimary {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  align-items:     center;
  gap:             6px;
  width:           100%;
  margin:          10px auto;
  padding:         10px 14px;
  list-style:      none;
  background:      var(--color-primary-dark);
  border-radius:   var(--radius-xl);
  box-shadow:      var(--shadow-md);
}

#navigationPrimary > li {
  position: relative;
}

#navigationPrimary > li > a {
  display:         inline-block;
  padding:         var(--nav-item-padding);
  font-family:     var(--font-body) !important;
  font-size:       15px;
  font-weight:     500;
  color:           var(--color-white) !important;
  text-decoration: none !important;
  border-radius:   var(--radius-md);
  transition:      background var(--transition-fast);
}

#navigationPrimary > li > a:hover,
#navigationPrimary > li:hover > a {
  background: var(--color-primary) !important;
  color:      var(--color-white) !important;
}

/* Eliminar flechas de dropdown */
#navigationPrimary .dropdown-toggle::after,
#navigationPrimary > li > a::before,
#navigationPrimary > li > a::after {
  display: none !important;
  content: none !important;
}

/* Borders OJS por defecto */
@media (min-width: 992px) {
  .pkp_navigation_primary li ul a:focus,
  .pkp_navigation_primary li ul a:hover,
  .pkp_nav_list ul a:hover,
  .pkp_nav_list ul a:focus,
  .pkp_navigation_primary > li > a:hover {
    border-color: transparent;
  }

  .pkp_navigation_primary > li:first-child a {
    margin-left: 0;
  }
}

/* --- Submenús desplegables --- */

#navigationPrimary li ul {
  position:      absolute;
  top:           100%;
  left:          0;
  min-width:     var(--dropdown-min-width);
  background:    var(--color-white);
  border:        1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-lg);
  overflow:      hidden;
  display:       none;
  z-index:       10001;
  margin:        0;
  padding:       0;
  list-style:    none;
}

#navigationPrimary li:hover > ul,
#navigationPrimary li:focus-within > ul {
  display: block;
}

#navigationPrimary li ul li a {
  display:         block;
  padding:         var(--nav-item-padding);
  font-family:     var(--font-body) !important;
  font-size:       14px;
  color:           var(--color-text-dark);
  text-decoration: none;
  border-radius:   0;
  transition:      background var(--transition-fast), color var(--transition-fast);
}

#navigationPrimary li ul li a:hover,
#navigationPrimary li ul li a:focus,
#navigationPrimary li ul li a:active {
  background: var(--color-primary);
  color:      var(--color-white);
  outline:    none;
  box-shadow: none;
}


/* =============================================================================
   5. MENÚ DE USUARIO (#navigationUser)
   ============================================================================= */

.pkp_navigation_user {
  display:     flex;
  align-items: center;
  width:       100%;
}

.pkp_navigation_user li {
  list-style: none;
}

.pkp_navigation_user li:first-child {
  margin-right: auto;
  margin-left:  50px;
}

.pkp_navigation_user li:not(:first-child) {
  margin-left: 15px;
}

.pkp_navigation_user a {
  text-decoration: none;
  color:           var(--color-white);
}

/* --- Barra de usuario --- */

#navigationUser {
  display:       inline-flex;
  align-items:   center;
  gap:           4px;
  list-style:    none;
  margin:        0;
  padding:       4px;
  background:    var(--color-primary-dark);
  border-radius: 0;
  box-shadow:    var(--shadow-sm);
}

#navigationUser > li {
  position: relative;
}

#navigationUser > li > a {
  width: 10em;
  display:         inline-flex;
  align-items:     center;
  padding:         6px 12px;
  font-family:     var(--font-body) !important;
  color:           var(--color-white) !important;
  text-decoration: none !important;
  border-radius:   var(--radius-lg);
  font-size:       var(--font-size-xs);
  font-weight:     500;
  transition:      background var(--transition-fast);
}

#navigationUser > li > a:hover {
  background: var(--color-primary);
}

#navigationUser > li > a:focus,
#navigationUser > li > a:active {
  background: var(--color-primary-darker);
  outline:    none;
}

/* Badge de notificaciones */
#navigationUser .task_count {
  margin-left:   6px;
  background:    #ff3b30;
  color:         var(--color-white);
  font-size:     11px;
  padding:       2px 6px;
  border-radius: var(--radius-pill);
}

/* --- Dropdown de usuario --- */

#navigationUser .dropdown-menu {
  position:      absolute;
  top:           100%;
  left:          10%;
  right:         0;
  min-width:     20px;
  background:    var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow:    var(--shadow-lg);
  display:       none;
  z-index:       9999;
  padding:       0;
  margin:        0 !important;
}

/* Zona invisible para no perder hover al bajar el cursor */
#navigationUser .dropdown-menu::before {
  content:  "";
  position: absolute;
  top:      -10px;
  left:     0;
  right:    0;
  height:   10px;
}

#navigationUser li:hover > .dropdown-menu,
#navigationUser li:focus-within > .dropdown-menu {
  display: block;
}

#navigationUser .dropdown-menu,
#navigationUser .dropdown-menu ul,
#navigationUser .dropdown-menu li {
  padding-left:  0 !important;
  padding-right: 0 !important;
  margin-left:   0 !important;
  margin-right:  0 !important;
  list-style:    none !important;
}

#navigationUser .dropdown-menu li a {
  display:     block;
  width:       100%;
  padding:     10px 14px;
  font-family: var(--font-body) !important;
  color:       var(--color-text-dark);
  font-size:   var(--font-size-xs);
  box-sizing:  border-box;
}

#navigationUser .dropdown-menu li a:hover {
  background: var(--color-primary);
  color:      var(--color-white);
  margin:     0 !important;
}


/* =============================================================================
   6. BARRA DE BÚSQUEDA
   ============================================================================= */

.pkp_search_persona {
  display:         flex;
  justify-content: center;
  align-items:     center;
  width:           100%;
}

.pkp_navigation_search_wrapper {
  width:        100%;
  max-width:    1000px;
  display:      flex;
  justify-content: center;
  margin-top:   0;
  margin-left:  auto;
  margin-right: auto;
}

.pkp_navigation_search_wrapper form {
  display:    flex;
  width:      100%;
  max-width:  var(--search-max-width);
  margin:     10px auto;
  flex-wrap:  wrap;
  gap:        6px;
}

.search_input {
  flex:          1;
  min-width:     0;
  padding:       12px 16px;
  font-family:   var(--font-body);
  font-size:     var(--font-size-base);
  border:        3px solid var(--color-primary);
  border-right:  none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  outline:       none;
  transition:    all var(--transition-base);
}

.search_input:focus {
  border-color: #ccc;
  box-shadow:   0 0 0 2px rgba(0, 105, 79, 0.2);
}

.search_button {
  flex-shrink:   0;
  padding:       12px 20px;
  font-family:   var(--font-body);
  font-size:     var(--font-size-base);
  background:    var(--color-primary-dark);
  color:         var(--color-white);
  border:        2px solid var(--color-primary-dark);
  border-left:   none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor:        pointer;
  white-space:   nowrap;
  transition:    all 0.25s ease;
}

.search_button:hover {
  background: var(--color-primary-dark);
  color:      var(--color-white);
}

.search_button:focus {
  outline:    none;
  box-shadow: 0 0 0 3px rgba(0, 105, 79, 0.3);
}

.search_button:active {
  background: var(--color-primary-dark);
  color:      var(--color-white);
  transform:  scale(0.97);
}

.fa-search:before {
  font-family: FontAwesome;
  content: "\f002";
  margin-right: 6px;
  color: #fff;
}

.pkp_block {
  border-radius: 3px;
  border: 1px solid #dedede;
  margin: 0 0 1rem 0;
  padding: 0;
}

.pkp_block h2.title {
  background-color: #efefef;
  padding: .5rem 1rem;
  font-family: var(--font-primary) !important;
}


/* =============================================================================
   7. TARJETAS FLIP DE REVISTAS (.flip-card)
   ============================================================================= */

/* --- Grid de números de revista --- */

ul.issues_archive,
.page_issue_archive ul.issues_archive,
.page_issue_archive .issues_archive {
  display:        flex !important;
  flex-direction: row !important;
  flex-wrap:      wrap !important;
  border-top:     none !important;
  margin-left:    0 !important;
  margin-right:   0 !important;
  list-style:     none !important;
  padding:        0 !important;
  gap:            20px !important;
}

ul.issues_archive > li,
.page_issue_archive ul.issues_archive > li,
.page_issue_archive .issues_archive > li {
  flex:       0 0 30% !important;
  max-width:  30% !important;
  width:      30% !important;
  padding:    0 !important;
  border-bottom: none !important;
  box-sizing: border-box !important;
  display:    block !important;
}

/* --- Tarjeta flip --- */

.flip-card {
  perspective: 1000px;
  width:       100%;
}

.flip-card-inner {
  position:        relative;
  width:           100%;
  padding-top:     140%;
  transform-style: preserve-3d;
  transition:      transform var(--transition-flip);
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position:            absolute;
  top:                 0;
  left:                0;
  width:               100%;
  height:              100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius:       var(--radius-md);
  overflow:            hidden;
  box-shadow:          var(--shadow-sm);
}

.flip-card-front img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
}

.flip-card-no-cover {
  width:           100%;
  height:          100%;
  background:      var(--color-bg-no-cover);
  display:         flex;
  align-items:     center;
  justify-content: center;
  padding:         20px;
  text-align:      center;
  color:           var(--color-text-muted);
}

/* CAMBIO DE AZUL A #565759 */
.flip-card-back {
  background:      #565759;
  color:           #fff !important;
  transform:       rotateY(180deg);
  display:         flex;
  flex-direction:  column;
  justify-content: space-between;
  align-items:     center;
  padding:         15px 12px;
  text-align:      center;
  box-sizing:      border-box;
  overflow:        hidden;
}

.flip-card-back * {
  color: #fff !important;
}

.flip-card-back h2 {
  font-family:  var(--font-primary) !important;
  font-size:    .95rem !important;
  margin:       0 0 8px !important;
  line-height:  1.3;
  flex-shrink:  0;
}

.flip-card-back h2 a {
  font-family:     var(--font-primary) !important;
  color:           #fff !important;
  text-decoration: none;
}

.flip-card-back .series {
  font-family:   var(--font-body);
  font-size:     .8rem;
  color:         #ddd !important;
  margin-bottom: 8px;
  flex-shrink:   0;
}

.flip-card-back .description {
  font-family:     var(--font-body);
  font-size:       .72rem;
  color:           #ddd !important;
  line-height:     1.45;
  overflow-y:      auto;
  flex:            1 1 auto;
  margin-bottom:   10px;
  text-align:      justify;
  padding:         0 4px;
  scrollbar-width: thin;
  scrollbar-color: #333333 transparent;
}

/* CAMBIO DE BOTÓN A #333333 */
.flip-card-btn {
  display:         inline-block;
  flex-shrink:     0;
  padding:         7px 16px;
  background:      #333333;
  color:           #fff !important;
  border-radius:   4px;
  text-decoration: none;
  font-family:     var(--font-body);
  font-size:       .8rem;
  transition:      background .2s;
}

.flip-card-btn:hover {
  background: #4a4a4a;
}


/* =============================================================================
   8. TABLAS GENERALES (.tabla-1)
   ============================================================================= */

table.tabla-1,
table.tabla-1 td {
  text-align: center;
  border:     0.5px solid var(--color-border-table);
}

table.tabla-1 p {
  text-align: center;
}


/* =============================================================================
   9. BOTÓN "VOLVER ARRIBA" (#btnTop)
   ============================================================================= */

#btnTop {
  position:         fixed !important;
  bottom:           16px !important;
  right:            16px !important;
  z-index:          2147483647;

  transform:        translateZ(0);
  -webkit-transform: translateZ(0);
  will-change:      transform;

  width:            50px;
  height:           50px;
  background-color: var(--color-primary);
  color:            var(--color-white);
  border:           none;
  border-radius:    50%;
  cursor:           pointer;
  font-size:        26px;
  line-height:      50px;
  text-align:       center;
  padding:          0;
  display:          none;
  box-sizing:       border-box;
  max-width:        50px;
  margin:           0;
  transition:       background-color var(--transition-base);
}

#btnTop:hover,
#btnTop:active,
#btnTop:focus {
  background-color: var(--color-primary-muted);
  outline:          none;
  transform:        translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Estado visible (clase aplicada por JS al hacer scroll) */
.btn-top.show {
  opacity:        1;
  pointer-events: auto;
  transform:      translateY(0);
}


/* =============================================================================
   10. RESPONSIVE (max-width: 768px)
   ============================================================================= */

@media (max-width: 768px) {

  /* --- Navegación primaria --- */
  #navigationPrimary {
    flex-direction: column !important;
    align-items:    stretch !important;
    justify-content: center;
  }

  #navigationPrimary li {
    width: 100% !important;
  }

  #navigationPrimary li a {
    display: block;
    width:   100%;
  }

  #navigationPrimary li ul {
    position:      static;
    display:       block;
    width:         100%;
    background:    transparent;
    border:        none;
    box-shadow:    none;
  }

  #navigationPrimary li ul li a {
    color: var(--color-white);
  }

  #navigationPrimary li ul li a:hover,
  #navigationPrimary li ul li a:focus,
  #navigationPrimary li ul li a:active {
    color:      var(--color-white);
    background: var(--color-primary-dark);
  }

  /* --- Menú de usuario --- */
  #navigationUser {
    flex-direction: column !important;
    align-items:    stretch !important;
    width:          100%;
    gap:            0;
  }

  #navigationUser > li {
    width: 100% !important;
  }

  #navigationUser > li > a {
    width:           100%;
    justify-content: space-between;
    padding:         10px 12px;
    border-radius:   var(--radius-md);
    margin-left:     0 !important;
  }

  #navigationUser .dropdown-menu {
    position:      static;
    width:         100%;
    margin:        0;
    padding:       0;
    box-shadow:    none;
    border-radius: var(--radius-md);
  }

  #navigationUser .dropdown-menu li a {
    padding: 10px 12px;
  }

  /* --- Barra de búsqueda --- */
  .pkp_navigation_search_wrapper {
    margin-top: 0.5rem;
  }

  .pkp_navigation_search_wrapper form {
    display:        flex !important;
    flex-direction: row !important;
    flex-wrap:      nowrap !important;
    width:          100% !important;
  }

  .pkp_navigation_search_wrapper .search_input {
    flex:      1 1 auto !important;
    min-width: 0 !important;
    width:     auto !important;
  }

  .pkp_navigation_search_wrapper .search_button {
    flex:        0 0 auto !important;
    width:       auto !important;
    white-space: nowrap !important;
  }

  /* --- Botón volver arriba (pantallas muy pequeñas) --- */
  #btnTop {
    width:       42px !important;
    height:      42px !important;
    font-size:   22px !important;
    line-height: 42px !important;
    right:       8px !important;
    bottom:      8px !important;
  }
}

.pkp_site_name {
  display:     flex;
  align-items: center;
}

.extra-logos {
  display:     flex;
  align-items: center;
  width:       30%;
  margin-left: 10%;
}

.extra-logosa {
  width:        20%;
	padding-top: 13%;
	margin-right: 5%;
}

.extra-logosa2 {
	width: 60%;
	margin-right: 5%;
	padding-top:13%;
}

.pkp_structure_content {
  padding-top: 0;
  margin-top:  2.13rem;
}

.pkp_structure_main:before,
.pkp_structure_main:after {
  background: none;
}

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

.pkp_site_name .is_img img {
  padding-right: 10%;
  width: 50%;
  padding-top: 4%;
}


@media (max-width: 900px) {
  .page_issue_archive .issues_archive > li {
    flex:      1 1 45% !important;
    max-width: 48% !important;
  }
}

@media (max-width: 576px) {
  .page_issue_archive .issues_archive > li {
    flex:      1 1 100% !important;
    max-width: 100% !important;
  }
}


/* =============================================================================
   11. BARRA LATERAL — Bloque "Nuevo Envío"
   ============================================================================= */

#customblock-nuevoenvio h2.title {
  display: none !important;
}

#customblock-nuevoenvio .content {
  padding: .75rem 1rem;
}

.nuevo_envio {
  text-align: center;
}

.boton_envio,
.boton_envio:link,
.boton_envio:visited {
  display:         block;
  width:           100%;
  padding:         .6rem 1rem;
  background:      var(--color-primary);
  color:           var(--color-white) !important;
  text-align:      center;
  border-radius:   var(--radius-md);
  font-family:     var(--font-body) !important;
  font-size:       var(--font-size-sm) !important;
  font-weight:     600 !important;
  transition:      background var(--transition-base);
  box-sizing:      border-box;
  text-decoration: none !important;
}

.boton_envio:hover,
.boton_envio:focus,
.boton_envio:active {
  background: var(--color-primary-dark) !important;
  color:      var(--color-white) !important;
}


/* =============================================================================
   12. BARRA LATERAL — Bloque "Premios del CMCH"
   ============================================================================= */

#customblock-premioscmch h2.title {
  position:         static   !important;
  clip:             auto     !important;
  overflow:         visible  !important;
  width:            auto     !important;
  height:           auto     !important;
  margin:           0        !important;
  padding:          .5rem 1rem !important;
  background-color: #efefef;
  font-size:        0        !important;
}

#customblock-premioscmch h2.title::after {
  content:     "Premios del CMCH";
  font-family: var(--font-primary);
  font-size:   1rem;
}

#customblock-premioscmch .content p.title {
  display: none;
}

#customblock-premioscmch .content {
  padding:    .75rem 1rem;
  text-align: center;
}

#customblock-premioscmch .content img {
  display:   block;
  margin:    0 auto;
  max-width: 115px;
  width:     auto;
  height:    auto;
}


/* =============================================================================
   13. BARRA LATERAL — Bloque "SCImago"
   ============================================================================= */

#customblock-scimago h2.title {
  position:         static   !important;
  clip:             auto     !important;
  overflow:         visible  !important;
  width:            auto     !important;
  height:           auto     !important;
  margin:           0        !important;
  padding:          .5rem 1rem !important;
  background-color: #efefef;
  font-size:        0        !important;
}

#customblock-scimago h2.title::after {
  content:     "SCImago Journal & Country Rank";
  font-family: var(--font-primary);
  font-size:   1rem;
}

#customblock-scimago .content {
  padding:    .75rem 1rem;
  text-align: center;
}

#customblock-scimago .content p:first-child {
  display: none;
}

#customblock-scimago .content img,
#customblock-scimago .content a img {
  display:   block;
  margin:    0 auto;
  max-width: 190px;
  width:     100%;
  height:    auto;
}


/* =============================================================================
   14. BARRA LATERAL — adaptación para n tamaños de pantalla
   ============================================================================= */

@media (max-width: 992px) {
  .pkp_structure_sidebar {
    float:      none;
    width:      100%;
    margin-top: 2rem;
  }

  .pkp_structure_main {
    width: 100%;
  }
}


/* =============================================================================
   15. BARRA LATERAL — Bloques "Redes sociales" y "Visitas"
   ============================================================================= */

#customblock-redes .content {
  padding:    .75rem 1rem;
  text-align: center;
}

#customblock-redes .redsoc_img {
  width:   32px !important;
  height:  32px !important;
  display: inline-block;
  margin:  0 4px;
}

#customblock-visitas .content {
  padding:    .75rem 1rem;
  text-align: center;
}

#customblock-visitas .content img {
  display:   block;
  margin:    0 auto;
  max-width: 100%;
  height:    auto;
}


/* =============================================================================
   16. LÍMITE GLOBAL DE ANCHO — pantallas muy anchas (≥ 1400 px)
   ============================================================================= */

@media (min-width: 1400px) {

  .pkp_structure_content {
    max-width: 1400px !important;
  }

  .pkp_structure_main {
    max-width: 1050px;
  }

  .pkp_structure_sidebar {
    max-width: 310px;
  }
}


/* =============================================================================
   17. BARRA LATERAL — centrado general de todos los bloques
   ============================================================================= */

.pkp_structure_sidebar .pkp_block .content {
  text-align: center;
}

.pkp_structure_sidebar .pkp_block .content p,
.pkp_structure_sidebar .pkp_block .content li,
.pkp_structure_sidebar .pkp_block .content a {
  text-align: center;
}

.pkp_structure_sidebar .pkp_block h2.title {
  text-align:  center;
  font-family: var(--font-primary) !important;
}
/* =============================================================================
			   						HEADER
   ============================================================================= */
.pkp_structure_head{
  position: relative ;

}
.pkp_structure_head::before {
    content: "";
    position: absolute;
    inset: 0;
    /*background-image: url("https://sandbox.astra.red/IIH/moderna2026/public/site/images/administrador/img-fondo-escritorio-9f1234cbfb4b2343498ea42e69f518b3.png");*/
    background-image: url("https://moderna.historicas.unam.mx/public/site/images/administrador/img-fondo-escritorio.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 40% 70%;
    opacity: 0.3;
    pointer-events: none;
}
.pkp_structure_head> * {
    position: relative;
    z-index: 1;
}

/* =============================================================================
			   						MÓVILES
   ============================================================================= */
/* Menú móvil a la derecha */
@media (max-width: 991px) {   /* antes 1023px; ver sección 27, punto 3 */
    .pkp_site_nav_toggle {
        right: 0 !important;
        left: auto !important;
    }
	    .has_site_logo .pkp_head_wrapper
    {
        padding-right: 0;
    }
    .pkp_structure_head
    {
        height: 100px;
    }
	.pkp_site_nav_toggle
    {
        width: 100px;
        height: 100px;
    }
	 .pkp_site_name
    {
        left: 0;
        right: 100px;
        height: 100px;
    }
	.pkp_site_name .is_img img
    {
        width: 100%;
        max-height: 100px;
    }
    .extra-logos 
	{
  		width: 100%;
        max-height: 100px;
	}

	.extra-logosa 
	{
        max-height: 100px;
	}

	.extra-logosa2 
	{
        max-height: 100px;
    }
	.pkp_structure_head::before
    {
        background-size: 60% 100%;
        background-image: url("https://moderna.historicas.unam.mx/public/site/images/administrador/img-fondo-movil.png");
    }
}
/* =============================================================================
   18. JUSTIFICACIÓN GLOBAL DE TEXTOS DE CONTENIDO
   =============================================================================
   Aplica alineación justificada a los bloques de texto corrido del sitio
   (resúmenes, descripciones, párrafos de contenido). No se aplica a menús,
   botones, encabezados ni bloques que ya usan centrado intencional (barra
   lateral, tarjetas), para no romper esos diseños.
   ============================================================================= */

.abstract,
.article_summary,
.galley_label,
.pkp_block .content p,
.obj_article_summary .article_summary,
.page .description,
main p,
.pkp_structure_main p,
.pkp_structure_main li,
.item .description {
  text-align: justify;
}
 /* Menú móvil a la derecha */
@media (max-width: 991px) {   /* antes 1023px; ver sección 27, punto 3 */

    /* =========================================================
       MENÚ
       ========================================================= */

    .pkp_site_nav_toggle {
        right: 0 !important;
        left: auto !important;

        width: clamp(60px, 10vw, 100px);
        height: clamp(60px, 10vw, 100px);
    }


    /* =========================================================
       HEADER
       ========================================================= */

    .has_site_logo .pkp_head_wrapper {
        padding-right: 0;
    }

    .pkp_structure_head {
        height: clamp(60px, 10vw, 100px);
    }


    /* =========================================================
       BANNER / LOGO
       ========================================================= */

    .pkp_site_name {
        left: 0;

        /* Deja espacio para el botón */
        right: clamp(60px, 10vw, 100px);

        height: clamp(60px, 10vw, 100px);
    }

    .pkp_site_name .is_img img {
        width: 60%;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }


    /* =========================================================
       LOGOS ADICIONALES
       ========================================================= */

    .extra-logos {
        width: 100%;
        height: auto;
        max-height: 100%;
    }

    .extra-logosa,
    .extra-logosa2 {
        height: auto;
        max-height: 100%;
    }


    /* =========================================================
       FONDO
       ========================================================= */

    .pkp_structure_head::before {
        background-size: 60% 100%;
        background-image: url("https://moderna.historicas.unam.mx/public/site/images/administrador/img-fondo-movil.png");
        background-repeat: no-repeat;
        background-position: center;
    }


    /* =========================================================
       ICONO DEL MENÚ
       ========================================================= */

    .pkp_site_nav_toggle > span {
        border-bottom: 3px solid #fff;
    }

    .pkp_site_nav_toggle > span:before,
    .pkp_site_nav_toggle > span:after {
        background: #fff;
    }
}

/* Ancho del cuerpo del artículo: fijo solo en escritorio. En pantallas
   chicas un ancho fijo provocaba scroll horizontal (ver sección 22). */
.obj_article_details .main_entry {
  overflow-wrap: break-word;
}

@media (min-width: 992px) {
  .obj_article_details .main_entry {
    width: 600px;
  }
}

/* =============================================================================
   19. BLOQUE "NÚMERO COMPLETO" (.galleys) — reducir espacio vacío
   =============================================================================
   El tema base deja el bloque .galleys tan alto como la portada flotante
   (.heading .cover), que a veces es muy alta. Se limita la altura de la
   portada y se reduce el padding de .galleys para que no quede un hueco
   grande antes de "Artículos".
   ============================================================================= */

/* Solo se reduce el espacio vertical; los márgenes/padding laterales del
   tema se conservan para que la línea mida lo mismo que la de "Artículos". */
.obj_issue_toc .galleys {
  padding-top:    0 !important;
  padding-bottom: 0 !important;
  margin-top:     0 !important;
  margin-bottom:  0.2rem !important;
  min-height:     0 !important;
}

/* Se usa la misma línea del tema (::before, mismo ancho que "Artículos"),
   solo se baja a una altura fija justo debajo del título:
   alto del título (1.5rem) + su padding inferior (0.3rem) = 1.8rem. */
.obj_issue_toc .galleys::before {
  display: block !important;
  top:     2.4rem !important;
}

.obj_issue_toc .galleys h2 {
  top:            0 !important;
  margin:         0 0 1.1rem !important;
  padding-top:    0 !important;
  padding-bottom: 0.3rem !important;
  line-height:    1.5rem !important;
}

.obj_issue_toc .galleys .galleys_links,
.obj_issue_toc .galleys .galleys_links li {
  margin:  0 !important;
  padding: 0 !important;
}

/* Espacio mínimo entre "Número completo" y la primera sección */
.obj_issue_toc .galleys + .sections {
  margin-top: 0.3rem !important;
}

.obj_issue_toc .galleys + .sections .section:first-child {
  padding-top: 0.3rem !important;
}

.obj_issue_toc .heading .cover img {
  max-height: 150px;
  width:      auto;
}
/* =============================================================================
   20. ÍCONO DE LICENCIA CREATIVE COMMONS en el texto
   =============================================================================
   El tema estira las imágenes del contenido; el ícono de licencia
   (by-nc-sa, by-nc-nd, etc.) se ajusta a la altura de la línea de texto.
   ============================================================================= */

.page img[src*="by-nc"],
.page img[src*="creativecommons"] {
  display:        inline-block !important;
  height:         1.3em !important;
  width:          auto !important;
  max-width:      none !important;
  margin:         0 0.2em !important;
  vertical-align: text-bottom;
}

/* =============================================================================
   21. INDEXACIONES (pie de página) — idéntico a Novohispana
   =============================================================================
   Novohispana no tiene CSS para este bloque: su aspecto sale de cómo el
   navegador acomoda su tabla. El tema aplica img{width:auto;height:auto},
   así que (salvo CLASE, ESCI, Handbook y Ulrichs, que llevan alto en su
   style) cada logo ocupa todo el ancho de su columna, y cada columna mide
   en proporción al logo más ancho que contiene (tamaño natural en px):
     col 1  Biblat / Latindex / Ulrichs   → 1200
     col 2  CLASE / MIAR                  →  512
     col 3  Dialnet / REDIB               → 1200
     col 4  DOAJ / SNPCyH                 →  959
     col 5  ESCI / SciELO                 → 1172
     col 6  Handbook / Scopus             → 1200
     col 7  HAPI / SJR                    →  400
   Aquí se reproduce lo mismo con una cuadrícula, y "order" coloca cada logo
   en la misma posición que en Novohispana (filas de 7, 7 y 1), sin importar
   cómo esté repartido el HTML de Moderna. !important vence los style en línea.
   ============================================================================= */

.pkp_footer_content > div > table {
  display:               grid;
  grid-template-columns: minmax(0, 1200fr) minmax(0, 512fr) minmax(0, 1200fr)
                         minmax(0, 959fr)  minmax(0, 1172fr) minmax(0, 1200fr)
                         minmax(0, 400fr);
  gap:                   2px;
  padding:               2px;
  align-items:           center;
  width:                 100%;
  margin:                0 auto;
}

.pkp_footer_content > div > table > tbody,
.pkp_footer_content > div > table > tbody > tr {
  display: contents;
}

.pkp_footer_content > div > table td {
  display:    block;
  min-width:  0;
  padding:    1px;
  text-align: center !important;
}

/* Logos sin alto fijo en Novohispana: llenan el ancho de su columna */
.pkp_footer_content > div > table td img {
  width:      100% !important;
  min-width:  100% !important;   /* vence el "width: 132px !important" de DOAJ */
  max-width:  100% !important;
  height:     auto !important;
}

/* Logos con alto fijo en Novohispana (style en línea de su HTML) */
.pkp_footer_content > div > table td img[src*="CLASE"],
.pkp_footer_content > div > table td img[src*="esci"],
.pkp_footer_content > div > table td img[src*="handbook"],
.pkp_footer_content > div > table td img[src*="ulrichs"] {
  width:     auto !important;
  min-width: 0 !important;
}
.pkp_footer_content > div > table td img[src*="CLASE"]    { height: 72px !important; }
.pkp_footer_content > div > table td img[src*="esci"]     { height: 55px !important; }
.pkp_footer_content > div > table td img[src*="handbook"] { height: 37px !important; }
.pkp_footer_content > div > table td img[src*="ulrichs"]  { height: 34px !important; }

/* Posición de cada logo (mismo orden que Novohispana) */
.pkp_footer_content > div > table td:has(img[src*="biblat"])   { order: 1; }
.pkp_footer_content > div > table td:has(img[src*="CLASE"])    { order: 2; }
.pkp_footer_content > div > table td:has(img[src*="dialnet"])  { order: 3; }
.pkp_footer_content > div > table td:has(img[src*="doaj"])     { order: 4; }
.pkp_footer_content > div > table td:has(img[src*="esci"])     { order: 5; }
.pkp_footer_content > div > table td:has(img[src*="handbook"]) { order: 6; }
.pkp_footer_content > div > table td:has(img[src*="hapi"])     { order: 7; }
.pkp_footer_content > div > table td:has(img[src*="latindex"]) { order: 8; }
.pkp_footer_content > div > table td:has(img[src*="MIAR"])     { order: 9; }
.pkp_footer_content > div > table td:has(img[src*="redib"])    { order: 10; }
.pkp_footer_content > div > table td:has(img[src*="snpcyh"])   { order: 11; }
.pkp_footer_content > div > table td:has(img[src*="scielo"])   { order: 12; }
.pkp_footer_content > div > table td:has(img[src*="scopus"])   { order: 13; }
.pkp_footer_content > div > table td:has(img[src*="scimago"])  { order: 14; }
.pkp_footer_content > div > table td:has(img[src*="ulrichs"])  { order: 15; }
/* =============================================================================
   22. ARTÍCULO — evitar scroll horizontal en móviles
   =============================================================================
   En pantallas chicas el cuerpo del artículo ocupa todo el ancho disponible
   y nada dentro de él puede ser más ancho que la pantalla: los enlaces
   largos (DOI, URL de las referencias) se parten, y las imágenes y tablas
   se ajustan al ancho (las tablas anchas se desplazan dentro de su propio
   recuadro en vez de mover toda la página).
   ============================================================================= */

@media (max-width: 991px) {
  .obj_article_details,
  .obj_article_details .row,
  .obj_article_details .main_entry,
  .obj_article_details .entry_details {
    width:      100% !important;
    max-width:  100% !important;
    float:      none !important;
    box-sizing: border-box;
  }

  .obj_article_details .main_entry * {
    max-width: 100%;
  }

  .obj_article_details p,
  .obj_article_details li,
  .obj_article_details a,
  .obj_article_details .value {
    overflow-wrap: anywhere;
    word-break:    break-word;
  }

  .obj_article_details img {
    max-width: 100% !important;
    height:    auto !important;
  }

  .obj_article_details table {
    display:    block;
    max-width:  100%;
    overflow-x: auto;
  }

  /* El texto del artículo en móvil va justificado (ver sección 23) */
}


/* =============================================================================
   23. TEXTO JUSTIFICADO EN MÓVILES
   =============================================================================
   En pantallas chicas el texto corrido de toda la revista (páginas,
   políticas, artículos: adscripción, palabras clave, resumen, cómo citar)
   se fuerza a justificado. Se activan guiones automáticos en español para
   que el justificado en columnas angostas no deje huecos grandes entre
   palabras. No afecta títulos, barra lateral, botones ni el cuadro de IA
   (sección 25), que se mantiene alineado a la izquierda por legibilidad.
   ============================================================================= */

@media (max-width: 991px) {
  .pkp_structure_main p,
  .pkp_structure_main li,
  .pkp_structure_main td,
  .pkp_structure_main th,
  .pkp_structure_main dd,
  .pkp_structure_main blockquote,
  .pkp_structure_main .description,
  .pkp_structure_main .abstract,
  .pkp_structure_main .article_summary,
  .pkp_structure_main .galley_label,
  .page .description,
  .item .description,
  main p,
  .obj_article_details .item,
  .obj_article_details .value,
  .obj_article_details .authors li,
  .obj_article_details .csl-entry {
    text-align: justify !important;
    -webkit-hyphens: auto;
    hyphens:         auto;
  }

  /* Palabras y URL largas (con o sin enlace) se parten solo si no caben,
     para no provocar scroll horizontal */
  .pkp_structure_main a,
  .pkp_structure_main p,
  .pkp_structure_main li,
  .pkp_structure_main td,
  .pkp_structure_main dd {
    overflow-wrap: anywhere;
    word-break:    break-word;
  }
}


/* =============================================================================
   24. VISTA DEL ARTÍCULO — texto justificado en todas las pantallas
   =============================================================================
   En la página de cada artículo (adscripción, palabras clave, resumen,
   referencias, cómo citar) el texto va justificado también en escritorio.
   ============================================================================= */

.obj_article_details p,
.obj_article_details li,
.obj_article_details .item,
.obj_article_details .value,
.obj_article_details .abstract,
.obj_article_details .item .description,
.obj_article_details .csl-entry {
  text-align: justify !important;
  -webkit-hyphens: auto;
  hyphens:         auto;
}


/* =============================================================================
   25. CUADRO DE ACTIVIDADES DE IA (#acts-ia) — Políticas editoriales
   =============================================================================
   Cuadro "Actividades relacionadas con el uso de IA en la preparación de
   manuscritos..." (sección <section id="acts-ia"> de Políticas editoriales).
   - Escritorio: tabla con bordes, encabezados en mayúsculas y negritas,
     texto alineado a la izquierda y arriba (como el PDF de la revista).
   - Móvil: cada actividad se muestra como una ficha; los encabezados de
     columna aparecen como etiquetas dentro de cada ficha.
   No requiere modificar el HTML de la página.
   ============================================================================= */

#acts-ia table {
  width:           100%;
  margin:          1rem 0;
  border-collapse: collapse;
  table-layout:    fixed;
  font-size:       0.85rem;
  line-height:     1.45;
}

#acts-ia td,
#acts-ia th {
  padding:        0.5rem 0.6rem;
  border:         1px solid #9a9a9a;
  vertical-align: top;
  text-align:     left !important;
  hyphens:        auto;
  overflow-wrap:  break-word;
}

#acts-ia td p,
#acts-ia th p {
  margin:      0;
  font-size:   inherit;
  line-height: inherit;
  text-align:  left !important;
}

/* Encabezados (vienen como <td><em> dentro de <thead>) */
#acts-ia thead td,
#acts-ia thead th {
  vertical-align: middle;
  text-align:     center !important;
  background:     #f2f2f2;
}

#acts-ia thead td p,
#acts-ia thead th p {
  text-align: center !important;
}

#acts-ia thead em {
  font-style:     normal;
  font-weight:    700;
  text-transform: uppercase;
  font-size:      0.75rem;
  letter-spacing: 0.02em;
}

/* Anchos de columna: número angosto, el resto repartido */
#acts-ia tr > *:nth-child(1) { width: 2.2rem; text-align: center !important; }
#acts-ia tr > *:nth-child(1) p { text-align: center !important; }
#acts-ia tr > *:nth-child(2) { width: 15%; }

/* Nota al pie del cuadro (* Traducido, ampliado y adaptado de STM...) */
#acts-ia > p:last-child {
  font-size: 0.85rem;
}

/* --- Móvil: una ficha por actividad --- */
@media (max-width: 767px) {
  #acts-ia table,
  #acts-ia tbody,
  #acts-ia tr,
  #acts-ia td {
    display:    block;
    width:      100% !important;
    box-sizing: border-box;
  }

  #acts-ia thead {
    display: none;
  }

  #acts-ia tbody tr {
    margin:        0 0 1.25rem;
    border:        1px solid #9a9a9a;
    border-radius: 6px;
    overflow:      hidden;
  }

  #acts-ia tbody td {
    border:        none;
    border-bottom: 1px solid #dcdcdc;
    padding:       0.6rem 0.8rem;
  }

  #acts-ia tbody td:last-child {
    border-bottom: none;
  }

  /* Número + nombre de la actividad: encabezado de la ficha */
  #acts-ia tbody td:nth-child(1) {
    background:    var(--color-primary);
    color:         #fff;
    border-bottom: none;
    padding:       0.4rem 0.8rem;
    text-align:    left !important;
  }

  #acts-ia tbody td:nth-child(1) p {
    text-align: left !important;
  }

  #acts-ia tbody td:nth-child(1)::before {
    content:     "Actividad ";
    font-weight: 700;
  }

  #acts-ia tbody td:nth-child(1) p {
    display:     inline;
    font-weight: 700;
  }

  #acts-ia tbody td:nth-child(2) {
    background: #f2f2f2;
  }

  /* Etiquetas con el nombre de cada columna */
  #acts-ia tbody td:nth-child(n+3)::before {
    display:        block;
    margin-bottom:  0.2rem;
    font-size:      0.72rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color:          #555;
  }

  #acts-ia tbody td:nth-child(3)::before { content: "Descripción"; }
  #acts-ia tbody td:nth-child(4)::before { content: "Ejemplos"; }
  #acts-ia tbody td:nth-child(5)::before { content: "Qué no se incluye en la actividad por corresponder a otra, permitida o no"; }
  #acts-ia tbody td:nth-child(6)::before { content: "Posibles medidas de la revista"; }
  #acts-ia tbody td:nth-child(7)::before { content: "Ejemplos de cómo puede formularse la declaración"; }
}


/* =============================================================================
   26. MENÚ DE USUARIO — evitar scroll horizontal
   =============================================================================
   Cada enlace del menú de usuario (Acceso, Registro / nombre de usuario)
   mide 10em; con los márgenes, el menú quedaba unos px más ancho que la
   pantalla y aparecía una barra de desplazamiento horizontal en PC.
   Los enlaces conservan su tamaño, pero se encogen si no caben.
   ============================================================================= */

#navigationUser {
  max-width:  100%;
  box-sizing: border-box;
}

#navigationUser > li {
  min-width:   0;
  flex-shrink: 1;
}

#navigationUser > li > a {
  max-width:  100%;
  box-sizing: border-box;
}


/* =============================================================================
   27. CABECERA — imagen de fondo sin deformarse y franja del menú más delgada
   =============================================================================
   1) PC: la imagen decorativa tenía ancho y alto fijados por separado
      (40% 70%) sin respetar la proporción de la imagen (489×355), así que
      se veía estirada horizontalmente, más al reducir la ventana. Ahora ocupa el 85% del alto de la cabecera (el espacio
      debajo de la barra superior de idioma/usuario) y su ancho se calcula
      solo, respetando la proporción de la imagen; va alineada abajo a la
      derecha para que se vea completa. En móvil se conserva como estaba.
   2) La franja oscura del menú principal se hace un poco más delgada
      (menos espacio arriba y abajo); el tamaño de letra no cambia.
   3) Las reglas de cabecera para móvil (alto, logo móvil, botón de menú) se
      aplicaban hasta 1023 px, pero el tema muestra el menú de escritorio
      desde 992 px; entre 992 y 1023 px se mezclaban y el menú se veía
      encimado sobre el buscador. Esos dos bloques ahora terminan en 991 px.
   4) Tabletas y móvil (hasta 991 px): la imagen de fondo móvil (170×120)
      se forzaba a 60% del ancho y 100% del alto, centrada, así que se
      estiraba más entre más chica la ventana. Ahora ocupa ~1/3 del ancho
      entre el título y el botón de menú; su alto se calcula solo (sin
      estirarse) y la cabecera la recorta arriba y abajo.
   5) Tabletas y móvil (hasta 991 px): la cabecera replica la de Novohispana:
      80 px de alto, logos UNAM/IIH ocultos y el título de la revista con
      un alto máximo de 72 px.
   ============================================================================= */

@media (min-width: 992px) {
  .pkp_structure_head::before {
    background-size:     auto 85%;
    background-position: right bottom;
  }
}

/* --- Franja del menú principal (antes 10px arriba/abajo) --- */
#navigationPrimary {
  margin:  8px auto;
  padding: 6px 14px;
}

#navigationPrimary > li > a {
  padding-top:    7px;
  padding-bottom: 7px;
}

/* --- Imagen de fondo en tabletas/móvil: entre el título y el botón de
       menú, ocupando ~1/3 del ancho y sin estirarse (su alto se calcula
       solo; la cabecera recorta arriba y abajo) --- */
@media (max-width: 991px) {
  .pkp_structure_head::before {
    /* Se usa la imagen de escritorio (489×355): la móvil (170×120) es el
       mismo dibujo pero a baja resolución y se veía borrosa al ampliarla */
    background-image:    url("https://moderna.historicas.unam.mx/public/site/images/administrador/img-fondo-escritorio.png") !important;
    background-size:     33% auto !important;
    background-position: 66% center !important;
  }
}

/* --- Cabecera en tabletas/móvil idéntica a Novohispana --- */
@media (max-width: 991px) {
  .pkp_structure_head {
    height: 80px !important;
  }

  .pkp_site_nav_toggle {
    width:  clamp(60px, 10vw, 100px) !important;
    height: 80px !important;
  }

  .pkp_site_name {
    right:  clamp(60px, 10vw, 100px) !important;
    height: 80px !important;
  }

  .extra-logos {
    display: none !important;
  }

  .pkp_site_name .is_img img {
    width:      auto !important;
    max-width:  100% !important;
    height:     auto !important;
    max-height: 72px !important;
    object-fit: contain;
  }
}


/* =============================================================================
   28. MENÚ MÓVIL — flechas en submenús y submenús cerrados por defecto
   =============================================================================
   Solo en el menú de tabletas/móvil (botón de hamburguesa, hasta 991 px):
   - Los elementos que tienen submenú (Publicar en la revista, Acerca de,
     Números publicados, Estadísticas, Selecciona idioma) muestran una
     flecha ▼ que gira ▲ cuando el submenú está abierto. Los que no tienen
     submenú no llevan flecha.
   - Todos los submenús (incluido el de idioma: Español / Inglés) quedan
     ocultos; se abren al tocar su elemento y se cierran al tocarlo de
     nuevo. Esto requiere el script "menú móvil" instalado en la cabecera
     del sitio (Moderna), que agrega/quita la clase .submenu-abierto.
     Sin el script, :focus-within abre al tocar y cierra al tocar fuera.
   En escritorio no cambia nada.
   ============================================================================= */

@media (max-width: 991px) {

  /* --- Submenús ocultos por defecto --- */
  #navigationPrimary li > ul,
  #navigationUser li > ul {
    display:    none !important;
    position:   static !important;
    transform:  none !important;
    float:      none !important;
    box-shadow: none !important;
  }

  /* --- Submenú visible solo cuando su elemento está abierto ---
     El script "menú móvil" (ver nota al final de esta sección) agrega la
     clase .submenu-abierto al tocar el elemento y la quita al tocarlo de
     nuevo. :focus-within queda como respaldo si el script no está
     instalado (abre al tocar, cierra al tocar fuera). No se usa :hover
     porque en pantallas táctiles se queda "pegado" e impide cerrar. */
  #navigationPrimary > li.submenu-abierto > ul,
  #navigationUser > li.submenu-abierto > ul,
  #navigationPrimary > li:focus-within > ul,
  #navigationUser > li:focus-within > ul,
  #navigationPrimary li > a[aria-expanded="true"] + ul,
  #navigationUser li > a[aria-expanded="true"] + ul,
  #navigationPrimary li.show > ul,
  #navigationPrimary li.open > ul,
  #navigationUser li.show > ul,
  #navigationUser li.open > ul,
  #navigationPrimary li > ul.show,
  #navigationUser li > ul.show {
    display: block !important;
  }

  /* --- Flecha en los elementos que tienen submenú --- */
  #navigationPrimary > li:has(> ul) > a::after,
  #navigationUser > li:has(> ul) > a::after {
    content:        "" !important;
    display:        inline-block !important;
    width:          0;
    height:         0;
    margin-left:    10px;
    vertical-align: middle;
    border-left:    6px solid transparent;
    border-right:   6px solid transparent;
    border-top:     7px solid #fff;
    border-bottom:  0;
    transition:     transform 0.2s ease;
  }

  /* En el menú de usuario el enlace repartía su contenido de extremo a
     extremo; se alinea al inicio para que la flecha quede junto al texto */
  #navigationUser > li > a {
    justify-content: flex-start !important;
  }

  /* Los elementos del menú de usuario tenían un margen izquierdo además
     del ancho completo, y su recuadro resaltado se salía del menú.
     Se quita el margen y se usa relleno interior para alinear el texto. */
  #navigationUser > li {
    margin-left: 0 !important;
  }

  #navigationUser > li > a {
    padding-left: 27px !important;
  }

  /* Los subelementos (p. ej. Español / Inglés) se alinean con el texto
     de los elementos principales en lugar de quedar más a la derecha */
  #navigationUser li > ul {
    margin:  0 !important;
    padding: 0 !important;
  }

  #navigationUser li > ul > li {
    margin-left: 0 !important;
  }

  #navigationUser li > ul > li > a {
    padding-left: 27px !important;
  }

  /* Flecha hacia arriba cuando el submenú está abierto */
  #navigationPrimary > li.submenu-abierto > a::after,
  #navigationUser > li.submenu-abierto > a::after,
  #navigationPrimary > li:focus-within > a::after,
  #navigationUser > li:focus-within > a::after,
  #navigationPrimary > li > a[aria-expanded="true"]::after,
  #navigationUser > li > a[aria-expanded="true"]::after,
  #navigationPrimary > li.show > a::after,
  #navigationPrimary > li.open > a::after,
  #navigationUser > li.show > a::after,
  #navigationUser > li.open > a::after {
    transform: rotate(180deg);
  }
}


/* Al tocar o enfocar un elemento del menú de usuario, el fondo usaba
   --color-primary-darker (#7A4D00, café/amarillo). Se usa el rosa de la
   revista, igual que al pasar el cursor. Aplica en todas las pantallas. */
#navigationUser > li > a:focus,
#navigationUser > li > a:active,
#navigationUser > li.submenu-abierto > a {
  background: var(--color-primary) !important;
}
