/* ================================
   Mobile Styles (max-width: 767px)
   ================================ */
@media (max-width: 767px) {

   /* ===== Mobile menu: fits in screen without scrolling ===== */
#measurementTypes {
    display: flex;
    flex-wrap: wrap;           /* Allow wrapping on small screens */
    justify-content: space-between;
    gap: 1px;
    padding: 8px 0;
    width: 100%;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
}

#measurementTypes .menu-item {
    flex: 1 1 auto;            /* Items grow/shrink evenly */
    min-width: 0;              /* Allows shrinkage */
    text-align: center;
    text-decoration: none;
    background-color: #336699;
    color: white;
    border-radius: 45%;
    white-space: nowrap;       /* Keep text in one line */
    overflow: hidden;
    text-overflow: ellipsis;   /* Truncate long text */
    font-size: 0.75rem;
    padding: 6px 4px;
}
/* ===== Menu Hover & Active Styles ===== */
#measurementTypes .menu-item:hover {
    background-color: blue;
    color: white;
}

/* Active menu item */
#measurementTypes .menu-item.active {
    background-color: #003366;
    color: orange;
}

/* Optional: Ensure colors apply to links inside menu items */
#measurementTypes .menu-item:hover a,
#measurementTypes .menu-item.active a {
    color: inherit; /* inherit white or orange */
    text-decoration: none;
}


    /* Remove scrollbar entirely */
    #measurementTypes::-webkit-scrollbar {
        display: none;
    }

    /* ====== GENERAL MOBILE LAYOUT ====== */
    body {
        font-size: 14px;
        line-height: 1.4;
        padding: 0 10px;
    }

    h1, h2, h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    /* Adjust cards for single-column layout */
    .card {
        margin-bottom: 15px;
    }

    /* Images scale nicely */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Buttons fit mobile width */
    .btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    /* Remove unnecessary paddings/margins */
    .container, .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
}
