/* ============================================================
   HEADER - Portal de revistas científicas
   OJS 3.4 - v9 (hero con clase JS pkp_page_index_portal)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');

/* ══════════════════════════════════════════════
   1. CONTENEDORES PRINCIPALES - ancho completo
   ══════════════════════════════════════════════ */

header.pkp_structure_head,
#headerNavigationContainer {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: rgb(135, 40, 46) !important;
  border: none !important;
  box-shadow: none !important;
}

.pkp_head_wrapper {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: rgb(135, 40, 46) !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ══════════════════════════════════════════════
   2. IMAGEN DE FONDO - hero
   SOLO en la página de inicio del portal
   (clase añadida por JS solo en /index/es)
   ══════════════════════════════════════════════ */

.pkp_page_index_portal .pkp_site_name_wrapper {
  position: relative !important;
  min-height: 240px !important;
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  padding: 24px 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background-image: linear-gradient(rgba(80, 15, 25, 0.60), rgba(80, 15, 25, 0.60)), url('https://revistas.ides.org.ar/desarrollo-economico/es/libraryFiles/downloadPublic/13') !important;
  background-size: cover !important;
  background-position: center 60% !important;
}

.pkp_page_index_portal .pkp_site_name_wrapper::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  background: rgba(80, 15, 25, 0.60) !important;
  z-index: 1 !important;
}

.pkp_page_index_portal .pkp_site_name_wrapper::after {
  display: none !important;
}

/* ══════════════════════════════════════════════
   3. LOGO Y TÍTULO
   ══════════════════════════════════════════════ */

.pkp_site_name {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 32px !important;
  padding: 0 40px !important;
  width: 100% !important;
  background: transparent !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.pkp_site_name a.is_img {
  display: block !important;
  flex-shrink: 0 !important;
  z-index: 2 !important;
}

.pkp_site_name a.is_img img {
  height: 120px !important;
  width: auto !important;
  border-radius: 6px !important;
  display: block !important;
}

/* Título visible solo en el portal */
.pkp_page_index_portal h1.pkp_screen_reader {
  position: relative !important;
  clip: unset !important;
  clip-path: unset !important;
  -webkit-clip-path: unset !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 26px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6) !important;
  letter-spacing: 0.01em !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  z-index: 2 !important;
  flex: 1 !important;
  order: 2 !important;
  text-align: center !important;
}

/* Título hero generado por JS - solo en el portal */
.pkp_page_index_portal #ubp-hero-title {
  position: relative !important;
  z-index: 10 !important;
  flex: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
  font-size: 26px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.01em !important;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6) !important;
  text-align: center !important;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  white-space: normal !important;
  word-break: break-word !important;
  min-width: 0 !important;
}

/* ══════════════════════════════════════════════
   4. TARJETAS DE REVISTAS
   ══════════════════════════════════════════════ */

.pkp_page_index .journals h3 a {
  color: #87282E !important;
}

/* Reset completo del tema OJS para las tarjetas */
.page_index_site .journals ul li.has_thumb,
.page_index_site .journals ul li.has_thumb * {
  position: static !important;
  float: none !important;
  margin: 0 !important;
}

/* Grilla de 2 columnas */
.page_index_site .journals ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(400px, auto);
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: start;
  background-color: transparent;
}

/* Tarjeta */
.page_index_site .journals ul li.has_thumb {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  height: 100%;
}

/* Pseudo-elementos que generan líneas */
.page_index_site .journals ul li.has_thumb::after,
.page_index_site .journals ul li.has_thumb::before,
.page_index_site .journals ul::after,
.page_index_site .journals ul::before,
.page_index_site .journals ul li::after,
.page_index_site .journals ul li::before {
  display: none !important;
}

/* Thumb centrado con altura fija */
.page_index_site .journals ul li.has_thumb .thumb {
  height: 180px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  flex-shrink: 0;
}

/* Imagen */
.page_index_site .journals ul li.has_thumb .thumb img {
  max-height: 180px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Body con botones al fondo */
.page_index_site .journals ul li.has_thumb .body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/* Descripción ocupa el espacio disponible */
.page_index_site .journals ul li.has_thumb .description {
  flex: 1 !important;
}

/* Links/botones al fondo */
.page_index_site .journals ul li.has_thumb .links {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-top: auto;
  width: 100%;
}

.page_index_site .journals ul li.has_thumb .links li {
  width: 100% !important;
  float: none !important;
}

.page_index_site .journals ul li.has_thumb .links li a {
  display: block !important;
  width: 100% !important;
  padding: 0.4rem 1rem;
  border-radius: 0;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

/* Botón Ver revista */
.page_index_site .journals ul li.has_thumb .links li.view a {
  background-color: rgb(135, 40, 46);
  color: #ffffff;
}
.page_index_site .journals ul li.has_thumb .links li.view a:hover {
  background-color: rgb(100, 25, 30);
}

/* Botón Número actual */
.page_index_site .journals ul li.has_thumb .links li.current a {
  background-color: #ffffff;
  color: rgb(135, 40, 46);
  border: 1px solid rgb(135, 40, 46);
}
.page_index_site .journals ul li.has_thumb .links li.current a:hover {
  background-color: #eaf0f6;
}
