/* HEADER */
/* =========================================
   ESTILO GERAL (Desktop) - Mantendo o seu
   ========================================= */
.container-pai {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  justify-content: space-between;
  align-items: center;

  background-color: var(--cor-roxo-claro);
  height: 95px;
  padding: 0 20px;

  box-sizing: border-box;
}

/* Botão Mobile (Escondido no PC) */
#btn-mobile {
  display: none;
}

/* Menu principal */
.nav-pai ul {
  display: flex;
  align-items: center;
  gap: 30px;

  margin: 0;
  /* Removido margin-top para centralizar */
  padding: 0;
  list-style: none;
  font-size: 20px;
}

.nav-pai li {
  position: relative;
}

.nav-pai li a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: "Karla", sans-serif;
  color: var(--cor-branca);
  padding: 10px 15px;
  transition: background 0.3s;
}

.nav-pai li a:hover {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

/* Seta */
.seta-header {
  width: 12px;
  transition: transform 0.3s;
}

.nav-pai li:hover .seta-header {
  transform: rotate(180deg);
}

/* Dropdown Desktop */
ul.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--cor-roxo-claro);
  border-radius: 5px;
  list-style: none;
  padding: 10px 0;
  margin: 0;
  display: none;
  min-width: 180px;
  z-index: 999;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-pai li:hover ul.dropdown {
  display: block;
}

ul.dropdown li a {
  display: block;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  /* Ajustado borda */
}

ul.dropdown li a:hover {
  background: var(--cor-laranja);
}

/* Botão Entrar */
.button-header {
  background-color: var(--cor-laranja);
  color: #fafafa;
  border: none;
  /* Melhor usar border none */
  border-radius: 30px;
  padding: 10px 24px;
  /* Ajustado padding */
  font-size: 18px;
  /* Ajustado fonte */
  cursor: pointer;
  font-family: "Karla", sans-serif;
}

.button-header:hover {
  background-color: var(--cor-amarelo);
  color: var(--cor-roxo-claro);
}

/* RESPONSIVIDADE */

@media (max-width: 1100px) {
  /* Ajuste do Container */
  .container-pai {
    padding: 0 20px;
  }

  /* Mostrar Botão Hambúrguer */
  #btn-mobile {
    display: flex;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    gap: 0.5rem;
    z-index: 200;
  }

  /* Ícone Hambúrguer (3 linhas) */
  #hamburger {
    border-top: 2px solid var(--cor-branca);
    width: 25px;
    display: block;
  }

  #hamburger::after,
  #hamburger::before {
    content: "";
    display: block;
    width: 25px;
    height: 2px;
    background: var(--cor-branca);
    margin-top: 5px;
    transition: 0.3s;
    position: relative;
  }

  /* Configuração do Menu Deslizante */
  .nav-pai {
    display: block;
    /* Importante para a animação */
    position: absolute;
    width: 100%;
    top: 95px;
    right: 0;
    background: var(--cor-roxo-claro);
    height: 0;
    /* Começa fechado */
    transition: 0.5s;
    z-index: 1000;
    visibility: hidden;
    overflow-y: hidden;
  }

  .nav-pai.active {
    height: calc(100vh - 95px);
    /* Ocupa a tela toda */
    visibility: visible;
    overflow-y: auto;
  }

  /* Lista no Mobile */
  .nav-pai ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 0;
  }

  .nav-pai li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-pai li a {
    justify-content: center;
    padding: 20px;
  }

  /* Botão Entrar no Mobile */
  .button-header {
    margin-top: 20px;
    width: 80%;
  }

  /* Dropdown no Mobile (Estático) */
  ul.dropdown {
    position: static;
    display: block;
    background-color: rgba(0, 0, 0, 0.1);

    box-shadow: none;
    min-width: 100%;
    padding: 0;
  }

  ul.dropdown li a {
    padding-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Animação do X no botão */
  .nav-pai.active ~ #btn-mobile #hamburger {
    border-top-color: transparent;
  }

  .nav-pai.active ~ #btn-mobile #hamburger::before {
    transform: rotate(135deg);
  }

  .nav-pai.active ~ #btn-mobile #hamburger::after {
    transform: rotate(-135deg);
    top: -7px;
  }

  /* 1. Dropdown começa FECHADO no celular */
  ul.dropdown {
    position: static;
    display: none;

    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: none;
    padding: 0;
    margin-top: 0;
  }

  ul.dropdown.ativar-dropdown {
    display: block;

    animation: surgirSuave 0.3s ease;
  }

  @keyframes surgirSuave {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .seta-girada {
    transform: rotate(180deg) !important;
  }
}
