:root {
  --header-rail-width: 11rem;
  --header-panel-height: 96vh;
  --header-toggle-height: 4.5rem;
  --header-max-height: ;
}
@media screen and (min-height: 1200px) {
  :root {
    --header-panel-height: 80vh;
  }
}
@media screen and (min-width: 1600px) {
  :root {
    --header-panel-height: 80vh;
  }
}
.entry-content {
  transition: filter 0.3s ease;
}

.custom-header {
  background-color: rgba(82, 142, 93, 0.92);
  background-image: url("../../assets/images/header-pattern.png");
  background-position: left 34.5rem;
  background-repeat: no-repeat;
  border-radius: 0 0 calc(var(--wp--custom--border-radius--default) / 2) 0;
  left: 0;
  min-height: var(--header-panel-height);
  overflow: hidden;
  position: fixed;
  top: 0;
  transition: width 0.35s ease-in-out;
  will-change: width;
  width: var(--header-rail-width);
  z-index: 1000;
}

.custom-header.menu-open {
  width: 50vw;
  max-width: 50vw;
}

.custom-header.menu-open .site-header-rail {
  min-height: 0;
}

.custom-header.menu-open .mobile-navigation-control {
  bottom: 0;
  left: 0;
  min-height: var(--header-toggle-height);
  position: absolute;
  width: 100%;
  z-index: 2;
}

.site-header-wrapper {
  align-items: stretch;
  display: flex;
  flex-direction: row;
  height: var(--header-panel-height);
  min-height: var(--header-panel-height);
  width: 100%;
}

.site-header-rail {
  display: flex;
  flex: 0 0 var(--header-rail-width);
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.site-logo {
  padding: 1rem;
}

.site-logo .custom-logo-link,
.site-logo img {
  display: block;
}

.site-logo img {
  height: auto;
  width: 100%;
}

.mobile-site-logo {
  display: none;
}

.mobile-navigation-control {
  align-items: center;
  background-color: rgba(203, 210, 224, 0.1);
  display: flex;
  justify-content: center;
  min-height: var(--header-toggle-height);
  padding: 0.5rem;
  text-align: center;
  width: 100%;
}
.custom-header.menu-open .mobile-navigation-control {
  justify-content: start;
}
.mobile-navigation-control button {
  align-items: center;
  background-color: transparent;
  border: none;
  color: var(--wp--preset--color--bma-light);
  cursor: pointer;
  display: flex;
  font-size: var(--wp--preset--font-size--heading-xs);
  font-weight: 700;
  letter-spacing: 0.085em;
  line-height: 1;
  padding: 0;
  text-transform: uppercase;
}

.custom-header.menu-open .mobile-navigation-control button {
  padding-left: 1.5rem;
}
.mobile-navigation-control .closed .close-menu-icon,
.mobile-navigation-control .opened .open-menu-icon {
  display: none;
}

.open-close-navigation {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.open-close-navigation svg {
  flex: 0 0 auto;
}

.open-close-navigation .open-menu-icon {
  height: 1.9rem;
  width: 2.5rem;
}

.open-close-navigation .close-menu-icon {
  height: 2rem;
  width: 2rem;
}

.open-close-navigation.opened .menu-toggle-text::after {
  content: "CLOSE";
  font-size: var(--wp--preset--font-size--heading-xs);
}

.open-close-navigation.opened .menu-toggle-text {
  font-size: 0;
}

.custom-header .custom-navigation {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  justify-content: flex-start;
  opacity: 0;
  overflow: auto;
  padding: 10rem 4rem calc(var(--header-toggle-height) + 4rem) 4rem;
  pointer-events: none;
  transform: translateX(-1rem);
  transition:
    opacity 0.25s ease,
    transform 0.35s ease,
    visibility 0s linear 0.35s;
  visibility: hidden;
  will-change: opacity, transform;
  width: calc(100vw - var(--header-rail-width));
}

.custom-header .custom-navigation.opened {
  opacity: 1;
  overflow: auto;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity 0.25s ease 0.12s,
    transform 0.35s ease 0.08s,
    visibility 0s;
  visibility: visible;
}

.custom-header .custom-navigation .custom-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: start;
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: min(56rem, 100%);
  min-width: max-content;
}

.custom-header .custom-navigation .custom-menu > li {
  border-bottom: 2px solid rgba(252, 250, 247, 0.9);
}

.custom-header .custom-navigation .custom-menu a {
  color: var(--wp--preset--color--bma-light);
  display: block;
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--heading-m);
  font-weight: 700;
  line-height: 1.08;
  padding: 1.5rem 0;
  text-decoration: none;
}

.custom-header .custom-navigation .custom-menu a:hover,
.custom-header .custom-navigation .custom-menu a:focus-visible {
  color: var(--wp--preset--color--secondary);
}

