.carousel {
    display: flex;
    justify-content: center;
    padding: calc(78 / var(--root-font-size) * 1rem) 0 calc(155 / var(--root-font-size) * 1rem);
    text-align: center;
    background: var(--secondary-colour);
    position: relative;
    &:after {
        content: "";
        position: absolute;
        bottom: 0;
        width: 100%;
        height: calc(calc(155 / var(--root-font-size) * 1rem) + calc(170 / var(--root-font-size) * 1rem));
        background: #fff;
    }
    .carousel__container {
        flex: 0 0 calc(1104 / var(--root-font-size) * 1rem);
        min-width: 0;   /* KEY for flex rows */
        min-height: 0;
    }
    .carousel-subtitle {

    }
    .carousel-title {
        margin: calc(20 / var(--root-font-size) * 1rem) 0 0 0;
    }
    .carousel-wrapper {
        position: relative;
    }
    .swiper {
        margin: calc(47 / var(--root-font-size) * 1rem) 0 0 0;
        min-width: 0;
        min-height: 0;
        width: 100%;
        position: relative;
        /* display: none; */
    }
    .swiper-slide {
        aspect-ratio: 356/360;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        text-align: left;
        &:before {
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            background: #000000 0% 0% no-repeat padding-box;
            opacity: 0.25;
        }
        &:after {
            content: "";
            position: absolute;
            width: 100%;
            height: 45.83%;
            background: transparent linear-gradient(180deg, #00000000 0%, #000000 100%) 0% 0% no-repeat padding-box;
            opacity: 0.5;
        }
        .carousel-slide-image__container {
            position: absolute;
            width: 100%;
            height: 100%;
            &:before {
                content: "";
                display: inline-block;
                position: absolute;
                top: calc(35 / var(--root-font-size) * 1rem);
                left: calc(35 / var(--root-font-size) * 1rem);
                vertical-align: middle;
                width: 3px;
                height: calc(100% - calc(160 / var(--root-font-size) * 1rem));
                border-left: 1px solid #fff;
                position: absolute;
                z-index: 2;
            }
            &:after {
                content: "";
                display: inline-block;
                position: absolute;
                top: calc(35 / var(--root-font-size) * 1rem);
                left: calc(35 / var(--root-font-size) * 1rem);
                vertical-align: middle;
                width: calc(100% - calc(70 / var(--root-font-size) * 1rem));
                height: calc(100% - calc(54 / var(--root-font-size) * 1rem));
                border-top: 1px solid #fff;
                position: absolute;
                border-right: 1px solid #fff;
                z-index: 2;
            }
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
        .carousel-slide-text__container {
            z-index: 1;
            width: 100%;
            padding: 0 calc(27 / var(--root-font-size) * 1rem) calc(17 / var(--root-font-size) * 1rem);
            color: #fff;
            .carousel-slide-subtitle {
                color: #fff;
                font: 500 calc(14 / var(--root-font-size) * 1rem)/calc(20 / var(--root-font-size) * 1rem) var(--font-family-sans-serif);
                letter-spacing: calc(0.56 / var(--root-font-size) * 1rem);
                display: -webkit-box;
                -webkit-line-clamp: 1;
                -webkit-box-orient: vertical;  
                overflow: hidden;
            }
            .carousel-slide-title {
                margin: calc(13 / var(--root-font-size) * 1rem) 0 0 0;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;  
                overflow: hidden;
            }
        }
    }
    .swiper-button {
        width: calc(68 / var(--root-font-size) * 1rem);
        height: calc(68 / var(--root-font-size) * 1rem);
        background: #fff;
        border: 1px solid var(--primary-colour);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 300ms ease-out;
        z-index: 1;
        &:after {
            display: none;
        }
        &.swiper-button-prev {
            left: calc(-33 / var(--root-font-size) * 1rem);
            transform: translate(-100%, 0);
        }
        &.swiper-button-next {
            right: calc(-33 / var(--root-font-size) * 1rem);
            transform: translate(100%, 0);
            svg {
                transform: rotate(180deg);
            }
        }
        svg {
            width: 11.81px;
            height: auto;
            position: static;
            path {
                transition: fill 300ms ease-out;
            }
        }
    }
    .swiper-pagination {
        bottom: calc(-51 / var(--root-font-size) * 1rem) !important;
        z-index: 1;
        .swiper-pagination-bullet {
            margin: 0 calc(14 / var(--root-font-size) * 1rem);
            width: 14px;
            height: 14px;
            background: #fff;
            border: 1px solid var(--primary-colour);
            &.swiper-pagination-bullet-active {
                background: var(--primary-colour);
            }
        }

    }
} 

@media screen and (max-width: 1024px) {
    .carousel {
        max-width: 100%;
        overflow: hidden;
        padding: 52px 0 99px;
            &:after {
            content: "";
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 99px;
            background: #fff;
        }
        .carousel__container {
            flex: 0 0 100%;
        }
        .carousel-subtitle, .carousel-title {
            padding: 0 18px;
        }
        .carousel-title {
            margin: 15px 0 0 0;
        }
        .carousel-wrapper {
            position: relative;
            &:after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 50%;
                background: #fff;
            }
            .swiper {
                margin: calc(34 / var(--root-font-size) * 1rem) 0 0 0;
                .swiper-slide {

                }
                .carousel-slide-text__container {
                    padding: 0 24.5px 25px;
                }
                .carousel-slide-subtitle {
                    font: 500 12px/18px var(--font-family-sans-serif);
                    letter-spacing: 0.48px;
                }
                .carousel-slide-title {
                    margin: 5px 0 0 0;
                }
                .carousel-slide-image__container {
                    &:before {
                        top: 24.5px;
                        left: 24.5px;
                        width: 1px;
                        height: calc(100% - 130px);
                    }
                    &:after {
                        top: 24.5px;
                        left: 24.5px;
                        width: calc(100% - 49px);
                        height: calc(100% - 49px);
                    }
                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }
            }
            .swiper-button {
                width: 44px;
                height: 44px;
                transform: none;
                 &.swiper-button-prev {
                    left: 8px;
                }
                &.swiper-button-next {
                    right: 8px
                }
                svg {
                    width: 10px;
                }
            }
            .swiper-pagination {
                bottom: -33px !important;
                .swiper-pagination-bullet {
                    width: 10px;
                    height: 10px;
                }
            }
        }
    }
}

@media screen and (min-width: 1025px) {
    .carousel .swiper-button:hover {
        background: var(--primary-colour-lighter);
        svg path {
            fill: #fff;
        }
    }
}

.carousel.golf {
    background: var(--golf-menu-bg);
    .carousel-subtitle {
        color: var(--golf-primary-colour);
    }
    .carousel-title {
        color: var(--golf-primary-colour);
    }
    .swiper-button {
        border-color: var(--golf-primary-colour);
        svg path {
            fill: var(--golf-primary-colour);
        }
        &:hover {
            @media screen and (min-width: 1025px) {
                background: var(--golf-primary-colour-lightest) !important;
                svg path {
                    fill: #fff !important
                }
            }
        }
    }
    .swiper-pagination {
        .swiper-pagination-bullet {
            border-color: var(--golf-primary-colour);
            &.swiper-pagination-bullet-active {
                background: var(--golf-primary-colour);
            }
        }
    }
}

/* Editor */
.block-editor-block-list__block {
    .carousel {
        height: 100%;
        .swiper-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            .swiper-slide {
                flex: 0 0 20%;
                margin: 0 0 0 20px;
                z-index: 1;
                .carousel-slide-text__container {
                    
                }
            }
        }
    }
}