* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #3d1a6b, #260143, #19002b, #0c0014);
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* Efeito de partículas no fundo */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(183, 139, 250, 0.15);
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* Gradiente animado no background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(138, 92, 246, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(183, 139, 250, 0.2) 0%, transparent 60%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: -2;
  opacity: 0.7;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ------------------- Navbar Corrigida ------------------- */
header {
  background: transparent;
  color: #000000;
  height: 80px;
  padding: 0 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, transform 0.8s ease, opacity 0.8s ease;
  transform: translateY(-100px);
  opacity: 0;
  backdrop-filter: none;
}

header.show {
  transform: translateY(0);
  opacity: 1;
}

header.scrolled {
  background: rgba(25, 0, 43, 0.85);
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  position: relative;
}

/* CORREÇÃO DAS LOGOS - POSICIONAMENTO CORRETO */
.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  z-index: 1002;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.8s ease;
  opacity: 0;
  transform: translateY(-20px);
}

.logo.show img {
  opacity: 1;
  transform: translateY(0);
}

.logo img:hover {
  transform: scale(1.05);
}

.logo-left {
  margin-right: auto;
}

.logo-right {
  margin-left: auto;
}

.logo-right img {
  height: 50px !important;
}

/* NAVBAR CORRIGIDA - OTIMIZAÇÃO PARA MAIS ITENS */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px; /* Reduzido ligeiramente para caber mais itens */
  align-items: center;
  opacity: 0;
  transform: translateY(-20px);
  transition: transform 0.8s ease, opacity 0.8s ease;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.nav-links.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 1.05em; /* Tamanho da fonte mantido */
  padding: 6px 8px; /* Padding horizontal reduzido */
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a::before,
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #b78bfa;
  transition: width 0.3s ease;
}

.nav-links a::before { top: 0; }
.nav-links a::after { bottom: 0; }

.nav-links a:hover {
  color: #b78bfa;
}

.nav-links a:hover::before,
.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.ativo {
  color: #b78bfa;
}

.nav-links a.ativo::before,
.nav-links a.ativo::after {
  width: 100%;
}

/* ------------------- Dropdown Menu ------------------- */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.dropdown-toggle .fa-chevron-down {
  font-size: 0.7em;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle .fa-chevron-down {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: rgba(25, 0, 43, 0.98);
  backdrop-filter: blur(15px);
  min-width: 220px;
  padding: 10px 0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  border: 1px solid rgba(183, 139, 250, 0.2);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(183, 139, 250, 0.1), transparent);
  transition: left 0.5s ease;
}

.dropdown-item:hover::before {
  left: 100%;
}

.dropdown-item:hover {
  background: rgba(183, 139, 250, 0.15);
  color: #b78bfa;
  padding-left: 25px;
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.dropdown-item:hover i {
  transform: scale(1.2);
}

/* Estilo para o dropdown quando está ativo/aberto */
.dropdown-toggle.active {
  color: #b78bfa !important;
}

.dropdown-toggle.active::before,
.dropdown-toggle.active::after {
  width: 100% !important;
}

/* Item ativo no dropdown */
.dropdown-item.ativo-drop {
  color: #b78bfa;
  background: rgba(183, 139, 250, 0.1);
}

.dropdown-item.ativo-drop i {
  color: #b78bfa;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  z-index: 1001;
}

/* ===== Responsividade dropdown no mobile ===== */
@media (max-width: 1199px) {
  /* Ajustes para telas menores que 1200px */
  .nav-links {
    gap: 18px;
  }
  
  .nav-links a {
    padding: 6px 7px;
  }
}

@media (max-width: 1099px) {
  /* Ajustes adicionais para telas menores */
  .nav-links {
    gap: 15px;
  }
  
  .nav-links a {
    padding: 6px 6px;
  }
}

@media (max-width: 991px) {
  /* Menu lateral */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px; /* Aumentado para caber mais itens */
    background: rgba(25, 0, 43, 0.97);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding-top: 80px;
    transition: right 0.4s ease;
    z-index: 999;
    left: auto;
    right: -100%;
    transform: none;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
    transform: none;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    font-size: 1.1em;
    padding: 15px 25px;
    width: 100%;
    border-bottom: 1px solid rgba(183, 139, 250, 0.1);
  }

  /* Dropdown dentro do menu mobile: inicialmente escondido */
  .dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    margin-top: 0;
    gap: 0;
    width: 100%;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(20, 0, 35, 0.8);
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  /* Quando a classe .show for adicionada, mostra o submenu */
  .dropdown-menu.show {
    display: flex;
  }

  /* Um leve recuo visual para itens do dropdown */
  .dropdown-item {
    padding: 12px 25px;
    border-radius: 0;
  }

  /* Indica quando o toggle está ativo */
  .dropdown-toggle.active {
    color: #b78bfa;
  }
}

/* Garante que o dropdown no desktop mantenha comportamento anterior */
@media (min-width: 992px) {
  .dropdown-menu {
    display: block; /* controlado por .show no JS com opacity/visibility */
  }
}

/* ------------------- Conteúdo Principal ------------------- */
main {
  flex: 1;
  padding: 120px 5% 40px;
  color: #fff;
  position: relative;
  z-index: 1;
}

