:root {
  --azulPmfEscuro: #002f66;
  --pretoPmf: black;
  --azulPmfClaro: #0093d4;
  --brancoPmf: #ffffff;
  --cinzaPmf: #606060;
  --fonteTitulos: "Montserrat";
  --fontePadrao: "Montserrat", sans-serif;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--fontePadrao);
  /* overflow: hidden;  sim1*/
  /* teste */
}
header {
  background-color: var(--brancoPmf);
  padding: 0 40px;
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}

.logo {
  height: auto;
  max-height: 55px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  flex-shrink: 0;
}

#burger, 
#closeMenu {
  display: none; /* Escondidos no Desktop */
}

nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  white-space: nowrap;
}

.nav-item a {
  text-decoration: none;
  color: var(--cinzaPmf);
  font-weight: 500;
  font-size: 1rem;
  font-family: var(--fonteTitulos);
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--azulPmfEscuro);
}

.input-container {
  position: relative;
  display: inline-block;
}

#pesquisa {
  font-family: var(--fonteTitulos);
  font-size: 1rem;
  height: 35px;
  width: 150px;
  padding: 10px;
  padding-left: 30px;
  border: 1px solid var(--cinzaPmf);
  border-radius: 5px;
  padding-right: 30px;
}

#imgFundo {
  width: 100%;
  z-index: -1;
  position: absolute;
}

main {
  height: 100%;
  background-size: cover;
  /* background-repeat: no-repeat; */
  background-position-x: center;
  background-position-y: center;
}

.divCentro {
  color: var(--brancoPmf);
  width: 100%;
  height: 100vh;
  position: relative;
}

.divCentro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

/* Tags da Div Inicial */

.divInicial {
  margin-top: 15%;
  width: 50%;
  position: absolute;
  left: 40%;
  transform: translateX(-50%);
  z-index: 1;
  /* border: 2px solid red */
}

.h1-Inicial {
  font-size: 4rem;
  font-weight: bold;
  font-family: var(--fonteTitulos);
  margin: 0;
  user-select: none;
}

.h2-Inicial {
  font-size: 2.5rem;
  margin-top: 10px;
  font-family: var(--fonteTitulos);
  font-weight: 400;
  user-select: none;
}

.h3-Inicial {
  font-size: 2rem;
  font-weight: bold;
  font-family: var(--fonteTitulos);
  margin-bottom: 15px;
  user-select: none;
}

.button-Inicial {
  background-color: transparent;
  border-radius: 30px;
  border: 3px solid white;
  color: var(--brancoPmf);
  height: 60px;
  width: 200px;
  font-size: 1.4rem;
  font-weight: bold;
  margin-right: 3%;
  font-family: var(--fonteTitulos);
  padding: 5px;
  cursor: pointer;
  transition: 0.8s;
}

.button-Inicial:hover {
  color: var(--azulPmfClaro);
  border: 3px solid var(--azulPmfClaro);
}

/* Estilos para os modais */

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  padding-left: 40px;
  border-radius: 10px;
  max-width: 30%;
  text-align: left;
  position: relative;
}

.hr {
  border: none;
  border-top: 1px solid var(--cinzaPmf);
  margin: 20px 0 20px 0;
  width: 70%;
}

.h3-Modal2 {
  font-family: var(--fonteTitulos);
  color: var(--azulPmfClaro);
  font-size: 1.1rem;
}

.p-Modal2 {
  font-family: var(--fonteTitulos);
  color: var(--cinzaPmf);
  font-size: 1rem;
  margin: 6px 0 0 0;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Estilos para o botão de fechar o modal */

.close:hover {
  color: red;
}

/* Estilo para o menu ativo em telas pequenas */
.nav-list.active {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--brancoPmf);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.nav-list.active ul {
  display: flex;
  flex-direction: column;
}

.nav-list.active ul li {
  margin: 10px 0;
}

.nav-list.active ul li a {
  color: var(--cinzaPmf);
  font-size: 1.5rem;
}

/* Estilo para o botão de fechar no menu */
#closeMenu {
  font-size: 2rem;
  color: var(--cinzaPmf);
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  display: none;
  /* Inicialmente oculto */
}

