/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
}

/* HEADER */
header {
  background: #022a8a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 100px;
  flex-wrap: wrap;
}

header .logo-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .logo-title img {
  height: 50px;
}

header .texts h1 {
  font-size: 1.4rem;
}

header nav {
  display: flex;
  gap: 10px;
}

header nav button {
  background: #00a73e;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
}

header nav button:hover {
  background: #007f30;
}

/* BARRA DE TÍTULO */
.barra-titulo {
  background: #e0e0e0;
  padding: 20px 0;
}
.barra-titulo .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  font-weight: bold;
  color: #022a8a;
  font-size: 1.1rem;
}

/* LAYOUT */
.main-container {
  display: flex;
  max-width: 1100px;
  margin: 30px auto;
  gap: 20px;
  padding: 0 20px;
}

/* ASIDE */
aside.filtro {
  width: 30%;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px #0001;
}

aside.filtro h2 {
  margin-top: 0;
  color: #00a73e;
}

aside.filtro label {
  font-weight: bold;
  display: block;
  margin-top: 15px;
}

aside.filtro input[type="date"],
aside.filtro input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

aside.filtro button {
  margin-top: 20px;
  width: 100%;
  background: #00a73e;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

aside.filtro button:hover {
  background: #007f30;
}

/* LISTA DE EDIÇÕES */
.edicoes {
  width: 70%;
}

.edicao {
  display: flex;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px #0001;
  margin-bottom: 15px;
  overflow: hidden;
}

.edicao-imagem {
  height: 100%;
  padding: 10px;
}

.edicao-imagem img {
  width: 100px;
  object-fit: cover;
}

.edicao-conteudo {
  padding: 15px;
  flex: 1;
}

.edicao-conteudo h3 {
  margin: 0;
  color: #022a8a;
}

.edicao-conteudo p {
  margin: 5px 0;
}

.edicao-conteudo a {
  color: #00a73e;
  text-decoration: none;
  font-weight: bold;
}

.edicao-conteudo a:not(:last-child)::after {
  content: "|";
  margin: 0 8px;
  color: #ccc;
}

/* PAGINAÇÃO */
nav.paginacao {
  text-align: center;
  margin: 20px 0;
}

nav.paginacao a,
nav.paginacao span,
nav.paginacao strong {
  margin: 0 5px;
  text-decoration: none;
}

nav.paginacao a {
  color: #00a73e;
}

nav.paginacao strong {
  color: #022a8a;
}

/* FOOTER */
footer {
  background: #022a8a;
  color: #fff;
  text-align: center;
  padding: 15px 10px;
  margin-top: 30px;
  font-size: 0.9rem;
}

footer a {
  color: #00ff90;
  margin: 0 8px;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVIDADE */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }
  aside.filtro, .edicoes {
    width: 100%;
  }
  header {
    padding: 10px 20px;
  }
}

@media (max-width: 600px) {
  header .logo-title img {
    height: 40px;
  }
  header .texts h1 {
    font-size: 1rem;
  }
  header nav button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .edicao {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .edicao-imagem img {
    width: 80px;
  }
}

/* Esconde o botão menu-toggle no desktop */
.menu-toggle {
  display: none;
  font-size: 2.2rem;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* Menu nav padrão */
nav#menuNav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Dropdown básico */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: white;
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 10;
}

.dropdown-content a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
}

.dropdown-content a:hover {
  background: #00a73e;
  color: white;
}

/* Exibe o dropdown quando o botão tiver classe active */
.dropdown-btn.active + .dropdown-content {
  display: block;
}

/*Tabela Atos*/
.tabela-atos {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-top: 20px;
}

.tabela-atos th, .tabela-atos td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: center;
}

/* RESPONSIVIDADE */
@media (max-width: 900px) {
  /* Mostrar botão hamburguer */
  .menu-toggle {
    display: block;
  }

  /* Esconder menu por padrão */
  nav#menuNav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
    gap: 0;
  }

  /* Exibir menu quando ativo */
  nav#menuNav.active {
    display: flex;
  }

  /* Ajustar botões do menu no mobile */
  nav#menuNav > button,
  nav#menuNav .dropdown {
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    text-align: left;
    color: white;
    font-size: 1rem;
    cursor: pointer;
  }

  nav#menuNav > button:hover,
  nav#menuNav .dropdown-btn:hover {
    background: #00a73e;
  }

  /* Ajusta dropdown-content no mobile para ficar dentro do fluxo */
  .dropdown-content {
    position: static;
    background: #0343a6;
    box-shadow: none;
  }

  .dropdown-content a {
    color: white;
  }

  .dropdown-content a:hover {
    background: #007f30;
  }
}

/* --- NOVO INDEX --- */

