/* ==================================================
   HEADER — ANCESGEN
================================================== */

.ancesgen-header {
  max-width: 1450px;
  margin: 0 auto;
  padding: 30px 20px 0; /* 30 top, 20 laterais, 0 bottom */
  font-family: Arial, sans-serif;
  margin-bottom: -15px;
}

/* ==================================================
   BARRA SUPERIOR
================================================== */

.header-bar {
  display: flex;
  align-items: flex-end;          /* desce logo e hambúrguer */
  justify-content: space-between;
}

/* ==================================================
   LOGO
================================================== */

.header-logo img {
  max-width: 250px;               /* levemente menor e mais equilibrado */
  height: auto;
  display: block;
}

/* ==================================================
   MENU DESKTOP
================================================== */

.main-menu {
  display: flex;
  justify-content: flex-end;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.menu-list li a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
}

.menu-list li a:hover {
  color: #555;
  transition: color 0.2s ease;
}

/* ==================================================
   BOTÃO HAMBÚRGUER
================================================== */

.menu-icon {
  display: none;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;

  font-size: 22px;
  font-weight: bold;
  color: #000 !important;
  cursor: pointer;

  padding: 0;
  margin-bottom: 5px;
  position: relative;
  z-index: 9999;
}

/* remove QUALQUER efeito de fundo */
.menu-icon:hover,
.menu-icon:focus,
.menu-icon:active {
  background: none !important;
  color: #000 !important;
}

/* ==================================================
   LINHA DIVISÓRIA — DESTAQUE À ESQUERDA
================================================== */

.institucional-divisor {
  position: relative;
  height: 2px;
  background: #000;
  margin-top: 20px;
}

/* detalhe mais grosso À ESQUERDA */
.institucional-divisor::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 4px;
  background: #000;
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {

  .ancesgen-header {
    padding: 16px 20px 0;
  }

  /* mostra hambúrguer */
  .menu-icon {
    display: block;
    margin-left: auto;
  }

  /* MENU MOBILE — NÃO USAR display:none */
  .main-menu {
    display: flex;
    flex-direction: column;
    width: 100%;

    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition: max-height 0.35s ease, opacity 0.25s ease;
  }

  /* MENU ABERTO */
  .ancesgen-header.open .main-menu {
    max-height: 1000px; /* suficiente para todos os links */
    opacity: 1;
  }

  .menu-list {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .menu-list li a {
    width: 100%;
    padding: 14px 10px;
    font-size: 17px;
    border-bottom: 1px solid #ddd;
  }

}
@media (max-width: 768px) {

  .header-bar {
    flex-wrap: wrap;
  }

  /* MENU MOBILE */
  .main-menu {
    order: 3;
    width: 100%;
    display: block;

    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition: max-height 0.35s ease, opacity 0.25s ease;
  }

  .ancesgen-header.open .main-menu {
    max-height: 1000px;
    opacity: 1;
  }

  .menu-list {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .menu-list li a {
    width: 100%;
    padding: 14px 10px;
    font-size: 17px;
    border-bottom: 1px solid #ddd;
  }

}