/* ================================================= */
/* CSS DO CABEÇALHO (VERSÃO FINAL E ESTÁVEL)         */
/* ================================================= */

/* --- Container Principal do Cabeçalho --- */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-link { text-decoration: none; }

/* --- Barra Superior --- */
.top-bar {
  background-color: #002244;
  color: #fff;
  padding: 6px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
}
.top-bar .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.left-info { display: flex; gap: 30px; align-items: center; }
.left-info a.info-link { color: #fff; text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.left-info a.info-link:hover { color: #ffcc00; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { color: #fff; text-decoration: none; font-size: 1rem; transition: color 0.3s ease; }
.social-icons a:hover { color: #ffcc00; }

/* --- Cabeçalho Principal --- */
.main-header {
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f5f5f5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.logo-area .logo img { height: 55px; width: auto; }

/* --- Distribuição do conteúdo --- */
.logo-area {
  flex: 0 0 auto;
}
.nav-menu {
  flex: 1;
  display: flex;
  justify-content: center;
}
.header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 25px;
}

/* --- Menu de Navegação (Desktop) --- */
.nav-menu ul { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; gap: 25px; }
.nav-menu ul li a { color: #003366; text-decoration: none; font-weight: 500; padding: 10px 0; position: relative; font-family: 'Poppins', sans-serif; font-size: 15px; }
.nav-menu ul li a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0%; height: 3px; background-color: #ffcc00; transition: width 0.3s ease; }
.nav-menu ul li a:hover { color: #0055a4; }
.nav-menu ul li a:hover::after { width: 100%; }
.has-submenu { position: relative; }

/* --- Dropdown --- */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 5px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
}
.has-submenu:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a { padding: 8px 15px; display: block; white-space: nowrap; font-size: 14px; }
.arrow-icon { font-size: 0.7em; margin-left: 5px; transition: transform 0.3s ease; }


/* --- Botão Matrícula --- */
.matricula-btn { background-color: #003366; color: #fff !important; padding: 10px 25px; border-radius: 50px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; }
.matricula-btn:hover { background-color: #ffcc00; color: #003366 !important; }

.matricula-btn-mobile {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background-color: #003366;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}
.matricula-btn-mobile:hover {
    background-color: #ffcc00;
    color: #003366 !important;
}

.mobile-only { display: none; }

/* --- Ícone Hambúrguer (escondido no desktop) --- */
.hamburger { display: none; cursor: pointer; background: transparent; border: none; z-index: 1001;}
.hamburger span { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: #003366; }

/* --- ESTILOS RESPONSIVOS (MOBILE) --- */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 100px 30px 30px 30px;
    transition: right 0.4s ease-in-out;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .nav-menu ul li { width: 100%; }
  .nav-menu ul li a { width: 100%; display: flex; justify-content: space-between; align-items: center; }
  
  /* REGRA MODIFICADA */
  .nav-menu ul li.mobile-only {
      margin-top: 15px; /* Espaço superior reduzido */
      padding-top: 15px; /* Espaço interno superior reduzido */
      border-top: 1px solid #f0f0f0;
  }

  .nav-menu ul li.mobile-only a {
    justify-content: center;
  }

  .submenu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.4s ease-in-out;
    width: 100%;
  }

  .submenu.open {
    max-height: 500px;
  }

  .hamburger { display: flex; flex-direction: column; justify-content: space-around; }
  .desktop-only { display: none !important; }
  .mobile-only { display: list-item; }

  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
}

@media (max-width: 768px) {
    .top-bar .header-container {
        justify-content: space-between;
    }
    .hide-on-mobile {
        display: none;
    }
}