/* Intro explicação */
.section.intro {
  background: white;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px #0001;
}

.section.intro h2 {
  margin-bottom: 10px;
  color: #022a8a;
}

.section.intro p {
  line-height: 1.5;
  font-size: 1rem;
}

/* Formulários de login e pesquisa */
.form-pesquisa input,
.form-login input {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.form-pesquisa button,
.form-login button {
  margin-top: 10px;
  width: 100%;
  background: #022a8a;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.form-pesquisa button:hover,
.form-login button:hover {
  background: #007f30;
}

/* Botão ver todas edições */
nav.paginacao a {
  display: inline-block;
  padding: 10px 20px;
  background: #00a73e;
  color: white;
  border-radius: 6px;
  font-weight: bold;
}

nav.paginacao a:hover {
  background: #007f30;
}


/* HEADER INSTITUCIONAL */
.site-header {
  background: #022a8a;
  color: white;
  font-family: Arial, sans-serif;
}
.header-top {
  background: #011d60;
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.header-top .social-links a {
  color: #00ff90;
  margin-left: 15px;
  text-decoration: none;
}
.header-top .social-links a:hover {
  text-decoration: underline;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 100px;
  flex-wrap: wrap;
}
.header-main .logo-title {
  display: flex;
  align-items: center;
  gap: 15px;
}
.header-main img {
  height: 60px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}
.main-nav a:hover {
  color: #00ff90;
}
.btn-acesso {
  background: #00a73e;
  padding: 8px 14px;
  border-radius: 5px;
}
.btn-acesso:hover {
  background: #007f30;
}

/* FOOTER INSTITUCIONAL */
.site-footer {
  background: #022a8a;
  color: white;
  padding: 30px 20px;
}
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 20px;
}
.footer-col h3 {
  margin-bottom: 10px;
  color: #00ff90;
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col ul li {
  margin: 6px 0;
}
.footer-col ul li a {
  color: #fff;
  text-decoration: none;
}
.footer-col ul li a:hover {
  color: #00ff90;
}
.footer-col .social a {
  display: inline-block;
  margin-right: 10px;
  color: #00ff90;
}
.footer-col .social a:hover {
  color: white;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid #fff3;
  padding-top: 10px;
  font-size: 0.85rem;
}

/* BARRA SUPERIOR */
.top-bar {
  background: #011d5c;
  color: white;
  font-size: 0.85rem;
  padding: 6px 0;
}
.top-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
}
.top-bar .social-links a {
  margin-left: 10px;
  color: #00ff90;
  text-decoration: none;
}
.top-bar .social-links a:hover {
  text-decoration: underline;
}

/* HEADER PRINCIPAL */
.main-header {
  background: #022a8a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-header .logo-title {
  display: flex;
  align-items: center;
  gap: 15px;
}
.main-header .logo-title img {
  height: 55px;
}
.main-header .texts h1 {
  font-size: 1.3rem;
}
.main-header .texts small {
  font-size: 0.9rem;
}

/* NAV */
.main-header nav {
  display: flex;
  align-items: center;
  gap: 15px;
}
.main-header nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}
.main-header nav a:hover {
  text-decoration: underline;
}

/* BOTÃO LOGIN */
.btn-login {
  background: #00a73e;
  padding: 8px 14px;
  border-radius: 5px;
}
.btn-login:hover {
  background: #007f30;
}

/* DROPDOWN */
.dropdown {
  position: relative;
}
.dropdown-btn {
  background: none;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-radius: 4px;
}
.dropdown-content a {
  color: #333;
  padding: 10px;
  display: block;
}
.dropdown-content a:hover {
  background: #00a73e;
  color: white;
}
.dropdown-btn.active + .dropdown-content {
  display: block;
}

/* RESPONSIVO */
@media (max-width: 900px) {
  .main-header nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #022a8a;
    padding: 10px 0;
  }
  .main-header nav.active {
    display: flex;
  }
  .main-header nav a,
  .main-header nav .dropdown-btn {
    width: 100%;
    text-align: left;
    padding: 12px 20px;
  }
  .main-header nav .dropdown-content {
    position: static;
    box-shadow: none;
    background: #0343a6;
  }
  .main-header nav .dropdown-content a {
    color: white;
  }
}

.section.info-block {
  background: white;
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 0 8px #0001;
}

.section.info-block h2 {
  color: #022a8a;
  margin-bottom: 10px;
}

.section.info-block p {
  line-height: 1.6;
}

.municipio-logado {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 15px;
  font-weight: bold;
  color: #fff;
}

.municipio-logado span {
  margin-bottom: 6px;
}

.btn-logout {
  background: #a30000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.btn-logout:hover {
  background: #7a0000;
}