:root {
    --bithead-z-header: 9990;
    --bithead-z-sticky-row: 9991;
    --bithead-z-overlay: 99999;
}

.bithead-site-header,
.bithead-site-footer,
.bithead-navigation,
.bithead-navigation * {
    box-sizing: border-box;
}

.bithead-site-header {
    position: relative;
    z-index: var(--bithead-z-header);
    width: 100%;
}

.bithead-site-header.bithead-is-sticky {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
}

@media (max-width: 767px) {
    .bithead-site-header.bithead-is-sticky:not(.bithead-sticky-mobile) {
        position: relative;
        top: auto;
    }
}

/* Hide common theme header/footer wrappers only when Bithead replacement is enabled. */
body.bithead-hide-theme-header > #site-header,
body.bithead-hide-theme-header > header#masthead,
body.bithead-hide-theme-header > .site-header,
body.bithead-hide-theme-header > .ct-header,
body.bithead-hide-theme-header > #masthead.site-header {
    display: none !important;
}

body.bithead-hide-theme-footer > #site-footer,
body.bithead-hide-theme-footer > footer#colophon,
body.bithead-hide-theme-footer > .site-footer,
body.bithead-hide-theme-footer > .ct-footer,
body.bithead-hide-theme-footer > #colophon.site-footer {
    display: none !important;
}

.bithead-logo,
.bithead-logo a {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.bithead-logo img {
    display: block;
    height: auto;
}

.bithead-logo-text {
    font: inherit;
    color: inherit;
}

/* Navigation shell and 3-row header layout */
.bithead-navigation {
    position: relative;
    display: block;
    width: 100%;
}

.bithead-row-slot,
.bithead-row {
    width: 100%;
}

.bithead-row {
    position: relative;
    z-index: 2;
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bithead-row-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-inline: auto;
}

.bithead-structure-default .bithead-row-inner {
    width: 100%;
}

.bithead-structure-boxed .bithead-row-inner {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}

.bithead-structure-full_width {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.bithead-structure-full_width .bithead-row-inner {
    width: 100%;
}

.bithead-row-tools {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: 12px;
}

.bithead-row.is-bithead-row-fixed {
    position: fixed !important;
    left: var(--bithead-fixed-left, 0px);
    top: var(--bithead-fixed-top, 0px);
    width: var(--bithead-fixed-width, 100%);
    z-index: var(--bithead-z-sticky-row);
}

.bithead-row.is-bithead-row-fixed + * {
    position: relative;
}

/* Menus */
.bithead-desktop-menu,
.bithead-desktop-wrap {
    min-width: 0;
}

.bithead-desktop-menu > .bithead-menu,
.bithead-desktop-menu .sub-menu,
.bithead-offcanvas-menu .bithead-menu,
.bithead-offcanvas-menu .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bithead-desktop-menu > .bithead-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.bithead-desktop-menu .bithead-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.bithead-menu-link {
    text-decoration: none;
    color: inherit;
    transition: color .18s ease, background-color .18s ease, opacity .18s ease;
}

.bithead-desktop-menu .bithead-menu-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
}

.bithead-desktop-menu .sub-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.bithead-desktop-menu li:hover > .sub-menu,
.bithead-desktop-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bithead-desktop-menu .sub-menu .bithead-menu-item {
    display: flex;
    width: 100%;
}

.bithead-desktop-menu .sub-menu .bithead-menu-link {
    width: 100%;
    padding: 8px 10px;
}

.bithead-desktop-menu .sub-menu .sub-menu {
    top: 0;
    left: calc(100% + 8px);
}

.bithead-submenu-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    line-height: 1;
    cursor: pointer;
}

.bithead-desktop-menu .bithead-submenu-toggle {
    display: none;
}

/* Mobile/off-canvas trigger */
.bithead-menu-trigger,
.bithead-search-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.bithead-menu-trigger svg,
.bithead-search-toggle svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* Desktop Search */
.bithead-desktop-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.bithead-search-popover {
    position: absolute;
    z-index: 100;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, 90vw);
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(15,23,42,.14);
}

.bithead-search-popover[hidden] {
    display: none !important;
}

.bithead-search-form {
    position: relative;
    display: flex;
    width: 100%;
}