#Titulo {
  text-align: center;
  font-size: 2.8em;
  margin-bottom: 60px;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

#Titulo.show {
  opacity: 1;
  transform: translateY(0);
}

#Titulo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #b78bfa, #8a5cf6);
  border-radius: 2px;
}

/* ------------------- Layout dos Projetos - CARDS MAIS LARGOS ------------------- */
.projetos-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.projeto-card {
  background: rgba(101, 78, 163, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
  display: flex;
  flex-direction: column;
}

.projeto-card.show {
  opacity: 1;
  transform: translateY(0);
}

.projeto-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.projeto-header {
  display: flex;
  gap: 30px;
  padding: 30px;
  border-bottom: 1px solid rgba(183, 139, 250, 0.3);
}

.projeto-imagem {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.projeto-info-principal {
  flex: 1;
}

.projeto-titulo {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

.projeto-descricao {
  color: #d9c6ff;
  line-height: 1.7;
  font-size: 1.1em;
  margin-bottom: 20px;
}

.projeto-metadados {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  color: #b78bfa;
  background: rgba(183, 139, 250, 0.1);
  padding: 8px 15px;
  border-radius: 20px;
}

.projeto-conteudo {
  padding: 30px;
}

.projeto-detalhes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.projeto-participantes {
  background: rgba(25, 0, 43, 0.4);
  padding: 20px;
  border-radius: 12px;
}

.participantes-titulo {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 600;
}

.participantes-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.participante {
  background: rgba(183, 139, 250, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  color: #d9c6ff;
  transition: all 0.3s ease;
}

.participante:hover {
  background: rgba(183, 139, 250, 0.3);
  transform: translateY(-2px);
}

.projeto-ata {
  background: rgba(25, 0, 43, 0.4);
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #b78bfa;
}

.ata-titulo {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ata-conteudo {
  color: #d9c6ff;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 1em;
}

.documentos-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.documento-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(183, 139, 250, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.documento-item:hover {
  background: rgba(183, 139, 250, 0.2);
  transform: translateX(8px);
}

.documento-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(183, 139, 250, 0.2);
  border-radius: 8px;
  color: #b78bfa;
  font-size: 1.3em;
}

.documento-info {
  flex: 1;
}

.documento-nome {
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  font-size: 1em;
}

.documento-detalhes {
  font-size: 0.85em;
  color: #d9c6ff;
}

.documento-acoes {
  display: flex;
  gap: 8px;
}

.btn-documento {
  background: transparent;
  border: none;
  color: #b78bfa;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 1.1em;
}

.btn-documento:hover {
  background: rgba(183, 139, 250, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.projeto-status {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-ativo {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-concluido {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-planejamento {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.filtros-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filtro-btn {
  background: rgba(101, 78, 163, 0.5);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1em;
}

.filtro-btn:hover, .filtro-btn.active {
  background: rgba(183, 139, 250, 0.8);
  color: #260143;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(183, 139, 250, 0.3);
}

.sem-projetos {
  text-align: center;
  padding: 80px 20px;
  color: #d9c6ff;
  font-size: 1.3em;
  grid-column: 1 / -1;
}

/* ------------------- Modal de Documentos ------------------- */
.modal-content {
  background: linear-gradient(135deg, #3d1a6b, #260143);
  color: #fff;
  border: 1px solid rgba(183, 139, 250, 0.3);
  border-radius: 15px;
}

.modal-header {
  border-bottom: 1px solid rgba(183, 139, 250, 0.3);
}

.modal-footer {
  border-top: 1px solid rgba(183, 139, 250, 0.3);
}

.btn-close {
  filter: invert(1);
}

.btn-primary {
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #2575fc, #6a11cb);
}

.documento-preview {
  max-height: 500px;
  overflow-y: auto;
  padding: 20px;
  background: rgba(25, 0, 43, 0.5);
  border-radius: 10px;
}

.documento-preview img {
  max-width: 100%;
  border-radius: 8px;
}

/* ------------------- Footer ------------------- */
footer {
  background: #12001f;
  color: #fff;
  text-align: center;
  padding: 40px 5%;
  font-size: 0.9em;
  margin-top: auto;
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

footer.show {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------- Responsivo / Toggle Menu ------------------- */
@media(max-width: 992px) {
  .projeto-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .projeto-imagem {
    width: 100%;
    height: 250px;
  }
  
  .projeto-detalhes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media(max-width: 768px) {
  .hamburger {
    display: block;
    z-index: 1003;
  }
  
  .filtros-container {
    gap: 10px;
  }
  
  .filtro-btn {
    padding: 8px 18px;
    font-size: 0.9em;
  }
  
  #Titulo {
    font-size: 2.2em;
  }
  
  .projeto-header,
  .projeto-conteudo {
    padding: 20px;
  }
}

@media(max-width: 480px) {
  #Titulo {
    font-size: 1.8em;
    margin-bottom: 40px;
  }
  
  .projeto-header,
  .projeto-conteudo {
    padding: 15px;
  }
  
  .projeto-titulo {
    font-size: 1.5em;
  }
  
  .documento-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .documento-acoes {
    align-self: flex-end;
    width: 100%;
    justify-content: flex-end;
  }
  
  .logo img {
    height: 45px;
  }
  
  .logo-right img {
    height: 40px !important;
  }
}