

.header-menu-initialized {
    /* This class is added to the root element once the menu has been fully initialized. */
}




/* ===============================
   RESET
=============================== */
.header-menu { list-style: none; margin: 0; padding: 0; }
.header-menu li { 
    margin: 0;
    padding: 0;
}

.header-menu a { text-decoration: none; color: inherit; }

*, *::before, *::after { box-sizing: border-box; }

:root {
    --header-height: 100px;
}


body.mobile-menu-is-open {
    overflow: hidden !important;
    height: 100%;
}


.tc-sub-menu > li:hover .submenu-toggle svg,
.tc-sub-menu > li:focus-within .submenu-toggle svg {
    filter: invert(100%) sepia(100%) grayscale(100%);
}

.tc-sub-menu > li:hover .submenu-toggle i,
.tc-sub-menu > li:focus-within .submenu-toggle i {
    filter: invert(100%) sepia(100%) grayscale(100%);
}


/* ===============================
   HEADER LAYOUT
=============================== */

header.custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 110px;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: stretch;
}

header.custom-header .max-width-container {
    display: flex;
    align-items: center;
    margin-inline: auto;
    max-width: 1400px;
    flex-wrap: nowrap;
    width: 95%;
    gap: 1rem;
}

header.custom-header .max-width-container > * {
    flex: 0 0 auto;
}

header.custom-header .site-logo,
header.custom-header .elementor-widget-theme-site-logo {
    flex: 0 0 auto;
    width: auto;
    max-width: 200px; /* optional safety */
}

nav.header-menu {
    height: 100%;
    display: flex;
}

ul.header-menu__list {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: start;
}

/* ===============================
   MENU ITEMS
=============================== */

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
}


.menu-item--depth-0 {
    position: relative;
}


.menu-link {
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: clamp(.6rem, 1vw, .95rem) !important;
    display: flex;
    text-transform: uppercase;
    font-weight: 700;
    min-height: 40px;
    background: transparent;
    align-items: center;
}

/* ===============================
   TOP LEVEL MENU ITEM BASE 
=============================== */

/* ===============================
   FULL WIDTH UNDERLINE
=============================== */

.menu-item--depth-0::before {
    content: '';

    position: absolute;
    left: 0;
    bottom: 0;

    width: 0%;
    height: 2px;

    background-color: currentColor;

    transition: width 0.3s ease-in-out;
}

/* ===============================
   TRIGGERS (LINK HOVER + FOCUS)
=============================== */

.menu-item--depth-0:has(> .menu-link:hover)::before,
.menu-item--depth-0:has(> .menu-link:focus-visible)::before {
    width: 100%;
}

/* ===============================
   ACCESSIBILITY FOCUS STYLE
=============================== */

.menu-item--depth-0 > .menu-link:focus-visible,
.menu-item--depth-0 > .submenu-toggle:focus-visible {

}

/* ===============================
   SUBMENU TOGGLE BUTTON
=============================== */

.submenu-toggle {
    padding: 0px !important;
    background: transparent !important;
    border: none;
    border-radius:0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: inherit !important;
}


button:hover,
button:focus {
    background: transparent;
    color: black;
}

.submenu-toggle:hover,
.submenu-toggle:focus {
    background: transparent;
    color: black;
}

.submenu-toggle svg {
    width: 6px;
    height: 6px;
    fill: currentColor;
}


/* ===============================
   TOGGLE ICONS — CONTEXT SWITCHING
=============================== */

.toggle-icon--desktop {
    display: flex;
    align-items: center;
}

.toggle-icon--mobile {
    display: none;
}

.toggle-icon {
    pointer-events: none; 
    fill: currentColor;
    padding:2px;
}

/* ===============================
   DESKTOP SUBMENUS (STATE DRIVEN)
=============================== */

