/* ============================================================
   CEHGR · Hoja de estilo para OJS 3.3 (tema Default)
   Versión consolidada y limpia
   Pegar/subir en: Configuración → Sitio web → Apariencia
   → Avanzado → "Hoja de estilo de la revista"
   Marca: granate #9a2436 · hover #7d1d2c
   ============================================================ */

/* ---------- 1. CABECERA: fondo blanco, franja superior para el usuario ---------- */
.pkp_structure_head {
  position: relative !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid #e0e0e0 !important;
  padding: 34px 0 0 0 !important;   /* 34px de franja blanca arriba */
  margin: 0 !important;
}

/* Quitar hueco entre el borde de la página y la cabecera */
.pkp_structure_page { margin-top: 0 !important; }

/* ---------- 2. BANNER a sangre (llena el ancho de la página) ---------- */
.pkp_head_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.pkp_site_name_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  height: auto !important;
}
.pkp_site_name {
  position: relative !important;
  width: 100% !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
.pkp_site_name > a,
.pkp_site_name .is_img {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.pkp_site_name .is_img img,
.pkp_site_name img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
}

/* ---------- 3. MENÚ DE USUARIO (cehgr) en la franja blanca superior ---------- */
.pkp_navigation_user_wrapper {
  position: absolute !important;
  top: 0 !important;
  right: 18px !important;
  left: auto !important;
  width: auto !important;
  max-width: none !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  z-index: 30 !important;
}
.pkp_navigation_user_wrapper .pkp_navigation_user {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}
/* Enlace 'cehgr': blanco transparente en reposo, pastilla blanca al hover/click */
.pkp_navigation_user_wrapper > .pkp_navigation_user > li > a {
  display: inline-block !important;
  color: #ffffff !important;
  background: transparent !important;
  padding: 4px 12px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,.4) !important;  /* sombra sutil para legibilidad */
  transition: background .15s, border-color .15s, color .15s !important;
}
.pkp_navigation_user_wrapper > .pkp_navigation_user > li > a:hover,
.pkp_navigation_user_wrapper > .pkp_navigation_user > li > a:focus,
.pkp_navigation_user_wrapper > .pkp_navigation_user > li.is_open > a {
  color: #333 !important;
  background: #ffffff !important;
  border-color: #e0e0e0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.12) !important;
  text-shadow: none !important;
}

/* Desplegable del usuario (Panel de control, Salir, etc.) */
.pkp_navigation_user > li > ul {
  top: 34px !important;
  background: #ffffff !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.15) !important;
  padding: 4px 0 !important;
  min-width: 11em !important;
  z-index: 1000 !important;
}
.pkp_navigation_user > li > ul a {
  display: block !important;
  padding: 8px 16px !important;
  color: #333 !important;
  background: #fff !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  text-decoration: none !important;
}
.pkp_navigation_user > li > ul a:hover,
.pkp_navigation_user > li > ul a:focus {
  background: #f5eaec !important;
  color: #9a2436 !important;
  border-left: 3px solid #9a2436 !important;
}

/* ---------- 4. MENÚ DE NAVEGACIÓN PRINCIPAL ---------- */
#navigationPrimary > li > a:hover,
#navigationPrimary > li > a:focus { border-color: #9a2436 !important; }
#navigationPrimary [aria-expanded="true"]:before { border-bottom-color: #9a2436 !important; }
#navigationPrimary a:hover,
#navigationPrimary a:focus { color: #9a2436 !important; }

/* Submenús desplegables en granate */
#navigationPrimary ul { background: #9a2436 !important; }
#navigationPrimary ul a { color: #ffffff !important; }
#navigationPrimary ul a:hover,
#navigationPrimary ul a:focus { background: #7d1d2c !important; color: #ffffff !important; }

