/* =====================================================
   Policy Making LAT - Custom CSS Final
   Compatível com Material Theme (OJS 3.5.0.1)
   ===================================================== */

/* ---- Tipografia global ---- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
html, body, p, div, span, h1, h2, h3, h4, h5, h6, a, button, input, select, textarea {
  font-family: 'Roboto', sans-serif !important;
  color: #000 !important;
}

/* ---- Força modo claro ---- */
html, body {
  background-color: #fff !important;
  color: #000 !important;
}
:root {
  color-scheme: light !important;
}
[data-theme="dark"], .dark {
  background: #fff !important;
  color: #000 !important;
}
.material-theme-selector, [data-component="themeSelector"], #theme-toggle {
  display: none !important;
}

/* ---- Botões ---- */
button, .pkp_button, .pkp_button_primary, .pkp_button_submit,
.pkp_button_generic, .pkp_form_button, input[type="submit"], input[type="button"], input[type="reset"] {
  background-color: #D9631E !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 0.5rem 1rem !important;
  transition: background-color 0.3s ease;
}
button:hover, .pkp_button:hover {
  background-color: #CA5917 !important;
}

/* ---- Oculta "Home" no breadcrumb ---- */
.cmp_breadcrumbs li:first-child, .pkp_breadcrumbs li:first-child {
  display: none !important;
}

/* =====================================================
   HEADER E BARRAS
   ===================================================== */

/* Header geral */
header.sticky{
  position:relative !important;
  padding-top:54px !important;   /* faixa cinza */
  padding-bottom:64px !important;/* faixa laranja */
  background:#fff !important;
  box-shadow:none !important;
  border:0 !important;
  z-index:50;
}

/* Faixa cinza superior */
header.sticky::before{
  content:"";
  position:absolute; top:0; left:0; right:0;
  height:48px; background:#E8E8E8; z-index:0;
}

/* Área do usuário e busca (na faixa cinza) */
header.sticky > .flex.items-center.space-x-2{
  position:absolute !important;
  top:7px; right:26px; z-index:2; gap:10px !important;
}

/* Ícone de busca */
.pkp_navigation_search_wrapper a{
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  width:34px !important; height:34px !important;
  border:1px solid #EEE !important; border-radius:6px !important;
  background:#fff !important;
}
.pkp_navigation_search_wrapper a svg{ fill:#D9631E !important; }
.pkp_navigation_search_wrapper a:hover{ background:#D9631E !important; }
.pkp_navigation_search_wrapper a:hover svg{ fill:#fff !important; }

/* Botão do usuário */
#navigationUser li.profile > a{
  display:inline-flex !important; align-items:center !important;
  background:#fff !important; color:#D9631E !important;
  border:1px solid #EEE !important;
  border-radius:10px !important;
  padding:.4rem .9rem !important;
  box-shadow:0 2px 4px rgba(0,0,0,.05);
  font-weight:500 !important;
}

/* =====================================================
   BARRA LARANJA DO MENU PRINCIPAL (ajustada à esquerda)
   ===================================================== */

/* Esconde duplicado mobile */
header.sticky ul#navigationPrimary.block{ display:none !important; }

/* Barra laranja */
header.sticky ul#navigationPrimary.space-x-2{
  position:absolute !important;
  left:0; right:0; bottom:0;
  display:flex !important;
  justify-content:flex-start !important; /* alinhado à esquerda */
  align-items:center !important;
  background:#D9631E !important;
  padding:.6rem 2rem !important;
  margin:0 !important;
  border-radius:0 !important;
  z-index:1;
}

/* Itens do menu (texto simples, sem botões) */
header.sticky ul#navigationPrimary.space-x-2 > li > a,
header.sticky ul#navigationPrimary.space-x-2 > li .material-dropdown__trigger{
  display:inline-block !important;
  background:none !important;
  color:#fff !important;
  border:none !important;
  padding:.45rem 1rem !important;
  margin:0 .25rem !important;
  font-weight:500 !important;
  text-transform:none !important;
  font-size:1rem !important;
  transition:color .2s ease;
}
header.sticky ul#navigationPrimary.space-x-2 > li > a:hover,
header.sticky ul#navigationPrimary.space-x-2 > li .material-dropdown__trigger:hover{
  color:#f4f4f4 !important;
  text-decoration:underline !important;
}

/* Submenus (dropdowns) */
header.sticky .material-dropdown__body{
  background:#fff !important;
  border-radius:8px !important;
  box-shadow:0 8px 18px rgba(0,0,0,.12);
  padding:.5rem 0 !important;
}
header.sticky .material-dropdown__item a{
  color:#333 !important;
  padding:.4rem 1rem !important;
  display:block !important;
}
header.sticky .material-dropdown__item a:hover{
  color:#D9631E !important;
  background:#f9f9f9 !important;
}

/* =====================================================
   AJUSTES DE BOTÕES E LINKS TIPO BOTÃO
   (fora dos menus de navegação)
   ===================================================== */

/* Botões padrão (reforça borda rounded-md = 6px) */
button,
.pkp_button,
.pkp_button_primary,
.pkp_button_submit,
.pkp_button_generic,
.pkp_form_button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  background-color: #D9631E !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important; /* rounded-md */
  padding: 0.5rem 1rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  transition: background-color 0.2s ease-in-out;
}

