/* === Header Styles === */
header#masthead {
    background-color: #ffffff;
    padding: 5px 0;
    border-bottom: none;
    /* Sticky Transitions */
    position: relative;
    /* Default: Relative flow (avoids overlapping slider on load) */
    width: 100%;
    z-index: 999;
    transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Fix overlap with WordPress Admin Bar ONLY when fixed */
body.admin-bar header#masthead.header-sticky {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar header#masthead.header-sticky {
        top: 0 !important;
    }
}

/* Placeholder is handled by JS but needs to be block */
.header-placeholder {
    display: none;
    /* Active via JS inline style, but default to hidden to prevent flash */
}

header#masthead.header-sticky+.header-placeholder {
    display: block;
    /* Show if needed via CSS too, but JS is managing height */
}

/* === Desktop Sticky Behavior === */
/* When scanned (header-sticky present) */
header#masthead.header-sticky {
    position: fixed;
    /* Become fixed on scroll */
    top: 0;
    left: 0;
    box-shadow: 0 10px 26px rgba(17, 17, 17, 0.08), 0 2px 8px rgba(17, 17, 17, 0.05);
    padding: 5px 0;
    /* Shrink padding slightly */
}

/* Apply animation only on Desktop to avoid conflict with mobile hide transform */
@media screen and (min-width: 769px) {
    header#masthead {
        box-shadow: 0 10px 26px rgba(17, 17, 17, 0.08), 0 2px 8px rgba(17, 17, 17, 0.05);
    }

    header#masthead.header-sticky {
        animation: slideDown 0.3s ease forwards;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Hide Search on Scroll (Desktop Only) & Compact Layout */
@media screen and (min-width: 769px) {

    /* === UNIFIED DESKTOP HEADER LAYOUT (ALWAYS HORIZONTAL) === */
    /* Applied to both default and sticky states for consistency */
    header#masthead .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0;
    }

    header#masthead .site-branding {
        margin-bottom: 0;
        margin-right: 0;
        order: 1;
        /* Left */
        flex-shrink: 0;
    }

    header#masthead .custom-logo-link img {
        transition: width 0.3s ease;
    }

    /* === Updated Desktop Layout for Moved Search === */
    header#masthead .main-navigation {
        order: 2;
        flex-grow: 1;
        display: flex;
        align-items: center;
        /* Center menu in available space */
        justify-content: flex-start;
    }

    header#masthead .main-navigation ul {
        justify-content: center;
        width: auto;
        /* Allow it to shrink/grow properly */
        margin: 0 auto;
        /* Center visually in the nav container */
        display: flex;
    }

    /* Search Bar inside Navigation on Desktop */
    header#masthead .header-search {
        display: flex !important;
        width: 250px;
        flex-shrink: 0;
        margin-left: 20px;
        /* Keep spacing from menu */
        margin-top: 0;
    }

    /* ... */
}

/* === Mobile Behavior === */
@media screen and (max-width: 768px) {
    /* ... existing styles ... */

    /* Compact header on mobile */
    header#masthead,
    header#masthead.header-sticky {
        padding: 1px 0;
    }

    /* Navigation Drawer */
    .main-navigation {
        /* ... existing fixed styles ... */
        padding-top: 20px;
        display: flex;
        flex-direction: column;
    }

    /* Search Bar inside Drawer on Mobile */
    .main-navigation .header-search {
        width: 100%;
        padding: 0 20px;
        /* Horizontal padding matching menu */
        margin-bottom: 20px;
        /* Space between search and menu */
        box-sizing: border-box;
        order: -1;
        /* Ensure it's at the top if not already */
    }

    .search-form {
        width: 100%;
    }

    /* ... */


    header#masthead .search-form {
        width: 100%;
        max-width: 100%;
    }

    /* Ensure visibility override is not needed anymore since we force display flex above */
}

/* === Mobile Behavior === */
@media screen and (max-width: 768px) {

    /* Hide on Scroll Down */
    header#masthead.header-hidden {
        transform: translateY(-100%);
    }

    /* Ensure header remains on top */
    /* Ensure header remains on top */
    header#masthead {
        /* position: fixed;  <-- Removed to allow relative default on load */
        width: 100%;
        z-index: 2001;
        position: relative;
    }

    /* Ensure content stays visible */
    body.is-scrolled header#masthead .header-search {
        display: flex;
        /* Force keep visible */
        opacity: 1;
        visibility: visible;
        height: auto;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.site-branding {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
}

