/* =========================================================
   RST SERVICE SLIDER
   FULL CSS
   ========================================================= */

.rst-service-slider {

    --rst-orange: #ff5614;
    --rst-dark: #303543;
    --rst-gray: #eeeeF0;
    --rst-border: #dedfe3;

    width: 100%;
    max-width: 1200px;

    margin: 45px auto;
    padding: 0 20px;

    box-sizing: border-box;

    font-family: "Golos Text", Arial, sans-serif;
    color: var(--rst-dark);

    position: relative;
}


/* =========================================================
   ВЕРХНЯЯ ЧАСТЬ
   ========================================================= */

.rst-service-slider__top {

    display: grid;

    grid-template-columns: 280px 1fr;

    align-items: center;

    gap: 50px;

    margin-bottom: 25px;
}


.rst-service-slider__logo img {

    display: block;

    width: 280px;
    max-width: 100%;

    height: auto;

    margin: 0;
}


.rst-service-slider__intro {

    border-left: 4px solid var(--rst-orange);

    padding-left: 25px;
}


.rst-service-slider__intro h2 {

    margin: 0 0 16px !important;

    padding: 0 !important;

    color: var(--rst-dark);

    font-size: 30px;
    line-height: 1.15;

    font-weight: 700;
}


.rst-service-slider__intro p {

    margin: 0 !important;

    padding: 0 !important;

    color: #687080;

    font-size: 19px;
    line-height: 1.45;
}


/* =========================================================
   ЗАГОЛОВОК СЛАЙДА
   ========================================================= */

.rst-service-slider__title {

    position: relative;

    width: 100%;

    height: 76px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    display: flex;

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

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;
}


.rst-service-slider__title-track {

    position: relative;

    width: 100%;

    height: 76px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    display: flex;

    align-items: center;
    justify-content: center;
}


.rst-service-slider__title-item {

    position: absolute;

    left: 0;
    right: 0;
    top: 0;

    width: 100%;

    height: 76px !important;

    margin: 0 !important;

    padding: 0 110px !important;

    display: flex;

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

    box-sizing: border-box;

    color: var(--rst-dark) !important;

    font-size: 31px;

    line-height: 1.15;

    font-weight: 700;

    text-align: center;

    white-space: nowrap;

    will-change: transform, opacity;
}


/* =========================================================
   ЛИНИИ ОКОЛО ЗАГОЛОВКА
   ========================================================= */

.rst-service-slider__title::before,
.rst-service-slider__title::after {

    content: "";

    position: absolute;

    top: 50%;

    width: 64px;
    height: 4px;

    border-radius: 10px;

    background: var(--rst-orange) !important;

    transform: translateY(-50%);

    z-index: 5;
}


.rst-service-slider__title::before {

    left: 200px;
}


.rst-service-slider__title::after {

    right: 200px;
}


/* =========================================================
   НАЧАЛЬНОЕ ПОЛОЖЕНИЕ ЗАГОЛОВКОВ
   ========================================================= */

.rst-title-1 {

    transform: translateY(0);

    opacity: 1;
}


.rst-title-2 {

    transform: translateY(-100%);

    opacity: 0;
}


/* =========================================================
   ПЕРЕХОД НА СЛАЙД 2
   ========================================================= */

.rst-service-slider.is-slide-2 .rst-title-1 {

    animation:
        rst-title-go-down
        .6s
        cubic-bezier(.77, 0, .18, 1)
        forwards;
}


.rst-service-slider.is-slide-2 .rst-title-2 {

    animation:
        rst-title-from-top
        .6s
        cubic-bezier(.77, 0, .18, 1)
        forwards;
}


@keyframes rst-title-go-down {

    0% {

        transform: translateY(0);
        opacity: 1;
    }

    100% {

        transform: translateY(100%);
        opacity: 0;
    }
}


@keyframes rst-title-from-top {

    0% {

        transform: translateY(-100%);
        opacity: 0;
    }

    100% {

        transform: translateY(0);
        opacity: 1;
    }
}


/* =========================================================
   ВОЗВРАТ НА СЛАЙД 1
   ========================================================= */

.rst-service-slider.is-slide-1 .rst-title-1 {

    animation:
        rst-title-from-bottom
        .6s
        cubic-bezier(.77, 0, .18, 1)
        forwards;
}


.rst-service-slider.is-slide-1 .rst-title-2 {

    animation:
        rst-title-go-up
        .6s
        cubic-bezier(.77, 0, .18, 1)
        forwards;
}


@keyframes rst-title-from-bottom {

    0% {

        transform: translateY(100%);
        opacity: 0;
    }

    100% {

        transform: translateY(0);
        opacity: 1;
    }
}