.bithead-search-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 44px 10px 12px;
    border: 1px solid rgba(15,23,42,.16);
    border-radius: 8px;
    outline: none;
    font: inherit;
}

.bithead-search-input:focus {
    border-color: currentColor;
}

.bithead-search-submit {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.bithead-search-submit svg {
    width: 19px;
    height: 19px;
}

/* Off canvas */
.bithead-offcanvas {
    position: fixed;
    inset: 0;
    z-index: var(--bithead-z-overlay);
    pointer-events: none;
    visibility: hidden;
}

.bithead-offcanvas.is-open {
    pointer-events: auto;
    visibility: visible;
}

.bithead-offcanvas-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
    transition: opacity .28s ease;
}

.bithead-offcanvas.is-open .bithead-offcanvas-backdrop {
    opacity: 1;
}

.bithead-offcanvas-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 360px;
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, .12);
    transition: transform .3s cubic-bezier(.2,.75,.2,1);
}

.bithead-offcanvas-right .bithead-offcanvas-panel {
    right: 0;
    transform: translateX(102%);
}

.bithead-offcanvas-left .bithead-offcanvas-panel {
    left: 0;
    transform: translateX(-102%);
}

.bithead-offcanvas.is-open .bithead-offcanvas-panel {
    transform: translateX(0);
}

.bithead-offcanvas-close {
    position: sticky;
    z-index: 3;
    top: 12px;
    float: right;
    margin: 12px 12px 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(127,127,127,.08);
    color: #111827;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.bithead-offcanvas-close svg {
    width: 20px;
    height: 20px;
}

.bithead-offcanvas-inner {
    clear: both;
    padding: 24px;
}

.bithead-offcanvas-menu-group + .bithead-offcanvas-menu-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(15,23,42,.08);
}

.bithead-offcanvas-menu .bithead-menu-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
}

.bithead-offcanvas-menu .bithead-menu-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
}

.bithead-offcanvas-menu .bithead-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.bithead-offcanvas-menu .bithead-submenu-toggle[aria-expanded="true"] span {
    transform: rotate(45deg);
}

.bithead-offcanvas-menu .bithead-submenu-toggle span {
    display: block;
    transition: transform .18s ease;
}

.bithead-offcanvas-menu .sub-menu {
    grid-column: 1 / -1;
    display: none;
    padding-left: 14px;
}

.bithead-offcanvas-menu .bithead-menu-item.is-submenu-open > .sub-menu {
    display: block;
}

.bithead-offcanvas-search {
    margin-top: 24px;
    padding: 12px;
    background: transparent;
    border-radius: 10px;
}

/* Off-canvas CTA buttons */
.bithead-offcanvas-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.bithead-offcanvas-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: color .18s ease, background-color .18s ease, opacity .18s ease, transform .18s ease;
}

.bithead-offcanvas-button:hover {
    transform: translateY(-1px);
}

.bithead-button-primary {
    background: #111827;
    color: #fff;
}

.bithead-button-secondary {
    background: #f1f5f9;
    color: #111827;
}

.bithead-button-text {
    background: transparent;
    color: #111827;
}

.bithead-editor-note {
    padding: 10px 12px;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    color: #64748b;
    font-size: 13px;
}

body.bithead-offcanvas-open {
    overflow: hidden;
}

/* Breakpoint visibility */
.bithead-breakpoint-none .bithead-menu-trigger { display: none; }
.bithead-breakpoint-none .bithead-desktop-wrap { display: block; }
.bithead-breakpoint-always .bithead-menu-trigger { display: inline-flex; }
.bithead-breakpoint-always .bithead-desktop-wrap { display: none; }
.bithead-breakpoint-always .bithead-desktop-search { display: none; }
.bithead-breakpoint-always .bithead-row-top,
.bithead-breakpoint-always .bithead-row-bottom { display: none; }

@media (min-width: 1025px) {
    .bithead-breakpoint-1024 .bithead-menu-trigger { display: none; }
    .bithead-breakpoint-1024 .bithead-desktop-wrap { display: block; }
}

