body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
}

/* Pasek na górze */
#navbar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 90%;
  background-color: #111;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  border-radius: 20px;
  transition: border-radius 0.3s ease;
}

/* Logo z dodatkowym marginesem od lewej */
#logo {
  font-size: 20px;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: 10px;
}

/* Submenu: animacja rozwijania z użyciem transform: scaleY */
#mobileMenu {
  background-color: #111;
  position: fixed;
  top: 55px; /* Menu nachodzi na pasek o 5px (60px - 5px) */
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  padding: 20px;
  /* Ustawiamy tylko dolne rogi zaokrąglone */
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 90%; /* Taka sama szerokość jak navbar */
  max-width: 100%;
  z-index: 99;
  opacity: 0;
  pointer-events: none; /* wyłącza interakcję gdy niewidoczne */
  transition: transform 0.3s ease-out, opacity 0.3s ease;
}

/* Gdy submenu rozwinięte */
#mobileMenu.showMenu {
  transform: translateX(-50%) scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

/* Lista w submenu: elementy wyrównane do lewej */
#mobileMenu ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

/* Elementy listy: mniejsza odległość między elementami */
#mobileMenu li {
  margin: 5px 0;
}

/* Linki w submenu: czcionka 16px */
/* Linki w submenu: czcionka 16px */
#mobileMenu a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block; /* Zmiana na inline-block, aby background obejmował tylko tekst */
  transition: color 0.3s ease, background-image 0.3s ease, transform 0.3s ease;
  padding-left: 10px; /* Dodany odstęp z lewej */
  padding-right: 10px; /* Opcjonalnie, aby dodać przestrzeń po prawej stronie tekstu */
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Zmiana wyglądu linków po najechaniu: tło, odstępy i animacja przesunięcia */
#mobileMenu a:hover {
  background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
  border-radius: 15px; /* Zaokrąglenie tła */
}


#menuToggle {
  background-color: transparent;
  border: none;
  padding: 8px;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  left: -10px; /* Przesunięcie przycisku o 10px w lewo */
}

.line {
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  right: 0;
}

.top {
  top: 0;
  transform-origin: center;
  transform: translateY(3px);
}

.middle {
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s ease, transform 0.3s ease; /* Dodajemy animację transformacji */
}

.bottom {
  bottom: 0;
  transform-origin: center;
  transform: translateY(-3px);
}

#menuToggle.open .top {
  opacity: 0; /* Górna linia znika */
  transform: rotate(0deg) translateY(0); /* Górna linia przestaje być widoczna */
}

#menuToggle.open .middle {
  opacity: 1; /* Środkowa linia staje się widoczna */
  transform: translateY(0px) rotate(-45deg); /* Środkowa linia przesuwa się na miejsce górnej */
}

#menuToggle.open .bottom {
  transform: translateY(-10px) rotate(+45deg); /* Dolna linia pozostaje w tej samej pozycji */
}