.custom-header .header-social-links {
  margin-top: 4rem;
}
.header-social-links ul {
  list-style: none;
}
.custom-header .header-social-menu {
  align-items: center;
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-header .header-social-menu li {
  margin: 0;
  padding: 0;
}

.custom-header .header-social-menu a {
  align-items: center;
  background-color: var(--wp--preset--color--bma-dark);
  border-radius: 50%;
  display: flex;
  height: 2rem;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    outline-color 0.2s ease;
  width: 2rem;
}

.custom-header .header-social-menu a:hover,
.custom-header .header-social-menu a:focus-visible {
  background-color: var(--wp--preset--color--secondary);
  outline: 2px solid var(--wp--preset--color--bma-light);
  outline-offset: 0.25rem;
}

.custom-header .header-social-menu a:hover svg,
.custom-header .header-social-menu a:focus-visible svg,
.custom-header .header-social-menu a:hover svg path,
.custom-header .header-social-menu a:focus-visible svg path {
  color: var(--wp--preset--color--bma-dark) !important;
  fill: var(--wp--preset--color--bma-dark) !important;
}
.custom-header .header-social-menu img {
  display: block;
  height: 2rem;
  object-fit: contain;
  width: 2rem;
}

.custom-menu .submenu {
  background: rgba(91, 153, 102, 0.95);
  border: 1px solid rgba(252, 250, 247, 0.35);
  border-radius: 0.25rem;
  display: none;
  gap: 1rem;
  list-style: none;
  min-width: 15rem;
  padding: 1rem;
  position: absolute;
}

.custom-menu li.has-children:hover .submenu {
  display: grid;
}

@media screen and (max-width: 1200px) {
  .custom-header {
    --mobile-header-width: 100%;
    --mobile-bar-height: 6.4rem;

    background-position: left 6rem;
    border-radius: 0 0 4rem 0;
    min-height: 0;
    transition: none;
    width: var(--mobile-header-width);
    max-width: var(--mobile-header-width) !important;
  }

  .custom-header.menu-open {
    width: var(--mobile-header-width);
    max-width: var(--mobile-header-width);
  }

  .site-header-wrapper {
    display: block;
    height: auto;
    min-height: 0;
    width: 100%;
  }

  .site-header-rail {
    align-items: stretch;
    display: grid;
    flex: none;
    grid-template-columns: 1fr 6.4rem;
    min-height: 0;
    width: 100%;
  }

  .custom-header.menu-open .site-header-rail {
    min-height: 0;
  }

  .site-logo {
    align-items: center;
    display: flex;
    min-height: var(--mobile-bar-height);
    padding: 1rem;
  }

  .desktop-site-logo {
    display: none;
  }

  .mobile-site-logo {
    display: block;
  }

  header .site-logo img,
  header .site-logo .mobile-header-logo {
    display: block;
    height: auto;
    max-height: 4rem;
    max-width: min(22rem, calc(100vw - 13rem));
    width: auto;
  }

  .mobile-navigation-control,
  .custom-header.menu-open .mobile-navigation-control {
    align-items: center;
    background-color: rgba(73, 133, 84, 0.55);
    bottom: auto;
    display: flex;
    justify-content: center;
    left: auto;
    min-height: var(--mobile-bar-height);
    padding: 0;
    position: static;
    width: auto;
  }

  .mobile-navigation-control button {
    align-items: center;
    height: 100%;
    justify-content: center;
    padding: 0;
    width: 100%;
  }

  .open-close-navigation {
    gap: 0;
  }

  .open-close-navigation .menu-toggle-text {
    display: none;
  }

  /* .open-close-navigation .open-menu-icon,
  .open-close-navigation .close-menu-icon {
    height: 1.8rem;
    width: 1.8rem;
  } */

  .custom-header .custom-navigation {
    box-sizing: border-box;
    display: flex;
    height: auto;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1.4rem;
    pointer-events: none;
    transform: translateY(-0.75rem);
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      padding 0.35s ease,
      transform 0.35s ease,
      visibility 0s linear 0.35s;
    visibility: hidden;
    width: 100%;
  }

  .custom-header .custom-navigation.opened {
    max-height: calc(100vh - var(--mobile-bar-height) - 2rem);
    opacity: 1;
    overflow: auto;
    padding: 1.2rem 1.4rem 3rem;
    pointer-events: auto;
    transform: translateY(0);
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease 0.08s,
      padding 0.35s ease,
      transform 0.35s ease,
      visibility 0s;
    visibility: visible;
  }

  .custom-header .custom-navigation .custom-menu {
    width: 100%;
  }

  .custom-header .custom-navigation .custom-menu a {
    padding: 1.35rem 0;
  }

  .custom-header .header-social-links {
    margin-top: 1.4rem;
  }

  .custom-header .header-social-menu {
    gap: 1.2rem;
  }

  .custom-header .header-social-menu a {
    height: 2.6rem;
    width: 2.6rem;
  }

  .custom-menu .submenu {
    position: static;
  }
}

@media screen and (max-width: 767px) {
  .custom-header {
    --mobile-header-width: 100%;
  }

  .custom-header .header-social-links {
    margin-top: 2.5rem;
  }

  .custom-header .header-social-menu {
    gap: 1rem;
  }

  .custom-header .header-social-menu a {
    height: 3rem;
    width: 3rem;
  }

  .custom-header .header-social-menu img {
    height: 1.5rem;
    width: 1.5rem;
  }

  .custom-menu .submenu {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-content,
  .custom-header,
  .custom-header .custom-navigation {
    transition-duration: 0.01ms;
    transition-delay: 0s;
  }
}
