/* Hamburger button */
.hamburger {
  position: fixed;
  top: 50px;
  right: 50px;
  width: 30px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 10001;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #010c80;
  border-radius: 2px;
  transition: 0.3s;
  transform-origin: center;
}

.hamburger.white span {
    background-color: white;
}

.hamburger.white.open span {
  background-color: black;
}

.hamburger.open span {
    color: black;
}

/* Transform hamburger into X */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  color: #646cff;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  color: #646cff;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  color: #646cff;
}

/* Overlay menu */
.overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 100%;
  background-color: white;
  overflow-x: hidden;
  transition: 0.3s;
  z-index: 10000;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.overlay.show {
  width: 50%; /* Right half of the screen */
}

.overlay ul {
  list-style: none;
  padding: 100px;
  text-align: right;
}

.overlay ul li {
  margin: 20px 0;
  font-size: 37px;
  cursor: pointer;
}

.overlay ul li a {
  color: black;           
  font-weight: 100;       
  text-decoration: none;  
  transition: color 0.3s; 
}

.overlay ul li a:hover {
  color: #010c80;
}

@media (max-width: 768px) {
  .hamburger {
    top: 30px;
    right: 40px;
  }
  .overlay.show {
    width: 100%;
  }

  .overlay ul {
    text-align: right; 
  }

  .overlay ul li {
    font-size: 36px;
    margin: 15px 0;
  }
}
