/* ====== IKONER ====== */
.menu .icon {
  width: 20px;
  height: 20px;
  color: var(--isvit);
  transition: color 0.3s ease, transform 0.3s ease;
}

.spacer_nav {
	height: 70px;
	display: inline-block;
}


/* Pulsanimation vid hover */
.menu li a:hover .icon {
  color: var(--salviagron);
  animation: icon-pulse 0.6s ease;
}

@keyframes icon-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--djup-gran);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  transition: transform 0.3s ease-in-out, background 0.3s ease-in-out;
}

.navbar.hidden {
  transform: translateY(-100%);
}

/* ====== LOGO ====== */
.logo {
  /* Anpassa logotyp vid behov */
}

/* ====== DESKTOP MENY ====== */
.desktop .menu {
  display: flex;
  gap: 10px;
}

ul.menu li {
  list-style: none;
}

/* Menylänk med ikon ovanför text */
.menu li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  text-align: center;
  text-decoration: none;
  color: var(--isvit);
  padding: 10px 15px;
  font-size: 0.9rem;
  transition: color 0.3s ease-in-out;
}

.menu li a:hover,
.menu li a.active {
   color: var(--salviagron);
}

li.current_page_item a {
   color: var(--salviagron);
}



ul.menu li {
  list-style: none;
  border-right: 0.1rem solid rgba(255, 255, 255, 0.23);
}

/* Första li: lägg även till border-left */
ul.menu li:first-child {
  border-left: 0.1rem solid rgba(255, 255, 255, 0.23);
}

/* ====== HAMBURGARMENY (DESKTOP: DOLD) ====== */
.hamburger {
  display: none;
}

/* ====== MOBILMENY ====== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100vh;
  background: #2e2e2e;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease-in-out;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 49;
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  margin-top: 80px;
}

.mobile-menu li {
  width: 100%;
  border-bottom: 1px solid #0d0d0d;
}

.mobile-menu li:last-child {
  border-bottom: none;
}

.mobile-menu a {
  font-size: 18px;
  text-decoration: none;
  color: #f1f1f1;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 15px 0;
  margin-left: 20px;
}

/* ====== RESPONSIVT ====== */
@media (max-width: 768px) {
  .desktop .menu {
    display: none;
  }

  .hamburger {
    display: flex;
    width: 40px;
    height: 40px;
    background: #151515;
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 5px;
    font-size: 40px;
    position: fixed;
    top: 15px;
    left: 20px;
    z-index: 60;
    transition: all 0.3s ease-in-out;
  }

  .menu li a {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 0.5em;
  }

  .menu .icon {
    width: 22px;
    height: 22px;
  }

  .logo {
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: auto;
  }
}
