.block-header-mobile-padder {
  display: none;
  height: 108px;
  padding-bottom: 4em;
  display: none;
}

body.home .block-header-mobile-padder {
  padding-bottom: 0;
}

@media (min-width: 1001px) {
  .block-header-mobile-padder {
    display: none;
  }
}

.block-header-mobile {
  display: block;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: none;
  margin: 0 auto;
  padding-left: var(--padding);
  padding-right: var(--padding);
}

body.admin-bar .block-header-mobile {
  margin-top: var(--wp-admin--admin-bar--height, 0);
}

body.is-menu-open .block-header-mobile {
  font: var(--fontbase);
  background-color: var(--bg);
  color: var(--fg);
  font-size: var(--font-size, 17px);
  background-image: url(./images/brave-raccoon-background-02.svg);
  background-position: center top;
  background-size: 80% auto;
  background-repeat: repeat;
  background-attachment: fixed;

  @media screen and (max-width: 600px) {
    background-size: 137% auto;
  }
}

.block-header-mobile>* {
  margin-block-start: 0;
}

body.is-menu-open .block-header-mobile {
  margin-bottom: 0;
}

.block-header-mobile>* {
  max-width: var(--page-width);
  width: 100%;
  margin: 0 auto;
}

.block-header-mobile>.mobile-top {
  display: flex;
  padding-top: 2em;
  padding-bottom: 0.5em;
  align-items: center;
  position: relative;
}

@media screen and (max-width: 670px) {
  .block-header-mobile>.mobile-top {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 4em;
    padding-bottom: 0;
  }
}

.block-header-mobile>.mobile-top>.logo {
  width: 14rem;
  max-width: 100%;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

@media screen and (max-width: 670px) {
  .block-header-mobile>.mobile-top>.logo {
    width: 100%;
    max-width: 11rem;
  }
}

.block-header-mobile>.mobile-top>.logo img,
.block-header-mobile>.mobile-top>.logo svg {
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
  stroke: none !important;
  transition: fill var(--anim-speed) ease-in-out;
  position: relative;
  max-width: 100%;
}

/* Inline styles from production */
.block-header-mobile>.mobile-top>.logo svg,
.block-header-mobile>.mobile-top>.logo path {
  fill: unset !important;
}

.block-header-mobile>.mobile-top>.logo svg .cls-1 {
  fill: #f2f2f2 !important;
}

.block-header-mobile>.mobile-top>.logo svg .cls-2 {
  fill: #ff3d03 !important;
}

.block-header-mobile>.mobile-top>.logo a:hover,
.block-header-mobile>.mobile-top>.logo a:focus {
  path {
    fill: unset !important;
  }
}

.block-header-mobile>.mobile-top>.logo a:hover,
.block-header-mobile>.mobile-top>.logo a:focus {
  .cls-1 {
    fill: #f2f2f2 !important;
  }

  .cls-2 {
    fill: #ff3d03 !important;
  }
}


.block-header-mobile>.mobile-top>.other {
  display: flex;
  align-items: center;
  justify-content: end;
  padding-top: 0.75em;
  gap: 0.5em;
}

@media screen and (min-width: 400px) {
  .block-header-mobile>.mobile-top>.other {
    position: absolute;
    right: 0;
    top: 0;
    flex: 1;
  }
}

@media screen and (max-width: 670px) {
  .block-header-mobile>.mobile-top>.other {
    align-self: center;
  }
}

.block-header-mobile>.mobile-top>.other>.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline;
  position: relative;
  top: -1px;
}

.block-header-mobile>.mobile-top>.other>.menu>li {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  padding-left: 1em;
  padding-top: 0.35em;
  padding-bottom: 0.35em;
  font-size: 1.15em;
}

.block-header-mobile>.mobile-top>.other>.menu>li::marker {
  content: none;
}

.block-header-mobile>.mobile-top>.other>.menu>li>a {
  text-decoration: underline;
  text-underline-offset: 0.6em;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
}

.block-header-mobile>.mobile-top>.other>.menu>li>a:hover {
  color: var(--fg-hover);
}

.block-header-mobile>.mobile-top>.other>.hamburger {
  display: block;
  text-align: right;
}

.block-header-mobile>.mobile-top>.other>.hamburger .hamburger-button-wrapper {
  position: relative;
}

/* .is-menu-open .block-header-mobile > .mobile-top > .other .custom-social-media,
.is-menu-open .block-header-mobile > .mobile-top > .other .theme-switcher {
  display: none;
} */
.block-header-mobile>.mobile-top>.other .custom-social-media {
  display: flex;
  align-items: center;
}

@media screen and (max-width: 670px) {
  .block-header-mobile>.mobile-top>.other .custom-social-media {
    display: none;
  }
}

.block-header-mobile>.mobile-top>.other .custom-social-media li {
  font-size: 1em;
  margin: 0;
}

.block-header-mobile>.mobile-menu {
  flex: 1;
  display: none;
  width: 100%;
  padding-top: 4em;
  /* justify-content: center; */
  flex-direction: column;
}

.block-header-mobile>.mobile-menu>.theme-switcher {
  width: 4em;
  margin-top: 2em;
}

.block-header-mobile>.mobile-menu>.theme-switcher svg {
  height: 2em;
}

.block-header-mobile>.mobile-menu>.menus {
  width: 100%;
  padding-bottom: 1em;
}

.block-header-mobile>.mobile-menu>.menus .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  height: 0;
  transform: translateY(-1em) scale(0.8);
  overflow: hidden;
  transition: opacity var(--anim-speed) ease-in-out, transform var(--anim-speed) ease-in-out;
}

