/* ===== Mobile Pill Navbar (Universal) ===== */
.mobile-pill-nav {
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.mobile-pill-nav.mil-nav-visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991px) {

    /* Hide old top headers when pill nav is present */
    .mil-frame-top,
    .mil-frame .mil-frame-top,
    .mil-menu-frame .mil-frame-top {
        display: none !important;
    }

    .mobile-pill-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 25px;
        top: calc(25px + env(safe-area-inset-top));
        left: 50%;
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
        width: 95%;
        max-width: 450px;
        height: 48px;
        background-color: #1a1a1a;
        border-radius: 50px;
        padding: 4px 8px;
        z-index: 9999;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.06);
        transition: -webkit-transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease-in-out;
        will-change: transform, opacity;
    }

    .mobile-pill-nav.mil-nav-scrolled-down {
        -webkit-transform: translate3d(-50%, -150%, 0);
        transform: translate3d(-50%, -150%, 0);
        opacity: 0 !important;
        pointer-events: none;
    }

    .mobile-pill-nav .nav-icon {
        -webkit-tap-highlight-color: transparent;
        width: 38px;
        height: 38px;
        background-color: #ffffff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        text-decoration: none;
        overflow: hidden;
    }

    .mobile-pill-nav .nav-icon img {
        width: 70%;
        height: auto;
        object-fit: contain;
    }

    .mobile-pill-nav .nav-links {
        display: flex;
        align-items: center;
        flex-grow: 1;
        overflow-x: auto;
        margin: 0 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        justify-content: space-evenly;
    }

    .mobile-pill-nav .nav-links::-webkit-scrollbar {
        display: none;
    }

    .mobile-pill-nav .nav-links a {
        -webkit-tap-highlight-color: transparent;
        color: #f1f1f1;
        text-decoration: none;
        font-size: 13px;
        margin: 0 5px;
        white-space: nowrap;
        font-weight: 500;
        transition: color 0.3s;
    }

    .mobile-pill-nav .nav-links a:hover,
    .mobile-pill-nav .nav-links a.active {
        color: #ffffff;
        font-weight: 700;
    }

    .mobile-pill-nav .nav-contact {
        -webkit-tap-highlight-color: transparent;
        background-color: #ffffff;
        color: #1a1a1a;
        text-decoration: none;
        padding: 0 12px;
        border-radius: 30px;
        height: 34px;
        display: flex;
        align-items: center;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
        transition: background-color 0.3s;
    }

    .mobile-pill-nav .nav-contact:hover {
        background-color: #f0f0f0;
    }
}
