:root {
    --slider-dot-start: 10px;
    --slider-dot-space: 20px;
}

.homepage__blocks__list .block-slider .container {
    margin: 0 auto;
    padding: 0;
}

.block-slider {
    margin-bottom: 32px;
    
    .block-slider__top-nav {
        position: absolute;
        padding-bottom: 58px;
        z-index: 1;
        width: 100%;
        background: linear-gradient(180deg, #000000 -63.41%, rgba(0, 0, 0, 0) 100%);
        pointer-events: none;

        .block-slider__top-nav__list {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            margin: 0;
            padding: 32px 0 0 0;
            list-style: none;
            gap: 24px;
            pointer-events: all;
        }

        .block-slider__top-nav__link {
            position: relative;
            font-weight: 700;
            font-size: 18px;
            line-height: 24px;
            color: #FFF;
            margin-bottom: 7px;
            white-space: nowrap;

            &:before {
                content: '';
                display: block;
                width: calc(100% + 4px);
                height: 3px;
                position: absolute;
                bottom: -3px;
                left: 0;
                opacity: 0;
                transition: opacity linear 0.2s;
                -webkit-transition: opacity linear 0.2s;
                background-color: var(--accent-color);
            }

            &:hover:before {
                opacity: 1;
            }
        }
    }

    .carousel {
        .carousel__control {
            display: none;
        }

        .carousel__activator {
            display: block;
            position: absolute;
            right: 60px;
            z-index: 1;
            width: 8px;
            height: 8px;
            cursor: pointer;

            &:before {
                content: '';
                display: block;
                width: 100%;
                height: 100%;
                background-color: #fff;
                border-radius: 50%;
            }

            &:checked:before {
                background-color: var(--accent-color);
            }

            /* posicionamento dos radios da navegação por pontos */
            &:nth-last-of-type(1) { bottom: calc( 1 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(2) { bottom: calc( 2 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(3) { bottom: calc( 3 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(4) { bottom: calc( 4 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(5) { bottom: calc( 5 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(6) { bottom: calc( 6 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(7) { bottom: calc( 7 * var(--slider-dot-space) + var(--slider-dot-start)) }
            &:nth-last-of-type(8) { bottom: calc( 8 * var(--slider-dot-space) + var(--slider-dot-start)) }
        }

        .carousel__item {
            position: relative;
        }

        .block-slides__img {
            filter: brightness(0.8);
            -webkit-filter: brightness(0.8);
            width: 100%;
            height: calc(100vh - 88px);
            object-fit: cover;
        }

        .block-slides__link {
            color: #FFF;
            position: absolute;
            bottom: 60px;
            left: 66px;
            max-width: 700px;
        }
        
        .block-slides__title {
            margin: 0 0 12px 0;
            font-weight: 700;
            font-size: 42px;
            line-height: 52px;
            position: relative;

            &::before {
                content: '';
                display: block;
                height: 3px;
                position: absolute;
                width: 172px;
                top: -24px;
                background-color: var(--accent-color);
            }
        }

        .block-slides__excerpt {
            font-weight: 400;
            font-size: 18px;
            line-height: 24px;
        }
    }
}

/* -------------------------------------
   Mobile
------------------------------------- */
@media (max-width:991px) {
    .block-slider {
        margin-bottom: 24px;
        
        & .block-slider__top-nav {
            .block-slider__top-nav__list {
                justify-content: flex-start;
                flex-wrap: nowrap;
                overflow-x: auto;
                padding-left: 24px;
                padding-right: 24px;
            }
        }

        & .carousel {
            .carousel__activator {
                /* posicionamento dos radios da navegação */
                &:nth-child(1) { bottom: 32px; left: calc( 1 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(2) { bottom: 32px; left: calc( 2 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(3) { bottom: 32px; left: calc( 3 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(4) { bottom: 32px; left: calc( 4 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(5) { bottom: 32px; left: calc( 5 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(6) { bottom: 32px; left: calc( 6 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(7) { bottom: 32px; left: calc( 7 * var(--slider-dot-space) + var(--slider-dot-start)) }
                &:nth-child(8) { bottom: 32px; left: calc( 8 * var(--slider-dot-space) + var(--slider-dot-start)) }

                /* tansição dos slides */
                &:nth-of-type(1):checked~.carousel__screen .carousel__track { transform: translateX( calc( (1 - 1) * -100%) ); }
                &:nth-of-type(2):checked~.carousel__screen .carousel__track { transform: translateX( calc( (2 - 1) * -100%) ); }
                &:nth-of-type(3):checked~.carousel__screen .carousel__track { transform: translateX( calc( (3 - 1) * -100%) ); }
                &:nth-of-type(4):checked~.carousel__screen .carousel__track { transform: translateX( calc( (4 - 1) * -100%) ); }
                &:nth-of-type(5):checked~.carousel__screen .carousel__track { transform: translateX( calc( (5 - 1) * -100%) ); }
                &:nth-of-type(6):checked~.carousel__screen .carousel__track { transform: translateX( calc( (6 - 1) * -100%) ); }
                &:nth-of-type(7):checked~.carousel__screen .carousel__track { transform: translateX( calc( (7 - 1) * -100%) ); }
                &:nth-of-type(8):checked~.carousel__screen .carousel__track { transform: translateX( calc( (8 - 1) * -100%) ); }
            }

            .carousel__track {
                overflow-x: initial;
            }

            .carousel__item {
                width: 100%;
            }

            .block-slides__link {
                left: 0;
                padding: 0 24px;
            }
    
            .block-slides__title {
                font-size: 32px;
                line-height: 40px;
            }
        }
    }
}