.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
    padding: 0 0 8px;
    scroll-snap-type: none;
}

.news-grid::-webkit-scrollbar {
    height: 6px;
}

.news-grid::-webkit-scrollbar-track {
    background: transparent;
}

.news-grid::-webkit-scrollbar-thumb {
    background: rgba(24, 9, 29, .18);
    border-radius: 999px;
}

.news-grid article {
    min-height: 350px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    color: var(--black);
    background: #fff;
    border: 1px solid #f0ecf2;
    border-radius: 16px;
    overflow: hidden;
    transition: color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.news-grid article::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background:
        linear-gradient(180deg, rgba(24, 9, 29, .08) 0%, rgba(24, 9, 29, .78) 100%),
        var(--news-image, none) center / cover no-repeat;
    opacity: 0;
    transition: opacity .25s ease;
}

.news-grid article:hover,
.news-grid article:focus-within {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(24, 9, 29, .14);
    transform: translateY(-2px);
}

.news-grid article:hover::after,
.news-grid article:focus-within::after {
    opacity: 1;
}

.news-grid small,
.news-grid .news-card__categories,
.news-grid h3,
.news-grid p,
.news-grid a {
    position: relative;
    z-index: 1;
}

.news-card__categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 14px;
}

.news-grid small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--grey);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.news-grid small::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    content: "";
    background: var(--orange);
    border-radius: 50%;
}

.news-grid h3 {
    margin: auto 0 16px;
    color: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.news-grid h3 a {
    color: inherit;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}

.news-grid p {
    margin: 0;
    color: var(--grey);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.news-grid > article > a {
    display: inline-flex;
    width: fit-content;
    margin-top: 28px;
    color: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

.news-grid article:hover small,
.news-grid article:focus-within small,
.news-grid article:hover p,
.news-grid article:focus-within p {
    color: rgba(255, 255, 255, .78);
}

.news-grid article:hover small::before,
.news-grid article:focus-within small::before {
    background: var(--orange);
}

@media (max-width: 1700px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-grid article {
        min-height: 260px;
        padding: 20px;
        border-radius: 14px;
    }
}
