/* TermiteBiz mobile navigation: isolated selectors avoid modifying theme desktop styling. */
#tbmm-root, #tbmm-root *, #tbmm-toggle {
    box-sizing: border-box;
}

#tbmm-toggle, #tbmm-root { display: none; }

@media screen and (max-width: 1024px) {
    /* Only hide the old menus after the new menu has been initialized. */
    body.tbmm-ready header nav,
    body.tbmm-ready header #mobile-menu,
    body.tbmm-ready #mobile-menu,
    body.tbmm-ready header .select-menu {
        display: none !important;
    }

    body.tbmm-ready #tbmm-root { display: block; }
    body.tbmm-ready #page-title .tbmm-anchor,
    body.tbmm-ready #page-title-portfolio .tbmm-anchor {
        position: relative !important;
    }

    /* Reserve space for the hamburger beside longer page titles. */
    body.tbmm-ready #page-title .tbmm-anchor > h1,
    body.tbmm-ready #page-title-portfolio .tbmm-anchor > h1 {
        max-width: calc(100% - 68px) !important;
    }

    body.tbmm-ready #tbmm-toggle {
        display: flex !important;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        margin: 0;
        background: rgba(12, 12, 12, 0.28);
        border: 1px solid rgba(255, 255, 255, 0.72);
        border-radius: 5px;
        color: #fff;
        box-shadow: none;
        cursor: pointer;
        z-index: 10;
        line-height: 1;
        -webkit-appearance: none;
        appearance: none;
        transition: background-color .18s ease, border-color .18s ease;
    }
    body.tbmm-ready #tbmm-toggle:hover,
    body.tbmm-ready #tbmm-toggle[aria-expanded="true"] {
        background: rgba(0, 0, 0, .58);
        border-color: #fff;
    }
    body.tbmm-ready #tbmm-toggle:focus-visible,
    #tbmm-root button:focus-visible,
    #tbmm-root a:focus-visible {
        outline: 3px solid #dda92f !important;
        outline-offset: 3px;
    }

    .tbmm-bars { width: 23px; display: flex; flex-direction: column; gap: 5px; }
    .tbmm-bars > span { display: block; width: 23px; height: 2px; background: currentColor; border-radius: 2px; }

    /* Home page: use the existing slider/content as the hamburger anchor.
       No separate bar, no visible MENU label, no added vertical space. */
    body.tbmm-ready .tbmm-overlay-anchor {
        position: relative !important;
        isolation: isolate;
    }
    body.tbmm-ready .tbmm-overlay-anchor > #tbmm-toggle {
        top: 16px;
        right: max(16px, 4vw);
        transform: none;
        z-index: 9999;
        background: rgba(20, 20, 20, .73);
        border-color: rgba(255, 255, 255, .88);
    }
    body.tbmm-ready #tbmm-toggle.tbmm-viewport-toggle {
        position: fixed;
        top: 18px;
        right: 18px;
        transform: none;
        z-index: 9999;
        background: rgba(20, 20, 20, .8);
    }

    /* A full viewport drawer lets menus extend beyond the banner without clipping. */
    #tbmm-root .tbmm-backdrop {
        position: fixed !important;
        inset: 0;
        background: rgba(12, 15, 18, 0.58);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 999970;
        transition: opacity .24s ease, visibility .24s ease;
    }
    #tbmm-root .tbmm-drawer {
        display: flex !important;
        flex-direction: column;
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(370px, 91vw);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        border: 0;
        background: #fff;
        color: #252525;
        box-shadow: -16px 0 45px rgba(0,0,0,.15);
        opacity: 1;
        visibility: hidden;
        transform: translateX(105%);
        pointer-events: none;
        z-index: 999971;
        overflow: hidden;
        transition: transform .28s ease, visibility .28s ease;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
        text-align: left;
    }
    body.tbmm-open #tbmm-root .tbmm-backdrop,
    body.tbmm-open #tbmm-root .tbmm-drawer {
        visibility: visible;
        pointer-events: auto;
    }
    body.tbmm-open #tbmm-root .tbmm-backdrop { opacity: 1; }
    body.tbmm-open #tbmm-root .tbmm-drawer { transform: translateX(0); }
    body.tbmm-open { overflow: hidden !important; }

    #tbmm-root .tbmm-drawer-heading {
        flex: 0 0 auto;
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 12px 19px;
        background: #252525;
        border-bottom: 3px solid #d4a13b;
    }
    #tbmm-root .tbmm-close {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        color: #fff;
        background: transparent;
        border: 1px solid rgba(255,255,255,.4);
        border-radius: 5px;
        cursor: pointer;
        appearance: none;
    }
    #tbmm-root .tbmm-close:hover { background: rgba(255,255,255,.13); }

    #tbmm-root .tbmm-navigation {
        display: block !important;
        flex: 1 1 auto;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px 0 20px;
        background: #fff;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    #tbmm-root .tbmm-menu-group,
    #tbmm-root .tbmm-menu-group ul,
    #tbmm-root .tbmm-menu-group li {
        display: block;
        width: auto;
        float: none;
        position: relative;
        margin: 0 !important;
        padding: 0;
        max-width: none;
        box-shadow: none;
        text-align: left;
        border-radius: 0;
        background: transparent;
        list-style: none;
    }
    #tbmm-root .tbmm-menu-group li { border-bottom: 1px solid #eceae7; }
    #tbmm-root .tbmm-menu-group li > a {
        display: block;
        width: 100%;
        min-height: 53px;
        margin: 0 !important;
        padding: 16px 55px 16px 25px !important;
        color: #262626 !important;
        background: none !important;
        border: 0 !important;
        text-decoration: none !important;
        text-transform: none;
        letter-spacing: .01em;
        font-size: 17px;
        font-weight: 570;
        line-height: 1.3;
        white-space: normal;
        transition: color .18s ease, background .18s ease;
        float: none;
        box-shadow: none;
        text-shadow: none;
    }
    #tbmm-root .tbmm-menu-group li > a:hover,
    #tbmm-root .tbmm-menu-group li.current-menu-item > a,
    #tbmm-root .tbmm-menu-group li.current_page_item > a {
        color: #ab7425 !important;
        background: #fcfaf6 !important;
    }
    #tbmm-root .tbmm-menu-group li > a::before,
    #tbmm-root .tbmm-menu-group li > a::after { display: none !important; }

    #tbmm-root .tbmm-subtoggle {
        position: absolute;
        top: 5px;
        right: 11px;
        width: 43px;
        height: 43px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        color: #444;
        background: transparent;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    #tbmm-root .tbmm-subtoggle:hover { background: #f2eee6; }
    #tbmm-root .tbmm-subtoggle svg { width: 17px; height: 17px; transition: transform .18s ease; }
    #tbmm-root .tbmm-subtoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
    #tbmm-root .tbmm-menu-group ul.sub-menu {
        display: block;
        margin: 0 !important;
        padding: 0 0 0 14px !important;
        background: #faf9f6;
        border-top: 1px solid #e9e6df;
    }
    #tbmm-root .tbmm-menu-group ul.sub-menu[hidden] { display: none !important; }
    #tbmm-root .tbmm-menu-group ul.sub-menu li:last-child { border-bottom: 0; }
    #tbmm-root .tbmm-menu-group ul.sub-menu li > a {
        min-height: 47px;
        padding-top: 13px !important;
        padding-bottom: 13px !important;
        font-size: 15px;
        font-weight: 450;
        color: #555 !important;
    }

}

