/**
 * ==========================================================
 * ПОПУЛЯРНЫЕ КАТЕГОРИИ — EKIN-PRO
 * ==========================================================
 */

.home-categories-v2 {
    --home-categories-accent: #ff7600;
    --home-categories-dark: #17202a;
    --home-categories-text: #4d5660;
    --home-categories-muted: #69727c;
    --home-categories-border: #e3e6e8;
    --home-categories-card-bg: #fff;

    position: relative;

    width: 100%;

    padding: 76px 0 80px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 0 0,
            rgba(255, 118, 0, 0.035),
            transparent 34%
        ),
        #fff;
}

.home-categories-v2 *,
.home-categories-v2 *::before,
.home-categories-v2 *::after {
    box-sizing: border-box;
}


/**
 * Шапка.
 */

.home-categories-v2__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 50px;

    margin-bottom: 40px;
}

.home-categories-v2__heading {
    max-width: 690px;
}

.home-categories-v2__eyebrow {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 14px;

    color: var(--home-categories-accent);

    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.home-categories-v2__eyebrow > span {
    display: block;

    width: 25px;
    height: 2px;

    background: var(--home-categories-accent);
}

.home-categories-v2 .home-categories-v2__title {
    margin: 0;

    color: var(--home-categories-dark);

    font-size: clamp(38px, 4.1vw, 62px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}

.home-categories-v2__subtitle {
    max-width: 650px;

    margin-top: 21px;

    color: var(--home-categories-muted);

    font-size: clamp(15px, 1.25vw, 19px);
    line-height: 1.6;
}

.home-categories-v2__subtitle p {
    margin: 0;
}


/**
 * Кнопка каталога.
 */

.home-categories-v2__catalog-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;

    flex: 0 0 auto;

    gap: 30px;

    min-width: 295px;
    min-height: 62px;

    margin-top: 27px;
    padding: 16px 25px;

    border: 1px solid var(--home-categories-accent);
    border-radius: 13px;

    background: #fff;
    color: var(--home-categories-accent) !important;

    font-size: 15px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.home-categories-v2__catalog-button svg {
    flex: 0 0 27px;

    width: 27px;
    height: 27px;
}

.home-categories-v2__catalog-button:hover {
    transform: translateY(-2px);

    background: var(--home-categories-accent);
    color: #fff !important;

    box-shadow: 0 12px 25px rgba(255, 118, 0, 0.16);
}


/**
 * Основная сетка.
 *
 * 20 колонок:
 * первая карточка — 10;
 * вторая — 5;
 * третья — 5;
 * нижние пять — по 4.
 */

.home-categories-v2__grid {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    grid-auto-flow: row;

    gap: 22px;
}


/**
 * Общая карточка.
 */

.home-categories-v2__card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 420px;

    padding: 31px 29px 25px;

    overflow: hidden;

    border: 1px solid var(--home-categories-border);
    border-radius: 19px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(249, 250, 250, 0.94)
        );

    box-shadow: 0 10px 28px rgba(20, 31, 42, 0.04);

    color: inherit;
    text-decoration: none;

    isolation: isolate;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.home-categories-v2__card:hover {
    transform: translateY(-5px);

    border-color: rgba(255, 118, 0, 0.34);

    box-shadow: 0 20px 45px rgba(20, 31, 42, 0.09);

    color: inherit;
}


/**
 * Размещение карточек.
 */

.home-categories-v2__card--1 {
    grid-column: span 10;
}

.home-categories-v2__card--2,
.home-categories-v2__card--3 {
    grid-column: span 5;
}

.home-categories-v2__card--4,
.home-categories-v2__card--5,
.home-categories-v2__card--6,
.home-categories-v2__card--7,
.home-categories-v2__card--8 {
    grid-column: span 4;
}


/**
 * Номер.
 */

.home-categories-v2__number {
    position: relative;
    z-index: 3;

    color: var(--home-categories-accent);

    font-size: 19px;
    font-weight: 700;
    line-height: 1;
}

.home-categories-v2__number-line {
    position: relative;
    z-index: 3;

    display: block;

    width: 25px;
    height: 2px;

    margin-top: 11px;

    background: var(--home-categories-accent);
}


/**
 * Изображение.
 */

.home-categories-v2__media {
    position: absolute;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
}

.home-categories-v2__image {
    display: block;
    transform: scale(1.15);
    width: 100%;
    height: 100%;

    object-fit: contain;

    /*filter: drop-shadow(
        0 15px 20px rgba(30, 38, 45, 0.1)
    );*/

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.home-categories-v2__card:hover .home-categories-v2__image {
    transform: scale(1.18);

   /* filter: drop-shadow(
        0 19px 25px rgba(30, 38, 45, 0.14)
    ); */
}


/**
 * Первая крупная карточка.
 */

.home-categories-v2__card--featured {
    min-height: 402px;

    padding: 32px 31px 28px;
}

.home-categories-v2__card--featured .home-categories-v2__media {

    top: 20px;
    right: -20px;
    bottom: 0;

    width: 65%;
}

.home-categories-v2__card--featured .home-categories-v2__content {
    position: relative;
    z-index: 3;

    display: flex;
    flex-direction: column;

    width: 40%;

    margin-top: 45px;
}

.home-categories-v2__card--featured
.home-categories-v2__card-title {
    font-size: clamp(24px, 2.1vw, 33px);
}

.home-categories-v2__card--featured
.home-categories-v2__description {
    max-width: 240px;

    margin-top: 16px;

    font-size: 15px;
    line-height: 1.55;
}


/**
 * Верхние компактные карточки.
 */

.home-categories-v2__card--top-small {
    min-height: 402px;
}

.home-categories-v2__card--top-small
.home-categories-v2__media {

    top: 30px;
    right: 10px;
    left: 10px;

    height: 220px;
}

.home-categories-v2__card--top-small
.home-categories-v2__content {
    position: relative;
    z-index: 3;

    margin-top: auto;
    margin-bottom: 48px;
}


/**
 * Нижние карточки.
 */

.home-categories-v2__card--bottom {
    min-height: 385px;
}

.home-categories-v2__card--bottom
.home-categories-v2__media {

    top: 30px;
    right: 10px;
    left: 10px;

    height: 160px;
}

.home-categories-v2__card--bottom
.home-categories-v2__content {
    position: relative;
    z-index: 3;

    margin-top: auto;
    margin-bottom: 48px;
}


/**
 * Тексты.
 */

.home-categories-v2__content {
    display: flex;
    flex-direction: column;
}

.home-categories-v2__card-title {

    display: flex;
    align-items: flex-start;

    min-height: 24px;

    color: var(--home-categories-dark);

    font-size: clamp(15px, 1.45vw, 18px);
    font-weight: 700;
    line-height: 1.25;
}

.home-categories-v2__description {
    display: block;
 min-height: 45px;
    margin-top: 8px;
    margin-bottom: 8px;
    color: var(--home-categories-text);

    font-size: 13px;
    line-height: 1.55;
}


/**
 * Круглая стрелка.
 */

.home-categories-v2__arrow {
    position: absolute;
    z-index: 4;
    bottom: 23px;
    left: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border: 1px solid rgba(255, 118, 0, 0.21);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.83);
    color: var(--home-categories-accent);

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.home-categories-v2__arrow svg {
    width: 24px;
    height: 24px;
}

.home-categories-v2__card:hover
.home-categories-v2__arrow {
    transform: translateX(3px);

    border-color: var(--home-categories-accent);

    background: var(--home-categories-accent);
    color: #fff;
}


/**
 * Если категорий меньше восьми.
 */

.home-categories-v2__grid--7
.home-categories-v2__card--4,
.home-categories-v2__grid--7
.home-categories-v2__card--5,
.home-categories-v2__grid--7
.home-categories-v2__card--6,
.home-categories-v2__grid--7
.home-categories-v2__card--7 {
    grid-column: span 5;
}

.home-categories-v2__grid--6
.home-categories-v2__card--4,
.home-categories-v2__grid--6
.home-categories-v2__card--5,
.home-categories-v2__grid--6
.home-categories-v2__card--6 {
    grid-column: span 6;
}

.home-categories-v2__grid--6
.home-categories-v2__card--4 {
    grid-column: span 7;
}

.home-categories-v2__grid--6
.home-categories-v2__card--5 {
    grid-column: span 6;
}

.home-categories-v2__grid--6
.home-categories-v2__card--6 {
    grid-column: span 7;
}


/**
 * Ноутбуки.
 */

@media (max-width: 1199.98px) {

    .home-categories-v2 {
        padding-top: 65px;
        padding-bottom: 68px;
    }

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

    .home-categories-v2__card,
    .home-categories-v2__card--1,
    .home-categories-v2__card--2,
    .home-categories-v2__card--3,
    .home-categories-v2__card--4,
    .home-categories-v2__card--5,
    .home-categories-v2__card--6,
    .home-categories-v2__card--7,
    .home-categories-v2__card--8 {
        grid-column: auto;
    }

    .home-categories-v2__card--featured {
        grid-column: span 2;

        min-height: 410px;
    }

    .home-categories-v2__card:not(
        .home-categories-v2__card--featured
    ) {
        min-height: 385px;
    }
}


/**
 * Планшеты.
 */

@media (max-width: 767.98px) {

    .home-categories-v2 {
        padding: 54px 0 58px;
    }

    .home-categories-v2__header {
        flex-direction: column;

        gap: 24px;

        margin-bottom: 32px;
    }

    .home-categories-v2__catalog-button {
        min-width: 260px;

        margin-top: 0;
    }

    .home-categories-v2__card--featured {
        grid-column: auto;
    }

    .home-categories-v2__card--featured
    .home-categories-v2__media {
        width: 51%;
    }

    .home-categories-v2__card--featured
    .home-categories-v2__content {
        width: 50%;
    }
}


/**
 * Телефоны.
 */

@media (max-width: 575.98px) {

    .home-categories-v2 {
        padding: 46px 0 50px;
    }

    .home-categories-v2__header {
        margin-bottom: 27px;
    }

    .home-categories-v2__eyebrow {
        font-size: 14px;
    }

    .home-categories-v2 .home-categories-v2__title {
        font-size: clamp(34px, 11vw, 46px);
        line-height: 1.04;
    }

    .home-categories-v2__subtitle {
        margin-top: 16px;

        font-size: 14px;
    }

    .home-categories-v2__catalog-button {
        width: 100%;
        min-width: 0;
        min-height: 54px;
    }

    .home-categories-v2__grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .home-categories-v2__card,
    .home-categories-v2__card--featured,
    .home-categories-v2__card--top-small,
    .home-categories-v2__card--bottom {
        min-height: 360px;

        padding: 25px 22px 22px;
    }

    .home-categories-v2__card--featured
    .home-categories-v2__media,
    .home-categories-v2__card--top-small
    .home-categories-v2__media,
    .home-categories-v2__card--bottom
    .home-categories-v2__media {
        top: 46px;
        right: 16px;
        left: 16px;
        bottom: auto;

        width: auto;
        height: 154px;
    }

    .home-categories-v2__card--featured
    .home-categories-v2__content,
    .home-categories-v2__card--top-small
    .home-categories-v2__content,
    .home-categories-v2__card--bottom
    .home-categories-v2__content {
        width: auto;

        margin-top: auto;
        margin-bottom: 47px;
    }

    .home-categories-v2__card--featured
    .home-categories-v2__card-title {
        font-size: 17px;
    }

    .home-categories-v2__card-title {
        font-size: 14px;
    }

    .home-categories-v2__description {
        max-width: none;

        margin-top: 9px;

        font-size: 13px;
    }

    .home-categories-v2__arrow {
        bottom: 20px;
        left: 22px;

        width: 43px;
        height: 43px;
    }
}


/**
 * Отключение анимаций.
 */

@media (prefers-reduced-motion: reduce) {

    .home-categories-v2__card,
    .home-categories-v2__image,
    .home-categories-v2__arrow,
    .home-categories-v2__catalog-button {
        transition: none;
    }
}