.mfg-masonry-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.mfg-grid-item {
    width: 31.33%; /* Adjusted for 3 columns with margins */
    margin: 1%;
    float: left;
    box-sizing: border-box;
    overflow: hidden;
}

.mfg-grid-item img {
    width: 95%; /* Reduced by 5% from 100% */
    height: auto;
    display: block;
    margin: 0 auto; /* Center the image horizontally */
    border-radius: 5px;
    object-fit: cover;
}

.mfg-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin: 0.5rem 0 0.25rem;
    line-height: 1.3;
    font-weight: 600;
}

.mfg-title a {
    text-decoration: none;
    color: #333;
}

.mfg-title a:hover {
    text-decoration: underline;
}

.mfg-excerpt {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Large screens (desktops, 1200px and up) */
@media (max-width: 1200px) {
    .mfg-grid-item {
        width: 31.33%; /* Maintain 3 columns */
        margin: 1%;
    }
}

/* Tablets (768px to 1199px) */
@media (max-width: 768px) {
    .mfg-grid-item {
        width: 48%; /* Switch to 2 columns */
        margin: 1%;
    }
    .mfg-title {
        font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    }
    .mfg-excerpt {
        font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
    .mfg-grid-item {
        width: 100%; /* Switch to 1 column */
        margin: 1% 0;
    }
    .mfg-title {
        font-size: clamp(0.85rem, 2vw, 1rem);
    }
    .mfg-excerpt {
        font-size: clamp(0.65rem, 1.6vw, 0.8rem);
    }
}

/* Small mobile devices (320px and below) */
@media (max-width: 320px) {
    .mfg-grid-item {
        width: 100%;
        margin: 1% 0;
    }
    .mfg-title {
        font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    }
    .mfg-excerpt {
        font-size: clamp(0.6rem, 1.4vw, 0.75rem);
    }
}