button:hover,
.pkp_button:hover,
.pkp_button_primary:hover,
.pkp_button_submit:hover,
.pkp_button_generic:hover,
.pkp_form_button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  background-color: #CA5917 !important;
  color: #fff !important;
}

/* Links que funcionam como botão (por ex. link de PDF/Galley) */
a.obj_galley_link,
a.obj_galley_link:link,
a.obj_galley_link:visited {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background-color: #D9631E !important;
  color: #fff !important;
  border-radius: 6px !important; /* rounded-md */
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.05) !important;
  border: none !important;
}

a.obj_galley_link:hover {
  background-color: #CA5917 !important;
  color: #fff !important;
  text-decoration: none !important;
}

a.obj_galley_link svg,
a.obj_galley_link svg * {
  fill: #fff !important;
  color: #fff !important;
}

/* Botões Login / Register (quando usuário não autenticado) */
a.login,
a.register,
a.login:link,
a.register:link,
a.login:visited,
a.register:visited {
  display: inline-block !important;
  background-color: #D9631E !important;
  color: #fff !important;
  border-radius: 6px !important; /* rounded-md */
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.05) !important;
  border: none !important;
}

a.login:hover,
a.register:hover {
  background-color: #CA5917 !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* =====================================================
   REMOÇÃO DE SOMBRAS E CONTORNOS EM LINKS ESPECÍFICOS
   ===================================================== */

a.flex.h-8.items-center.justify-center.rounded-xl.shadow-md.shadow-black\/5.ring-1,
a.flex.h-8.items-center.text-slate-500.justify-center.rounded-xl.shadow-md.shadow-black\/5.ring-1 {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  ring: none !important;
  border: none !important;
}

a.flex.h-8.items-center.justify-center.rounded-xl.shadow-md.shadow-black\/5.ring-1:hover,
a.flex.h-8.items-center.text-slate-500.justify-center.rounded-xl.shadow-md.shadow-black\/5.ring-1:hover {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  border: none !important;
}

/* =====================================================
   CORREÇÃO DE CONTRASTE DO MENU PRINCIPAL
   ===================================================== */

/* Força o texto branco nos itens principais da barra laranja */
header.sticky ul#navigationPrimary.space-x-2 > li > a,
header.sticky ul#navigationPrimary.space-x-2 > li > .material-dropdown__trigger {
  color: #fff !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

/* Ao passar o mouse, mantém o texto branco no item principal */
header.sticky ul#navigationPrimary.space-x-2 > li:hover > a,
header.sticky ul#navigationPrimary.space-x-2 > li:hover > .material-dropdown__trigger {
  color: #fff !important;
  background: transparent !important;
  text-decoration: underline !important;
}

/* Submenu mantém fundo branco e texto laranja */
header.sticky .material-dropdown__body {
  background-color: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.12) !important;
}

header.sticky .material-dropdown__item a {
  color: #D9631E !important;
  background-color: #fff !important;
}

header.sticky .material-dropdown__item a:hover {
  color: #D9631E !important;
  background-color: #f9f9f9 !important;
  text-decoration: underline !important;
}

/* Garantia de contraste dinâmico caso tema altere cor */
header.sticky ul#navigationPrimary.space-x-2 {
  background-color: #D9631E !important;
  color: #fff !important;
}


/* =====================================================
   CORREÇÃO FINAL DE CORES DE LINKS E MENU PRINCIPAL
   ===================================================== */

/* LINKS GERAIS */
body a, .pkp_structure_main a, .obj_article_details a {
  color: #D9631E !important;
  text-decoration: none !important;
}
body a:hover, .pkp_structure_main a:hover, .obj_article_details a:hover {
  color: #CA5917 !important;
  text-decoration: underline !important;
}

/* MENU PRINCIPAL (BARRA LARANJA) */
#navigationPrimary, .pkp_navigation_primary {
  background-color: #D9631E !important;
}
#navigationPrimary li a, 
#navigationPrimary li .material-dropdown__trigger,
.pkp_navigation_primary li a, 
.pkp_navigation_primary li .material-dropdown__trigger {
  color: #fff !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.2s ease-in-out;
}
#navigationPrimary li:hover > a,
#navigationPrimary li:hover > .material-dropdown__trigger,
.pkp_navigation_primary li:hover > a,
.pkp_navigation_primary li:hover > .material-dropdown__trigger {
  color: #fff !important;
  background: transparent !important;
  text-decoration: underline !important;
}

/* SUBMENUS */
#navigationPrimary .material-dropdown__body,
.pkp_navigation_primary .material-dropdown__body {
  background-color: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}
#navigationPrimary .material-dropdown__item a,
.pkp_navigation_primary .material-dropdown__item a {
  color: #D9631E !important;
  background-color: #fff !important;
}
#navigationPrimary .material-dropdown__item a:hover,
.pkp_navigation_primary .material-dropdown__item a:hover {
  color: #D9631E !important;
  background-color: #f5f5f5 !important;
  text-decoration: underline !important;
}
