.display-blog{
    margin-top: -15rem;
    display: flex;
    justify-content: center;
}

.blog-content{
    margin-top: 0;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    justify-items: center;  /* centers content *inside* each grid cell */
    justify-content: center; /* centers the whole grid itself */
    padding-left: 10rem;
    padding-right: 10rem;
}

.blog-item {
    width: 250px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
}
.blog-img {
    width: 250px;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-text {
    display: flex;
    flex-direction: column;
    align-items: center;   /* centers all children horizontally */
    gap: 1rem; /* space between text and button */
}

.blog-text a{
    width: 10rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: underline;
    color: var(--snd-bg-color);
    transition: all 0.5s ease;
}

.blog-text a:hover{
    font-weight: 600;
}

@media (max-width: 1381px) {
    .blog-content{
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1086px) {
    .blog-content{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 893px) {
    .blog-content{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 574px) {
    .blog-content{
        grid-template-columns: repeat(1, 1fr);
    }
    .blog-item {
        width: 80vw;
        flex-direction: column;
        box-sizing: border-box;
        cursor: pointer;
    }
    .blog-img {
        width: 80vw;
        overflow: hidden;
        position: relative;
        object-fit: cover;
    }
}