/* Stage-work Section */

.stage-work {
    position: relative;
    background-color: #EDEEFF;
    padding: 100px 0 150px;
}

.stage-work > * {
    position: relative;
    z-index: 1;
}

.stage-and-cost-title {
    font-weight: 600;
    font-size: 40px;
    line-height: 120%;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 30px;
}

.stage-and-cost-title span {
    color: #4a5fe6;
}

.stage-work-description {
    text-align: center;
    margin-bottom: 50px;
    font-size: 18px;
    line-height: 140%;
    color: #666;
}

/* Контейнер для стрелок и блока */
.stage-work-container {
    position: relative;
    margin-bottom: 50px;
}

/* Стрелки для слайдера */
.stage-work__custom-arrows {
    display: flex;
    gap: 42px;
    flex-shrink: 0;
    align-items: center;
    position: absolute;
    top: -80px;
    right: 0;
    z-index: 10;
}

.stage-work__custom-arrows .splide__arrow {
    background: transparent;
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.3s ease;
}

.stage-work__custom-arrows .splide__arrow:hover:not([disabled]) {
    border-color: #2C2C2C;
}

.stage-work__custom-arrows .splide__arrow--prev svg {
    transform: rotate(180deg);
}

.stage-work__custom-arrows .splide__arrow[disabled] {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* === РЕЖИМ СЕТКИ (по умолчанию) === */
.stage-work--grid .stage-work-block {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* === РЕЖИМ СЛАЙДЕРА === */
.stage-work--slider .stage-work-block {
    overflow: visible;
}

.stage-work--slider .stage-work-splide .splide__track {
    overflow: visible !important;
}

.stage-work--slider .stage-work-splide .splide__list {
    display: flex;
    gap: 20px;
}

.stage-work--slider .splide__slide {
    max-width: 380px; /* или нужная вам ширина */
    flex: 0 0 auto;
    height: auto;
    display: flex;
}

.stage-work--slider .stage-work-item {
    width: 100%;
    max-width: 380px;
}

/* Общие стили карточки */
.stage-work-item {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 30px 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    min-height: 226px;
    border-radius: 20px;
    z-index: 0;
}

.stage-work-icon {
    position: absolute;
    top: -20px;
    right: 20px;
    width: 60px;
    height: 60px;
}

.stage-work-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stage-work-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #6984E0 0%, #9E9FE2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
    z-index: 1;
    border-radius: 20px;
}

.stage-work-item:hover::before {
    transform: scaleX(1);
}

/* Текстовые элементы — выше псевдоэлемента */
.stage-work-item * {
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.stage-work-item ul {
    list-style: disc;
    padding-left: 20px;
}

.stage-work-number {
    font-weight: 500;
    font-size: 80px;
    line-height: 90%;
    color: rgba(0, 54, 246, 0.2);
    text-transform: uppercase;
}

.stage-work-item-content-title {
    white-space: normal;
    font-weight: 600;
    font-size: 28px;
    line-height: 120%;
    margin-bottom: 30px;
    color: #2C2C2C;
    margin-top: 0;
}

.stage-work-item-content-descr {
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    color: rgba(44, 44, 44, 0.6);
}

/* Цвета при наведении */
.stage-work-item:hover .stage-work-number,
.stage-work-item:hover .stage-work-item-content-title,
.stage-work-item:hover .stage-work-item-content-descr {
    color: #F7F7F7;
}

.stage-work-item--empty {
    background-color: transparent !important;
}

.stage-work-item--empty::before  {
    content: none;
}

/* Кнопка */
.stage-work-button {
    text-align: center;
    margin-top: 50px;
}

.stage-work-button .btn {
    display: inline-block;
    padding: 16px 40px;
    background: #4a5fe6;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.stage-work-button .btn:hover {
    background: #3a4fd6;
}

/* Адаптив */

@media (max-width: 1240px) {
    .stage-and-cost-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .stage-work--grid .stage-work-block {
        grid-template-columns: repeat(2, 1fr);
    }

    .stage-work--slider .splide__slide {
        width: 320px;
    }

    .stage-work-item-content-title {
        font-size: 24px;
    }

    .stage-work-item-content-descr {
        font-size: 15px;
    }

    .stage-work-number {
        font-size: 70px;
    }

    .stage-work__custom-arrows {
        top: -70px;
    }
}

@media (max-width: 768px) {
    .stage-work {
        padding: 60px 0 80px;
    }

    .stage-and-cost-title {
        font-family: 'Hero New', sans-serif;
        font-weight: 600;
        font-size: 24px;
        line-height: 120%;
        letter-spacing: -2%;
        margin-bottom: 30px;
        text-align: left;
    }

    .stage-work-description {
        text-align: left;
        margin-bottom: 30px;
        font-size: 16px;
    }

    .stage-work__custom-arrows {
        display: none; /* На мобиле скрываем стрелки */
    }

    /* На мобиле всегда показываем слайдером */
    /* Нативный скролл ТОЛЬКО для grid-режима */
    .stage-work--grid .stage-work-block {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
    }

    .stage-work--grid .stage-work-item {
        min-width: 280px;
        scroll-snap-align: start;
    }

    /* Для режима slider – НИЧЕГО НЕ ПЕРЕОПРЕДЕЛЯЕМ */
    .stage-work--slider .stage-work-block {
        display: block;
        overflow: visible;
    }

    .stage-work-item {
        padding: 25px 15px;
        gap: 16px;
        min-height: auto;
    }

    .stage-work-number {
        font-weight: 500;
        font-size: 60px;
        line-height: 95%;
    }

    .stage-work-item-content-title {
        font-weight: 600;
        font-size: 20px;
        line-height: 120%;
        margin-bottom: 20px;
    }

    .stage-work-item-content-descr {
        font-weight: 400;
        font-size: 14px;
        line-height: 120%;
    }

    .stage-work-item--empty {
        display: none;
    }

    .stage-work-button {
        margin-top: 40px;
    }

    .stage-work-button .btn {
        width: 100%;
        text-align: center;
    }
}

/* Для очень широких экранов */
