.header-container {
  text-align: center;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  background: var(--light-card);
  box-shadow: 0 2px 5px var(--shadow);
  padding: 1rem clamp(20px, 5vw, 40px);
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: height 0.3s ease, background 0.3s ease, top 0.3s ease;
}

/* Navbar positioning when toggle container is present */
.toggle-container ~ .navbar {
  top: 66px;
}

.navbar.scrolled {
  height: 70px;
  background: var(--primary);
  top: 0;
}

.navbar.scrolled .nav-links a,
.navbar.scrolled .mobile-menu-btn {
  color: #ffffff;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 180px;
  object-fit: contain;
}

.normal-logo {
  display: block;
}

.sticky-logo {
  display: none;
}

.navbar.scrolled .normal-logo {
  display: none;
}

.navbar.scrolled .sticky-logo {
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
  z-index: 1;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links .cta-nav {
  background: var(--primary);
  color: #ffffff !important;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  font-weight: 500;
}

.nav-links .cta-nav:hover {
  background: var(--primary-light);
}

.nav-links .cta-nav:hover::after,
.nav-links .cta-nav.active::after {
  width: 0;
}

.navbar.scrolled .nav-links .cta-nav {
  background: var(--secondary);
}

.navbar.scrolled .nav-links .cta-nav:hover {
  background: var(--secondary);
}

.navbar.scrolled .nav-links .cta-nav:hover::after,
.navbar.scrolled .nav-links .cta-nav.active::after {
  width: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
  color: var(--secondary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--light-card);
    padding: 1rem;
    box-shadow: 0 5px 15px var(--shadow);
    gap: 0.5rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text) !important;
  }

  .nav-links .cta-nav {
    margin: 0.5rem 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .navbar.scrolled .nav-links a {
    color: var(--text) !important;
  }

  .navbar.scrolled .nav-links .cta-nav {
    color: #ffffff !important;
  }
}

