
/* JULIKAT Carousel Content Block
 * Colors exclusively from bootstrap-relaunch.css
 * Existing CSS classes and overlay variables preserved.
 */

.cb-carousel {
    --cb-carousel-height: 450px;

    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;

    background: var(--bs-primary);
    color: var(--bs-light);
}

/* Height variants */
.cb-carousel--small {
    --cb-carousel-height: 320px;
}

.cb-carousel--fullscreen {
    --cb-carousel-height: 100vh;
    --cb-carousel-height: 100svh;
}

/* Carousel items */
.cb-carousel .carousel-item {
    position: relative;
    width: 100%;
    height: var(--cb-carousel-height);
    min-height: var(--cb-carousel-height);
    overflow: hidden;

    background-color: var(--bs-primary);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Background image */
.cb-carousel__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.cb-carousel__background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content positioning */
.cb-carousel__content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: var(--cb-carousel-height);

    color: var(--bs-light);
}

/* Text panel
 * Existing TYPO3/Fluid variables are preserved:
 * --overlay-color
 * --overlay-opacity
 */
.cb-carousel-text-wrapper {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 1.5rem;
    margin: .625rem;

    background-color: color-mix(
        in srgb,
        var(--overlay-color, var(--bs-primary))
            calc(var(--overlay-opacity, .3) * 100%),
        transparent
    );

    color: var(--bs-light);
}

/* Text elements */
.cb-carousel-text-wrapper h1,
.cb-carousel-text-wrapper h2,
.cb-carousel-text-wrapper h3,
.cb-carousel-text-wrapper h4,
.cb-carousel-text-wrapper h5,
.cb-carousel-text-wrapper h6 {
    color: inherit;
}

.cb-carousel-text-wrapper p {
    color: inherit;
}

.cb-carousel-text-wrapper > :last-child {
    margin-bottom: 0;
}

/* Links inside text panels */
.cb-carousel-text-wrapper a:not(.btn) {
    color: inherit;
    text-decoration-color: currentColor;
    text-underline-offset: .2em;
}

.cb-carousel-text-wrapper a:not(.btn):hover {
    text-decoration-thickness: 2px;
}

/* Foreground image */
.cb-carousel__image-foreground {
    display: inline-block;
    max-width: 70%;
    height: auto;

    box-shadow: 0 .5rem 1.5rem
        color-mix(
            in srgb,
            var(--bs-dark) 50%,
            transparent
        );
}

/* Navigationscontainer – feste Position */
.cb-carousel .carousel-control-prev,
.cb-carousel .carousel-control-next {
    width: 60px;
    z-index: 3;
    opacity: 1;
}

/* Abstand zum Carousel-Rand */
.cb-carousel .carousel-control-prev {
    left: 25px;
}

.cb-carousel .carousel-control-next {
    right: 25px;
}

/* Icon-Größe unabhängig von der Position */
.cb-carousel .carousel-control-prev-icon,
.cb-carousel .carousel-control-next-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.cb-carousel .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='3' fill='%23626D52'/%3E%3Cg fill='none' stroke='%23FBF8F2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' transform='translate(2.4 2.4) scale(.8)'%3E%3Crect x='4' y='4' width='16' height='16' rx='4.5'/%3E%3Cpath d='M13.6 8.6 10.2 12l3.4 3.4'/%3E%3C/g%3E%3C/svg%3E");
}

.cb-carousel .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='3' fill='%23626D52'/%3E%3Cg fill='none' stroke='%23FBF8F2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' transform='translate(2.4 2.4) scale(.8)'%3E%3Crect x='4' y='4' width='16' height='16' rx='4.5'/%3E%3Cpath d='m10.4 8.6 3.4 3.4-3.4 3.4'/%3E%3C/g%3E%3C/svg%3E");
}

/* Carousel navigation */
.cb-carousel .carousel-control-prev,
.cb-carousel .carousel-control-next {
    z-index: 3;
    color: var(--bs-light); 
}

.cb-carousel .carousel-control-prev-icon,
.cb-carousel .carousel-control-next-icon {
    filter: none;
}

/* Carousel indicators */
.cb-carousel .carousel-indicators {
    z-index: 3;
}

.cb-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--bs-light);
}


/* JULIKAT Carousel Indicators */

.cb-carousel .carousel-indicators {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1.5rem;
}

/* Inactive indicator */
.cb-carousel .carousel-indicators [data-bs-target] {
    box-sizing: border-box;
    flex: 0 0 24px;

    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 0;

    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4.2' fill='%23626D52' fill-opacity='.28'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    opacity: 1;

    transition: transform .2s ease;
}

/* Active indicator */
.cb-carousel .carousel-indicators [data-bs-target].active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.2' fill='none' stroke='%23626D52' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='4.8' fill='%23626D52'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Hover */
.cb-carousel .carousel-indicators [data-bs-target]:hover {
    transform: scale(1.1);
}

/* Keyboard focus */
.cb-carousel .carousel-indicators [data-bs-target]:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 3px;
}

/* Mobile */
@media (max-width: 575.98px) {
    .cb-carousel .carousel-indicators {
        gap: 4px;
        margin-bottom: 1rem;
    }
}






/*
 * Call to Action
 */
.cb-carousel__cta {
    width: 100%;
    text-align: center;
}

.cb-carousel__cta-text {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Responsive – Tablet
 */
@media (max-width: 991.98px) {
    .cb-carousel {
        --cb-carousel-height: 380px;
    }

    .cb-carousel--small {
        --cb-carousel-height: 280px;
    }

    .cb-carousel--fullscreen {
        --cb-carousel-height: 100svh;
    }
}

/*
 * Responsive – Mobile
 */
@media (max-width: 767.98px) {
    .cb-carousel {
        --cb-carousel-height: 340px;
    }

    .cb-carousel--small {
        --cb-carousel-height: 240px;
    }

    .cb-carousel--fullscreen {
        --cb-carousel-height: 100svh;
    }

    .cb-carousel-text-wrapper {
        padding: 1.25rem;
    }
}

/*
 * Responsive – Small Mobile
 */
@media (max-width: 575.98px) {
    .cb-carousel {
        --cb-carousel-height: 300px;
    }

    .cb-carousel--small {
        --cb-carousel-height: 220px;
    }

    .cb-carousel--fullscreen {
        --cb-carousel-height: 100svh;
    }

    .cb-carousel-text-wrapper {
        padding: 1rem;
        margin: .5rem;
    }
}