/* Слайдер с фоновым изображением */
.wf_slider--background .wf_slider-item {
    position: relative;
    min-height: 450px; /* Уменьшили с 600px */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Убираем обрезку только на десктопе */
@media (min-width: 993px) {
    .wf_slider--background .owl-stage-outer {
        overflow: visible !important;
    }

    .wf_slider--background .owl-stage {
        padding-bottom: 50px !important;
    }
}

/* На мобильных оставляем overflow hidden */
@media (max-width: 992px) {
    .wf_slider--background .owl-stage-outer {
        overflow: hidden !important;
    }

    .wf_slider--background,
    .wf_slider--background .wf-container {
        overflow: hidden !important;
        max-width: 100% !important;
    }
}

/* Затемнение для читаемости текста */
.wf_slider--background .wf_slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

/* Контент поверх затемнения */
.wf_slider--background .wf_slider-wrapper,
.wf_slider--background .wf_slider-inner,
.wf_slider--background .wf_slider-innercell,
.wf_slider--background .wf_slider-content {
    position: relative;
    z-index: 2;
}

/* Обеспечиваем достаточную высоту для контента */
.wf_slider--background .wf_slider-wrapper,
.wf_slider--background .wf_slider-inner {
    min-height: 450px; /* Уменьшили с 600px */
}

/* Белый цвет текста */
.wf_slider--background .wf_slider-content {
    color: #fff;
    padding-bottom: 30px;
}

.wf_slider--background .wf_slider-content h1,
.wf_slider--background .wf_slider-content h2,
.wf_slider--background .wf_slider-content h3,
.wf_slider--background .wf_slider-content h4,
.wf_slider--background .wf_slider-content h5,
.wf_slider--background .wf_slider-content .title,
.wf_slider--background .wf_slider-content .subtitle {
    color: #fff !important;
}

/* Вертикальное выравнивание */
.wf_slider--background .wf_slider-innercell {
    min-height: 450px; /* Уменьшили с 600px */
    display: flex;
    align-items: center;
    padding: 40px 0; /* Уменьшили с 50px */
}

/* Большие экраны */
@media (min-width: 1400px) {
    .wf_slider--background .wf_slider-item,
    .wf_slider--background .wf_slider-wrapper,
    .wf_slider--background .wf_slider-inner,
    .wf_slider--background .wf_slider-innercell {
        min-height: 550px; /* Уменьшили с 700px */
    }
}

/* Средние экраны (десктоп) */
@media (min-width: 993px) and (max-width: 1399px) {
    .wf_slider--background .wf_slider-item,
    .wf_slider--background .wf_slider-wrapper,
    .wf_slider--background .wf_slider-inner,
    .wf_slider--background .wf_slider-innercell {
        min-height: 450px;
    }
}

/* Планшеты */
@media (max-width: 992px) {
    .wf_slider--background .wf_slider-item,
    .wf_slider--background .wf_slider-wrapper,
    .wf_slider--background .wf_slider-inner,
    .wf_slider--background .wf_slider-innercell {
        min-height: 400px; /* Увеличили с 450px для планшетов */
    }

    .wf_slider--background .wf_slider-innercell {
        padding: 35px 15px;
    }
}

/* Мобильные устройства - ПЕРЕОПРЕДЕЛЯЕМ min-height: 48rem */
@media (max-width: 768px) {
    /* КРИТИЧЕСКИ ВАЖНО: Переопределяем правило из темы */
    .wf_slider--background.wf_slider .wf_owl_carousel,
    .wf_slider--background.wf_slider .wf_slider-item,
    .wf_slider--background.wf_slider .wf_slider-innercell {
        min-height: 280px !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Дополнительное переопределение для всех вложенных элементов */
    .wf_slider--background .wf_slider-wrapper,
    .wf_slider--background .wf_slider-inner {
        min-height: 280px !important;
        max-height: none !important;
        height: 100% !important;
    }

    /* Слайдер */
    .wf_slider--background .wf_slider-item {
        background-size: cover !important;
        background-position: center center !important;
    }

    .wf_slider--background .wf_slider-innercell {
        padding: 30px 15px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Усиливаем затемнение на мобильных */
    .wf_slider--background .wf_slider-item::before {
        background: rgba(0,0,0,0.6);
    }

    /* Контент */
    .wf_slider--background .wf_slider-content {
        padding-bottom: 0;
        width: 100%;
    }

    .wf_slider--background .wf_slider-content .title {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }

    .wf_slider--background .wf_slider-content .subtitle {
        font-size: 0.875rem !important;
        margin-bottom: 8px !important;
    }

    .wf_slider--background .wf_slider-content .text {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }

    .wf_slider--background .wf_slider-content .wf_btn-group {
        margin-top: 15px;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .wf_slider--background.wf_slider .wf_owl_carousel,
    .wf_slider--background.wf_slider .wf_slider-item,
    .wf_slider--background.wf_slider .wf_slider-innercell {
        min-height: 250px !important;
    }

    .wf_slider--background .wf_slider-wrapper,
    .wf_slider--background .wf_slider-inner {
        min-height: 250px !important;
    }

    .wf_slider--background .wf_slider-innercell {
        padding: 20px 15px !important;
    }

    .wf_slider--background .wf_slider-content .title {
        font-size: 1.1rem !important;
    }

    .wf_slider--background .wf_slider-content .subtitle {
        font-size: 0.8rem !important;
    }

    .wf_slider--background .wf_slider-content .text {
        font-size: 0.8rem !important;
    }
}