/* Блок «Статьи» над текстом «Станки и инструмент в Казахстане» на главной: 3 карточки с картинками */

.footer__outer .footer__top__outer > .__inner {
    flex-wrap: wrap !important;
}

.home-articles {
    order: -1;
    flex: 0 0 100%;
    min-width: 0;
    box-sizing: border-box;
}

.home-articles__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.home-articles__title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -.01em;
    text-transform: uppercase;
    color: #1b1b1d;
}

.home-articles__all,
.home-articles__all:visited {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dededf;
    border-radius: 8px;
    background: #fff;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #3d3d41;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}

.home-articles__all:hover {
    border-color: #141416;
    color: #141416;
    text-decoration: none;
}

.home-articles__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-articles__card,
.home-articles__card:visited {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e4e6;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.home-articles__card:hover {
    border-color: #d6d6d8;
    box-shadow: 0 10px 28px rgba(20, 20, 22, .08);
    transform: translateY(-2px);
    text-decoration: none;
}

.home-articles__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f4f4f5;
}

.home-articles__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    transition: transform .35s ease;
}

/* Крупное фото — во всю обложку */
.home-articles__image--cover img {
    object-fit: cover;
}

/* Фото товара на белом — целиком, белый фон сливается с подложкой */
.home-articles__image--contain img {
    box-sizing: border-box;
    padding: 14px 18px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.home-articles__card:hover .home-articles__image img {
    transform: scale(1.04);
}

.home-articles__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.home-articles__date {
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 12.5px;
    line-height: 1.3;
    color: #9a9aa0;
}

.home-articles__name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.3;
    color: #1b1b1d;
    transition: color .15s;
}

.home-articles__card:hover .home-articles__name {
    color: #d8231b;
}

.home-articles__text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    color: #6b6b70;
}

.home-articles__more {
    margin-top: auto;
    padding-top: 4px;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #d8231b;
}

.home-articles__more::after {
    content: " →";
}

/* Текст о сайте теперь на всю ширину под статьями */
.footer__outer .footer__top__outer > .__inner > .footer__about {
    flex: 1 1 100% !important;
    width: 100% !important;
}

@media screen and (max-width: 999px) {
    .home-articles__list {
        gap: 12px;
    }

    .home-articles__title {
        font-size: 20px;
    }

    .home-articles__body {
        padding: 12px 14px 14px;
    }

    .home-articles__name {
        font-size: 15px;
    }

    .home-articles__text {
        display: none;
    }
}

/* Телефон: лента карточек с прокруткой вбок, следующая карточка видна краем */
@media screen and (max-width: 767px) {
    .home-articles {
        width: 100%;
    }

    .home-articles__head {
        margin-bottom: 12px;
    }

    .home-articles__title {
        font-size: 18px;
    }

    .home-articles__list {
        display: flex;
        gap: 12px;
        margin: 0 -12px;
        padding: 0 12px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .home-articles__list::-webkit-scrollbar {
        display: none;
    }

    .home-articles__card {
        flex: 0 0 78%;
        max-width: 300px;
        scroll-snap-align: start;
    }

    .home-articles__card:hover {
        transform: none;
        box-shadow: none;
    }

    .home-articles__text {
        display: -webkit-box;
    }
}