.block-header-mobile>.mobile-menu>.menus .sub-menu a {
  text-decoration: underline;
  text-underline-offset: 0.6em;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
}

.block-header-mobile>.mobile-menu>.menus .sub-menu .current-menu-item>a {
  text-decoration-color: var(--fg);
}

.block-header-mobile>.mobile-menu>.menus .sub-menu:focus-within,
.block-header-mobile>.mobile-menu>.menus .is-open>.sub-menu {
  display: block;
  opacity: 1;
  height: auto;
  padding-bottom: 2em;
  transform: translateY(0) scale(1);
}

.block-header-mobile>.mobile-menu>.menus>.menu {
  padding: 0;
  margin: 0;
  display: block;
  text-align: center;
  list-style: none;
}

.block-header-mobile>.mobile-menu>.menus>.menu>li {
  display: block;
  position: relative;
}

.block-header-mobile>.mobile-menu>.menus>.menu>li::marker {
  content: "";
}

.block-header-mobile>.mobile-menu>.menus>.menu>li.lang-fi {
  display: none;
}

.block-header-mobile>.mobile-menu>.menus>.menu>li>button.open-submenu {
  -moz-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  position: absolute;
  right: 0;
  top: 0;
  width: 3em;
  height: 3em;
  font-size: clamp(14px, 3vw, 20px);
  cursor: pointer;
  color: var(--fg);
}

.block-header-mobile>.mobile-menu>.menus>.menu>li>button.open-submenu>svg {
  fill: var(--fg);
  width: 30%;
  height: auto;
}

.block-header-mobile>.mobile-menu>.menus>.menu>li.is-open>button.open-submenu>svg {
  transform: rotate(180deg);
}

.block-header-mobile>.mobile-menu>.menus>.menu>li>a {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.8em;
  /* text-transform: uppercase; */
  font-size: 48px;
  line-height: 1.2;
  /* text-decoration: underline; */
  text-underline-offset: 0.6em;
  text-decoration-thickness: 2px;
  text-decoration-color: transparent;
  transition: var(--anim-speed) ease-in-out;
}

@media (max-width: 600px) {
  .block-header-mobile>.mobile-menu>.menus>.menu>li>a {
    font-size: 35px;
  }
}

.block-header-mobile>.mobile-menu>.menus>.menu>li>a:hover {
  color: var(--orange);
}

.block-header-mobile>.mobile-menu>.menus>.menu>li.current-menu-item>a {
  color: var(--orange);
  /* text-decoration-color: var(--fg); */
}

.block-header-mobile>.mobile-menu>.menus>.menu>li:last-child>a {
  margin-bottom: 0;
}

.block-header-mobile .hamburger-button {
  display: block;
  height: 3em;
  position: relative;
  background: none;
  border-radius: 0;
  border: none;
  margin-left: 0.5em;
}

.block-header-mobile .hamburger-button .hamburger-button-wrapper {
  display: block;
  width: var(--mytheme-hamburger-width, 1.75em);
  height: var(--mytheme-hamburger-height, 1em);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
  .block-header-mobile .hamburger-button .hamburger-button-wrapper {
    top: 47%;
  }
}

.block-header-mobile .hamburger-button .hamburger-button-wrapper>i:nth-child(1) {
  position: absolute;
  display: block;
  top: 3px;
  left: 0;
  width: 100%;
  height: var(--mytheme-hamburger-bar-height, 3px);
  background-color: var(--fg-headline);
  transition: all 0.2s ease-in-out;
}

.block-header-mobile .hamburger-button .hamburger-button-wrapper>i:nth-child(2) {
  position: absolute;
  display: block;
  top: 12px;
  left: 0;
  width: 100%;
  height: var(--mytheme-hamburger-bar-height, 3px);
  background-color: var(--fg-headline);
  transition: all 0.2s ease-in-out;
}

.block-header-mobile .hamburger-button .hamburger-button-wrapper>i:nth-child(3) {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  width: 100%;
  height: var(--mytheme-hamburger-bar-height, 3px);
  background-color: var(--fg-headline);
  transition: all 0.2s ease-in-out;
}

.block-header-mobile.is-open {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--bg);
  z-index: 2000;
  overflow: auto;
}

.block-header-mobile.is-open>.mobile-menu {
  display: flex;
  align-items: center;
}

.block-header-mobile.is-open .hamburger-button>.hamburger-button-wrapper>i:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.block-header-mobile.is-open .hamburger-button>.hamburger-button-wrapper>i:nth-child(2) {
  top: 50%;
  transform: rotate(-45deg);
}

.block-header-mobile.is-open .hamburger-button>.hamburger-button-wrapper>i:nth-child(3) {
  opacity: 0;
}

.block-header-mobile .custom-social-media {
  font-size: 1.4em;
  --some-icon: var(--fg);
  --some-bg: none;
  --some-hover-icon: var(--bg);
  --some-hover-bg: var(--fg);
}

.block-header-mobile .custom-social-media>li>a {
  border: none;
}

body.is-menu-open {
  overflow: hidden;
}

.mobile-menu .menu>li,
.mobile-menu .custom-social-media,
.mobile-menu .theme-switcher {
  opacity: 0;
  transform: translateY(2em);
}

.is-menu-open .mobile-menu .menu>li,
.is-menu-open .mobile-menu .custom-social-media,
.is-menu-open .mobile-menu .theme-switcher {
  animation: animateMenuElements var(--anim-speed) forwards;
}

@keyframes animateMenuElements {
  0% {
    opacity: 0;
    transform: translateY(2em);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}