/* Estilo global */ 
body {
  font-family: 'Itim', cursive !important;
  scroll-behavior: smooth;
  font-size: 1rem;
}

html {
  font-size: 100%; /* valor base */
}

/* Reset básico */
:root {
  font-size: 100%;
}

body {
  font-size: 1rem;
}

/* barrinha do botão de a+ e a- a fonte */
#fontSizeSliderContainer {
  position: absolute;
  top: 3.75rem; /* ajuste conforme posição do ícone */
  right: 3.75rem;
  z-index: 9999;
  background-color: #fff;
  border-radius: 0.625rem;
  box-shadow: 0 0 0.94rem rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  transition: opacity 0.2s ease;
}

#fontSizeSliderContainer label {
  font-size: 12px;
  color: #333;
  margin-bottom: 4px;
}

#fontSizeLabel {
  font-size: 12px;
  margin-bottom: 4px;
  color: #333;
}

/* Botão de resetar tamanho de fonte */
#resetFontBtn  {
  background-color: #ffffff !important;
  color: #000000 !important;
  font-weight: bold;
  border: 1px solid #aaa;
}

/* Fonte Dislexica */
body.dyslexic-font * {
    font-family: 'OpenDyslexic', sans-serif !important;
  }

  body.reduced-motion * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body.reduced-motion .carousel,
  body.reduced-motion #anuncios-superior,
  body.reduced-motion .banner,
  body.reduced-motion .anuncio-card {
  display: none !important;
  }

/* Menu de acessibilidade */
  #accessibilityMenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2000;
    background: white;
    border-radius: 0.5rem;
  }

  #accessibilityMenu button {
  color: #212529 !important; /* texto preto padrão Bootstrap */
  border-color: #ccc;
}

/* Logo se adapta melhor */
a.d-flex.text-green:hover,
a.d-flex.text-green:focus {
  color: #0f3b22; /* verde mais escuro no hover */
  text-decoration: underline;
  cursor: pointer;
  filter: brightness(0.9);
  transition: color 0.3s ease, filter 0.3s ease;
}

a.d-flex.text-green {
  color: #136941; /* verde padrão */
  text-decoration: none;
  transition: color 0.3s ease, filter 0.3s ease;
}

/* Estilo da logo */
.logo img {
  height: 50px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Menu hover */
.nav-link.text-dark.fw-semibold {
  transition: color 0.3s ease;
}

.nav-link.text-dark.fw-semibold:hover, .nav-link.text-dark.fw-semibold:focus {
  color: #c80000 !important; /* Forçar a cor no hover */
  cursor: pointer;            /* Dá o cursor de link */
  transition: color 0.3s ease;
  transform: scale(1.05);
}

.header-custom {
  background-color: #73986f; /* Cor de fundo do header, pode ser também: 00d455 ou 73986f */
}

/* Search Bar */
.search-bar input {
  max-width: 500px;
}

.search-bar {
  position: relative; /* contexto para o dropdown absoluto funcionar */
  z-index: 10;
}
  
  #sugestoes {
  max-height: 250px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;  
  top: 100%; /* abaixo do input */
  left: 0;
}

.access-icons i {
  cursor: pointer;
  font-size: 1.2rem;
  color: white !important;
  transition: color 0.3s ease;
}

.access-icons i:hover {
  color: #aaca1b !important; /* Verde limão suave ao passar o mouse */
}

