/* ====== Footer Nav Reset ====== */
footer.ma-footer-nav ul,
footer.ma-footer-nav ul ul,
footer.ma-footer-nav li,
footer.ma-footer-nav li li,
footer.ma-footer-nav ul.ma-nav,
footer.ma-footer-nav ul.ma-more-submenu,
footer.ma-footer-nav .ma-nav li,
footer.ma-footer-nav .ma-more-submenu li {
    list-style: none !important;
    list-style-type: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

footer.ma-footer-nav .ma-nav > li::before,
footer.ma-footer-nav .ma-nav > li::after,
footer.ma-footer-nav .ma-more-submenu > li::before,
footer.ma-footer-nav .ma-more-submenu > li::after,
footer.ma-footer-nav ul::before,
footer.ma-footer-nav ul::after,
footer.ma-footer-nav li::before,
footer.ma-footer-nav li::after,
footer.ma-footer-nav li::marker {
    content: none !important;
    display: none !important;
}

/* ===================== MODERN FOOTER NAV BAR ===================== */
footer.ma-footer-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 1200px;
    background: #ffffff;
    border-top: 1px solid #e7eaf1;
    box-shadow: 0 -2px 18px rgba(0, 40, 120, 0.06), 0 -1px 3px rgba(0, 0, 0, 0.06);
    z-index: 10010;
    padding: 0;
    transition: box-shadow 0.18s;
}

footer.ma-footer-nav .ma-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    height: 72px;
    min-height: 72px;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}

footer.ma-footer-nav .ma-nav > li {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 72px;
    position: relative;
}

footer.ma-footer-nav .ma-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 72px;
    min-height: 72px;
    font-size: 14px;
    color: #224466;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: transparent;
    transition: background 0.16s, color 0.18s, box-shadow 0.18s;
    border: none;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    gap: 2px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    box-sizing: border-box;
}

footer.ma-footer-nav .ma-nav a i {
    font-size: 20px;
    color: #1576bb;
    margin-bottom: 2px;
    transition: color 0.15s;
}

footer.ma-footer-nav .ma-nav a span {
    font-size: 11px;
    font-weight: 500;
    margin-top: 0;
    letter-spacing: 0.03em;
    line-height: 1.1;
    color: #224466;
}

footer.ma-footer-nav .ma-nav a:active,
footer.ma-footer-nav .ma-nav a.active {
    background: #eaf7fc;
    color: #0b7aba;
}

footer.ma-footer-nav .ma-nav a:hover {
    background: #f3faff;
    color: #1290cf;
}

footer.ma-footer-nav .ma-nav a:hover i,
footer.ma-footer-nav .ma-nav a.active i,
footer.ma-footer-nav .ma-nav a:active i {
    color: #0c6096;
}

footer.ma-footer-nav .ma-nav a::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 0;
    height: 2px;
    background: #1ea9f9;
    border-radius: 2px;
    transition: width 0.22s;
}

footer.ma-footer-nav .ma-nav a:hover::after,
footer.ma-footer-nav .ma-nav a.active::after {
    width: 40%;
}

/* =============== More Submenu =============== */
footer.ma-footer-nav .ma-nav-more {
    position: relative;
}

footer.ma-footer-nav .ma-more-submenu {
    position: absolute;
    right: 0;
    left: auto;
    bottom: 76px;
    inset-block-end: 76px;
    min-width: 150px;
    background: #ffffff !important;
    border-radius: 16px 16px 20px 20px !important;
    box-shadow: 0 8px 32px rgba(20, 40, 100, 0.22), 0 2px 8px rgba(0, 0, 0, 0.13) !important;
    border: 1.5px solid #e8ecf3 !important;
    padding: 8px 0;
    display: none !important;
    flex-direction: column !important;
    z-index: 10002;
    top: auto !important;
}

@media (min-width: 800px) {
    footer.ma-footer-nav .ma-more-submenu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 76px;
        inset-block-end: 76px;
    }
}

footer.ma-footer-nav .ma-nav-more.open .ma-more-submenu {
    display: flex !important;
    flex-direction: column !important;
}

