@media (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
    }

    /*
     * Page-specific Elementor section width fixes (homepage, page ID 5).
     * These IDs come from Elementor's auto-generated element IDs and must be
     * updated if the page structure is rebuilt in Elementor.
     */
    .elementor-5 .elementor-element.elementor-element-4bac236 {
        --width: 100% !important;
    }
    .elementor-5 .elementor-element.elementor-element-65a483d {
        --width: 100% !important;
    }
    .elementor-5 .elementor-element.elementor-element-8b9a13b {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

.mobile-footer-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgb(255, 255, 255);
    border-top-width: 1px;
    border-top-style: solid;
    border-color: rgb(216, 216, 216);
    padding: 0px;
    z-index: 1000;
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px;
    height: 85px;
    transform: translateY(0px);
    margin: 0;
    list-style: none;
}

@media (max-width: 768px) {
    .mobile-footer-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Intentional: mobile footer nav replaces the Elementor desktop header on small screens. */
    .elementor-location-header {
        display: none !important;
    }

    body {
        padding-bottom: 70px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: #9CA3AF;
    text-decoration: none !important;
    transition: color 0.2s;
    min-width: 70px;
}

.mobile-footer-nav > .mobile-nav-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-item .material-icons {
    font-size: 28px;
    color: rgb(148, 163, 184);
}

.mobile-nav-item .mobile-nav-icon-svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: rgb(148, 163, 184);
}

.mobile-nav-item span:not(.material-icons) {
    font-size: 10px;
    font-weight: 500;
    color: rgb(9, 74, 122);
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.mobile-nav-item:hover,
.mobile-nav-item.active,
.mobile-nav-item.current-menu-item {
    color: #0D5A99;
}

.mobile-nav-item.active,
.mobile-nav-item.current-menu-item {
    font-weight: 600;
}

.mobile-sub-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 8px;
    z-index: 1001;
}

.mobile-nav-menu-item.submenu-open > .mobile-sub-menu {
    display: block;
}

.mobile-sub-menu .mobile-nav-menu-item {
    list-style: none;
}

.mobile-sub-menu .mobile-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
}

.mobile-sub-menu .mobile-nav-item .mobile-nav-label {
    font-size: 13px;
}


