header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background-color: var(--bg-color);
  box-shadow: 0 0 1rem var(--bg-color);
  z-index: 10;
}

header ul li {
  display: inline-block;
  list-style: none;
  margin: 1.1rem 1.2rem;
}

header ul li a {
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  color: var(--white);
  text-shadow: .2rem .2rem .3rem #000;
}

header ul li a::after {
  content: '';
  width: 0;
  height: 0.2rem;
  background-color: var(--main-color);
  position: absolute;
  left: 50%;
  bottom: -.5rem;

  transition: width .4s ease, left .4s ease;
}

header ul li a:hover::after {
  width: 100%;
  left: 0;
}

header .bx {
  display: none;
}


/* ----------- Code for responsive design ----------- */
@media only screen and (max-width: 1010px) {
  header ul li a {
    font-size: 1rem;
  }
}

@media only screen and (max-width: 750px) {
  header ul li a {
    font-size: .75rem;
  }
}

@media only screen and (max-width: 650px) {
  header {
    justify-content: end;
    background: transparent;
    box-shadow: none;
    position: relative;
    background-color: var(--bg-color);
  }

  header .bx {
    display: block;
    font-size: 2.2rem;
    color: var(--white);
  }

  header ul {
    background: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--second-bg-color);
    position: fixed;
    top: 0;
    right: -12.5rem;
    width: 12.5rem;
    height: 100vh;
    margin: 0;
    padding-top: 3rem;

    transition: right .5s ease;
  }

  header ul li {
    display: block;
    margin: 1.2rem;
  }

  header ul li a {
    font-size: 1.1rem;
    font-weight: 700;
  }

  header .bx-menu-alt-right {
    font-size: 2.8rem;
    margin: 1rem 1rem 0 0;
  }

  header ul .bx {
    position: absolute;
    top: 1rem;
    left: 1rem;
    cursor: pointer;
  }
}

/* ljiedeci je na 390 ako treba*/