/* Botão de doação */
.btn-doar {
  background-color: #a51b1b;
  color: white;
  border: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-doar:hover {
  background-color: #a30000;
  transform: scale(1.05);
}

/* Estilizando a barra de rolagem horizontal (compatível com WebKit) */
.scrollable-element {
  overflow-x: auto;
  white-space: nowrap;
}

/* Barra de rolagem personalizada para Chrome, Edge e Safari */
.scrollable-element::-webkit-scrollbar {
  height: 8px; /* altura para barra horizontal */
}

.scrollable-element::-webkit-scrollbar-track {
  background: #f0f0f0; /* cor de fundo */
}

.scrollable-element::-webkit-scrollbar-thumb {
  background-color: #aaa; /* cor da “alça” */
  border-radius: 4px;
}

/* Botões do header funcioanais e belos */
.btn-icon {
  background: transparent;
  border: none;
  padding: 4px;
  font-size: 1.3rem;
  cursor: pointer;
  color: white;
}

.btn-icon:focus {
  outline: 2px dashed #fff;
  outline-offset: 2px;
}

.access-icons .btn {
  color: #ffffff !important; /* Branco puro para melhor contraste */
  background-color: transparent;
  border: none;
  padding: 6px 8px;
  font-size: 1.3rem;
  transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.access-icons .btn:hover {
  color: #d4ff00 !important; /* Verde limão claro no hover */
  background-color: rgba(255, 255, 255, 0.15); /* Leve fundo para feedback visual */
  transform: scale(1.1);
}

/* Caixa sobre leitura de voz da página */
#leituraStatus{
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 260px;
  max-height: 150px;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#leituraTexto{
  margin-top: 5px;
}

#pararLeitura{
  margin-top: 10px;
  padding: 4px 10px;
  background: #e74c3c;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
}

/* Darkmode */
.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode .btn-outline-light {
  border-color: #ccc;
  color: #f0f0f0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode .btn-outline-light:hover {
  background-color: #333;
  color: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Estilo do header em modo escuro */
.dark-mode .header-custom {
  background-color: #1e1e1e !important;
  color: #f0f0f0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Links e textos no header no dark mode */
.dark-mode .header-custom a,
.dark-mode .header-custom .nav-link,
.dark-mode .header-custom .btn,
.dark-mode .header-custom .access-icons i {
  color: #f0f0f0 !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ícones ao passar o mouse no modo escuro */
.dark-mode .header-custom .access-icons i:hover {
  color: #aaca1b !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  nav .nav {
    flex-direction: column;
    padding-left: 0;
  }

  .btn {
    align-self: flex-end;
  }
}

/* Header responsivo (scolando com a tela) para telas menores */
@media (max-width: 767.98px) {
  .header-custom {
    position: static !important; /* ou relative */
    padding: 10px 15px;
  }
}

/* Header para telas menores */
@media (max-width: 576px) {
  .header-custom {
    padding: 0.3rem 0.5rem;
    flex-direction: column;
    align-items: start;
  }

  .header-custom img {
    height: 30px;
  }

  .header-custom span {
    font-size: 1rem;
  }

  .search-bar {
    display: none;
  }
}

/* Header para telas menores 
@media (max-width: 576px) {
   .search-bar {
    width: 100%;
    margin-top: 0.5rem;
  }

  nav, .btn-doar {
    display: none;  ou transforme em menu colapsável 
  }
}

remover Search bar
@media (max-width: 768px) {
  .search-bar {
    display: none;
  }
}

*/

/* Header responsivo para telas no modo paisagem */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .header-custom {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .header-custom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* garante quebra em telas pequenas */
  gap: 1rem;
}

  .header-custom .search-bar {
    display: none;
  }

  .search-bar {
  flex: 1; /* ocupa espaço restante entre logo e ícones */
  display: flex;
  justify-content: center;
}

.search-bar input {
  max-width: 500px;
  width: 100%;
}

  .header-custom nav {
    order: 2;
    text-align: center;
    width: 100%;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .header-custom .acessibilidade-botoes {
    order: 3;
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
  }

  .header-custom .btn-doar {
    order: 4;
    display: flex;
    justify-content: center;
    margin: 0.5rem auto;
  }

  .header-custom .logo {
    order: 1;
  }
}

/* Header responsivo para telas no modo paisagem  (tirar para ver qual fica melhor) */
@media (max-width: 992px) and (orientation: landscape) {
  .header-custom .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .search-bar {
    flex: 1 1 100%;
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
    order: 2; /* opcional para forçar a posição central abaixo da logo */
  }

  .access-icons, nav, .btn-doar {
    order: 3;
  }

  .header-custom a,
  .header-custom nav,
  .btn-doar {
    align-self: center;
  }

  .access-icons {
    align-items: center;
  }
}