/* Noemica — ajustes visuais para OJS 3.5.0-5 / Tema Padrão */

:root {
  --noemica-principal: #0B3C41;
  --noemica-ouro: #BFA15F;
  --noemica-offwhite: #FAF8F5;
  --noemica-texto: #222b30;
  --noemica-suave: #657078;
  --noemica-borda: #DED8CB;
  --noemica-fundo: var(--noemica-offwhite);
}

/* Leitura e ritmo visual */
body {
  color: var(--noemica-texto);
  background-color: var(--noemica-offwhite);
  line-height: 1.65;
}

/* Acessibilidade: foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--noemica-ouro) !important;
  outline-offset: 3px;
}

::selection {
  color: var(--noemica-offwhite);
  background: var(--noemica-principal);
}

/* Formulários públicos */
.pkp_structure_main input[type="text"],
.pkp_structure_main input[type="email"],
.pkp_structure_main input[type="password"],
.pkp_structure_main input[type="search"],
.pkp_structure_main input[type="url"],
.pkp_structure_main select,
.pkp_structure_main textarea {
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--noemica-texto);
  background: #fff;
  border: 1px solid #9aa4a8;
  border-radius: 3px;
}

.pkp_structure_main input:focus,
.pkp_structure_main select:focus,
.pkp_structure_main textarea:focus {
  border-color: var(--noemica-principal);
  box-shadow: 0 0 0 3px rgba(191, 161, 95, 0.25);
}

.pkp_structure_main button,
.pkp_structure_main .cmp_button,
.pkp_structure_main input[type="submit"] {
  border-radius: 3px;
}

/* Tabelas e conteúdos extensos */
.pkp_structure_main table {
  width: 100%;
  border-collapse: collapse;
}

.pkp_structure_main th,
.pkp_structure_main td {
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--noemica-borda);
}

.pkp_structure_main th {
  color: var(--noemica-offwhite);
  background: var(--noemica-principal);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.pkp_structure_main {
  background-color: #fff;
}

.pkp_structure_head {
  min-height: 0;
  border-bottom: 3px solid var(--noemica-ouro);
}

.pkp_structure_content {
  padding-top: 0;
  padding-bottom: 3rem;
}

.page_index_journal .homepage_about {
  max-width: 860px;
  margin-top: 0;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
  font-size: 1.05rem;
}

.page_index_journal .current_issue {
  padding-top: 1.5rem;
  border-top: 1px solid var(--noemica-borda);
}

.page_index_journal .current_issue .current_issue_title,
.page_index_journal .current_issue .current_issue_title + p {
  margin-bottom: 1rem;
}

/* Na home, apresenta apenas a identificação e a capa da edição atual.
   O sumário completo permanece disponível na página da edição. */
.page_index_journal .current_issue .sections {
  display: none;
}

.page_index_journal .current_issue .read_more {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.55rem 0.85rem;
  color: var(--noemica-offwhite) !important;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  background: var(--noemica-principal);
  border: 1px solid var(--noemica-principal);
  border-radius: 3px;
}

.page_index_journal .current_issue .read_more:hover,
.page_index_journal .current_issue .read_more:focus {
  color: var(--noemica-principal) !important;
  background: var(--noemica-offwhite);
  border-color: var(--noemica-ouro);
}

/* Texto compacto do botão na interface em português */
html[lang^="pt"] .page_index_journal .current_issue .read_more {
  font-size: 0;
}

html[lang^="pt"] .page_index_journal .current_issue .read_more::before {
  content: "Veja mais";
  font-size: 0.95rem;
}

html[lang^="pt"] .page_index_journal .current_issue .read_more::after {
  display: none !important;
  content: none !important;
}

.obj_issue_toc .cover img,
.page_index_journal .current_issue .cover img {
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

/* Área de chamadas inserida em Conteúdo Adicional */
.noemica-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 3rem 0 1rem;
}

.noemica-action {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1.6rem;
  background: var(--noemica-fundo);
  border: 1px solid var(--noemica-borda);
  border-top: 4px solid var(--noemica-ouro);
  border-radius: 4px;
}

.noemica-action h3 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--noemica-principal);
}

