/* Keyframes for the animation */

.menu {
  display: flex;
  margin: 0;
  padding: 0;
}
.menu li {
  list-style: none;
}
.menu li a {
  text-decoration: none;
  font-size: 1.8rem;
}
.menu li a:hover {
  color: #e67e22;
}

.mega-menu-3-cols {
  grid-template-columns: repeat(3, 1fr);
}

.mega-menu {
  position: absolute;
  left: 0;
  top: 10rem;
  left: 5rem;
  right: 5rem;

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.8)
  );
  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  padding-top: 2rem;
  padding-bottom: 2rem;
  max-height: 0; /* Start with 0 height */
  overflow: hidden; /* Hide overflowing content */
  transition: max-height 0.3s ease-in-out;
  border-radius: 0 0 12px 12px;
}
.menu li:hover > .mega-menu {
  opacity: 1;
  overflow: hidden;

  visibility: visible;
  max-height: 500px; /* Set max-height to the desired value */
  transition: all 0.3s ease; /* Add transition for smoother animation */
  cursor: pointer;
}

.mega-menu-content {
  font-size: 2rem;
  padding-left: 3rem;
  padding-right: 3rem;
  align-items: center;
  height: 12rem;
}

.mega-menu-ydelser-img {
  width: 10rem;
  height: 10rem;
  border-radius: 8%;
  padding-top: 0.5rem;
}

/* OST */
.top-header {
  display: flex;
  justify-content: space-between;

  align-items: center;
  background-color: #f5f6fa;
  height: 4.2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  position: relative;
  border-bottom: 1px solid #eee;
  z-index: 21;
}

.sticky .top-header {
  margin-bottom: 10rem;
}

.top-header-text {
  margin-left: 0.6rem;
  font-size: 1.2rem;
}

.top-header-icon {
  color: #000;
}

header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 30px;
  width: 100%;
  height: 10rem;
  transition: 250ms;
  background-color: #fff;
  border-bottom: 1px solid #cf711d;
  top: 0;
  z-index: 100; /* Higher z-index for the header */
}

.header-links {
  font-size: 1.8rem !important;
  text-transform: uppercase !important;
}

.sticky header {
  position: fixed;
}

.logo {
  height: 6.4rem;
  z-index: 99999999;
}

.nav-links {
  position: absolute;
  left: 0;
  right: 0;
  top: 10rem; /* Adjust this value based on your design */
  width: 100%;
  background-color: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: menu_animation 200ms ease-in-out;

  z-index: 50; /* Lower z-index for the dropdown */
}

.show-navlinks {
  display: flex;
}

@keyframes menu_animation {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0%);
  }
}

.logo {
  text-decoration: none;
  transition: 250ms;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

header ul li {
  list-style: none;
  margin: 20px 0;
  text-align: center;
  text-transform: uppercase;
}

header ul a {
  text-decoration: none;
  padding: 10px 30px;
  font-size: 1.8rem;
  transition: 250ms;
  color: #000;
}

header ul li a:hover {
  color: #e67e22;
}

.nav-btn:link,
.nav-btn:visited {
  text-decoration: none;
  font-weight: 500;
  font-size: 1.4rem;
  width: 20rem;
  transition: all 0.3s;
  padding: 1.2rem 2.4rem;
  border-radius: 25px;
  color: #fff;
  text-align: center;
  background-color: #e67e22;
}

.nav-btn:hover,
.nav-btn:active {
  padding: 1.2rem 2.4rem;
  border-radius: 25px;
  color: #fff;
  background-color: #cf711d;
}

.test {
  background-color: #fff;
}

.hamburger-on {
  background: url(../img/logos/hamburger.svg);
  width: 30px;
  height: 30px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: 250ms ease-in-out;
  transform: scaleX(-1);
}

.hamburger-off {
  background: url(../img/logos/close.svg);
  width: 25px;
  height: 25px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: 250ms ease-in-out;
}

@media screen and (min-width: 850px) {
  .nav-links {
    display: flex;
    justify-content: space-around;
    padding-left: 3rem;

    flex-direction: row;
    position: unset;
    text-transform: uppercase;
  }

  header ul {
    display: flex;
  }

  header ul li {
    margin: 0;
  }

  header ul li a {
    padding: 0;
    margin: 5px 10px;
    font-size: 2rem;
    background: transparent;
  }

  .hamburger-on {
    display: none;
  }
}