/* CSS do Footer  */

footer {
  text-align: center;
}

/* Container de fundo do Modal */
.modal-container {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

/* Caixa de conteúdo interna */
.modal-conteudo {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Botão de fechar (X) */
.modal-fechar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.modal-fechar:hover {
  color: #333;
}

/* Estilização dos Cards dentro do Modal (Baseado na sua imagem) */
.modal-card-item {
  background: #f9f9f9;
  border-left: 5px solid #002f66;
  border-radius: 4px;
  padding: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modal-card-item h3 {
  color: #002f66;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-card-item p {
  margin: 0.25rem 0;
  color: #555;
  font-size: 0.95rem;
}

.modal-card-divisor {
  border-top: 1px dashed #ddd;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

@media (max-width: 768px) {

  /* Transforma a tabela e seus componentes em blocos flexíveis */
  .tabela-contatos,
  .tabela-contatos tbody,
  .tabela-contatos tr {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  /* Oculta o cabeçalho original da tabela no mobile */
  .tabela-contatos thead {
    display: none;
  }

  /* Estilização do card baseado na imagem enviada */
  .tabela-contatos tbody tr {
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 5px solid #002f66;
    /* Borda azul esquerda */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    /* Centraliza todos os textos */
    align-items: center;
  }

  /* Ajuste do espaçamento e ordem dos dados */
  .tabela-contatos td {
    display: block;
    width: 100% !important;
    padding: 0.25rem 0 !important;
    border: none !important;
    color: #444;
    font-size: 0.95rem;
  }

  /* Destaque para o Setor/Título do Bloco */
  .tabela-contatos td:first-child {
    color: #002f66;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  /* Linha divisória pontilhada antes dos dados de contato */
  .tabela-contatos td:last-child {
    border-top: 1px dashed #ddd !important;
    margin-top: 0.75rem;
    padding-top: 0.75rem !important;
    font-size: 1rem;
  }


  #imgFundo {
    height: 100%;
  }

  .logo {
    margin-right: 0px;
    margin-left: 20px;
  }

  .input-container {
    display: none;
  }

  .h1-Inicial {
    font-size: 3rem;
  }

  .h2-Inicial {
    font-size: 2rem;
  }

  .h3-Inicial {
    margin-top: 2.5em;
  }

  .divInicial {
    width: 80%;
    margin-top: 10%;
    margin-left: 3em;
  }

  .brs {
    display: none;
  }

  #botaoProCidadao {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }

  .modal-content {
    max-width: 60%;
    text-align: center;
    padding: 30px;
    margin-top: 30%;
  }

  .hr {
    width: 100%;
  }
}

@media screen and (max-width: 1024px) and (min-width: 769px) {
  header {
    padding: 10px 25px;
    height: auto;
    min-height: 80px;
  }

  .logo {
    max-width: 200px;
  }

  #burger, 
  #closeMenu {
    display: none;
  }

  #itensMenu {
    display: block !important;
  }

  nav ul {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: 6px 16px;
    justify-content: flex-end;
  }

  .nav-item a {
    font-size: 0.875rem;
  }
}

@media screen and (max-width: 768px) {
  header {
    padding: 0 20px;
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-sizing: border-box;
  }

  .logo {
    max-width: 160px;
  }

  #burger {
    display: block;
    cursor: pointer;
    margin-left: auto;
    font-size: 28px;
  }

  /* Oculta o container do menu no mobile por padrão */
  #itensMenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--brancoPmf);
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
  }

  /* Exibe o container ao ativar o JS */
  #itensMenu.active {
    display: block;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    padding: 25px 0 15px 0;
    position: relative;
  }

  /* Ícone de fechar no canto superior direito do menu */
  #closeMenu {
    display: block;
    position: absolute;
    top: 8px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--cinzaPmf);
  }

  nav ul {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .nav-item {
    width: 100%;
    text-align: center;
  }

  .nav-item a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
  }
}