.latest__news-block {
    background-color: rgba(249, 246, 229, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.latest__news-container {
    height: 1044px;

}

.latest__news-padding {
    padding-left: var(--padding-left-default);
    padding-right: var(--padding-right-default);
}

.latest__news-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

}

.latest__news-title h2 {
    margin: 0;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 56px;
    color: rgba(74, 74, 74, 1);
    margin-top: 52px;

}

.latest__news-line {
    width: 100px;
    height: 8px;
    margin-top: 19px;
    background: rgb(var(--color-blue));
}

.masonry-container {
    max-width: 1600px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 30px;
    box-sizing: border-box;
    height: 800px;

}



.masonry-item {
    position: relative;
    width: calc(100%- 70px) / 4;
    box-sizing: border-box;
    display: inline-block;
    break-inside: avoid;
}

.masonry-item:nth-child(4n + 1) {
    order: 1;
}

.masonry-item:nth-child(4n + 2) {
    order: 2;
}

.masonry-item:nth-child(4n + 3) {
    order: 3;
}

.masonry-item:nth-child(4n) {
    order: 4;
}

.masonry-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 10px solid transparent;
    pointer-events: none;
    transition: border-color 0.3s ease;

}


.masonry-item:hover::before {
    border-color: rgb(var(--color-blue));

}

.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: 0.3s ease;
    box-sizing: border-box;
}

.title-border {
    position: absolute;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    bottom: 0;
    display: flex;
    align-items: center;
}

.title-font p {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
    letter-spacing: 2px;
    color: rgba(74, 74, 74, 1);
    padding-left: 20px;
    margin: 0;


}


.masonry-item:hover .title-border {
    transform: translateY(-30px);
    background-color: rgb(var(--color-blue));

}

.masonry-item:hover .title-font p {
    color: rgba(249, 246, 229, 1);
}

.latest__news-icon {
    position: absolute;
    width: 49px;
    height: 32px;
    display: flex;
    justify-content: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    cursor: pointer;
    transition: all 0.5s ease;

}

.latest__news-icon img {
    width: 65%;
    /* 1440 100% */
    height: auto;

}

.masonry-item:hover .latest__news-icon {
    opacity: 1;
}



@media only screen and (max-width: 1024px) {
    .latest__news-container {
        width: 100%;
        height: 1368px;

    }

    .latest__news-padding {
        padding-left: 46px;
        padding-right: 46px;

    }

    .latest__news-title h2 {
        margin-top: 65px;

    }

    .masonry-container {
        margin-top: 100px;
        column-gap: 61px;
        height: 1000px;
    }

    .masonry-item {
        position: relative;
        width: calc((100% - 180px) / 3);
        box-sizing: border-box;
    }

    .masonry-item:nth-child(3n + 1) {
        order: 1;
    }

    .masonry-item:nth-child(3n + 2) {
        order: 2;
    }

    .masonry-item:nth-child(3n) {
        order: 3;
    }

}


@media only screen and (max-width: 768px) {
    .latest__news-container {
        height: 1745px;

    }

    .latest__news-title h2 {
        font-size: 36px;
        line-height: 38px;
        margin-top: 40px;


    }

    .latest__news-line {
        margin-top: 20px;
        margin-bottom: 50px;

    }

    .masonry-container {
        gap: 30px;
        width: 520px;
        height: 1525px;
        margin: auto;


    }

    .masonry-item {
        width: calc(100% / 2);
        box-sizing: border-box;
    }


    .masonry-item:nth-child(1),
    .masonry-item:nth-child(3),
    .masonry-item:nth-child(6) {
        order: 1;
    }

    .masonry-item:nth-child(2),
    .masonry-item:nth-child(4),
    .masonry-item:nth-child(5),
    .masonry-item:nth-child(7),
    .masonry-item:nth-child(8) {
        order: 2;
    }

}


@media only screen and (max-width: 640px) {
    .latest__news-padding {
        padding-left: 17px;
        padding-right: 17px;

    }

    .masonry-container {
        width: 540px;
        height: 1570px;



    }
}

@media only screen and (max-width: 639px) {
    .latest__news-container {
        height: 2896px;

    }

    .latest__news-padding {
        padding-left: 0px;
        padding-right: 0px;

    }

    .latest__news-title h2 {
        font-size: 24px;


    }

    .latest__news-line {
        width: 50px;
        margin-top: 20px;
        margin-bottom: 40px;

    }

    .masonry-container {
        gap: 20px;
        width: 270px;
        height: 2716px;
        margin: auto;

    }

    .masonry-item {
        width: 100%;

    }

    .masonry-item:nth-child(1),
    .masonry-item:nth-child(2),
    .masonry-item:nth-child(3),
    .masonry-item:nth-child(4),
    .masonry-item:nth-child(5),
    .masonry-item:nth-child(6),
    .masonry-item:nth-child(7),
    .masonry-item:nth-child(8) {
        order: 1;
    }

}