.navbar {
  display: flex;
  width: 100vw;
  height: 70px;
  color: #ffffff;
  background-color: #2c2c2c;
  border-bottom: 1px solid #404040;
  justify-content: space-between;
  flex-direction: row;
  text-align: center;
  position: relative;

  .nav-container {
    display: block;
    position: relative;
    height: 60px;
    width: 60px;

    li {
      list-style: none;
    }
    a {
      text-decoration: none;
      color: #0e2431;
      font-weight: 500;
      font-size: 1.2rem;
      &:hover {
        text-decoration: underline;
        font-weight: bolder;
      }
    }
    a:active {
      text-decoration: underline;
      font-weight: bolder;
    }

    .checkbox {
      position: absolute;
      display: block;
      height: 32px;
      width: 32px;
      top: 20px;
      left: 20px;
      z-index: 15;
      opacity: 0;
      cursor: pointer;
    }

    .hamburger-lines {
      display: block;
      height: 18px;
      width: 26px;
      position: absolute;
      bottom: 15px;
      left: 20px;
      z-index: 12;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .line {
        display: block;
        height: 2px;
        width: 100%;
        border-radius: 1px;
        background: #ffffff;
        transition: all 0.3s ease;
      }

      .line1 {
        transform-origin: 0% 0%;
        transition: transform 0.3s ease;
      }
      .line2 {
        transition: transform 0.2s ease;
      }
      .line3 {
        transform-origin: 0% 100%;
        transition: transform 0.3s ease;
      }
    }
  }

  .menu-items {
    display: flex;
    align-items: center;
    width: 40vw;
    max-width: 300px;
    min-width: 250px;
    z-index: 10;

    padding-top: 100px;
    background-color: #1a1a1a;
    border-right: 1px solid #333333;
    height: 100vh;
    transform: translate(-150%);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease;
    text-align: left;
    position: relative;

    li {
      margin-bottom: 0;
      font-size: 1.1rem;
      font-weight: 400;
      position: relative;
      width: 100%;

      a {
        color: #cccccc;
        text-decoration: none;
        display: block;
        padding: 16px 24px;
        border-bottom: 1px solid #2a2a2a;
        transition: all 0.2s ease;
        font-family: 'Cascadia Code', 'Roboto', sans-serif;
        font-size: 0.95rem;
        text-transform: lowercase;

        &:hover {
          background-color: #242424;
          color: #ffffff;
          padding-left: 32px;
        }

        &:active {
          background-color: #333333;
        }
      }
    }
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    padding-top: 5px;
    font-family: "Tagesschrift", sans-serif;
    text-decoration: none;

    a {
      color: inherit;
      text-decoration: none;
      font-size: inherit;
      font-weight: inherit;
      font-family: inherit;
      transition: color 0.2s ease;
    }
    
    a:hover {
      color: #cccccc;
      text-decoration: none;
    }
    
    a:visited {
      color: inherit;
    }
  }

  .right-container {
    display: flex;
    align-items: center;
    justify-content: center;

    i {
      font-size: 22px;
      color: #ffffff;
      cursor: pointer;
      margin-right: 20px;
      transition: color 0.2s ease;

      &:hover {
        color: #cccccc;
      }
    }
    
    #search-icon {
      padding: 8px;
      border-radius: 4px;
      transition: all 0.2s ease;
      
      &:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.1);
      }
      
      &:active {
        transform: scale(0.95);
      }
    }
  }
}

@media (max-width: 768px) {
  .navbar {
    .right-container {
      width: 10%;
      
      i {
        margin-right: 15px;
        font-size: 20px;
      }
    }
    
    .menu-items {
      width: 100vw;
      max-width: none;
      min-width: none;
      
      li a {
        font-size: 1rem;
        padding: 18px 24px;
      }
    }
  }
}

.nav-container input[type="checkbox"]:checked ~ .menu-items {
  transform: translateX(0%);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
  transform: rotate(45deg);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
  transform: scaleY(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
  transform: rotate(-45deg);
}