@media (max-width: 1024px) {
    .bithead-breakpoint-1024 .bithead-menu-trigger { display: inline-flex; }
    .bithead-breakpoint-1024 .bithead-desktop-wrap { display: none; }
    .bithead-breakpoint-1024 .bithead-desktop-search { display: none; }
    .bithead-breakpoint-1024 .bithead-row-top,
    .bithead-breakpoint-1024 .bithead-row-bottom { display: none; }
}

@media (min-width: 768px) {
    .bithead-breakpoint-767 .bithead-menu-trigger { display: none; }
    .bithead-breakpoint-767 .bithead-desktop-wrap { display: block; }
}

@media (max-width: 767px) {
    .bithead-breakpoint-767 .bithead-menu-trigger { display: inline-flex; }
    .bithead-breakpoint-767 .bithead-desktop-wrap { display: none; }
    .bithead-breakpoint-767 .bithead-desktop-search { display: none; }
    .bithead-breakpoint-767 .bithead-row-top,
    .bithead-breakpoint-767 .bithead-row-bottom { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bithead-offcanvas-panel,
    .bithead-offcanvas-backdrop,
    .bithead-menu-link,
    .bithead-menu-trigger,
    .bithead-search-toggle,
    .bithead-offcanvas-button {
        transition: none !important;
    }
}


/* Reveal modes: Side Panel or Modal */
.bithead-reveal-modal .bithead-offcanvas-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: 520px;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    opacity: 0;
    transform: translate(-50%, -46%) scale(.97);
    transition: transform .3s cubic-bezier(.2,.75,.2,1), opacity .24s ease;
}

.bithead-reveal-modal.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.bithead-reveal-modal.bithead-offcanvas-left .bithead-offcanvas-panel,
.bithead-reveal-modal.bithead-offcanvas-right .bithead-offcanvas-panel {
    right: auto;
    left: 50%;
    transform: translate(-50%, -46%) scale(.97);
}

.bithead-reveal-modal.is-open.bithead-offcanvas-left .bithead-offcanvas-panel,
.bithead-reveal-modal.is-open.bithead-offcanvas-right .bithead-offcanvas-panel {
    transform: translate(-50%, -50%) scale(1);
}

/* Bithead logo loop animations */
.bithead-logo {
    --bithead-logo-duration: 2.5s;
    --bithead-neon-color: #00e5ff;
    --bithead-neon-light: 12px;
}

.bithead-logo-media {
    position: relative;
    display: inline-flex;
    line-height: 0;
    max-width: 100%;
    isolation: isolate;
}

.bithead-logo-media img {
    position: relative;
    z-index: 1;
}

/* Shine is masked with the source image itself. On transparent PNG logos the
 * light therefore travels across the visible logo pixels only — never across
 * the surrounding Elementor/container rectangle. */
.bithead-logo-animation-shine .bithead-logo-media::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,.18) 36%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.18) 64%, transparent 82%);
    background-size: 260% 100%;
    background-position: 180% 0;
    -webkit-mask-image: var(--bithead-logo-mask);
    mask-image: var(--bithead-logo-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    animation: bithead-logo-shine var(--bithead-logo-duration) ease-in-out infinite;
}

.bithead-logo-animation-bounce img,
.bithead-logo-animation-bounce .bithead-logo-text {
    animation: bithead-logo-bounce var(--bithead-logo-duration) ease-in-out infinite;
    transform-origin: center bottom;
}

.bithead-logo-animation-neon img,
.bithead-logo-animation-neon .bithead-logo-text {
    animation: bithead-logo-neon var(--bithead-logo-duration) ease-in-out infinite alternate;
}

.bithead-logo-animation-round img,
.bithead-logo-animation-round .bithead-logo-text {
    animation: bithead-logo-round var(--bithead-logo-duration) linear infinite;
    transform-origin: center center;
}

@keyframes bithead-logo-shine {
    0%, 18% { background-position: 180% 0; opacity: 0; }
    30% { opacity: 1; }
    62%, 100% { background-position: -80% 0; opacity: 0; }
}

@keyframes bithead-logo-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12%); }
    60% { transform: translateY(-6%); }
}

@keyframes bithead-logo-neon {
    from { filter: drop-shadow(0 0 0 var(--bithead-neon-color)); }
    to { filter: drop-shadow(0 0 var(--bithead-neon-light) var(--bithead-neon-color)); }
}

