/* wp-content/themes/sdm/vc-components/assets/smd-feature-grid/index.css */

.smd-feature-grid{
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(var(--smd-feature-cols, 3), minmax(0, 1fr));
    gap: var(--smd-feature-gap, 16px);
    margin: 56px 0;
}

/* Mobile: одна колонка как на скрине */
@media (max-width: 767px){
    .smd-feature-grid{
        grid-template-columns: 1fr;
        margin: 32px 0;
    }
}

.smd-feature{
    position: relative;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 24px;
    box-shadow: 0 12px 24px -4px rgba(145,158,171,.12);
    padding: 28px 28px 26px;
    overflow: hidden;
    min-height: 260px;

    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Темы/фоны под макет */
.smd-feature--theme-white{
    background: #ffffff;
}

.smd-feature--theme-soft-yellow{
    background: #fff3c7; /* мягкий желтый */
    border-color: rgba(255, 194, 0, .35);
}

.smd-feature--theme-soft-blue{
    background: #eef6ff; /* мягкий голубой */
    border-color: rgba(24, 119, 242, .12);
}

.smd-feature--theme-yellow-border{
    background: #FFFFFF; /* мягкий голубой */
    border: 2px solid #FFDD72
}

.smd-feature--theme-yellow{
    background: #FFFBEE; /* мягкий голубой */
    border-color: #F1EFEA;
}

/* Размеры (span’ы в сетке) */
.smd-feature--size-normal{
    grid-column: auto;
    grid-row: auto;
    min-height: 330px;
}

.smd-feature--theme-soft-yellow {
    min-height: 260px;
}

.smd-feature--theme-soft-yellow .smd-feature__text {
    color: #0A0A0A;
}
.smd-feature--size-wide{
    grid-column: span 2;
}

.smd-feature--size-tall{
    grid-row: span 2;
}

.smd-feature--size-big{
    grid-column: span 2;
    grid-row: span 2;
    max-height: 280px;
}

/* На мобилке все превращаем в 1x1, чтобы не было «дыр» */
@media (max-width: 767px){
    .smd-feature--size-wide,
    .smd-feature--size-tall,
    .smd-feature--size-big{
        grid-column: auto;
        grid-row: auto;
    }
}

.smd-feature__content{
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    max-width: 720px;
    z-index: 1;
}

.smd-feature__title{
    margin: 0;
    font-weight: 800;
    font-size: 24px;
    line-height: 32px;
    color: #0A0A0A;
}

.smd-feature__text{
    margin: 0;
    font-size: 16px;
    line-height: 20px;
    color: #8A8A8A;
}

/* Нормализуем отступы у контента из WYSIWYG */
.smd-feature__text > *:first-child{ margin-top: 0; }
.smd-feature__text > *:last-child{ margin-bottom: 0; }

.smd-feature__link{
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    color: #0A0A0A;
    text-decoration: none;
}

.smd-feature__link:hover{
    color: #0A0A0A;
}

.smd-feature__arrow{
    font-size: 18px;
    line-height: 1;
    transform: translateY(1px);
}

/* Медиа справа снизу, как на карточке со схемой интеграций */
.smd-feature__media{
    position: absolute;
    right: 0px;
    bottom: 0px;
    width: min(44%, 260px);
    max-height: 56%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 0;
}

.smd-feature__media img{
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    opacity: .95;
}

@media (min-width: 768px) and (max-width: 1023px){
    .smd-feature-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .smd-feature--size-tall {
        grid-column: span 2;
        grid-row: 3;
    }

    .smd-feature--size-big {
        grid-column: 2;
        max-height: 100%;
        grid-row: auto;
    }
}

@media (max-width: 1100px){
    .smd-feature__media{
        display: none;
    }

    .smd-feature--size-normal{
        min-height: auto;
    }
}


/* На маленьких — картинку делаем аккуратнее, чтобы не съедала текст */
@media (max-width: 767px){
    .smd-feature{
        padding: 22px 18px 20px;
        min-height: 180px;
    }

    .smd-feature__title{
        font-size: 22px;
    }


    .smd-feature--theme-soft-yellow {
        min-height: auto;
    }


}