.site-logo .custom-logo {
  display: block;
  width: auto;
  max-width: var(--logo-width);
  height: auto;
}

.header-container { 
  background-color: var(--color-header);
}

.header-container-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-region {
  display: flex;
  align-items: center;
}

.header-region-left {
  justify-content: flex-start;
}

.header-region-right {
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
  min-width: 0;
}

.site-logo,
.site-logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-title {
  max-width: min(260px, 42vw);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
}

.header-container a {
  color: var(--color-prim-menu-font);
  text-decoration: none;
}
.header-container a:hover {
  color: var(--color-prim-menu-font-hover);
  text-decoration: none;
} 

/*Menyen*/

/*Hvilke meny som vises paa skjermstorrelse*/
.mobile-menu-code {
  display: block;
}

.desktop-menu-code {
  display: none;
}

@media (min-width: 768px) {
  .desktop-menu-code {
    display: block;
  }

  .mobile-menu-code {
    display: none;
  }
}

/*Design av desktopmeny*/

.desktop-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.desktop-menu > li + li {
  margin-left: 22px;
  padding-left: 22px;
}

.desktop-menu > li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 24px;
  background: var(--color-footer);
  transform: translateY(-50%);
}

.desktop-menu li a {
	text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  position: relative;
  padding: 0;
  font-size: 1rem;
  line-height: 1.2;
}

@media screen and (min-width: 850px) {
	.desktop-menu li a {
    font-size: 1.1rem;
  }
}

.desktop-menu li a:hover,
.desktop-menu li.current-menu-item > a,
.desktop-menu li.current-menu-parent > a,
.desktop-menu li.current_page_item > a {
  color: var(--color-prim-menu-font-hover);
  text-decoration: none;
}

.thbs-menu-wrapper {
  position: relative;
  z-index: 1000;
}

/* Menu bars, can be customized by changing the spans */

.thbs-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.thbs-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-prim-menu-font); 
  border-radius: 5px;
  transition: width 0.3s ease, background-color 0.3s ease;
  margin-left: auto;
}

.thbs-menu-toggle span:nth-child(1) {
  width: 100%;
}
.thbs-menu-toggle span:nth-child(2) {
  width: 100%;
}
.thbs-menu-toggle span:nth-child(3) {
  width: 100%;
}

.thbs-menu-toggle:hover span:nth-child(1) {
  width: 70%;
}
.thbs-menu-toggle:hover span:nth-child(2) {
  width: 100%;
}
.thbs-menu-toggle:hover span:nth-child(3) {
  width: 50%;
}

/* Close button */

.thbs-close-btn {
  position: absolute;
  top: 50px;
  left: 50px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1002;
  transition: transform 0.3s ease;
}

.thbs-close-btn span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-mob-menu-font);
  border-radius: 2px;
  transform-origin: center;
}

/* Make the X */
.thbs-close-btn span:first-child {
  transform: translateY(-50%) rotate(45deg);
}
.thbs-close-btn span:last-child {
  transform: translateY(-50%) rotate(-45deg);
}

.thbs-close-btn:hover,
.thbs-close-btn:focus {
  transform: scale(1.15);
  outline: none;
}

/* Default to off screen */
.thbs-mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  height: 100vh;
  background: var(--color-mob-menu);
  color: var(--color-mob-menu-font);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  text-align: start;
  padding-left: 5%;
}

/* Visible when toggled */
.thbs-mobile-nav.open {
  transform: translateX(0);
}

.thbs-hamburger-menu-list {
  list-style: none;
  padding: 2rem;
  margin: 0;
}


.thbs-hamburger-menu-list .menu-item {
    margin-top: 1em;
    font-size: 1.4rem;
    text-decoration: none; 
}

.thbs-hamburger-menu-list li a {
    color: var(--color-mob-menu-font);
    text-decoration: none; 
    position: relative;
    padding: 5px 0px;
}


.thbs-hamburger-menu-list a:hover, .thbs-hamburger-menu-list li.current-menu-item a {
  color: var(--color-mob-menu-font-hover);
  text-decoration: underline;
}

/* Backdrop */

.thbs-menu-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(17, 31, 22, 0.6);
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.thbs-mobile-nav.open + .thbs-menu-backdrop,
.thbs-menu-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .header-container-inner {
    gap: 18px;
  }

  .header-region-right {
    justify-content: flex-end;
    gap: 16px;
  }
}

@media (max-width: 767.98px) {
  .header-container-inner {
    gap: 12px;
  }

  .header-region-right {
    justify-content: flex-end;
  }

  .site-logo .custom-logo {
    width: var(--logo-width);
  }
}



/*Hopp til innhold ved tabbing*/

.skip-to-content {
    transform: translateY(-100%);
    display: block;
    position: absolute;
    top: 0px;
    left: 0px;
    padding-right: 1em;
    padding-left: 1em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    transition-duration: 0.4s;
    transition-property: transform;
    background-color: #fff;
    color: #000;
    border: 1px solid blue
}

.skip-to-content:focus {
    transform: translateY(1px);
}
