.masonry {
    columns: 3; 
    column-gap: 20px; 
    max-width: 1200px;
    margin: 0 auto; 
}

@media (max-width: 1200px) {
    .masonry {
        columns: 2;
    }
}

@media (max-width: 992px) {
    .masonry {
        columns: 1; 
    }
}

.masonry .grid {
    display: inline-block;
    margin-bottom: 20px; 
    position: relative;
    width: 100%;
}

.masonry .grid:before {
    border-radius: 5px;
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /*background-color: rgba(0, 0, 0, .2); Artur - võtsin praegu ära, sest arusaamatu milleks vaja ja ei sobitu pildi nurkadega*/
    z-index: 1;
}

.masonry .grid img {
    width: 100%;
    border-radius: 5px;
    display: block;
    object-fit: cover;
    object-position: center;
    min-width: 300px; 
    min-height: 250px; 
    max-height: 400px; 
}

.masonry .grid__title {
    font-size: 1.2em !important;
    font-weight: bold;
    margin: 0;
    padding: 5px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    color: white !important;
    background-color: rgba(0, 0, 0, 0.5);
}

.masonry .grid__link {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
}