/* TOPO CONTATOS */
.top-bar {
  position:absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #8B0000;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.5rem 5.2rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}
.contact-info {
  display: flex;
  flex: 1;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}
.contact-info span {
  margin-right: 1.5rem;
  white-space: nowrap;
  font-size: 1rem;
}
.contact-info span:nth-child(3) {
  flex: 1;
  text-align: center;
}
.top-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem; /* Aumenta tamanho dos ícones */
  margin-left: auto;
}
.top-icons a {
  margin-left: 0.8rem;
  color: #fff;
  text-decoration: none;
}
/* HEADER PRINCIPAL */
.header {
  position:relative;
  width: 100%;
  background-color: white;
  top: 42px; /* espaço para o top-bar */
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
}
.nav-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.nav-desktop {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.nav-desktop a {
  font-size: 18px;
  color: #0f0f0f;
}
/* BOTÃO INSCRIÇÃO */
.btn-inscricao {
  left: 14.2rem !important; 
  background-color: #8B0000;
  color: #fff!important;
  padding: 0.4rem 1.2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
  margin-top: -9px;
}
.btn-wrapper.desktop-only {
  margin-left: 2.50rem; /* <- NOVO */
}
.logo img {
  width: 100px;
  height: 60px;
  margin-left: -1rem;
}
.nav-desktop a {
  margin-left: 1.2rem;
  color: #080808;
  font-weight: 500;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: #f7f4f4;
  background-color: #8B0000;
}
.header-icons {
  display: none;
}
.menu-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #8B0000;
  cursor: pointer;
  z-index: 1001; /* Garantir que esteja acima */
  position: relative; /* Necessário para o z-index funcionar */
}
/* MOBILE: Ajustes Top Bar */
@media (max-width: 768px) {
  .top-bar {
    position: relative;
    top: 0;
    left: 0;
    height: 32px;
    width: 100%;
    z-index: 1000;
    background-color: #8B0000;
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.2rem;
  }

  .top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0rem;
  }

  .contact-info {
    justify-content: center;
    flex-wrap: wrap;
    margin-right: auto;
    gap: 1.8rem;
  }

  .contact-info span:nth-child(3),
  .top-icons {
    display: none;
  }

  .header {
    top: 32px; 
  }
  /* HEADER MOBILE */
  .header .container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-wrapper {
    flex: none;
    display: none; /* esconde menu desktop */
  }

  .header-icons {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    order: 1; /* Agora fica na ESQUERDA */
  }

  .btn-inscricao {
   display: none;
  }
  .logo {
    flex-shrink: 0;
    order: 3; /* Agora fica na DIREITA */
  }
}
.offcanvas-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 270px;
  height: auto;
  background-color: #080808; /* Azul sombrio */
  color: #fff;
  padding: 20px;
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.offcanvas-menu.show {
  right: 0;
}
.close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  align-self: flex-end;
  cursor: pointer;
}

.offcanvas-nav a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  font-weight: bold;
  transition: color 0.2s;
}
.offcanvas-nav a:hover {
  color: #00bcd4;
}
.social-icons {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}
.social-icons a {
  color: #fff;
  font-size: 1.2rem;
  transition: color 0.2s;
}
.social-icons a:hover {
  color: #00bcd4;
}
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  z-index: 999;
}
.overlay.show {
  display: block;
}
.desktop-only {
  display: inline-block;

}
.mobile-only {
  display: none;
}
@media (max-width: 991px) {
  .top-bar {
    position: absolute; /* ou static, se preferir */
    height: 32px;
    padding: 0.2rem 0.5rem;
  }
.header {
  top: 32px; 
} 

  .header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    position: relative;
  }
  .logo {
    flex-shrink: 0;
    order: 3; 
  }
  .nav-wrapper {
    display: none; /* Esconde o menu completo no mobile */
  }
  .btn-inscricao.mobile-only {
    display: none;
    
  }
  .header-icons.mobile-only {
    display: flex;
    gap: 1rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
  }
  .header-icons.mobile-only a,
  .header-icons.mobile-only button {
    background: none;
    border: none;
    color: #8B0000;
  }

  .desktop-only {
    display: none;
  }

  .header .container {
    position: relative;
    height: 60px;
  }

  .logo img {
    height: 40px;
    margin-left: 0px;
  } 
}

@media (max-width: 400px) {
  .top-bar {
    font-size: 0.7rem; /* Reduz tamanho da letra */
    padding: 0.2rem 0.3rem;
    height: auto; /* Permite altura automática */
  }

  .contact-info span {
    font-size: 0.7rem; /* Reduz ainda mais nos spans */
    margin-right: 0.8rem;
  }

  .header {
    top: auto; /* Remove valor fixo */
    margin-top: 32px; /* Deixa espaço abaixo da top-bar */
  }

  .logo img {
    width: 90px;
    height: 45px;
  }
}