@media screen and (max-width: 380px) {
    body.tbmm-ready #tbmm-toggle { width: 44px; height: 44px; }
    body.tbmm-ready #page-title .tbmm-anchor > h1,
    body.tbmm-ready #page-title-portfolio .tbmm-anchor > h1 {
        max-width: calc(100% - 58px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tbmm-root .tbmm-backdrop,
    #tbmm-root .tbmm-drawer,
    body.tbmm-ready #tbmm-toggle { transition: none !important; }
}

/* === Responsive TermiteBiz footer ===
   The theme forces three floated footer widgets plus right-aligned contact text.
   These overrides change only the footer and only at tablet/mobile widths.
   The WordPress footer widgets and their existing content remain untouched. */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    #widget-area > .width-container.footer-3-column {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
        align-items: center;
        max-width: 840px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    #widget-area .footer-3-column > .widget {
        width: auto !important;
        float: none !important;
        clear: none !important;
        min-width: 0;
        margin: 0 !important;
        padding: 26px 10px !important;
        text-align: center !important;
    }
    #widget-area .footer-3-column > #text-2 { text-align: center !important; }
    #widget-area .footer-3-column > #text-4 {
        grid-column: 1 / -1;
        padding-top: 18px !important;
        border-top: 1px solid rgba(255,255,255,.16);
    }
    #widget-area .footer-3-column .textwidget { text-align: center !important; }
}
@media screen and (max-width: 767px) {
    #widget-area { padding: 8px 0 14px !important; }
    #widget-area > .width-container.footer-3-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: calc(100% - 36px) !important;
        max-width: 540px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 !important;
    }
    #widget-area .footer-3-column > .widget {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 26px 6px !important;
        text-align: center !important;
        overflow-wrap: anywhere;
    }
    #widget-area .footer-3-column > .widget + .widget {
        border-top: 1px solid rgba(255,255,255,.17);
    }
    #widget-area .footer-3-column h6.widget-title {
        margin: 0 0 14px !important;
        padding: 0 !important;
        font-size: 18px !important;
        line-height: 1.35 !important;
        letter-spacing: .08em;
        text-align: center !important;
    }
    #widget-area .footer-3-column .textwidget {
        max-width: 100%;
        text-align: center !important;
        font-size: 16px !important;
        line-height: 1.75 !important;
    }
    #widget-area .footer-3-column .textwidget a {
        overflow-wrap: anywhere;
    }
}
@media screen and (max-width: 1024px) {
    /* Center the existing company image without stretching/distorting it. */
    #widget-area .footer-3-column #text-3 .textwidget,
    #widget-area .footer-3-column #text-3 .textwidget center {
        display: block;
        text-align: center !important;
    }
    #widget-area .footer-3-column #text-3 img {
        display: block !important;
        width: auto !important;
        max-width: min(100%, 260px) !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    /* The old Yelp HTML uses a table and third-party badge iframe. */
    #widget-area .footer-3-column #text-4 .textwidget,
    #widget-area .footer-3-column #text-4 .textwidget p {
        text-align: center !important;
    }
    #widget-area .footer-3-column #text-4 table {
        display: table !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto 14px !important;
        border: 0 !important;
        border-collapse: collapse !important;
        float: none !important;
    }
    #widget-area .footer-3-column #text-4 table td {
        border: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        text-align: center !important;
    }
    #widget-area .footer-3-column #text-4 table img {
        display: block;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    #widget-area .footer-3-column #text-4 [id^="yelp-biz-badge"] {
        display: flex !important;
        justify-content: center !important;
        max-width: 100%;
        margin: 0 auto !important;
        text-align: center !important;
    }
    #widget-area .footer-3-column #text-4 [id^="yelp-biz-badge"] iframe {
        max-width: 100%;
    }
}

