.elementor-82 {
  position: sticky !important;
  top: 0;
  z-index: 9000;
  transition: top 0.3s ease-in-out;
}

.header-wrapper {
  background-color: var(--clr-bg-light);
  box-shadow: var(--shadow-l);
}

.header {
  max-width: min(var(--container-l-max-width), 100% - var(--screen-gutter) * 2) !important;
  margin-inline: auto;
  padding: 0.8rem 0;
  display: grid !important;
  align-items: center !important;
}

/*HEADER COMPONENTS*/

/*HEADER COMPONENTS -  Logo*/

.header-logo__wrapper {
  display: flex;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: fit-content;
}

.header-logo {
  width: fit-content;
  display: flex;
  flex-direction: row !important;
  flex: 0 1 auto !important;
  white-space: nowrap !important;
  align-items: center !important;
}

.header-logo__img svg {
  display: flex;
  width: 100%;
  max-height: 4rem;
}

.header-logo__title svg {
  display: flex;
  height: 2rem;
  width: auto;
  margin-bottom: auto;
}

/*HEADER COMPONENTS -  Nav*/

.header-nav__wrapper {
  display: flex;
  flex-direction: column;
}

.header-nav__menu {
  display: flex;
  margin-block: 0;
  padding: 0;
  list-style: none;
  gap: 0;
}

/* HEADER COMPONENTS -  Nav - Top Menu - Items */

.header-nav__menu > li:not(.btn) > *:first-child,
.header-nav__menu > li:not(.btn) > *:first-child:link,
.header-nav__menu > li:not(.btn) > *:first-child:visited {
  display: flex;
  white-space: nowrap;
  font-size: var(--text-m);
  font-weight: 500;
  color: var(--clr-text-body);
  align-items: center;
  position: relative;
  width: 100%;
}

/*HEADER COMPONENTS -  Nav - Top Menu - Items - Down arrows */

svg[hidden] {
  display: none;
  position: absolute;
}

.header-nav__menu svg {
  width: 1em;
  height: 1em;
  margin-left: 0.5em;
  stroke: var(--clr-text-primary);
  stroke-width: 2;
  fill: transparent;
  stroke-linecap: round;
}

.header-nav__menu [aria-expanded="true"] svg {
  transform: scaleY(-1);
}

/*HEADER COMPONENTS -  Nav - Submenus */

.header-nav__submenu {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--clr-bg-light);
  list-style: none;
  visibility: hidden;
  opacity: 1;
  position: absolute;
  z-index: 9010;
}

.header-nav__submenu[aria-hidden="false"] {
  visibility: visible;
} /*Open/Close Menu Behavior with JS*/

.header-nav__submenu a,
.header-nav__submenu button {
  display: flex;
  width: 100%;
  align-items: center;
}

/*HEADER COMPONENTS -  Secondary menu*/