/* Logo Styling */
.custom-logo-link img {
    width: 166px;
    height: auto;
    display: block;
}

/* Fallback for text title if no logo */
.site-branding h1 {
    margin: 0;
    font-size: 24px;
}

.site-branding h1 a {
    color: #333;
    text-decoration: none;
}

/* Menu Styling */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-navigation ul li {
    margin: 0;
    position: relative;
}

.main-navigation ul li a {
    color: #333333;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 15px;
    margin: 0;
    /* Added horizontal padding for better hit area */
    transition: color 0.3s ease;
    text-transform: uppercase;
    display: inline-block;
}

/* External Link Icon */
.main-navigation ul li a[target="_blank"]::after {
    content: "\f35d";
    /* fa-external-link-alt */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.85em;
    vertical-align: middle;
    opacity: 0.7;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item>a,
.main-navigation ul li.current_page_item>a {
    color: #cca471;
}

.main-navigation .menu-item-has-children>a::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.main-navigation .sub-menu {
    list-style: none;
}

@media screen and (min-width: 769px) {
    .main-navigation .menu-item-has-children {
        position: relative;
    }

    .main-navigation .menu-item-has-children>.sub-menu {
        position: absolute;
        top: calc(100% + 2px);
        left: 0;
        min-width: 220px;
        padding: 10px 0;
        margin: 0;
        display: block;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 14px;
        box-shadow: 0 16px 36px rgba(17, 17, 17, 0.12), 0 4px 12px rgba(17, 17, 17, 0.06);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
        z-index: 1000;
    }

    .main-navigation .menu-item-has-children:hover>.sub-menu,
    .main-navigation .menu-item-has-children:focus-within>.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-navigation .sub-menu li {
        width: 100%;
    }

    .main-navigation .sub-menu li a {
        display: block;
        padding: 9px 16px;
        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase !important;
        line-height: 1.45;
        white-space: normal;
    }

    .main-navigation .sub-menu .menu-item-has-children>a::after {
        float: right;
        margin-left: 12px;
    }

    .main-navigation .sub-menu .sub-menu {
        top: -13px;
        left: calc(100% + 12px);
    }
}

/* Breadcrumb Styles (Moved from pages.css) */
.breadcrumb-wrapper {
    padding: 20px 0;
    margin-bottom: 0;
    text-align: center;
    background: #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0;
}

.breadcrumb {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    /* Normal case as requested */
    letter-spacing: 0;
    color: #888;
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.6;
}

.breadcrumb a {
    color: #c58f16;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400;
    font-size: 14px;
    font-family: inherit;
}

.breadcrumb a:hover {
    color: #a07010;
    text-decoration: underline;
}

.breadcrumb .breadcrumb-sep {
    margin: 0 10px;
    color: #6c757d;
}

.breadcrumb .current {
    display: inline;
    width: auto;
    margin-top: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    color: #222;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
}

/* Depth-2 views (Pages, Archives, etc.): Single line */
body:not(.single) .breadcrumb .current {
    display: inline;
    width: auto;
    margin-top: 0;
    white-space: normal;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
}

@media screen and (max-width: 768px) {
    .breadcrumb-wrapper .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
}

/* Removed redundant ::before slash as header.php adds it explicitly */
body:not(.single) .breadcrumb .current::before {
    content: none;
}

@media screen and (max-width: 768px) {
    .breadcrumb-wrapper {
        padding: 0 !important;
        margin-bottom: 0 !important;
        background: #f0f0f0 !important;
        min-height: 63px;
        display: flex;
        align-items: center;
    }

    .breadcrumb {
        font-size: 14px;
        padding: 8px 15px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.5;
        min-height: 63px;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
    }

    .breadcrumb a {
        color: #c58f16 !important;
        font-size: 14px;
        font-family: inherit;
    }

    .breadcrumb .current {
        white-space: nowrap !important;
        display: inline-block !important;
        color: #333;
        font-weight: 400;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1;
        min-width: 0 !important;
        max-width: 100% !important;
        font-size: 14px;
        font-family: inherit;
    }
}

/* Search Bar Styling */
.header-search {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 600px;
    /* Adjusted width for desktop */
    max-width: 100%;
}

@media screen and (min-width: 769px) {
    .search-form {
        background: #ffffff;
        border: none;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08), 0 2px 8px rgba(17, 17, 17, 0.04);
        padding: 10px 16px;
        gap: 10px;
    }
}

