@layer theme {

    .templateHomepageCover {
        overflow: hidden;
        padding-top: calc(var(--gutter) * 2 + var(--padding) + 32px);
        padding-bottom: calc(var(--gutter) * 2);
        .container {
            grid-column: full-start / full-end;
        }
        .grid {
            .splide {
                max-width: 100vw;
            }
            .splide__list {
                align-items: center;
            }
            .splide__slide {
                width: 256px;
                justify-content: center;
                align-items: center;
                display: flex;
                .block {
                    transition: opacity 1s ease-in-out;	
                    opacity: 0.6;
                    border-radius: var(--circle-radius);
                    overflow: hidden;
                    height: fit-content;
                    border: none;
                    padding: 0;
                    .media {
                        height: 100%;
                        &:before {
                            content: '';
                            background-color: var(--color-dark);
                            opacity: 0.25;
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                        }
                        img, video {
                            aspect-ratio: 1;
                            height: 100%;
                        }
                    }
                    .inner {
                        position: absolute;
                        gap: 0;
                        justify-content: center;
                        align-items: center;
                        width: 100%;
                        height: 100%;
                        pointer-events: none;
                        .title, .subTitle {
                            color: var(--color-light);
                            text-align: center;
                        }
                        .title {
                            line-height: var(--m-lineheight);
                            font-size: var(--m-fontsize);
                            font-weight: 300;
                        }
                        .subTitle {
                            font-size: var(--fontsize);
                        }
                        .subTitle, .buttons {
                            opacity: 0;
                            height: 0;
                        }
                        .title + .subTitle {
                            margin-top: auto;
                        }
                    }
                }
                
                &.is-active {
                    width: 600px;
                    .block {
                        opacity: 1;
                        .inner {
                            pointer-events: initial;
                            justify-content: flex-end;
                            gap: var(--padding);
                            padding-bottom: var(--section);
                            @media (max-width: 56em) {
                                padding-left: var(--spacer);
                                padding-right: var(--spacer);
                            }
                            @media (--max-fablet) {
                                padding-left: var(--spacer);
                                padding-right: var(--spacer);
                            }
                            .intro {
                                padding: 0 var(--padding);
                            }
                            .title {
                                line-height: var(--xl-lineheight);
                                font-size: var(--xl-fontsize);
                            }
                            .subTitle, .buttons {
                                opacity: 1;
                                height: auto;
                            }
                            .title + .subTitle {
                                margin-top: calc(var(--gutter) / 2);
                            }
                        }
                    }
                }
            }
            @media (max-width: 56em) {
                .splide__slide {
                    width: 100%;
                    .block {
                        border-radius: 0;
                        .media {
                            max-width:80%;
                        }
                    }
                    &.is-active {
                        width: 100%;
                        .block {
                            .inner {
                                position: relative;
                                padding-bottom: var(--padding);
                                .title + .subTitle {
                                    margin-top: calc(var(--gutter) / 2);
                                }
                            }
                        }
                    }
                }
            }
            @media (--max-fablet) {
                .splide__slide {
                    width: 100%;
                    .block {
                        border-radius: 0;
                        .media {
                            max-width:80%;
                        }
                    }
                    &.is-active {
                        width: 100%;
                        .block {
                            .inner {
                                position: relative;
                                padding-bottom: var(--padding);
                                .title + .subTitle {
                                    margin-top: calc(var(--gutter) / 2);
                                }
                            }
                        }
                    }
                }
            }
            .splide__pagination {
                justify-self: center;
            }
        }
    }
}