#menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;

  &:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: all;
  }

  &:focus-visible ~ .site-header .hamburger {
    outline: 3px solid var(--color-button-focus);
    outline-offset: 4px;
  }

  /* Animate bars into X */
  &:checked ~ header .hamburger .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  &:checked ~ header .hamburger .bar:nth-child(2) {
    opacity: 0;
  }
  &:checked ~ header .hamburger .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;

  .bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease; /* ← add transition */
  }
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 80px; /* ← starts below navbar */
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

  /* remove .close-btn since X is now on the hamburger itself */
  .close-btn {
    display: none;
  }

  .overlay-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;

    a {
      color: #212832;
      font-size: 2rem;
      font-family: "Poppins", sans-serif;
      font-weight: 500;
      text-decoration: none;
      display: inline-block;
      padding: 5px 20px; /* Makes the clickable area nice and big for thumbs */

      &:hover {
        opacity: 0.7;
      }
    }
  }
}

.site-header {
  width: 100%;
  display: flex;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  height: 80px;

  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 85%;
    max-width: 1200px;
    gap: 124px;

    a {
      text-decoration: none;
    }

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

      a {
        font-size: 55px;
        font-weight: 900;
        color: #ff0090;
      }
    }

    .nav-links {
      flex-grow: 1;
      display: flex;
      justify-content: space-around;
      align-items: center;
      list-style: none;
      gap: 24px;

      a {
        color: #212832;
        font-size: 22px;
        font-weight: 500;
      }
    }

    .nav-actions {
      display: flex;
      justify-content: space-around;
      align-items: center;
      gap: 16px;
      font-size: 22px;
      font-weight: 500;

      a {
        color: #ffffff;
      }

      .lang-dropdown {
        padding-left: 60px;
        position: relative;
        display: inline-block;

        .lang-checkbox {
          position: absolute;
          width: 1px;
          height: 1px;
          padding: 0;
          margin: -1px;
          overflow: hidden;
          clip: rect(0, 0, 0, 0);
          white-space: nowrap;
          border: 0;

          &:focus-visible ~ .current-lang {
            outline: 3px solid var(--color-button-focus);
            outline-offset: 4px;
          }
        }

        .current-lang {
          display: flex;
          align-items: center;
          gap: 4px;
          cursor: pointer;
          padding: 5px 10px;
          color: #ffffff;
          user-select: none;
        }

        .languagepicker {
          display: none;
          position: absolute;
          color: #ffffff;
          border-radius: 8px;
          list-style: none;
          min-width: 140px;
          background-color: rgba(255, 255, 255, 0.35);
          box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
          z-index: 100;
          padding: 0;
          margin: 0;
        }

        .lang-checkbox:checked ~ .languagepicker {
          display: block;
        }

        .arrow-down {
          display: inline-block;
          width: 0;
          height: 0;
          border-left: 5px solid transparent;
          border-right: 5px solid transparent;
          border-top: 5px solid;
          transition: transform 0.3s ease;
        }

        .lang-checkbox:checked ~ .current-lang .arrow-down {
          transform: rotate(180deg);
        }

        .languagepicker li a {
          display: flex;
          align-items: center;
          gap: 10px;
          padding: 10px 15px;
          color: #ffffff;
          text-decoration: none;
          font-size: 22px;

          &:hover {
            transform: scale(1.03);
          }
        }

        img {
          width: 24px;
        }
      }
    }
  }
}
@media (max-width: 1080px) {
  .site-header {
    .navbar {
      gap: 0px;
      .nav-actions {
        .lang-dropdown {
          padding-left: 120px;
        }
      }
    }
  }
}

@media (max-width: 820px) {
  .site-header {
    .navbar {
      gap: 0;
      width: 90%;

      .nav-links {
        display: none;
      }

      .nav-actions {
        font-size: 16px;

        .lang-dropdown {
          padding-left: 0;

          .languagepicker li a {
            padding: 10px 5px;
          }
        }
      }
    }
  }

  .hamburger {
    display: flex;
  }

  .nav-overlay {
    display: flex;
  }
}

@media (max-width: 600px) {
  .site-header {
    .navbar {
      width: 95%;

      .nav-actions {
        gap: 4px;
      }
    }
  }
}