.search-form .search-field {
    background: transparent;
    border-radius: 0;
    border: 0;
    font-size: 14px;
    padding: 0;
    outline: none;
    width: 100%;
    box-shadow: none;
}

.search-form .search-submit {
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: #000000;
    font-size: 18px;
    position: static;
    width: 24px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex: 0 0 24px;
}

/* Mobile Header Styles */
#menu-toggle,
.mobile-menu-footer {
    display: none;
    /* Hidden on desktop */
}

@media screen and (max-width: 768px) {
    .header-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 5px 20px;
        position: relative;
    }

    /* specific order for mobile top row */
    #menu-toggle {
        display: flex;
        align-items: center;
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        padding: 0;
        color: #080704;
        order: 2;
        /* Move to Right */
        z-index: 1001;
        /* Above drawer */
        flex-direction: row-reverse;
        /* Icon (Right), Text (Left) */
    }

    /* Custom Hamburger Icon */
    .custom-hamburger {
        position: relative;
        display: block;
        width: 25px;
        height: 18px;
        margin: 0;
    }

    .custom-hamburger .line {
        display: none;
    }

    .custom-hamburger::before {
        content: "";
        position: absolute;
        top: 1px;
        left: 0;
        width: 25px;
        height: 2px;
        background: #080704;
        border-radius: 999px;
        box-shadow: 0 7px 0 #080704, 0 14px 0 #080704;
        transition: opacity 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-font-smoothing: antialiased;
    }

    .custom-hamburger .line:nth-child(1) {
        top: 1px;
    }

    .custom-hamburger .line:nth-child(2) {
        top: 8px;
    }

    .custom-hamburger .line:nth-child(3) {
        top: 15px;
    }

    #menu-toggle .menu-text {
        display: none;
        /* Hide menu text */
    }

    /* ... */

    /* Hide toggle when menu is open */
    body.menu-open #menu-toggle {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .site-branding {
        order: 1;
        /* Move to Left */
        flex-grow: 0;
        /* Do not center/grow */
        margin-bottom: 0;
        margin-left: 0;
        /* Remove centering hack */
        margin-right: auto;
        /* Push others to right */
    }

    .site-branding .custom-logo-link img {
        width: 160px;
        margin: 0 auto;
    }

    /* Navigation Drawer */
    .main-navigation {
        position: fixed;
        top: 0;
        left: auto;
        right: -100%;
        /* Hidden off-screen right */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 99999;
        /* Maximized to be top-most */
        transition: right 0.3s ease;
        padding-top: 20px;
        /* Adjusted padding to remove large gap */
        display: flex;
        /* Changed from block to flex for footer positioning */
        flex-direction: column;
        justify-content: flex-start;
        /* Align content to top */
        overflow-y: auto;
        overflow-x: visible;
    }

    .main-navigation.toggled {
        right: 0;
        /* Slide in from right */
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        padding-top: 18px;
        width: 100%;
        overflow: visible;
        flex-grow: 0;
        /* Do not take up remaining space */
        margin: 0;
        /* Reset margins */
        border-top: 0;
    }

    .main-navigation ul li {
        width: 100%;
        margin: 0;
        border-bottom: none;
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation ul li a {
        display: block;
        padding: 12px 0;
        text-align: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 14px;
        color: #000000;
    }

    .main-navigation .menu-item-has-children>a::after {
        float: right;
        margin-left: 12px;
        transition: transform 0.2s ease;
    }

    .main-navigation .sub-menu {
        display: none !important;
        width: 100%;
        margin: 0;
        padding: 4px 0 10px 20px;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        position: static;
    }

    .main-navigation .menu-item-has-children.is-submenu-open>.sub-menu {
        display: block !important;
    }

    .main-navigation .menu-item-has-children.is-submenu-open>a::after {
        transform: rotate(180deg);
    }

    .main-navigation .sub-menu li {
        width: 100%;
        margin: 0;
    }

    .main-navigation .sub-menu li a {
        padding: 10px 0;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        color: #505050;
    }

    .main-navigation .sub-menu .sub-menu {
        padding-left: 16px;
        padding-bottom: 0;
    }

    /* Support Section Styles */
    .mobile-menu-footer {
        display: block;
        /* Explicitly show on mobile */
        margin-top: 30px;
        /* Space after menu items */
        padding: 20px;
        text-align: center;
        background: #cca471;
        /* Requested color */
        width: 100%;
    }

    .mobile-menu-footer .support-label {
        font-size: 13px;
        color: #000;
        /* Darker for contrast */
        margin-bottom: 5px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .mobile-menu-footer .support-phone {
        font-size: 18px;
        font-weight: normal;
        /* Removed bold */
        color: #fff;
        /* White for contrast */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .mobile-menu-footer .support-phone a {
        color: #fff;
        text-decoration: none;
    }

    .mobile-menu-footer .support-phone i {
        font-size: 18px;
    }

    .mobile-menu-footer .support-phone a {
        color: #c40d2e;
        text-decoration: none;
    }

    body.menu-open {
        overflow: hidden;
        /* Prevent background scrolling */
    }

    /* Overlay for when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2000;
    }

    /* Search Bar on Mobile */
    .header-search {
        order: 3;
        width: 100%;
        margin-top: 10px;
        display: flex;
        justify-content: center;
        padding-top: 14px;
        padding-bottom: 10px;
        overflow: visible;
    }

    .search-form {
        width: 100%;
        max-width: 320px;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: center;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 8px 18px rgba(17, 17, 17, 0.06),
            0 16px 30px -22px rgba(17, 17, 17, 0.18);
        padding: 8px 12px;
    }

    .search-form .search-field {
        background: #ffffff;
        border-radius: 10px;
        height: 40px;
        border: 0 !important;
        width: 100%;
        padding-left: 0;
        padding-right: 14px;
        margin: 0 !important;
        display: block;
        font-size: 16px;
        box-shadow: none;
    }

    .search-form .search-submit {
        position: static;
        order: -1;
        flex: 0 0 24px;
        background: transparent;
        border-radius: 0;
        border: none;
        width: 24px;
        height: 24px;
        color: #000000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
    }
}

/* === Force WP Admin Bar to Top on Mobile === */
@media screen and (max-width: 782px) {

    /* Sticky header should adhere to top:0 when admin bar is absolute (scrolled away) */
    body.is-scrolled header#masthead.header-sticky {
        top: 0 !important;
    }
}

/* === Logged-in Top Bar & Guest Top Bar === */
.top-bar-loggedin,
.top-bar-guest {
    background: #000000;
    color: #ffffff;
    padding: 8px 0;
    font-size: 14px;
    width: 100%;
    z-index: 1002;
    /* Above mobile menu if needed */
    position: relative;
}

.top-bar-loggedin .top-bar-content,
.top-bar-guest .top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-loggedin .top-bar-left span,
.top-bar-guest .top-bar-left span {
    color: #fff;
    font-weight: 500;
}

.top-bar-loggedin .btn-account,
.top-bar-guest .btn-account {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 4px 15px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    display: inline-block;
}

.top-bar-loggedin .btn-account:hover,
.top-bar-guest .btn-account:hover {
    background-color: #ffffff;
    color: #cca471;
}

/* Ensure container matches header width logic */
.top-bar-loggedin .container,
.top-bar-guest .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media screen and (max-width: 768px) {

    .top-bar-loggedin,
    .top-bar-guest {
        text-align: left;
        /* Reset center alignment */
    }

    .top-bar-loggedin .top-bar-content,
    .top-bar-guest .top-bar-content {
        flex-direction: row !important;
        /* Keep on same line */
        gap: 10px;
        align-items: center;
        /* Vertically center */
        flex-wrap: nowrap !important;
    }

    /* Allow email to truncate */
    .top-bar-loggedin .top-bar-left,
    .top-bar-guest .top-bar-left {
        flex: 1;
        /* Take available checks */
        min-width: 0;
        /* Allow flex item to shrink below content size */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Target the span specifically if needed */
    .top-bar-loggedin .top-bar-left span,
    .top-bar-guest .top-bar-left span {
        display: block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Keep button size properly */
    .top-bar-loggedin .top-bar-right,
    .top-bar-guest .top-bar-right {
        flex-shrink: 0;
    }

    /* Mobile Menu Header (User Info) */
    .mobile-menu-header {
        padding: 20px;
        background: #ffffff;
        border-bottom: 0;
        text-align: center;
        margin-bottom: 10px;
    }

    .mobile-menu-header .user-greeting {
        margin-bottom: 10px;
        font-weight: 600;
        color: #333;
        font-size: 14px;
        /* Smaller font */
        white-space: nowrap;
        /* Single line */
        overflow: hidden;
        /* Hide overflow */
        text-overflow: ellipsis;
        /* Add ... */
        display: block;
        /* Ensure truncation works */
        max-width: 100%;
        /* Constraint width */
    }

    .mobile-menu-header .btn-account,
    .mobile-menu-header .btn-login {
        display: inline-block;
        padding: 8px 20px;
        background: #000000;
        color: #fff;
        text-transform: uppercase;
        font-size: 14px;
        border-radius: 10px;
        text-decoration: none;
        font-weight: 600;
    }

    .mobile-menu-header .btn-login {
        width: 100%;
        /* Full width for login button */
    }

    /* Toggle Name Display (High Specificity) */
    body .top-bar-loggedin span.desktop-name,
    body .mobile-menu-header span.desktop-name {
        display: none !important;
    }

    body .top-bar-loggedin span.mobile-name,
    body .mobile-menu-header span.mobile-name {
        display: inline-flex !important;
        align-items: center;
        vertical-align: middle;
        max-width: 100%;
        white-space: nowrap;
    }

    /* Ensure the text inside mobile name doesn't push the badge */
    body .top-bar-loggedin span.mobile-name>span:first-child,
    body .mobile-menu-header span.mobile-name>span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 120px;
    }

    /* Wrap the parent nicely to avoid breaking */
    .top-bar-loggedin .user-greeting-top,
    .mobile-menu-header .user-greeting span {
        display: flex !important;
        align-items: center;
        flex-wrap: nowrap;
    }

    /* Compact Level Badges */
    .header-level-badge .header-level-text {
        display: none !important;
    }

    .header-level-badge {
        padding: 0 !important;
        width: 18px !important;
        height: 18px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0 !important;
        margin-left: 5px !important;
        line-height: 1 !important;
    }

    .header-level-badge .header-level-icon {
        margin: 0 !important;
        font-size: 10px;
        line-height: 1 !important;
        display: block !important;
    }
}

/* Hide on Desktop */
@media screen and (min-width: 769px) {
    .mobile-menu-header {
        display: none;
    }

    .top-bar-loggedin .mobile-name {
        display: none !important;
    }
}

/* === Mobile Breadcrumb Customization === */
@media screen and (max-width: 768px) {
    .breadcrumb {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .breadcrumb a {
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        font-weight: 400;
        color: #c58f16 !important;
        font-family: inherit;
    }

    .breadcrumb .breadcrumb-sep {
        font-size: 14px;
        margin: 0 4px !important;
        flex-shrink: 0;
    }

    .breadcrumb .current {
        font-size: 14px;
        color: #000;
        font-weight: 400;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        margin-top: 5px !important;
        flex: 0 0 100% !important;
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        font-family: inherit;
        text-align: center !important;
    }
}

/* === Fix Mobile Menu Overlay === */
@media screen and (max-width: 768px) {

    /* Instead of lowering z-index, we make the header transparent so the overlay shows through */
    body.menu-open header#masthead {
        background-color: transparent !important;
        box-shadow: none !important;
        border-bottom: none !important;
    }

    /* Ensure the menu itself keeps its background */
    body.menu-open .main-navigation {
        background-color: #fff;
        z-index: 100000;
        /* Ensure it stays on top */
    }

    /* Dim the logo to simulate it being under the overlay */
    body.menu-open .site-branding {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

/* Final mobile breadcrumb lock to avoid older duplicated rules overriding device emulation */
@media screen and (max-width: 768px) {
    .breadcrumb {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        overflow: hidden !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .breadcrumb a,
    .breadcrumb .breadcrumb-sep {
        flex: 0 0 auto !important;
    }

    .breadcrumb .current {
        display: block !important;
        flex: 0 0 100% !important;
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        min-width: 0 !important;
        margin: 5px auto 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        text-align: center !important;
    }
}