@keyframes rst-title-go-up {

    0% {

        transform: translateY(0);
        opacity: 1;
    }

    100% {

        transform: translateY(-100%);
        opacity: 0;
    }
}


/* =========================================================
   ОКНО СЛАЙДЕРА
   ========================================================= */

.rst-service-slider__window {

    position: relative;

    width: 100%;

    height: 275px !important;

    min-height: 275px !important;

    margin: 0 !important;

    overflow: hidden;

    background: var(--rst-gray) !important;

    border-radius: 18px;

    box-shadow:
        0 12px 35px rgba(48, 53, 67, .08);
}


/* =========================================================
   TRACK
   ========================================================= */

.rst-service-slider__track {

    display: flex;

    width: 200%;

    height: 100%;

    margin: 0 !important;
    padding: 0 !important;

    transform: translateX(0);

    transition:
        transform .65s cubic-bezier(.77, 0, .18, 1);
}


/* =========================================================
   СЛАЙД
   ========================================================= */

.rst-service-slide {

    width: 50%;

    flex: 0 0 50%;

    height: 275px !important;

    min-height: 275px !important;

    max-height: 275px !important;

    box-sizing: border-box;

    padding: 30px 100px !important;

    margin: 0 !important;

    background: var(--rst-gray) !important;

    color: var(--rst-dark);

    position: relative;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;
}


/* =========================================================
   КОНТЕЙНЕР КАРТОЧЕК
   ========================================================= */

.rst-service-cards {

    width: 100%;

    height: 215px;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box;

    align-items: stretch;
}