.noemica-action p {
  margin: 0 0 1rem;
  color: var(--noemica-suave);
}

.noemica-action p:last-child {
  margin-top: auto;
  margin-bottom: 0;
}

.noemica-action a {
  display: inline-block;
  padding: 0.65rem 1rem;
  color: var(--noemica-principal);
  font-weight: 700;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--noemica-principal);
  border-radius: 3px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.noemica-action a:hover,
.noemica-action a:focus {
  color: #fff !important;
  background: var(--noemica-principal);
  border-color: var(--noemica-principal);
  text-decoration: none;
}

/* Menu mais nítido */
.pkp_navigation_primary > li > a {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Links editoriais e arquivos de leitura */
.page_index_journal a,
.obj_article_summary .title a {
  color: var(--noemica-principal);
}

.page_index_journal a:hover,
.obj_article_summary .title a:hover {
  color: #765F2F;
}

.obj_galley_link {
  color: var(--noemica-principal) !important;
  background: #fff;
  border-color: var(--noemica-ouro);
}

.obj_galley_link:hover,
.obj_galley_link:focus {
  color: var(--noemica-offwhite) !important;
  background: var(--noemica-principal);
  border-color: var(--noemica-principal);
}

/* Sumário da edição */
.page_issue .obj_issue_toc .section {
  margin-top: 2.25rem;
}

.page_issue .obj_issue_toc .section > h2,
.page_issue .obj_issue_toc .section > h3 {
  padding-bottom: 0.55rem;
  color: var(--noemica-principal);
  border-bottom: 2px solid var(--noemica-ouro);
}

.obj_article_summary {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--noemica-borda);
}

.obj_article_summary:last-child {
  border-bottom: 0;
}

.obj_article_summary .title {
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
  line-height: 1.4;
}

.obj_article_summary .subtitle {
  margin-bottom: 0.45rem;
  color: var(--noemica-suave);
}

.obj_article_summary .authors,
.obj_article_summary .pages {
  font-size: 0.92rem;
}

/* Página individual do artigo */
.obj_article_details .page_title {
  color: var(--noemica-principal);
  line-height: 1.25;
}

.obj_article_details .authors {
  margin-top: 1rem;
}

.obj_article_details .abstract,
.obj_article_details .item {
  margin-top: 2rem;
}

.obj_article_details .abstract > h2,
.obj_article_details .item > h2,
.obj_article_details .item > h3 {
  padding-bottom: 0.45rem;
  color: var(--noemica-principal);
  border-bottom: 1px solid var(--noemica-ouro);
}

