* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.header {
  position: fixed;
  height: 80px;
  width: 100%;
  background-color: whitesmoke;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4%;
  /* cursor: pointer; */
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header__logo {
  height: 60px;
  width: 100px;
  cursor: pointer;
  align-self: center;
}

.logo {
  height: 100%;
  width: 100%;
}

nav {
  flex: 1;
  /* let nav take up remaining space */
  display: flex;
  justify-content: flex-end;
  /* push nav content toward the right, optional */
}

nav a {
  text-decoration: none;
  color: inherit;
  font-size: 1em;
  padding: 8px 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
  /* height: 100px; */
}


header nav a:hover {
  background-color: #01a9a175;
  color: #0f4c81;
  border-radius: 5px;
}

header nav a{
  font-weight: 600;
}
.navbar__brand:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.header__logo:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

nav ul {
  list-style-type: none;
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  max-width: 500px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* turn the three bars into an X when open */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: 80px;
    /* sits just below the header */
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: whitesmoke;
    transition: max-height 0.3s ease;
    flex: none;
  }

  nav.active {
    max-height: 300px;
    /* enough to reveal all links */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  nav ul {
    flex-direction: column;
    max-width: 100%;
    padding: 10px 5%;
    gap: 5px;
  }

  nav a {
    display: block;
    padding: 12px 0;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 15px 5%;
  }

  nav ul {
    max-width: 100%;
  }

  .loan-calculator {
    padding: 20px 10px;
  }
}

@media (max-width: 480px) {
  .header__cta {
    padding: 8px 14px;
    font-size: 0.85em;
  }
}