/* CarouselPagePart */

/* Image container - absolute full-bleed */

.carousel__image-container {
    inset: 0;
    position: absolute;
}

.carousel__image-container .carousel__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel container  */

.pagepart-carousel {
    height: 600px;
}

.pagepart-carousel.container-width {
    border-radius: 20px;
    margin: 0 auto;
    max-width: 1358px;
    overflow: hidden;
}

/* Main splide wrapper  */

.carousel__main {
    height: 100%;
}

/* Carousel item */

.carousel__item {
    overflow: hidden;
}

@media screen and (width >= 768px) {
    .carousel__item.item--has-text .grid-aligned-horizontal--right + picture {
        width: calc(100% - 510px);
    }

    .carousel__item.item--has-text .grid-aligned-horizontal--left + picture {
        left: 510px;
        width: calc(100% - 510px);
    }
}

/* Title */

.carousel__title {
    color: var(--color-white);
    font-size: var(--h2-fs);
    line-height: var(--h2-lh);
    margin: 0;
    max-height: calc(var(--h2-lh) * 2);
    overflow: hidden;
    text-decoration: none;
}

.item--has-title .carousel__title {
    margin-bottom: 30px;
}

/* Text */

.carousel__text-container > :last-child {
    margin-bottom: 0;
}

/* Text aligner - flex container */

.carousel__text-aligner {
    align-items: center;
    display: flex;
    height: 100%;
    inset: 0;
    margin: 0 auto;
    max-width: 1358px;
    padding: 0;
    pointer-events: none;
}

.carousel__text-aligner.grid-aligned-horizontal--center {
    justify-content: center;
}

.carousel__text-aligner.grid-aligned-vertical--top {
    align-items: flex-start;
}

.carousel__text-aligner.grid-aligned-vertical--bottom {
    align-items: flex-end;
}

/* Circle background - desktop */

@media screen and (width >= 768px) {
    .carousel__text-aligner::before {
        background: var(--color-navy);
        border-radius: 50%;
        content: "";
        height: 800px;
        left: -150px;
        position: absolute;
        top: -100px;
        width: 800px;
        z-index: 1;
    }

    .carousel__text-aligner.grid-aligned-horizontal--center::before {
        left: 50%;
        right: 50%;
        transform: translateX(-50%);
    }

    .carousel__text-aligner.grid-aligned-horizontal--right::before {
        left: auto;
        right: -150px;
    }
}

/* Text container */

.carousel__text-container {
    color: var(--color-white);
    height: 100%;
    margin: 0 auto;
    padding: 45px 30px;
    pointer-events: all;
    position: relative;
    text-align: left;
    width: 540px;
    z-index: 1;
}

@media screen and (width >= 768px) {
    .carousel__text-container {
        padding: 90px 45px 90px 75px;
    }

    .grid-aligned-horizontal--left .carousel__text-container {
        margin-left: 0;
        text-align: left;
    }

    .grid-aligned-horizontal--right .carousel__text-container {
        margin-right: 0;
        text-align: left;
    }
}

/* Circle background - mobile (SVG) */

@media screen and (width <= 767px) {
    .carousel__text-container::before {
        content: "";
        height: 100%;
        left: -10%;
        position: absolute;
        right: -10%;
        top: -150px;
        width: 120%;
        z-index: -1;
    }

    .item--theme-default .carousel__text-container::before {
        background: url(../../images/carousel-circle-blue.svg) no-repeat;
    }

    .item--theme-green .carousel__text-container::before {
        background: url(../../images/carousel-circle-green.svg) no-repeat;
    }

    .item--theme-yellow .carousel__text-container::before {
        background: url(../../images/carousel-circle-yellow.svg) no-repeat;
    }
}

/* CTA link */

.carousel__link .btn {
    background: none;
    color: var(--color-white);
    display: inline-block;
    font-size: var(--h4-fs);
    line-height: var(--h4-lh);
    padding: 0;
    position: relative;
}

.carousel__link .btn svg {
    height: 0.65em;
}

.carousel__link .btn:hover {
    text-decoration: underline;
}

/* Theme: yellow - dark text */

.item--theme-yellow .carousel__text-container,
.item--theme-yellow .carousel__link .btn {
    color: #000;
}

/* Theme circle colors - desktop */

@media screen and (width >= 768px) {
    .item--theme-default .carousel__text-aligner::before {
        background: var(--color-navy);
    }

    .item--theme-green .carousel__text-aligner::before {
        background: var(--color-green);
    }

    .item--theme-yellow .carousel__text-aligner::before {
        background: var(--color-yellow);
    }
}

/* Arrows */

.carousel__arrows {
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 2;
}

.carousel__arrow {
    align-items: center;
    background: rgb(0 0 0 / 0.3);
    border-radius: 50%;
    color: var(--color-white);
    display: flex;
    height: 48px;
    justify-content: center;
    pointer-events: all;
    width: 48px;
}

.carousel__arrow:hover {
    background: rgb(0 0 0 / 0.5);
}

/* CSS chevrons — override missing icon font */
.carousel__arrow::before {
    border-color: var(--color-white);
    border-style: solid;
    border-width: 3px 3px 0 0;
    content: "";
    display: block;
    font-family: inherit;
    height: 12px;
    width: 12px;
}

.carousel__arrow--prev::before {
    margin-left: 4px;
    transform: rotate(-135deg);
}

.carousel__arrow--next::before {
    margin-right: 4px;
    transform: rotate(45deg);
}

.carousel__arrow:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}


@media (prefers-reduced-motion: reduce) {
    .carousel__main {
        --reduced-motion: 0s;
    }
}
