.portfolio-grid {
    overflow: visible;
}
    .portfolio-grid .portfolio-item.hide {
        display: none !important;
    }
/* Мобильная версия со скрытием */
@media (max-width: 783px) {

   body.home .portfolio-grid .portfolio-item.mobile-limit-hidden {
        display: none !important;
    }

    /* Показываем кнопку */
    .portfolio-more-button {
        display: flex !important;
        justify-content: center;
        margin-top: 24px;
    }
}

.filter-btn {
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

.filter-btn.active {
    color: #ffffff !important;
    background-color: #FA4B05 !important;
    border-color: #FA4B05 !important;
}


/* HOVER ZOOM */
/* Колонка становится контейнером */
.three-images-row .kt-inside-inner-col {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    min-height: 300px; /* Задай нужную высоту */
}

/* Картинка заполняет всю колонку */
.three-images-row .kt-inside-inner-col img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Плавное увеличение при hover */
.three-images-row .kt-inside-inner-col img {
    transition: transform 0.4s ease;
}

.three-images-row .kt-inside-inner-col:hover img {
    transform: scale(1.08);
}

/* Обёртка с текстом — прячем вниз */
.three-images-row .kt-inside-inner-col .image-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 30px 24px 24px;
    box-sizing: border-box;

    /* Начальное состояние */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;

    /* Градиент */
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* При hover — выезжает */
.three-images-row .kt-inside-inner-col:hover .image-overlay-text {
    transform: translateY(0);
    opacity: 1;
}
/* Создаём затемняющий слой */
.three-images-row .kt-inside-inner-col::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    pointer-events: none; /* чтобы не блокировал клики */
    z-index: 1;
}

/* При hover — затемняем */
.three-images-row .kt-inside-inner-col:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

/* Текстовый блок поверх затемнения */
.three-images-row .kt-inside-inner-col .image-overlay-text {
    z-index: 2; /* выше чем ::after */
}

/* ПЛАНШЕТЫ И МОБИЛЬНЫЕ:
   градиент и текст видны всегда */
@media (max-width: 1024px), (hover: none) {

    /* Текстовый блок сразу находится на месте */
    .three-images-row .kt-inside-inner-col .image-overlay-text {
        transform: translateY(0);
        opacity: 1;
    }

    /* Постоянное лёгкое затемнение изображения */
    .three-images-row .kt-inside-inner-col::after {
        background: rgba(0, 0, 0, 0.2);
    }

    /* На сенсорных устройствах отключаем увеличение */
    .three-images-row .kt-inside-inner-col:hover img {
        transform: none;
    }
}
.three-images-row .kt-inside-inner-col {
    position: relative;
    overflow: hidden;
}

/* Все декоративные слои пропускают клики */
.three-images-row .image-overlay-text,
.three-images-row .image-overlay-text *,
.three-images-row .image-overlay-text::before,
.three-images-row .image-overlay-text::after,
.three-images-row .kt-inside-inner-col::before,
.three-images-row .kt-inside-inner-col::after {
    pointer-events: none;
}

@media (hover: none) and (pointer: coarse) {

    /* Отключаем десктопное приподнимание на сенсорных устройствах */
    .three-images-row .kt-inside-inner-col:hover,
    .three-images-row .kt-inside-inner-col:active {
        transform: none !important;
        box-shadow: none !important;
        border-color: transparent !important;
    }

    .three-images-row .kt-inside-inner-col img {
        transition:
            filter 0.12s ease,
            transform 0.12s ease;
    }

    /* Визуальная реакция на нажатие */
    .three-images-row .kt-inside-inner-col.is-pressed img {
        filter: brightness(0.72);
        transform: scale(1.015);
    }

    .three-images-row a {
        -webkit-tap-highlight-color: transparent;
    }
}