/* Cabeçalho e logotipo */
.pkp_site_name_wrapper {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.pkp_site_name {
  margin: 0;
  padding: 18px 0 12px;
}

.pkp_site_name .is_img {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.pkp_site_name .is_img img {
  display: block;
  width: auto;
  max-width: 420px;
  max-height: 105px;
  margin: 0;
  object-fit: contain;
}

.pkp_navigation_primary_wrapper {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 4px;
}

.pkp_navigation_primary {
  margin-top: 0;
  margin-bottom: 0;
}

/* Imagem principal da página inicial */
.page_index_journal .homepage_image {
  margin: 0 0 2rem;
  padding: 0;
  overflow: hidden;
}

.page_index_journal .homepage_image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

/* Rodapé institucional */
.pkp_structure_footer_wrapper {
  color: var(--noemica-offwhite);
  background-color: var(--noemica-principal);
  border-top: 4px solid var(--noemica-ouro);
}

.pkp_structure_footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.pkp_structure_footer .pkp_footer_content {
  flex: 1 1 auto;
  min-width: 0;
}

.pkp_structure_footer .pkp_brand_footer {
  flex: 0 0 180px;
  margin: 0;
  padding: 1.5rem;
}

.pkp_structure_footer .pkp_brand_footer img {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.pkp_structure_footer_wrapper a {
  color: var(--noemica-offwhite);
}

.noemica-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  color: var(--noemica-offwhite);
}

.noemica-footer h2,
.noemica-footer h3 {
  margin-top: 0;
  color: var(--noemica-ouro);
}

.noemica-footer p {
  margin: 0 0 0.75rem;
}

.noemica-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.noemica-footer li {
  margin-bottom: 0.45rem;
}

.noemica-footer a {
  color: var(--noemica-offwhite) !important;
  text-decoration: underline;
  text-decoration-color: var(--noemica-ouro);
  text-underline-offset: 3px;
}

.noemica-footer a:hover,
.noemica-footer a:focus {
  color: var(--noemica-ouro) !important;
}

.noemica-footer-note {
  opacity: 0.82;
  font-size: 0.9rem;
}

/* Celulares e tablets */
@media (max-width: 900px) {
  .noemica-actions {
    grid-template-columns: 1fr;
  }

  .noemica-action {
    min-height: 0;
  }

  .noemica-footer {
    gap: 0.75rem;
  }

  .pkp_structure_footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .pkp_structure_footer .pkp_brand_footer {
    flex-basis: auto;
    padding: 0 1.5rem 2rem;
  }

  .pkp_site_name {
    padding: 14px 0 10px;
  }

  .pkp_site_name .is_img img {
    max-width: 340px;
    max-height: 85px;
  }

  .page_index_journal .homepage_image img {
    max-height: 380px;
  }
}

@media (max-width: 600px) {
  .pkp_structure_content {
    padding-top: 0;
  }

  .noemica-action {
    padding: 1.25rem;
  }

  .pkp_site_name {
    padding: 10px 0 8px;
  }

  .pkp_site_name .is_img img {
    max-width: 240px;
    max-height: 70px;
  }

  .page_index_journal .homepage_image img {
    max-height: 260px;
  }
}

/* ==========================================================
   AJUSTES FINAIS DA PÁGINA INICIAL E DO RODAPÉ
   ========================================================== */

/* Reduz a altura visual do banner da página inicial */
.page_index_journal .homepage_image img,
.homepage_image img {
  max-height: 380px !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Na página inicial, mantém apenas a identificação, a capa
   e o acesso à edição atual, ocultando a lista de artigos */
.page_index_journal .current_issue .sections,
.page_index_journal .current_issue .section,
.page_index_journal .current_issue .obj_article_summary,
.page_index_journal .current_issue .articles,
.page_index_journal .current_issue .toc {
  display: none !important;
}

.page_index_journal .current_issue {
  margin-bottom: 2.5rem;
}

/* Rodapé com a identidade visual da Revista Noêmica */
.pkp_structure_footer_wrapper {
  color: var(--noemica-offwhite) !important;
  background: var(--noemica-principal) !important;
  border-top: 4px solid var(--noemica-ouro) !important;
}

.pkp_structure_footer_wrapper a {
  color: var(--noemica-ouro) !important;
}

.pkp_structure_footer_wrapper h2,
.pkp_structure_footer_wrapper h3,
.pkp_structure_footer_wrapper strong {
  color: var(--noemica-offwhite) !important;
}

/* ==========================================================
   AJUSTES FINAIS DE ESPAÇAMENTO E BOTÃO DE SUBMISSÃO
   ========================================================== */

/* Remove o espaço vazio excessivo antes do rodapé na página inicial */
.page_index_journal .pkp_structure_main {
  min-height: 0 !important;
  padding-bottom: 3rem !important;
}

.page_index_journal .current_issue {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.page_index_journal .current_issue .cover {
  margin-bottom: 1.25rem;
}

.page_index_journal .current_issue .read_more {
  margin-bottom: 0;
}

/* Evita altura artificial no contêiner central */
.page_index_journal .pkp_structure_content,
.page_index_journal .pkp_structure_main {
  height: auto !important;
}

/* Botão "Enviar Submissão" alinhado à identidade visual */
.block_make_submission a {
  color: var(--noemica-offwhite) !important;
  background: var(--noemica-principal) !important;
  border: 1px solid var(--noemica-principal) !important;
  border-radius: 3px;
}

.block_make_submission a:hover,
.block_make_submission a:focus {
  color: var(--noemica-principal) !important;
  background: var(--noemica-offwhite) !important;
  border-color: var(--noemica-ouro) !important;
}

/* ==========================================================
   RODAPÉ INSTITUCIONAL EM HTML — TEXTO NÍTIDO E SEIS SELOS
   ========================================================== */

.pkp_structure_footer_wrapper {
  position: relative;
  color: var(--noemica-offwhite) !important;
  background: var(--noemica-principal) !important;
  border-top: 4px solid var(--noemica-ouro) !important;
}

.pkp_structure_footer {
  display: block;
  width: 100%;
}

.pkp_structure_footer .pkp_footer_content {
  width: 100%;
}

.pkp_structure_footer .pkp_brand_footer {
  display: none !important;
}

.noemica-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.35rem 1.5rem 1.6rem;
  color: var(--noemica-offwhite);
}

.noemica-footer-texto {
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.noemica-footer-texto p {
  margin: 0 0 1rem;
  color: var(--noemica-offwhite);
  font-size: 0.98rem;
  line-height: 1.6;
}

.noemica-footer-texto a {
  color: var(--noemica-ouro) !important;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--noemica-ouro);
  text-underline-offset: 3px;
}

.noemica-footer-texto a:hover,
.noemica-footer-texto a:focus {
  color: #fff !important;
}

/* Linha horizontal de selos */
.noemica-selos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 1.5rem auto 1.1rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--noemica-ouro);
  border-bottom: 1px solid var(--noemica-ouro);
}

.noemica-selo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  text-align: center;
}

