.home-news {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    align-items: start;
    gap: 24px;

    margin-top: 64px;
}

.home-news__heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;

    min-width: 0;
}

.home-news__title {
    margin: 0;

    color: #000000;

    font-family: "Inter", Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 36px;
}

.home-news__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-height: 40px;
    padding: 8px 16px;

    border: 0;
    border-radius: 20px;

    color: #0093ee;
    background-color: #e8f6ff;

    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;

    white-space: nowrap;
    text-decoration: none;

    transition:
            color var(--sv-interaction-duration, 180ms) ease-out,
            background-color var(--sv-interaction-duration, 180ms) ease-out;
}

.home-news__button:disabled {
    opacity: 1;
    cursor: default;
}

.home-news__button:not(:disabled) {
    cursor: pointer;
}

.home-news__arrow {
    display: block;
    flex: 0 0 16px;

    width: 16px;
    height: 16px;

    background-color: currentColor;

    -webkit-mask-image:
            url("/images/icons/category-arrow-circle-right-108e708090425cc357a8bbe11386d3d1.svg");
    mask-image:
            url("/images/icons/category-arrow-circle-right-108e708090425cc357a8bbe11386d3d1.svg");

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;
}

.home-news__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 24px;

    min-width: 0;
}

.home-news-card {
    display: flex;
    flex-direction: column;
    gap: 16px;

    min-width: 0;
}

.home-news-card--featured {
    grid-column: span 2;
}

.home-news-card__media {
    display: block;

    width: 100%;
    aspect-ratio: 296 / 198;

    overflow: hidden;
    border-radius: 16px;

    background-color: #f5f5f5;
}

.home-news-card--featured .home-news-card__media {
    aspect-ratio: 616 / 414;
}

.home-news-card__media img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    transform: scale(1);
    transform-origin: center;

    transition: transform 300ms ease-out;
}

.home-news-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;

    min-width: 0;
}

.home-news-card__date {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 2px 8px;

    border-radius: 50px;
    box-shadow: inset 0 0 0 1px #0093ee;

    color: #0093ee;

    font-family: "Inter", Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;

    white-space: nowrap;
}

.home-news-card__title {
    margin: 0;

    color: #000000;

    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;

    overflow-wrap: anywhere;

    transition:
            color var(--sv-interaction-duration, 180ms) ease-out;
}

.home-news-card--featured .home-news-card__title {
    font-size: 28px;
    line-height: 36px;
}

.home-news-card__read {
    min-height: 36px;

    border-radius: 18px;

    font-size: 14px;
    line-height: 20px;
}

@media (hover: hover) and (pointer: fine) {
    .home-news-card__media:hover img {
        transform: scale(1.15);
    }

    .home-news-card__title:hover {
        color: #ee6a00;
    }

    /* Показуємо оформлення Hover також у поточному
       демонстраційному шаблоні з disabled-кнопками.
       Самі кнопки залишаються недоступними для натискання. */
    .home-news__button:hover {
        color: #ee6a00;
        background-color: #e8f6ff;
    }
}

.home-news__button:not(:disabled):active {
    color: #0082a7;
    background-color: #e8f6ff;
}

.home-news__button:focus-visible {
    outline: 2px solid #0093ee;
    outline-offset: 4px;
}

@media (max-width: 1279px) {
    .home-news {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .home-news__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .home-news {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;

        margin-top: 42px;
    }

    .home-news__heading {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .home-news__cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .home-news-card--featured {
        grid-column: auto;
    }

    .home-news-card--featured .home-news-card__title {
        font-size: 16px;
        line-height: 24px;
    }

    .home-news-card:not(.home-news-card--featured) {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }

    .home-news-card__read {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-news-card__media img,
    .home-news-card__title,
    .home-news__button {
        transition: none;
    }

    .home-news-card__media:hover img {
        transform: none;
    }
}