/**
 * Botones y menú de cuenta — Portal de Carteles Científicos
 * Stylesheet del sitio (misma estructura que revistas.editorialecuador.org)
 * Color base del portal: #1E8492
 */

/* Cards: equal height + buttons pinned to the bottom */
@media (min-width: 768px) {
  .page_index_site .journals > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .page_index_site .journals > ul > li {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .page_index_site .journals .thumb {
    flex: 0 0 auto;
    display: block;
    width: 100%;
  }

  .page_index_site .journals .thumb img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 26rem;
    object-fit: contain;
    object-position: top center;
  }

  @media (min-width: 992px) {
    .page_index_site .journals .thumb img {
      max-height: 28rem;
    }
  }

  .page_index_site .journals .body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }

  .page_index_site .journals .description {
    flex: 1 1 auto;
  }
}

.page_index_site .journals .links {
  margin-top: auto;
  width: 100%;
}

.page_index_site .journals .links li {
  display: block;
  width: 100%;
  margin: 0 0 0.65rem;
}

.page_index_site .journals .links li:last-child {
  margin-bottom: 0;
}

.page_index_site .journals .links a {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0.55em 1em;
  border: 1px solid #1E8492;
  border-radius: 3px;
  background: #fff;
  color: #1E8492;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  transform: translateY(0);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* Primario: "Ver evento" / "Ver revista" */
.page_index_site .journals .links .view a {
  background: #1E8492;
  color: #fff;
}

.page_index_site .journals .links .view a:hover,
.page_index_site .journals .links .view a:focus {
  background: #176a76;
  border-color: #176a76;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 132, 146, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
  outline: none;
}

/* Secundario: "Ver carteles" / "Número actual" (outline) */
.page_index_site .journals .links .current a {
  background: #fff;
  color: #1E8492;
}

.page_index_site .journals .links .current a:hover,
.page_index_site .journals .links .current a:focus {
  background: #1E8492;
  border-color: #1E8492;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 132, 146, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
  outline: none;
}

/* Evitar desbordamiento de URLs largas en la vista de artículo */
.obj_article_details .references,
.obj_article_details .references a,
.obj_article_details .entry_details .item,
.obj_article_details .entry_details .item a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Sidebar CTAs: both centered the same way */
#customblock-crossref .sidebar-cta-wrap,
#customblock-recursos-para-autores .sidebar-cta-wrap {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0 !important;
}

#customblock-crossref a.sidebar-cta,
#customblock-recursos-para-autores a.sidebar-cta {
  display: inline-block !important;
  width: auto !important;
  max-width: 100%;
  margin: 0 auto !important;
  float: none !important;
  text-align: center !important;
}



/* Crossref logo in sidebar (replaces CTA button) */
#customblock-crossref .sidebar-logo-wrap {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0.25em 0 0 !important;
}
#customblock-crossref a.sidebar-crossref-link {
  display: inline-block !important;
  line-height: 0;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#customblock-crossref img.sidebar-crossref-logo {
  display: block;
  width: 160px;
  max-width: 70%;
  height: auto;
  margin: 0 auto;
}


/* Crossref logo must always show in sidebar */
#customblock-crossref .content img {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 180px !important;
  max-width: 85% !important;
  height: auto !important;
  margin: 0 auto !important;
}
#customblock-crossref .content a {
  display: inline-block !important;
  text-align: center;
}
