/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #004080;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* CABEÇALHO E MENU */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #72b8f5;
  padding: 0 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1000;
}

.logo img {
  height: 100px;
  width: auto;
  display: block;
}

.nav-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1200px;
  gap: 20px;
  padding: 1rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-item > a,
.nav-item > button {
  display: flex; /* Usar flexbox para centralizar conteúdo */
  align-items: center; /* Centraliza verticalmente */
  justify-content: center; /* Centraliza horizontalmente */
  height: 40px; /* Altura fixa para todos os itens do menu */
  padding: 0 15px; /* Ajusta o padding horizontal */
  text-decoration: none;
  color: #2c3e50;
  font-size: 20px;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.3s, color 0.3s;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-item > a:hover,
.nav-item > button:hover {
  background-color: #cde4f7;
  color: #0077b6;
}

/* DROPDOWN (desktop) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #e3eaf0;
  padding: 5px;
  list-style: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 15px;
  color: #2c3e50;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background-color: #cde4f7;
  color: #0077b6;
}

/* Garante que o dropdown-toggle tenha a mesma aparência de um nav-link */
.nav-list .dropdown-toggle {
  font-weight: 500;
  /* Não precisa de regras adicionais aqui se .nav-item > a já cobrir */
}

/* Ícone do menu */
.mobile-menu-icon {
  display: block;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #2c3e50;
  z-index: 1001;
}

@media (min-width: 768px) {
  .mobile-menu-icon {
    display: none;
  }

  .nav-item.dropdown:hover > .dropdown-menu { /* Adicionado .dropdown para maior especificidade */
    display: block;
  }
}

/* Menu Mobile container */
.mobile-menu {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: #72b8f5;
  padding: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  gap: 12px;
  text-align: left;
  border-radius: 8px;
  z-index: 1000;
  transition: max-height 0.5s ease-in-out; /* Transição para max-height */
  overflow: hidden; /* Esconde o conteúdo que transborda */
  max-height: 0; /* Inicia fechado */
}

.mobile-menu.open {
  display: flex;
  max-height: 700px; /* Altura suficiente para mostrar o menu */
}

/* Lista de navegação */
.mobile-menu .nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Alinha os itens ao início (esquerda) */
  justify-content: flex-start; /* Garante que o conteúdo da lista também inicie à esquerda */
}

.mobile-menu .nav-item {
  width: 100%;
  margin-bottom: 10px;
}

.mobile-menu .nav-item:last-child {
  margin-bottom: 0;
}

/* Links e botões do menu mobile */
.mobile-menu .nav-item > a,
.mobile-menu .nav-item > button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 1.2rem;
  color: rgb(230, 230, 230);
  background-color: #004080;
  border-radius: 8px;
  transition: background 0.3s;
  border: 1px solid #dbdbdb;
  text-align: left; /* Alinha o texto à esquerda dentro do botão/link */
  font-weight: 500;
}

/* Botão dropdown mobile */
.mobile-menu .dropdown-toggle::after {
  content: " ▼";
  font-size: 20px;
  float: right; /* Alinha o triângulo à direita */
  transition: transform 0.3s ease;
}

/* Rotação do ícone de dropdown quando aberto */
.mobile-menu .dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Submenu dropdown mobile */
.mobile-menu .dropdown-menu {
  display: none;
  flex-direction: column;
  background-color: #e9e9e9;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #6d6d6d;
  width: calc(100% - 20px); /* Ocupa a largura total menos um padding */
  margin: 10px 10px 0; /* Centraliza e adiciona margem superior */
}

.mobile-menu .dropdown-menu li {
  padding: 6px 0;
}

.mobile-menu .dropdown-menu.open {
  display: flex;
}

.mobile-menu .dropdown-menu li a {
  padding: 8px 12px;
  font-size: 19px;
  color: #e4e4e4;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
  background-color: #004080;
}

