/* HEADER CSS */
.header {
  position: sticky !important;
  top: 0px !important;
  z-index: 9998;
}

body header div div a {
  text-decoration: none;
}

/* Top bar */
#top-texts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  height: 50px;
  background-color: black;
  -webkit-tap-highlight-color: transparent;
}

#pagina-atual {
  background-color: #ff7e00;
  padding: 8px 20px;
  border-radius: 50px;
}

/* Logo area */
.header-logo {
  height: auto;
  width: 50px;
  max-width: 100%;
}

#header-logo {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1vw;
}

#header-h1 {
  font-size: 1.5em;
  color: #ff7e00;
  line-height: 0.9;
  text-decoration: none;
}

/* Navigation */
#header-sections {
  display: flex;
  gap: 2vw;
  align-items: center;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li {
  position: relative;
  display: inline-block;
  margin-right: 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font: 16px 'Roboto';
}

nav ul li a:hover {
  text-decoration: underline;
}

/* Smooth dropdown */
#drop-sobre {
  position: absolute;
  background-color: #4c4c4c;
  border-radius: 5px;
  padding: 10px;
  list-style: none;
  z-index: 1000;

  /* Start hidden with animation-ready props */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-5px);
  transition: opacity 0.3s ease, max-height 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

nav ul li:hover #drop-sobre {
  opacity: 1;
  max-height: 500px; /* enough space for content */
  transform: translateY(0);
  pointer-events: auto;
}

/* Hamburger icon */
#hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

#hamburger-menu span {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 4px 0;
}

/* Mobile menu */
@media (max-width: 768px) {
  #hamburger-menu {
    display: flex;
  }

  #nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: black;
    width: 100%;
    text-align: center;

    /* Animation-friendly hidden state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  }

  #nav-menu.active {
    max-height: 500px; /* big enough for menu */
    opacity: 1;
    transform: translateY(0);
  }

  #nav-menu li {
    margin: 10px 0;
  }

  #header-sections {
    justify-content: flex-end;
  }
}