footer.ma-footer-nav .ma-more-submenu li,
footer.ma-footer-nav .ma-more-submenu li a {
    display: block !important;
    width: 100% !important;
    min-width: 110px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    font-size: 12px !important;
}

footer.ma-footer-nav .ma-more-submenu a {
    padding: 10px 0 !important;
    font-size: 13px !important;
    border-bottom: 1px solid #e9eef7 !important;
    text-align: center !important;
    background: transparent !important;
    border-radius: 0 !important;
    color: #1667a6 !important;
    font-weight: 500 !important;
    outline: none !important;
    text-decoration: none !important;
    height: auto !important;
    min-height: 0 !important;
}

footer.ma-footer-nav .ma-more-submenu a:last-child {
    border-bottom: none !important;
}

footer.ma-footer-nav .ma-more-submenu a:active,
footer.ma-footer-nav .ma-more-submenu a:hover,
footer.ma-footer-nav .ma-more-submenu a:focus {
    background: #eaf7fc !important;
    color: #1576bb !important;
    outline: none !important;
}

/* =============== Correct Spacer Selector =============== */
/* PHP prints .ma-footer-spacer outside footer, so this must NOT be footer.ma-footer-nav .ma-footer-spacer */
.ma-footer-spacer {
    height: 72px;
    width: 100%;
}

/* =============== Mobile Optimization =============== */
@media (max-width: 600px) {
    footer.ma-footer-nav {
        max-width: 100vw;
        border-radius: 0;
        background: #ffffff;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        min-height: 72px;
        box-shadow: 0 -2px 18px rgba(0, 40, 120, 0.06), 0 -1px 3px rgba(0, 0, 0, 0.06);
    }

    footer.ma-footer-nav .ma-nav {
        height: 72px;
        min-height: 72px;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }

    footer.ma-footer-nav .ma-nav > li {
        height: 72px;
        min-height: 72px;
    }

    footer.ma-footer-nav .ma-nav a {
        height: 72px;
        min-height: 72px;
        font-size: 12px;
        padding: 0 2px !important;
        min-width: 36px !important;
    }

    footer.ma-footer-nav .ma-nav a i {
        font-size: 18px !important;
        margin-bottom: 5px !important;
    }

    footer.ma-footer-nav .ma-nav a span {
        font-size: 11px !important;
        line-height: 1 !important;
    }

    footer.ma-footer-nav .ma-more-submenu {
        min-width: 110px !important;
        bottom: 76px !important;
        inset-block-end: 76px !important;
        border-radius: 10px 10px 14px 14px !important;
        padding: 2px 0 !important;
        top: auto !important;
    }

    footer.ma-footer-nav .ma-more-submenu a {
        padding: 8px 0 !important;
        font-size: 11px !important;
    }

    .ma-footer-spacer {
        height: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* =============== Flutter/WebView App Mode =============== */
/* If hm_app=1 adds one of these body classes later, footer/spacer will be fully hidden. */
body.hm-app-mode footer.ma-footer-nav,
body.hm_app footer.ma-footer-nav,
body.app-webview footer.ma-footer-nav,
body.hm-app-mode .ma-footer-spacer,
body.hm_app .ma-footer-spacer,
body.app-webview .ma-footer-spacer {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Extra iOS WebKit hack */
@supports (-webkit-touch-callout: none) {
    footer.ma-footer-nav .ma-more-submenu {
        bottom: 76px !important;
        inset-block-end: 76px !important;
        top: auto !important;
    }
}

/* =========================================================
   Flutter WebView Mode Fix
   Flutter already has native bottom navigation.
   Hide WordPress footer nav and spacer completely.
========================================================= */

body.hm-flutter-app-mode footer.ma-footer-nav,
body.hm-flutter-app-mode .ma-footer-nav,
body.hm-flutter-app-mode .ma-footer-spacer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body.hm-flutter-app-mode,
body.hm-flutter-app-mode html {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.hm-flutter-app-mode #page,
body.hm-flutter-app-mode .site,
body.hm-flutter-app-mode .site-content,
body.hm-flutter-app-mode .content-area,
body.hm-flutter-app-mode .entry-content,
body.hm-flutter-app-mode main,
body.hm-flutter-app-mode article {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}