/* RESPONSIVIDADE */
@media screen and (max-width: 767px) { /* Usei 767px para evitar sobreposição no 768px */
  .desktop-menu {
    display: none;
  }

  /* Não é necessário .mobile-menu .nav-list aqui, já está definido acima */

  .logo {
    display: none; /* Se a logo some no mobile */
  }

  .nav-bar { /* Ajuste o alinhamento da nav-bar no mobile se a logo sumir */
    justify-content: flex-end; /* Alinha o ícone do menu à direita */
  }

  header {
    justify-content: flex-end; /* Alinha o ícone do menu à direita */
  }
}

/* Container para centralizar conteúdos */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* RODAPÉ */
.rodape {
  
  background-color: #72b8f5;
  color: #000000;
  padding: 30px 20px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 14px;
  flex-shrink: 0;
}

.rodape a {
  color: #0011ff;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.rodape a:hover {
  color: #54b754;
}

.rodape-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  text-align: center;
}

.rodape-centro {
  flex: 1;
}

.img-right img {
  width: 200px;
  height: auto;
}

.img-left img {
  width: 300px;
  height: auto;
}

@media (max-width: 768px) {
  .rodape-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .img-left img,
  .img-right img {
    margin: 20px 0;
  }
}

/* SOCIAL ICONS */
.contato-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 14px;
}

.contato-social a {
  text-decoration: underline;
  color: #0011ff;
}

.contato-social a:hover {
  color: #54b754;
}

.contato-social img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-icons img:hover {
  filter: brightness(0.8) invert(0);
  transform: scale(1.3);
}

/* Se tiver hr antes do footer */
hr {
  border: none;
  height: 1px;
  background-color: #000000;
  margin-bottom: 0;
}

/* BOTÃO WHATSAPP FLOTAANTE */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.whatsapp-float:hover {
  background-color: #128c4a;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
  pointer-events: none;
}

/* BOTÃO CONTATO */
.btn-cta {
  background-color: #54b754;
  color: white;
  padding: 8px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  display: block;
  width: fit-content;
  margin: 0 auto;
}

.btn-cta:hover {
  background-color: #3d8b3d;
}

/* Seções básicas */
section {
  padding: 1rem 1rem;
}

.resumo, .noticias-index, .galeria, .participe {
  background-color: rgba(255, 255, 255, 0.948);
  margin: 0 auto 2rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  max-width: 95%;
}

h2 {
  color: #004080;
  margin-bottom: 1rem;
  text-align: center;
}

/* Resumo */
.resumo p {
  max-width: 700px;
  margin: 0 auto 1rem;
  font-size: 1.1rem;
  text-align: center;
}

.btn-link {
  display: block;
  width: max-content;
  margin: 0 auto;
  color: #004080;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

/* Notícias */
.noticias ul { /* Correção: a classe no HTML é noticias-index, mas essa regra é genérica para 'noticias' */
  max-width: 800px;
  margin: 0 auto 1rem;
  list-style: none;
}

.noticias ul li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
}

.noticias ul li strong {
  color: #004080;
}

/* Galeria */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 15px;
  max-width: 960px;
  margin: 0 auto;
}

.galeria-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.galeria-grid img:hover {
  transform: scale(1.05);
}

/* Participe */
.participe p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  text-align: center;
}
.participe .btn-cta {
  display: block;
  margin: 0 auto;
  text-align: center;
}

/* ATAS E ESTATUTO */
.grid-container {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

.grid-container h1 {
  margin-bottom: 30px;
  font-size: 28px;
  color: #ffffff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-content: center;
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* EMPURRA O FOOTER PARA BAIXO*/
.page-wrapper { /* Adicione esta classe ao <body> ou um wrapper principal se quiser usá-la */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* WIDGET INSTAGRAM*/
.instagram-widget {
  width: auto;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  justify-content: center;
}

/* AVISO DE COOKIES */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1e3c64;
  color: #fff;
  padding: 16px;
  text-align: center;
  font-size: 0.95rem;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
  display: none;
  border: 5px solid coral;
}

.cookie-banner a {
  color: coral;
  text-decoration: underline;
}

.cookie-banner button {
  background-color: #f6f6f6;
  color: #004080;
  border: none;
  margin-left: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.cookie-banner button:hover {
  background-color: #0064e6;
  color: white;
}