.noemica-selo-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  margin-bottom: 0.65rem;
  color: var(--noemica-ouro);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(11, 60, 65, 0.72);
  border: 2px solid var(--noemica-ouro);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 4px rgba(191, 161, 95, 0.14),
    0 6px 18px rgba(0, 0, 0, 0.18);
}

.noemica-selo-icone.retangular {
  width: 96px;
  border-radius: 12px;
}

.noemica-selo-titulo {
  display: block;
  color: var(--noemica-offwhite);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.noemica-selo-subtitulo {
  display: block;
  margin-top: 0.15rem;
  color: rgba(250, 248, 245, 0.82);
  font-size: 0.72rem;
  line-height: 1.25;
}

.noemica-footer-copyright {
  margin: 0.8rem 0 0;
  color: rgba(250, 248, 245, 0.82);
  font-size: 0.88rem;
  text-align: center;
}

/* Tablets: mantém uma linha com rolagem horizontal */
@media (max-width: 900px) {
  .noemica-selos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.9rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--noemica-ouro) rgba(255, 255, 255, 0.12);
  }

  .noemica-selo {
    flex: 0 0 132px;
  }
}

/* Celulares */
@media (max-width: 600px) {
  .noemica-footer {
    padding: 1.8rem 1rem 1.3rem;
  }

  .noemica-footer-texto p {
    font-size: 0.92rem;
  }

  .noemica-selo {
    flex-basis: 118px;
  }

  .noemica-selo-icone {
    width: 72px;
    height: 72px;
    font-size: 1.5rem;
  }

  .noemica-selo-icone.retangular {
    width: 86px;
  }

  .noemica-selo-titulo {
    font-size: 0.71rem;
  }

  .noemica-selo-subtitulo {
    font-size: 0.66rem;
  }
}