.header-secondary-menu {
  display: flex;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

/* HEADER COMPONENTS -  Secondary menu - Theme switcher */

.theme-switcher {
  display: flex;
}

.theme-switcher__svg {
  width: 3rem !important;
  height: 3rem !important;
  fill: var(--clr-text-primary);
}

/* HEADER COMPONENTS -  Secondary menu - Hambuger menu */

.navigation__checkbox {
  display: none;
}

.navigation__button {
  height: 5rem;
  width: 5rem;
  cursor: pointer;
}

.navigation__icon {
  position: relative;
  margin-top: 2rem;
  z-index: 1500;
}
.navigation__icon,
.navigation__icon::before,
.navigation__icon::after {
  width: 2.6rem;
  height: 3px;
  background-color: var(--clr-text-primary);
  display: inline-block;
}
.navigation__icon::before,
.navigation__icon::after {
  content: "";
  position: absolute;
  left: 0;
  transition: all 0.2s;
}
.navigation__icon::before {
  top: -1rem;
}
.navigation__icon::after {
  top: 1rem;
}
.navigation__button:hover .navigation__icon::before {
  top: -1rem;
}
.navigation__button:hover .navigation__icon::after {
  top: 1rem;
}
.navigation__checkbox:checked + .navigation__button .navigation__icon {
  background-color: transparent;
}
.navigation__checkbox:checked + .navigation__button .navigation__icon::before {
  top: 0;
  transform: rotate(135deg);
}
.navigation__checkbox:checked + .navigation__button .navigation__icon::after {
  top: 0;
  transform: rotate(-135deg);
}

/* DESKTOP SPECS */

@media (min-width: 1299px) {
  .header {
    grid-template-columns: 1fr 6fr 1fr !important;
  }

  /* DESKTOP SPECS - HEADER COMPONENTS -  Nav */

  .header-nav__wrapper {
    align-items: center;
  }

  .header-nav__menu {
    flex-direction: row;
    align-items: center;
  }

  .header-nav__menu > li {
    position: relative;
  } /* helps with positioning of submenus */

  .header-nav__menu .sub-menu--right {
    left: auto !important;
    right: 0 !important;
  } /* Prevent offscreen-submenus */

  /* DESKTOP SPECS - HEADER COMPONENTS -  Nav - Top Menu - Items */

  .header-nav__menu > li {
    margin-inline: var(--space-s);
  }

  .header-nav__menu > li:not(.btn) > *:first-child::after,
  .header-nav__menu > li:not(.btn) > *:first-child:link::after,
  .header-nav__menu > li:not(.btn) > *:first-child:visited::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0%;
    height: 2px;
    background-color: var(--clr-bg-accent);
    transition: all 0.3s ease-in-out;
  }

  .header-nav__menu > li:not(.btn) > *:first-child:hover::after,
  .header-nav__menu > li:not(.btn) > *:first-child:link:hover::after,
  .header-nav__menu > li:not(.btn) > *:first-child:link:active::after {
    width: 40px;
  }

  /*HEADER COMPONENTS -  Nav - Top Menu - Items - Down arrows */

  /* DESKTOP SPECS - HEADER COMPONENTS -  Nav  - Submenus */

  .header-nav__submenu {
    width: max-content;
    padding: var(--space-m);
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: all 0.1s;
    border-radius: var(--radius-site);
    top: 110%;
    left: 0;
  }

  .header-nav__submenu > li:not(:nth-child(2)) {
    padding-top: var(--space-xs);
  }
  .header-nav__submenu > li:not(:last-child) {
    padding-bottom: var(--space-xs);
  }

  li:has(> .header-nav__submenu__backlink) {
    display: none;
  }

  /* DESKTOP SPECS - HEADER COMPONENTS -  Secondary menu - Hamburger menu */

  .hamburger-menu {
    display: none;
  }
}

/* MOBILE SPECS */

@media (max-width: 1300px) {
  .header {
    grid-template-columns: 1fr 1fr !important;
  }

  /* MOBILE SPECS - HEADER COMPONENTS -  Nav */

  .header-nav {
    position: fixed;
    width: min(100%, 500px);
    height: calc(100dvh - 5rem);
    background-color: var(--clr-bg-light);
    right: 0;
    top: 5rem;
    padding-inline: var(--space-xl);
    padding-block: var(--space-2xl);
    opacity: 1;
    z-index: 1000;
  }

  .mobile-menu-hidden {
    visibility: hidden;
    opacity: 0;
  }

  .header-nav__menu {
    flex-direction: column;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    z-index: 999; /* Ensure it overlays other elements */
    pointer-events: auto; /* Enable interaction (like clicks) */
  } /* Overlay using pseudo-element */

  body.menu-open {
    overflow: hidden;
  } /* Prevent scrolling when menu is open */

  /* MOBILE SPECS - HEADER COMPONENTS -  Nav - Top Menu - Items */

  .header-nav__menu > li:not(:first-child) {
    padding-top: var(--space-s);
  }
  .header-nav__menu > li:not(:last-child) {
    padding-bottom: var(--space-s);
    border-bottom: 1px solid var(--clr-border-accent);
  }

  .header-nav__menu > li:first-child {
    text-transform: uppercase;
    font-weight: 600;
  }

  /*HEADER COMPONENTS -  Nav - Top Menu - Items - Down arrows */

  .header-nav__menu svg {
    transform: rotate(270deg);
  }

  .header-nav__submenu__backlink svg {
    transform: rotate(90deg);
    margin-left: 0;
    margin-right: 0.5em;
  }

  /* MOBILE SPECS - HEADER COMPONENTS -  Nav  - Submenus */

  .header-nav__submenu {
    padding: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  .header-nav__submenu[aria-hidden="false"] {
    opacity: 1;
  }

  .header-nav__submenu > li:not(:first-child) {
    padding-top: var(--space-s);
  }
  .header-nav__submenu > li:not(:last-child) {
    padding-bottom: var(--space-s);
    border-bottom: 1px solid var(--clr-border-accent);
  }

  .header-nav__submenu__backlink {
    text-transform: uppercase;
    color: var(--clr-text-accent);
  }
}