.rst-service-cards--four {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


.rst-service-cards--five {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 16px;
}

/* =========================================================
   иконки
   ========================================================= */

.rst-service-card__icon img {
    transition: filter 0.25s ease;
}

.rst-service-card:hover .rst-service-card__icon img {
    filter: brightness(0) invert(1);
}

/* =========================================================
   КАРТОЧКА
   ========================================================= */

.rst-service-card {

    width: 100%;

    height: 215px !important;

    min-height: 215px !important;

    max-height: 215px !important;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-start;

    position: relative;

    box-sizing: border-box;

    margin: 0 !important;

    padding: 25px 16px 22px !important;

    color: var(--rst-dark);

    text-decoration: none !important;

    background: #ffffff !important;

    border: 2px solid var(--rst-border);

    border-radius: 12px;

    box-shadow:
        0 5px 18px rgba(48, 53, 67, .07);

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}


.rst-service-card:hover {

    color: #ffffff !important;

    background: /*var(--rst-orange)*/ var(--mainMenuBg) !important;

    border-color: /*var(--rst-orange)*/ #fff;

    transform: translateY(-5px);

    box-shadow:
        0 12px 28px rgba(255, 86, 20, .20);
}


/* =========================================================
   ИКОНКИ
   ========================================================= */

.rst-service-card__icon {

    width: 100px;
    height: 80px;

    margin: 0 auto 22px !important;

    padding: 0 !important;

    display: flex;

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

    flex: 0 0 72px;

    color: var(--rst-orange);
}


.rst-service-card__icon svg {

    display: block !important;

    width: 120px !important;
    height: 80px !important;

    max-width: 120px !important;
    max-height: 80px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible;
}


.rst-service-card:hover .rst-service-card__icon {

    color: #ffffff;
}


/* =========================================================
   ЗАГОЛОВОК КАРТОЧКИ
   ========================================================= */

.rst-service-card__title {

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    color: inherit;

    font-size: 18px;

    line-height: 1.3;

    font-weight: 700;

    text-align: center;
}


/* =========================================================
   СТРЕЛКА ВНУТРИ КАРТОЧКИ
   ========================================================= */

.rst-service-card__arrow {

    position: absolute;

    right: 18px;
    bottom: 14px;

    margin: 0 !important;

    color: var(--rst-orange);

    font-size: 27px;

    line-height: 1;

    transition:
        transform .25s ease,
        color .25s ease;
}


.rst-service-card:hover .rst-service-card__arrow {

    color: #ffffff;

    transform: translateX(4px);
}


/* =========================================================
   КНОПКИ ПЕРЕКЛЮЧЕНИЯ СЛАЙДОВ
   ========================================================= */

.rst-service-slider__arrow {

    position: absolute;

    top: 50%;

    width: 48px !important;
    height: 48px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

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

    box-sizing: border-box;

    border: 0 !important;
    outline: none !important;

    border-radius: 50%;

    background: #ff5614 !important;

    color: #ffffff !important;

    cursor: pointer;

    z-index: 100;

    transform: translateY(-50%);

    transition:
        transform .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}


/* =========================================================
   SVG СТРЕЛКА
   ДЕЛАЕМ МАКСИМАЛЬНО ПОХОЖЕ НА TERM-ITEM__BTN
   ========================================================= */

.rst-service-slider__arrow svg {

    display: block !important;

    width: 28px !important;
    height: 28px !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 28px;

    color: #ffffff !important;

    fill: none !important;

    stroke: currentColor;
}


.rst-service-slider__arrow use {

    color: #ffffff;
}


/* =========================================================
   ПРАВАЯ КНОПКА
   ========================================================= */

.rst-service-slider__arrow--next {

    right: 18px;
}


/* =========================================================
   ЛЕВАЯ КНОПКА
   ========================================================= */

.rst-service-slider__arrow--prev {

    left: 18px;
}


/* Стрелка из sprite.svg смотрит вправо.
   Для предыдущего слайда разворачиваем её. */

.rst-service-slider__arrow--prev svg {

    transform: rotate(180deg);
}


/* =========================================================
   HOVER КНОПОК
   ========================================================= */

.rst-service-slider__arrow:hover {

    background: #e94d0d !important;

    box-shadow:
        0 7px 20px rgba(255, 86, 20, .30);

    transform:
        translateY(-50%)
        scale(1.05);
}


/* =========================================================
   ПОКАЗЫВАЕМ ТОЛЬКО НУЖНУЮ СТРЕЛКУ
   ========================================================= */

/* СЛАЙД 1:
   только стрелка ВПРАВО */

.rst-service-slider.is-slide-1
.rst-service-slider__arrow--prev {

    display: none !important;
}


/* СЛАЙД 2:
   только стрелка ВЛЕВО */

.rst-service-slider.is-slide-2
.rst-service-slider__arrow--next {

    display: none !important;
}


/* =========================================================
   DOTS
   ========================================================= */

.rst-service-slider__dots {

    display: flex;

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

    gap: 8px;

    margin-top: 15px;
}


.rst-service-slider__dot {

    width: 8px;
    height: 8px;

    margin: 0;
    padding: 0;

    border: 0;

    border-radius: 50%;

    background: #c4c6ca;

    cursor: pointer;

    transition:
        width .25s ease,
        background .25s ease;
}


.rst-service-slider__dot.is-active {

    width: 30px;

    border-radius: 10px;

    background: var(--rst-orange);
}


/* =========================================================
   ПЛАНШЕТ
   ========================================================= */

@media (max-width: 1000px) {

    .rst-service-slider__window {

        height: auto !important;

        min-height: 0 !important;
    }


    .rst-service-slider__track {

        height: auto;
    }


    .rst-service-slide {

        height: auto !important;

        min-height: 0 !important;

        max-height: none !important;

        padding:
            30px
            80px !important;
    }


    .rst-service-cards {

        height: auto;
    }


    .rst-service-cards--four,
    .rst-service-cards--five {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .rst-service-card {

        height: 215px !important;

        min-height: 215px !important;

        max-height: 215px !important;
    }


    .rst-service-slider__arrow--next {

        right: 8px;
    }


    .rst-service-slider__arrow--prev {

        left: 8px;
    }

}


/* =========================================================
   ПЛАНШЕТ 651–1000px
   Отдельная настройка.
   НЕ затрагивает мобильную версию до 650px.
   ========================================================= */

@media (min-width: 651px) and (max-width: 1000px) {

    /* -----------------------------------------------------
       ВЕРХНЯЯ ЧАСТЬ

       Уменьшаем логотип, чтобы текст справа получил
       достаточно места.
       ----------------------------------------------------- */

    .rst-service-slider__top {

        grid-template-columns: 200px 1fr;

        gap: 25px;

        margin-bottom: 15px;
    }


    .rst-service-slider__logo img {

        width: 200px;

        max-width: 100%;
    }


    .rst-service-slider__intro {

        padding-left: 18px;
    }


    .rst-service-slider__intro h2 {

        margin-bottom: 10px !important;

        font-size: 24px;

        line-height: 1.15;
    }


    .rst-service-slider__intro p {

        font-size: 15px;

        line-height: 1.35;
    }


    /* -----------------------------------------------------
       ЗАГОЛОВОК СЛАЙДА

       Линии ставим близко к краям, чтобы они не
       пересекали текст заголовка.
       ----------------------------------------------------- */

    .rst-service-slider__title {

        height: 65px !important;
    }


    .rst-service-slider__title-track {

        height: 65px !important;
    }


    .rst-service-slider__title-item {

        height: 65px !important;

        padding: 0 70px !important;

        font-size: 25px;

        line-height: 1.15;

        white-space: normal;
    }


    .rst-service-slider__title::before {

        left: 12px;
    }


    .rst-service-slider__title::after {

        right: 12px;
    }


    .rst-service-slider__title::before,
    .rst-service-slider__title::after {

        width: 45px;

        height: 3px;
    }


    /* -----------------------------------------------------
       ОБЛАСТЬ СЛАЙДОВ
       ----------------------------------------------------- */

    .rst-service-slide {

        padding:
            25px
            65px !important;
    }


    /* -----------------------------------------------------
       КАРТОЧКИ

       На планшете оставляем 2 колонки.
       ----------------------------------------------------- */

    .rst-service-cards--four,
    .rst-service-cards--five {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 16px;
    }


    .rst-service-card {

        height: 200px !important;

        min-height: 200px !important;

        max-height: 200px !important;

        padding:
            20px
            16px
            18px !important;
    }


    .rst-service-card__icon {

        width: 64px;

        height: 64px;

        flex-basis: 64px;

        margin-bottom: 16px !important;
    }


    .rst-service-card__icon svg {

        width: 60px !important;

        height: 60px !important;

        max-width: 60px !important;

        max-height: 60px !important;
    }


    .rst-service-card__title {

        font-size: 17px;
    }


    /* -----------------------------------------------------
       СТРЕЛКИ
       ----------------------------------------------------- */

    .rst-service-slider__arrow--next {

        right: 8px;
    }


    .rst-service-slider__arrow--prev {

        left: 8px;
    }

}


/* =========================================================
   МОБИЛЬНЫЙ
   ========================================================= */

@media (max-width: 650px) {

    .rst-service-slider {

        padding: 0 12px;

        margin: 30px auto;
    }


    .rst-service-slider__top {

        display: block;

        margin-bottom: 15px;
    }


    .rst-service-slider__logo {

        margin-bottom: 20px;
    }


    .rst-service-slider__intro {

        padding-left: 18px;
    }


    .rst-service-slider__intro h2 {

        font-size: 24px;
    }


    .rst-service-slider__intro p {

        font-size: 16px;
    }


    /* -----------------------------------------------------
       ЗАГОЛОВОК
       ----------------------------------------------------- */

    .rst-service-slider__title {

        height: 70px !important;
    }


    .rst-service-slider__title-track {

        height: 70px !important;
    }


    .rst-service-slider__title-item {

        height: 55px !important;

        padding: 0 45px !important;

        font-size: 22px;

        line-height: 1.15;

        white-space: normal;
    }


    /* На мобильном линии возвращаем к краям
       и не даём им заходить на заголовок */

    .rst-service-slider__title::before {

        left: 10px;
    }

    .rst-service-slider__title::after {

        right: 10px;
    }


    .rst-service-slider__title::before,
    .rst-service-slider__title::after {

        width: 25px;
        height: 3px;
    }


    /* -----------------------------------------------------
       ОБЛАСТЬ СЛАЙДОВ
       ----------------------------------------------------- */

    .rst-service-slider__window {

        height: auto !important;

        min-height: 0 !important;
    }


    .rst-service-slide {

        height: auto !important;

        min-height: 0 !important;

        max-height: none !important;

        padding:
            15px
            45px !important;
    }


    /* -----------------------------------------------------
       КАРТОЧКИ
       ----------------------------------------------------- */

    .rst-service-cards {

        height: auto;
    }


    .rst-service-cards--four,
    .rst-service-cards--five {

        grid-template-columns: 1fr;
    }


    .rst-service-card {

        height: 175px !important;

        min-height: 175px !important;

        max-height: 175px !important;

        padding:
            18px
            16px
            18px !important;
    }


    /* -----------------------------------------------------
       ПЕРВЫЙ СЛАЙД — 4 КАРТОЧКИ

       На втором слайде 5 карточек по 175px.
       Чтобы оба слайда имели одинаковую общую высоту,
       карточки первого слайда делаем около 220px.

       4 × 220px + 3 × 20px = 940px
       5 × 175px + 4 × 16px = 939px

       Поэтому визуально верхний и нижний отступы
       у обоих слайдов будут одинаковыми.
       ----------------------------------------------------- */

    .rst-service-cards--four .rst-service-card {

        height: 220px !important;

        min-height: 220px !important;

        max-height: 220px !important;
    }


    /* -----------------------------------------------------
       КНОПКИ
       ----------------------------------------------------- */

    .rst-service-slider__arrow {

        width: 44px !important;
        height: 44px !important;
    }


    .rst-service-slider__arrow--next {

        right: 5px;
    }


    .rst-service-slider__arrow--prev {

        left: 5px;
    }


    .rst-service-slider__arrow svg {

        width: 18px !important;
        height: 18px !important;

        flex-basis: 18px;
    }

}