/* Lupa de búsqueda */
.pkp_navigation_search_wrapper a:hover,
.pkp_navigation_search_wrapper a:focus { border-color: #9a2436 !important; }

/* ---------- 5. BOTONES en granate ---------- */
.block_make_submission a,
.cmp_manuscript_button,
.obj_galley_link {
  background: #9a2436 !important;
  color: #ffffff !important;
}
.block_make_submission a:hover,
.block_make_submission a:focus,
.cmp_manuscript_button:hover,
.cmp_manuscript_button:focus,
.obj_galley_link:hover,
.obj_galley_link:focus {
  background: #7d1d2c !important;
  color: #ffffff !important;
}

/* ---------- 6. CABECERA DE LECTURA DE ARTÍCULO y PIE ---------- */
.header_view { background: #9a2436 !important; }
.header_view .title:hover,
.header_view .title:focus { background: #7d1d2c !important; }
.pkp_structure_footer_wrapper { border-bottom: 1.43rem solid #9a2436 !important; }

/* ---------- 7. TÍTULOS · Opción C (Montserrat, sin mayúsculas, granate) ---------- */
.obj_issue_toc > .galleys h2,
.obj_issue_toc .section h2,
.pkp_page_index .current_issue h2 {
  text-transform: none !important;
  color: #9a2436 !important;
  border-bottom: 2px solid #e0d2d2 !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
}
.pkp_block .title {
  text-transform: none !important;
  border-bottom: 2px solid #9a2436 !important;
  color: rgba(0,0,0,0.7) !important;
}
.obj_article_summary > .title {
  text-transform: none !important;
  font-weight: 500 !important;
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
}
.obj_article_summary > .title a { color: #222 !important; }
.obj_article_summary > .title a:hover { color: #9a2436 !important; }
.pkp_page_index .current_issue .current_issue_title { text-transform: none !important; }
section.cmp_announcements h2::before {
  color: #9a2436 !important;
  border-bottom: 2px solid #9a2436 !important;
}
.obj_article_details .main_entry .label {
  text-transform: none !important;
  color: #9a2436 !important;
  border-bottom: 2px solid #e0d2d2 !important;
}
.pkp_structure_main h1,
.pkp_structure_main h2,
.pkp_structure_main h3 { text-transform: none !important; }
/* ============================================================
   8. GALERÍA ROTATIVA con flechas y fundido suave (cross-fade) —
   el JS (inyectado vía plugin "Custom Header") crea dos capas
   superpuestas (.cehgr-layer) y alterna su opacidad en cada
   cambio de imagen, apoyándose en la transition de este CSS.
   ============================================================ */

/* Wrapper que el JS crea ANTES del ::before, con position:relative
   y la misma altura/aspect-ratio que la imagen, para que las flechas
   se centren correctamente sin necesidad de cálculos a ciegas */
.cehgr-galeria-wrap {
  position: relative;
  width: 100%;
  max-width: 1001px;
  aspect-ratio: 1001 / 310;
  margin: 0 auto 1.5rem auto;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

/* Dos capas apiladas para el cross-fade. El JS alterna cuál tiene
   opacity:1 y le asigna la imagen nueva a la que está oculta antes
   de mostrarla, así el fundido es siempre suave */
.cehgr-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.cehgr-layer.is-visible {
  opacity: 1;
}

/* Botones de flecha, hijos directos de .cehgr-galeria-wrap.
   Sutiles en reposo, visibles solo al pasar el ratón por la galería */
.cehgr-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.0);
  color: rgba(255,255,255,.55);
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s, color .2s;
}

/* Solo se hacen visibles cuando el ratón está sobre toda la galería */
.cehgr-galeria-wrap:hover .cehgr-arrow {
  opacity: 1;
}

.cehgr-arrow:hover,
.cehgr-arrow:focus {
  background: rgba(0,0,0,.35);
  color: #ffffff;
}
.cehgr-arrow-left  { left: 8px; }
.cehgr-arrow-right { right: 8px; }

/* ============================================================
   9. JUSTIFICACIÓN de párrafos de texto largo
   Afecta a: "Sobre la revista" (portada), resúmenes/abstracts de
   artículos, tarjetas de artículo en el índice, y las secciones
   de "Acerca de" (enfoque y alcance, política de acceso abierto,
   política antiplagio, proceso de evaluación, etc.).
   No afecta a títulos, metadatos, botones, menús ni listas.
   ============================================================ */

.homepage_about p,
.obj_article_details p,
.obj_article_summary p,
.page_about_index p,
.page_about_index li,
.obj_issue_toc p,
.description p,
.page p,
.article-content,
.article-content p,
.pkp_page_content p {
  text-align: justify !important;
  /* evita que la justificación deje "ríos" feos de espacio
     en palabras largas o URLs sin cortar */
  hyphens: auto !important;
}