:root {
  --primary-blue: #3b4a96;
  --secondary-blue: #4f60d1;
  --nav-link-color: #333;
  --white-color: #ffffff;
}

.navbar {
   position: fixed;
  top: 0;
  left: 0; 
  width: 100%; 
  z-index: 999;
  height: 80px;
  width: 100%;
  background-color: var(--white-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: grid;
  align-items: center;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nav-center {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.logo {
  height: 60px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--nav-link-color);
  font-size: 16px;
  text-transform: capitalize;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a:hover {
  color: var(--primary-blue);
  text-decoration: none;
}

.dropdown-icon {
  margin-top: 2px;
}

/* CTA Button   */
.cta-button {
  display: flex;
  align-items: center;
  background-color: var(--primary-blue);
  color: var(--white-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  overflow: hidden;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.cta-button:hover {
  background-color: var(--secondary-blue);
  color: var(--white-color);
  text-decoration: none;
}

.cta-button {
  padding: 10px 24px;
}

.icon-wrapper {
  background-color: var(--secondary-blue);
  display: grid;
  place-items: center;
  padding: 12px;
  margin-left: 16px;
  margin-right: -18px;
}

.icon-wrapper:hover {
  background-color: var(--primary-blue);
}



/* Make the parent li a positioning context */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 150%;
  left: -20px;
  background-color: var(--white-color);
  list-style: none;
  padding: 1rem;
  width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown-menu li {
  margin-bottom: 0.5rem;
}

.dropdown-menu li:last-child {
  margin-bottom: 0;
}

.dropdown-menu a {
  color: var(--nav-link-color);
  font-weight: 400;
  width: 100%;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: #f0f2f5;
  color: var(--primary-blue);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.dropdown-icon {
  transition: transform 0.3s ease;
}

/* Toggle Button  */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--primary-blue);
  transition: all 0.3s ease-in-out;
}
@media screen and (max-width: 1024px) {
  .nav-links {
    gap: 1.25rem;
    padding: 1rem 0; 
  }
  .nav-links a {
    padding: 0.5rem 1rem;
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {

  .nav-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 2rem;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 1001;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 350px;
    background-color: var(--white-color);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);

    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.4s ease-in-out;
    z-index: 1000;
  }

  .nav-links.show-links {
    right: 0;
  }

  .nav-links a {
    font-size: 18px;
  }


  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    width: 100%;
    padding: 1rem 0 0 1rem;

    display: none;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown.active .dropdown-icon {
    transform: rotate(180deg);
  }
}