.tc-sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    visibility: hidden;

    padding-left: 0;
    filter: drop-shadow(-4px 17px 12px rgba(0, 0, 0, 0.034));
    display: flex;
    flex-direction: column;

    min-width: 230px;
    width: auto;
    background: white;

    opacity: 0;
    transform: translateY(15%);
    pointer-events: none;

    transition: opacity 0.15s ease-in-out,
                transform 0.15s ease-in-out;
}


@media screen and (min-width: 1101px) {

.submenu-toggle svg {
    fill: initial;
}

.submenu-toggle {
    pointer-events: none !important;
}


.header-menu__list {
     gap: 15px;
     padding-block:0;
     margin: 0;
     gap:20px;
}
/* Keep top-level indicators pointing down */
.header-menu__list > .menu-item-has-children > .submenu-toggle svg {
    transform: rotate(90deg);
}

/* Make submenu indicators point right */
.tc-sub-menu .menu-item-has-children > .submenu-toggle svg {
    transform: rotate(0);
    fill: white;
}
}
/* OPEN STATE (JS controlled via .is-open) */
.menu-item.is-open > .tc-sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* NESTED DESKTOP MENUS */
.tc-sub-menu--level-2 {
    top: 0;
    left: 100%;
}


.menu-item--depth-1 {
    position:relative;
}

/* Submenu items */
.tc-sub-menu .menu-link {
    min-height: 35px;
    padding-block: 0.5rem;
    width: 100%;
}

.tc-sub-menu .menu-item {
    padding-inline:1rem;
}

.tc-sub-menu > li:hover,
.tc-sub-menu > li:focus-within {
    background: #424242;
}

.tc-sub-menu > li:hover > .menu-link,
.tc-sub-menu > li:focus-within > .menu-link {
    color: #fff !important;
}


/* ===============================
   MOBILE NAVIGATION
=============================== */

.mobile-menu-toggle {
    display: none;
    background: transparent !important;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding:0.5rem 0.8rem !important;
    margin-left: auto;
    flex: 0 0 auto;
}

.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
    background: transparent;
    color: black;
}

.mobile-nav-header {
    display: none;
}

.mobile-menu-controls {
    margin-left: auto;
    display: none;
}

.mobile-menu-close,
.mobile-menu-back {
    all:unset;
    display: none;
    cursor: pointer;
    background: transparent;
    border: 0;
    font-size: 1.25rem;
    padding: 0 !important;
}

.mobile-menu-close:focus,
.mobile-menu-back:focus {
}

/* ===============================
   MOBILE BREAKPOINT
=============================== */