/* ==========================================================
   CORREÇÃO DOS ÍCONES DO RODAPÉ
   ========================================================== */

.noemica-selo-icone {
  box-sizing: border-box;
  overflow: hidden;
  padding: 0.25rem;
  font-size: 1.55rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.noemica-selo-icone.retangular {
  font-size: 1.5rem;
}

.noemica-selo-titulo,
.noemica-selo-subtitulo {
  width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .noemica-selo-icone {
    font-size: 1.35rem;
  }

  .noemica-selo-icone.retangular {
    font-size: 1.3rem;
  }
}

/* ==========================================================
   RODAPÉ COM ALTURA BEM REDUZIDA
   ========================================================== */

/* Sobrescreve os espaçamentos anteriores do rodapé */
.noemica-footer {
  max-width: 1080px !important;
  margin: 0 auto !important;
  padding: 1.15rem 1.25rem 0.75rem !important;
}

.noemica-footer-texto {
  max-width: 900px !important;
  margin: 0 auto !important;
}

.noemica-footer-texto p {
  margin: 0 0 0.55rem !important;
  font-size: 0.86rem !important;
  line-height: 1.42 !important;
}

/* Linha de selos mais baixa e compacta */
.noemica-selos {
  gap: 0.65rem !important;
  max-width: 920px !important;
  margin: 0.75rem auto 0.45rem !important;
  padding: 0.65rem 0 !important;
}

.noemica-selo-icone {
  width: 60px !important;
  height: 60px !important;
  margin-bottom: 0.35rem !important;
  padding: 0.2rem !important;
  font-size: 1.15rem !important;
  border-width: 1.5px !important;
  box-shadow:
    inset 0 0 0 3px rgba(191, 161, 95, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.14) !important;
}

.noemica-selo-icone.retangular {
  width: 72px !important;
  border-radius: 9px !important;
  font-size: 1.1rem !important;
}

.noemica-selo-titulo {
  font-size: 0.66rem !important;
  line-height: 1.12 !important;
}

.noemica-selo-subtitulo {
  margin-top: 0.08rem !important;
  font-size: 0.62rem !important;
  line-height: 1.12 !important;
}

.noemica-footer-copyright {
  margin: 0.45rem 0 0 !important;
  font-size: 0.74rem !important;
  line-height: 1.2 !important;
}

/* Impede altura mínima ou espaços herdados pelo tema */
.pkp_structure_footer_wrapper,
.pkp_structure_footer,
.pkp_structure_footer .pkp_footer_content {
  min-height: 0 !important;
  height: auto !important;
}

.pkp_structure_footer .pkp_footer_content > :first-child {
  margin-top: 0 !important;
}

.pkp_structure_footer .pkp_footer_content > :last-child {
  margin-bottom: 0 !important;
}

/* Tablets */
@media (max-width: 900px) {
  .noemica-footer {
    padding: 1rem 1rem 0.7rem !important;
  }

  .noemica-selos {
    margin-top: 0.65rem !important;
    padding: 0.55rem 0 0.65rem !important;
  }

  .noemica-selo {
    flex: 0 0 104px !important;
  }
}

/* Celulares */
@media (max-width: 600px) {
  .noemica-footer {
    padding: 0.9rem 0.85rem 0.65rem !important;
  }

  .noemica-footer-texto p {
    font-size: 0.8rem !important;
    line-height: 1.36 !important;
  }

  .noemica-selo {
    flex-basis: 96px !important;
  }

  .noemica-selo-icone {
    width: 54px !important;
    height: 54px !important;
    font-size: 1rem !important;
  }

  .noemica-selo-icone.retangular {
    width: 66px !important;
    font-size: 0.98rem !important;
  }

  .noemica-selo-titulo {
    font-size: 0.61rem !important;
  }

  .noemica-selo-subtitulo {
    font-size: 0.58rem !important;
  }
}
