.home-latest-posts {
    position: relative;
    width: 100%;
    margin: 28px 0 8px;
    padding: 56px 0 64px;
    overflow: hidden;
    background: #f7f6fb;
    direction: rtl;
    box-sizing: border-box;
}

.home-latest-posts__bg {
    position: absolute;
    inset: 0;
    background-color: #f7f6fb;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 0;
}

.home-latest-posts__inner {
    position: relative;
    z-index: 1;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.home-latest-posts__header {
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: center;
    float: none;
    width: auto;
    background: transparent;
}

.home-latest-posts__title {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.45;
    font-weight: 800;
    color: #1d2939;
}

.home-latest-posts__subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: #667085;
}

.home-latest-posts__stage {
    --home-posts-h: clamp(340px, 34vw, 480px);
    display: flex;
    align-items: stretch;
    gap: 16px;
    height: var(--home-posts-h);
    direction: rtl;
}

.home-latest-posts__card {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e4e7ec;
    color: #ffffff;
    text-decoration: none;
}

.home-latest-posts__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-latest-posts__end {
    flex: 0 0 calc(var(--home-posts-h) / 2);
    width: calc(var(--home-posts-h) / 2);
    height: 100%;
}

.home-latest-posts__end--first {
    border-radius: 0 999px 999px 0;
}

.home-latest-posts__end--last {
    border-radius: 999px 0 0 999px;
}

.home-latest-posts__middle {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.home-latest-posts__tile {
    min-width: 0;
    min-height: 0;
    border-radius: 24px;
}

.home-latest-posts__shade,
.home-latest-posts__caption {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.home-latest-posts__shade {
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.12) 0%, rgba(16, 24, 40, 0.72) 100%);
}

.home-latest-posts__caption {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    text-align: center;
}

.home-latest-posts__card:hover .home-latest-posts__shade,
.home-latest-posts__card:focus .home-latest-posts__shade,
.home-latest-posts__card:hover .home-latest-posts__caption,
.home-latest-posts__card:focus .home-latest-posts__caption {
    opacity: 1;
}

.home-latest-posts__caption-title {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 800;
    color: #ffffff;
}

.home-latest-posts__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffffff;
    color: #1d2939;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.home-latest-posts__more i {
    font-size: 12px;
}

@media (max-width: 991px) {
    .home-latest-posts {
        padding: 36px 0 40px;
    }

    .home-latest-posts__header {
        margin-bottom: 22px;
        padding: 0 8px;
    }

    .home-latest-posts__title {
        font-size: 22px;
    }

    .home-latest-posts__subtitle {
        font-size: 13px;
    }

    .home-latest-posts__inner {
        padding: 0 16px;
    }

    .home-latest-posts__stage {
        flex-direction: column;
        height: auto;
        gap: 12px;
    }

    .home-latest-posts__end {
        flex: none;
        width: 100%;
        height: 300px;
    }

    .home-latest-posts__end--first {
        border-radius: 50% 50% 0 0 / 42% 42% 0 0;
    }

    .home-latest-posts__end--last {
        border-radius: 0 0 50% 50% / 0 0 42% 42%;
    }

    .home-latest-posts__middle {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .home-latest-posts__tile {
        height: 210px;
        border-radius: 22px;
    }

    .home-latest-posts__tile .home-latest-posts__shade,
    .home-latest-posts__tile .home-latest-posts__caption {
        opacity: 1;
    }

    .home-latest-posts__more {
        display: none;
    }

    .home-latest-posts__caption-title {
        font-size: 18px;
    }
}
