/* Independent sidebar navigation. Custom overrides belong in h4b.css. */
.h4b-site-header {
    position: sticky;
}

.h4b-site-header .h4b-header-inner {

}
.wp-block-navigation .wp-block-navigation-item__description {
    color: gray;
    font-size: 18px;
    display: inline-block;
    font-weight: 300;
}
.h4b-sidebar-menu {
    position: absolute;
    top: 0.5em;
    right: 24px;
    height: 90px;
    display: flex;
    align-items: center;
    margin: 0 -5em 0  !important;
	transition:margin 0.3s ease, opacity 0.3s ease;
	pointer-events: auto;
	    padding: 30px 0 10px 0;
}
.scrolled .h4b-sidebar-menu {
    margin: 0 0 0 0 !important;
	transition:margin 0.3s ease 0.25s, opacity 0.3s ease;
}
.h4b-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: #004852;
    cursor: pointer;
	pointer-events:auto;
	margin-top:-3em;
}
.h4b-menu-toggle.h4b-menu-close {
    margin-top: -1em;
}
.h4b-menu-toggle:hover {
    color: #ec1749;
}

.h4b-hamburger {
    position: relative;
    display: block;
    width: 28px;
    height: 22px;
	transition:transform 0.25s ease;
}
.h4b-menu-is-open .h4b-hamburger {
	transform: scale(1.7);
}

.h4b-hamburger > span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform 280ms ease, opacity 180ms ease;
}

.h4b-hamburger > span:nth-child(1) { top: 0; }
.h4b-hamburger > span:nth-child(2) { top: 10px; }
.h4b-hamburger > span:nth-child(3) { top: 20px; }

.h4b-menu-is-open .h4b-hamburger > span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.h4b-menu-is-open .h4b-hamburger > span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.h4b-menu-is-open .h4b-hamburger > span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.h4b-menu-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #004852;
    overflow: clip;
	cursor: pointer;
}

.h4b-menu-dialog::backdrop {
    background: rgb(255 255 255 / 0);
	transition:background 0.5s ease;
}
.h4b-menu-is-open .h4b-menu-dialog::backdrop {
    background: rgb(219 48 97 / 65%);
}

.h4b-menu-panel {
    width: min(480px, calc(100% - 85px));
    height: 100%;
    margin-left: auto;
    padding: 34px 24px 48px 48px;
    background: #fff;
    box-shadow: -12px 0 60px rgb(0 72 82 / 12%);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(105%);
    transition: transform 500ms cubic-bezier(.22, .68, 0, 1);
    font-family: Geologica, sans-serif;
	    cursor: auto;
}

.admin-bar .h4b-menu-panel {
    padding-top: 53px;
	cursor: default;
}

.h4b-menu-is-open .h4b-menu-panel {
    transform: translateX(0);
    animation: h4b-menu-enter 500ms cubic-bezier(.22, .68, 0, 1);
}

@keyframes h4b-menu-enter {
    from { transform: translateX(105%); }
    to { transform: translateX(0); }
}

.h4b-menu-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.h4b-menu-title {
	font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #555555;
}

.h4b-menu-links {
    padding: 64px 20px 20px 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 220ms ease, transform 260ms ease;
}

.h4b-menu-is-open .h4b-menu-links {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 100ms;
}

.h4b-menu-links .wp-block-navigation,
.h4b-menu-links .wp-block-navigation__container {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
}

.h4b-menu-links .wp-block-navigation-item {
    width: 100%;
}

.h4b-menu-links a {
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
    color: #004852;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--h4b-secondary);
}

.h4b-menu-links a:hover,
.h4b-menu-links .current-menu-item > a {
    color: #ec1749!important;
}
.h4b-menu-links .wp-block-navigation-item.linkedin {
	position: relative;
}
.h4b-menu-links .wp-block-navigation-item.linkedin a::before {
	content:url('graphics/logo-linkedin.svg');
	position:relative;
	display:inline-block;
	height: 30px;
	width: 30px;
	top: 4px;
	    padding: 0 0.4em 0 0;
}
.h4b-menu-dialog .h4b-menu-links ul.wp-block-navigation__container li.wp-block-navigation-submenu {
	gap:0.6em;padding-bottom: 0.4em;
}
.h4b-menu-dialog .h4b-menu-links ul.wp-block-navigation__container ul.wp-block-navigation-submenu {
	padding:0;gap:0.7em;
}
.h4b-menu-dialog .h4b-menu-links ul.wp-block-navigation__container ul.wp-block-navigation-submenu li a {
	font-size: clamp(20px, 2vw, 26px);
}

/* Filter only the surrounding page, never an ancestor of the dialog. */
.h4b-menu-is-active .wp-site-blocks > :not(.h4b-site-header),
.h4b-menu-is-active .h4b-site-header > :not(.h4b-sidebar-menu),
.h4b-menu-is-active #wpadminbar {
    filter: blur(0px);
}

body.h4b-menu-is-active {
    /*overflow: hidden;*/
}

.h4b-menu-is-active .h4b-menu-open {
    /*visibility: hidden;*/
}

/* The primary navigation has no second hamburger; this block owns it. */
.h4b-site-header .h4b-navigation .wp-block-navigation__responsive-container-open {
    display: none !important;
}



@media (max-width: 781px) {
    .h4b-sidebar-menu { height: 76px; right: 16px; }
    .h4b-site-header .h4b-header-inner { padding-right: 88px; }
    .h4b-menu-panel { padding: 27px 16px 36px 28px; }
    .admin-bar .h4b-menu-panel { padding-top: 60px; }
    .h4b-menu-links { padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .h4b-menu-is-open .h4b-menu-panel,
    .h4b-menu-panel,
    .h4b-menu-links,
    .h4b-hamburger > span {
        transition: none;
        animation: none;
    }
}