@keyframes bithead-logo-round {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bithead-logo-animation-shine .bithead-logo-media::after,
    .bithead-logo-animation-bounce img,
    .bithead-logo-animation-bounce .bithead-logo-text,
    .bithead-logo-animation-neon img,
    .bithead-logo-animation-neon .bithead-logo-text,
    .bithead-logo-animation-round img,
    .bithead-logo-animation-round .bithead-logo-text {
        animation: none !important;
    }
}

/* =============================================================
 * Bithead 1.4.0 — off-canvas polish, menu animations and safe dropdowns
 * ============================================================= */
.bithead-navigation {
    --bithead-open-duration: 300ms;
    --bithead-dropdown-duration: 180ms;
}

/* Keep desktop dropdowns outside row bounds. Elementor containers may still
 * define their own overflow, but Bithead itself must never clip a submenu. */
.bithead-row,
.bithead-row-slot,
.bithead-row-inner,
.bithead-desktop-wrap,
.bithead-desktop-menu,
.bithead-desktop-menu > .bithead-menu,
.bithead-desktop-menu .bithead-menu-item {
    overflow: visible;
}

.bithead-desktop-menu .sub-menu {
    z-index: 9998;
    transition-duration: var(--bithead-dropdown-duration);
    transition-property: opacity, transform, visibility;
}

/* Viewport-aware classes are applied by frontend.js. */
.bithead-desktop-menu > .bithead-menu > .bithead-menu-item.bithead-submenu-align-right > .sub-menu {
    right: 0;
    left: auto;
}

.bithead-desktop-menu .sub-menu .bithead-menu-item.bithead-submenu-flip > .sub-menu {
    right: calc(100% + 8px);
    left: auto;
}

.bithead-dropdown-animation-fade .bithead-desktop-menu .sub-menu {
    transform: none;
}

.bithead-dropdown-animation-zoom .bithead-desktop-menu .sub-menu {
    transform: scale(.96);
    transform-origin: top left;
}

.bithead-dropdown-animation-zoom .bithead-desktop-menu li:hover > .sub-menu,
.bithead-dropdown-animation-zoom .bithead-desktop-menu li:focus-within > .sub-menu {
    transform: scale(1);
}

.bithead-dropdown-animation-none .bithead-desktop-menu .sub-menu {
    transform: none;
    transition: none !important;
}

/* Off-canvas header: logo and close button share one predictable row. */
.bithead-offcanvas-header {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    padding: 12px;
}

