.header-main {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #333;
  padding: 1rem 2rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  font-family: 'Poppins', sans-serif;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-main.is-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.header-main nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo e Título do Site */
.header-main nav a.brand {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #3013de;
  text-decoration: none;
  transition: color 0.3s ease;
}

.header-main nav a.brand:hover {
  color: #1e3a8a;
}

.header-main nav a.brand img {
  height: 2rem;
  width: 2rem;
  margin-right: 0.75rem;
}

.desktop-nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Mulish', sans-serif;
}

.nav-link {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
  color: #333;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: #3013de;
}

.nav-link .link-text {
  position: relative;
  display: inline-block;
}

.nav-link .link-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #3013de;
  transition: width 0.3s ease-out;
}

.nav-link:hover .link-text::after,
.nav-link.is-active .link-text::after {
  width: 100%;
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.25rem;
  background-color: #3013de;
  color: #ffffff !important;
  border-radius: 50em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background-color: #1e3a8a;
  transform: translateY(-1px);
}

.nav-cta .link-text::after {
  display: none;
}

#mobile-menu-button {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
}

#mobile-menu-button span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: #3013de;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

#mobile-menu-button span:nth-child(1) { top: 14px; }
#mobile-menu-button span:nth-child(2) { top: 19px; }
#mobile-menu-button span:nth-child(3) { top: 24px; }

#mobile-menu-button.is-active span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}

#mobile-menu-button.is-active span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-button.is-active span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

#mobile-menu {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  font-family: 'Mulish', sans-serif;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  z-index: 45;
}

#mobile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

#mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: #1f2933;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.active a:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.active a:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.active a:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.active a:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.active a:nth-child(5) { transition-delay: 0.25s; }

#mobile-menu a:hover,
#mobile-menu a.is-active {
  color: #3013de;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .header-main nav {
    padding: 0 1rem;
  }

  .desktop-nav-links {
    display: none;
  }

  #mobile-menu-button {
    display: block;
  }
}

@media (max-width: 320px) {
  .header-main {
    padding: 0.75rem 1rem;
  }

  .header-main nav a.brand img {
    height: 1.75rem;
    width: 1.75rem;
    margin-right: 0.5rem;
  }

  .header-main nav a.brand {
    font-size: 1.25rem;
  }

  #mobile-menu a {
    font-size: 1.15rem;
  }
}