@media (max-width: 1100px) {

    

    /* ===========================
       TOGGLE ICON SWAP
    =========================== */

    .toggle-icon--desktop { display: none; }
    .toggle-icon--mobile  { display: flex; align-items: center; }

    .toggle-icon--mobile {
        width: 0.8em;
        height: 0.8em;
    }

    /* ===========================
       VISIBLE CONTROLS
    =========================== */

    .mobile-menu-back,
    .mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }

    .mobile-menu-toggle {
        display: block;
    }

    header.custom-header {
        min-height: 90px;
        padding-inline: 30px !important;
    }

    header.custom-header {
        z-index: 10001;
    }


    nav.header-menu {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        opacity: 0;
        height: 100dvh;
        transform: translate3d(-100%, 0, 0);
        transition: opacity 0.1s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        visibility: hidden;
        pointer-events: none;
        flex-direction: column;
        background: white;
        will-change: transform;
        backface-visibility: hidden;
        overflow-y: auto;
        overflow-x: hidden;

        z-index: 10000;
    }

    /* OPEN STATE */
    body.mobile-menu-is-open nav.header-menu {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        background: white !Important;
        pointer-events: auto;
        opacity: 1;
    }

    /* ===========================
       BACKDROP OVERLAY
    =========================== */

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 9999;
        cursor: pointer;

        /* Fade in when injected */
        animation: overlay-fade-in 0.3s ease forwards;
    }

    @keyframes overlay-fade-in {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* ===========================
       TRACK SYSTEM 
    =========================== */

    ul.header-menu__list {
        /* Positioning root for the absolute submenu panels */
        position: relative;
        display: flex;
        padding-left: 0 !important;
        flex-direction: column;
        width: 100%;
        height: 100%;
        transform: translateX(calc(-100% * var(--menu-depth, 0)));
        transition: transform 0.3s ease-in-out;
        z-index: 1;

    }

    .menu-item {
        position: static;
        width: 100%;    
        padding: 5px 20px !important;
    }

    .menu-item--depth-0 {
        position: static;
    }

    /* ===========================
       MOBILE TYPOGRAPHY
    =========================== */

    .menu-link {
        font-size: 15px !important;
        font-weight: 900 !important;
        padding-block: 20px;
        width: 100%;
    }

    .menu-item+::before {
        display: none;
    }

    /* ===========================
       MOBILE SUBMENU PANELS
    =========================== */

    .menu-item > .tc-sub-menu {
        position: absolute;
        top: 0;
        left: 100%;     

        width: 100%;
        min-height: calc(100dvh - var(--mobile-nav-header-height, 90px));
        height: auto;

        background: white;

        display: flex;
        flex-direction: column;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition: opacity 0.2s ease-in-out;

        z-index: 2;       
    }

    .menu-item.is-open > .tc-sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Desktop submenu styles that must be neutralised on mobile */
    .tc-sub-menu {
        transform: none !important;  
        pointer-events: auto;        
    }

    /* ===========================
       ADMIN BAR FIX
    =========================== */

    body.admin-bar nav.header-menu {
        top: 46px;
        height: 100dvh;
        overflow-y:scroll;
    }

    /* ===========================
       MOBILE NAV HEADER
    =========================== */

    .mobile-nav-header {

        --mobile-nav-header-height: 90px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 20px !important;
        min-height: 90px;
        border-bottom: 1px solid black;
        flex-shrink: 0;    
    }

    .mobile-menu-controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    /* ===========================
       BREADCRUMB TITLE AREA
    =========================== */

    .mobile-nav-page-title {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0 0.5rem 0 0;
        overflow: hidden;
    }

    .mobile-nav-page-title span,
    .mobile-nav-page-title a {
        display: inline-flex;
        align-items: center;
        text-transform: uppercase;
        white-space: nowrap;
        color: inherit;
        text-decoration: none;
        font-weight: 700;
    }

    .mobile-nav-page-title a { cursor: pointer; }

    .mobile-nav-page-title a:hover,
    .mobile-nav-page-title a:focus { text-decoration: underline; }

    .mobile-nav-page-title a[aria-current="page"] { font-weight: 900; }

    .mobile-nav-page-title .breadcrumb-divider {
        font-size: 0.65em;
        opacity: 0.6;
        flex-shrink: 0;
    }

    .mobile-menu-back,
    .mobile-menu-close {
        display: inline-flex;
        color: black !important;
        background: transparent !important;
        padding: 0 !important;
    }



    .mobile-menu-back.hidden{
        display: none; /* only show on submenus, JS toggles this */
    }

    .mobile-menu-back:hover,
    .mobile-menu-close:hover {  
        background: transparent;
        color: black;
    }

   
    .mobile-menu-close svg {
        width: 30px;
        height: 30px;
        stroke: currentColor;
    }

    .mobile-menu-back svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        transform:scaleX(-1); 
    }
}

/* ===============================
   ACCESSIBILITY UTILITIES
=============================== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===============================
   FOCUS INDICATORS
=============================== */

.menu-link:focus-visible,
.submenu-toggle:focus-visible {
}

@media screen and (max-width:767px) {
        header.custom-header {
        padding-inline: 20px !important;
    }

    .mobile-nav-header {
        padding: 10px 20px !important;
    }

    .mobile-menu-close {
        padding-right: 0;
    }
}