.bithead-offcanvas-logo,
.bithead-offcanvas-logo a {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.bithead-offcanvas-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.bithead-offcanvas-logo-text {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.bithead-offcanvas-close {
    position: relative;
    top: auto;
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

/* Remove inherited WordPress/theme list margins that caused the first mobile
 * menu row (for example Home) to sit far away from the following row. */
.bithead-offcanvas-menus {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

.bithead-offcanvas-menu-group,
.bithead-offcanvas-menu-group + .bithead-offcanvas-menu-group {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.bithead-offcanvas-menu,
.bithead-offcanvas-menu .bithead-menu,
.bithead-offcanvas-menu .sub-menu,
.bithead-offcanvas-menu .bithead-menu-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* The top-level off-canvas list is a flex column so Elementor's Item Gap
 * control has a real layout property to update live. */
.bithead-offcanvas-menu > .bithead-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
}

.bithead-offcanvas-menu .bithead-menu-item {
    padding-top: 0;
    padding-bottom: 0;
}

.bithead-offcanvas-menu .bithead-menu-link {
    line-height: 1.35;
}

/* Reveal animation engine. */
.bithead-offcanvas-backdrop {
    transition-duration: var(--bithead-open-duration);
}

.bithead-offcanvas-panel {
    opacity: 1;
    transition-property: transform, opacity;
    transition-duration: var(--bithead-open-duration);
    transition-timing-function: cubic-bezier(.2,.75,.2,1);
}

.bithead-reveal-side-panel.bithead-open-animation-slide_fade .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-fade .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-zoom .bithead-offcanvas-panel {
    opacity: 0;
}

.bithead-reveal-side-panel.bithead-open-animation-slide_fade.is-open .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-fade.is-open .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-zoom.is-open .bithead-offcanvas-panel {
    opacity: 1;
}

.bithead-reveal-side-panel.bithead-open-animation-fade .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-fade.is-open .bithead-offcanvas-panel {
    transform: none;
}

.bithead-reveal-side-panel.bithead-open-animation-zoom .bithead-offcanvas-panel {
    transform: scale(.95);
}

.bithead-reveal-side-panel.bithead-offcanvas-left.bithead-open-animation-zoom .bithead-offcanvas-panel {
    transform-origin: left center;
}

.bithead-reveal-side-panel.bithead-offcanvas-right.bithead-open-animation-zoom .bithead-offcanvas-panel {
    transform-origin: right center;
}

.bithead-reveal-side-panel.bithead-open-animation-zoom.is-open .bithead-offcanvas-panel {
    transform: scale(1);
}

.bithead-open-animation-none .bithead-offcanvas-panel,
.bithead-open-animation-none .bithead-offcanvas-backdrop {
    transition: none !important;
}

.bithead-reveal-side-panel.bithead-open-animation-none .bithead-offcanvas-panel,
.bithead-reveal-side-panel.bithead-open-animation-none.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: none;
}

/* Modal variants keep centering transform while changing the visual motion. */
.bithead-reveal-modal.bithead-open-animation-slide .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -46%);
}

.bithead-reveal-modal.bithead-open-animation-slide.is-open .bithead-offcanvas-panel {
    transform: translate(-50%, -50%);
}

.bithead-reveal-modal.bithead-open-animation-slide_fade .bithead-offcanvas-panel {
    opacity: 0;
    transform: translate(-50%, -46%);
}

.bithead-reveal-modal.bithead-open-animation-slide_fade.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.bithead-reveal-modal.bithead-open-animation-fade .bithead-offcanvas-panel {
    opacity: 0;
    transform: translate(-50%, -50%);
}

.bithead-reveal-modal.bithead-open-animation-fade.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.bithead-reveal-modal.bithead-open-animation-zoom .bithead-offcanvas-panel {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.94);
}

.bithead-reveal-modal.bithead-open-animation-zoom.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.bithead-reveal-modal.bithead-open-animation-none .bithead-offcanvas-panel,
.bithead-reveal-modal.bithead-open-animation-none.is-open .bithead-offcanvas-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: reduce) {
    .bithead-desktop-menu .sub-menu,
    .bithead-offcanvas-panel,
    .bithead-offcanvas-backdrop {
        transition: none !important;
    }
}

/* =============================================================
 * Bithead 1.5.0 — image-only shine + reliable off-canvas logo
 * ============================================================= */
.bithead-offcanvas-logo {
    --bithead-offcanvas-logo-x: 0px;
    --bithead-offcanvas-logo-y: 0px;
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    transform: translate(var(--bithead-offcanvas-logo-x), var(--bithead-offcanvas-logo-y));
}