/* === About page: default Inikosoft page/sidebar template ===
   The normal template reserves 31% for a sidebar. Restore a full-width
   reading column on this specific page at phone/tablet widths only.
   The banner, hamburger, other pages and desktop layout are unchanged. */
@media screen and (max-width: 1024px) {
    body.tbmm-about-page #page-title-background,
    body.tbmm-about-page #page-title,
    body.tbmm-about-page #main {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    body.tbmm-about-page #page-title > .width-container,
    body.tbmm-about-page #main > .width-container {
        box-sizing: border-box;
        width: 94% !important;
        max-width: 94% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
    }

    body.tbmm-about-page #main #sidebar-border,
    body.tbmm-about-page #main #content-container,
    body.tbmm-about-page #main #content-container > .content-container-pro {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* If this sidebar has widgets, display them below the main article. */
    body.tbmm-about-page #main #sidebar {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        padding-left: 0 !important;
        border-left: 0 !important;
    }

    body.tbmm-about-page #main #content-container img {
        max-width: 100%;
        height: auto;
    }
}

/* About page v1.2.2: force the ACTUAL Inikosoft wrappers back to the
   available device width. The theme's desktop template uses a 69% article
   alongside a sidebar; custom theme rules may also size its title element.
   Scoped to this page and mobile/tablet screens only. */
@media only screen and (max-width: 1024px) {
    body.tbmm-about-page #page-title-background,
    body.tbmm-about-page #page-title,
    body.tbmm-about-page #main {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
        clear: both !important;
    }

    body.tbmm-about-page #page-title-background #page-title > .width-container,
    body.tbmm-about-page #main > .width-container,
    body.tbmm-about-page #main > .width-container.bg-sidebar-pro {
        display: block !important;
        box-sizing: border-box !important;
        width: 94% !important;
        min-width: 0 !important;
        max-width: 94% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
    }

    body.tbmm-about-page #main #sidebar-border,
    body.tbmm-about-page #main #content-container,
    body.tbmm-about-page #main #content-container .content-container-pro,
    body.tbmm-about-page #main .entry-content {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
        clear: both !important;
    }

    body.tbmm-about-page #main #sidebar {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        margin: 0 !important;
        padding-left: 0 !important;
        border-left: 0 !important;
    }
    body.tbmm-about-page #main #sidebar:empty { display: none !important; }
    body.tbmm-about-page #main img { max-width: 100% !important; height: auto !important; }
}
