
.uptext1{
    margin-top: 2px;
}
.text1_medium {
    margin-top: 10px;
    color: #252525;
    width: fit-content;
    text-decoration: none;
}
.works-block {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.works-container {
    display: flex;
    width: 100%; height: 100%;
    margin-top: 10px;
    padding-top: 40px;
    border-top: 1px solid #8B8D93;
}
.filter-bar {
    width: fit-content; height 100%;
    margin-right: 50px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.filter-bar .selected{
    text-decoration: underline;
    font-weight: bold;
    color: #131314;
}
.filter-bar a {
    color: gray;
    text-decoration-line: none;
}
.filter-bar a:hover{
    text-decoration: underline;
    cursor: pointer;
}
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 338px); /* Ширина колонки */
    grid-auto-rows: 382px; /* Высота строки */
    grid-column-gap: 34px; /* Расстояние между колонками */
    grid-row-gap: 40px; /* Расстояние между строками */
    grid-auto-flow: dense;
}
.works-grid .designer-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.works-grid a{
    text-decoration: none;
}
.works-grid img {
    width: 100%; height: 100%; max-height: 348px;
    object-fit: cover;
}

@media screen and (max-width: 1300px) {
    .works-block {
        max-width: 960px;
    }
    .works-grid img {
        max-height: 238px;
    }
    .works-grid {
        margin-left: auto;
        grid-template-columns: repeat(3, 225px); /* Ширина колонки */
        grid-auto-rows: 272px; /* Высота строки */
        grid-column-gap: 20px; /* Расстояние между колонками */
        grid-row-gap: 30px; /* Расстояние между строками */
    }
}

@media screen and (max-width: 920px) {
    .works-container {
        flex-direction: column;
    }
    .works-grid img {
        max-height: 348px;
    }
    .works-grid {
        margin-left: unset;
        grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); /* Ширина колонки */
        grid-auto-rows: auto;
        grid-column-gap: 20px; /* Расстояние между колонками */
        grid-row-gap: 30px; /* Расстояние между строками */
    }
    .filter-bar {
        margin-right: unset;
        margin-bottom: 50px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media screen and (max-width: 660px) {
    .works-container {
        flex-direction: column;
    }

    .works-grid {
        margin-left: unset;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Ширина колонки */
        grid-row-gap: 20px; /* Расстояние между строками */
    }
    .filter-bar {
        margin-bottom: 20px;
        gap: 10px;
    }
}