.bithead-offcanvas-logo > a {
    display: inline-flex;
    align-items: center;
    justify-content: inherit;
    min-width: 0;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.bithead-offcanvas-logo img,
.bithead-offcanvas-logo .bithead-offcanvas-logo-image {
    display: block !important;
    width: auto;
    max-width: min(100%, 220px);
    max-height: 110px;
    height: auto;
    object-fit: contain;
    opacity: 1;
    visibility: visible;
}

/* Avoid a theme/global image rule collapsing the logo inside Elementor preview. */
.elementor-editor-active .bithead-offcanvas-logo img,
.elementor-editor-preview .bithead-offcanvas-logo img {
    visibility: visible !important;
    opacity: 1 !important;
}

/* =============================================================
 * Bithead 1.7.0 — website dark mode engine + Elementor toggle
 * ============================================================= */
html[data-bithead-theme="light"],
html[data-bithead-theme="dark"] {
    color-scheme: light;
}
html[data-bithead-theme="dark"] {
    color-scheme: dark;
}

body.bithead-darkmode-auto-site {
    background-color: var(--bithead-page-bg);
    color: var(--bithead-text);
    transition: background-color .22s ease, color .22s ease;
}

body.bithead-darkmode-auto-site .site,
body.bithead-darkmode-auto-site #page,
body.bithead-darkmode-auto-site .site-content,
body.bithead-darkmode-auto-site .content-area,
body.bithead-darkmode-auto-site main.site-main {
    background-color: var(--bithead-page-bg);
    color: var(--bithead-text);
}

html[data-bithead-theme="dark"] body.bithead-darkmode-auto-site input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
html[data-bithead-theme="dark"] body.bithead-darkmode-auto-site textarea,
html[data-bithead-theme="dark"] body.bithead-darkmode-auto-site select {
    background-color: var(--bithead-surface);
    color: var(--bithead-text);
    border-color: var(--bithead-border);
}

html[data-bithead-theme="dark"] body.bithead-darkmode-auto-site input::placeholder,
html[data-bithead-theme="dark"] body.bithead-darkmode-auto-site textarea::placeholder {
    color: var(--bithead-muted);
}

/* Utility classes for Elementor/HTML blocks that should follow the Bithead palette. */
.bithead-theme-page { background-color: var(--bithead-page-bg) !important; color: var(--bithead-text) !important; }
.bithead-theme-surface { background-color: var(--bithead-surface) !important; color: var(--bithead-text) !important; }
.bithead-theme-text { color: var(--bithead-text) !important; }
.bithead-theme-muted { color: var(--bithead-muted) !important; }
.bithead-theme-border { border-color: var(--bithead-border) !important; }
.bithead-theme-primary { color: var(--bithead-primary) !important; }
.bithead-theme-primary-bg { background-color: var(--bithead-primary) !important; }

/* Dark logo variant. */
.bithead-logo-theme-media {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}
.bithead-logo-media-dark { display: none; }
html[data-bithead-theme="dark"] .bithead-logo-has-dark-variant .bithead-logo-media-light { display: none; }
html[data-bithead-theme="dark"] .bithead-logo-has-dark-variant .bithead-logo-media-dark { display: inline-flex; }

/* Elementor dark mode toggle. */
.bithead-dark-toggle-wrap {
    display: flex;
    width: 100%;
}
.bithead-dark-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid var(--bithead-border, #e5e7eb);
    background: var(--bithead-surface, #fff);
    color: var(--bithead-text, #111827);
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.bithead-dark-toggle:hover { transform: translateY(-1px); }
.bithead-dark-toggle:focus-visible {
    outline: 2px solid var(--bithead-primary, #2563eb);
    outline-offset: 2px;
}
.bithead-dark-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.bithead-dark-toggle-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}
.bithead-dark-toggle-icon-sun { display: none; }
.bithead-dark-toggle-icon-moon { display: inline-flex; }
html[data-bithead-theme="dark"] .bithead-dark-toggle-icon-sun { display: inline-flex; }
html[data-bithead-theme="dark"] .bithead-dark-toggle-icon-moon { display: none; }
.bithead-dark-toggle--switch .bithead-dark-toggle-icon { display: inline-flex; }
.bithead-dark-toggle-track {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(127, 127, 127, .18);
    background: color-mix(in srgb, currentColor 18%, transparent);
}
.bithead-dark-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: currentColor;
    transition: transform .2s ease;
}
html[data-bithead-theme="dark"] .bithead-dark-toggle-knob { transform: translateX(18px); }
.bithead-dark-toggle--icon_only .bithead-dark-toggle-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    body.bithead-darkmode-auto-site,
    .bithead-dark-toggle,
    .bithead-dark-toggle-knob {
        transition: none !important;
    }
}

/* Bithead's own neutral surfaces follow the website palette unless an
 * Elementor control explicitly overrides them. */
.bithead-desktop-menu .sub-menu,
.bithead-search-popover,
.bithead-offcanvas-panel,
.bithead-offcanvas-search {
    background-color: var(--bithead-surface, #ffffff);
    color: var(--bithead-text, #111827);
    border-color: var(--bithead-border, #e5e7eb);
}
.bithead-search-input {
    background-color: var(--bithead-surface, #ffffff);
    color: var(--bithead-text, #111827);
    border-color: var(--bithead-border, #e5e7eb);
}
.bithead-offcanvas-close,
.bithead-menu-trigger,
.bithead-search-toggle {
    color: var(--bithead-text, #111827);
}
