/* Hero Slider Section - Bootstrap Carousel */
.section-hero-slider {
    position: relative;
}

.section-hero-slider .carousel {
    position: relative;
}

.section-hero-slider .carousel-item {
    min-height: 70vh;
}

/* Ensure controls are positioned correctly */
.section-hero-slider .carousel-control-prev,
.section-hero-slider .carousel-control-next {
    z-index: 10;
}

.section-hero-slider .carousel-indicators {
    z-index: 10;
}

.section-hero-slider__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.section-hero-slider__bg img,
.section-hero-slider__bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile image positioning via CSS variables (set inline from template) */
@media (max-width: 768px) {
    .section-hero-slider__bg picture img {
        object-fit: var(--mobile-image-fit, cover);
        object-position: var(--mobile-image-position, center);
    }
}

/* Responsive Video */
.section-hero-slider__bg .hero-video-mobile {
    display: none;
}

/* Mobile Bild Fallback (wenn videoMobile fehlt aber imageMobile existiert) */
.section-hero-slider__bg .hero-image-mobile {
    display: none;
    width: 100%;
    height: 100%;
}

.section-hero-slider__bg .hero-image-mobile img {
    width: 100%;
    height: 100%;
    /* Uses inline styles from template for object-fit and object-position */
}

@media (max-width: 768px) {
    .section-hero-slider__bg .hero-video-desktop:has(~ .hero-video-mobile),
    .section-hero-slider__bg .hero-video-desktop:has(~ .hero-image-mobile) {
        display: none;
    }
    .section-hero-slider__bg .hero-video-mobile {
        display: block;
    }
    /* Show mobile image fallback when no mobile video */
    .section-hero-slider__bg .hero-image-mobile {
        display: block;
    }
}

.section-hero-slider__content {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding-block: 4rem;
}

/* Controls Theme: Auto (subtle background for visibility on any background) */
.section-hero-slider--controls-auto .carousel-control-prev,
.section-hero-slider--controls-auto .carousel-control-next {
    width: 8%;
    opacity: 0.8;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.section-hero-slider--controls-auto .carousel-control-prev:hover,
.section-hero-slider--controls-auto .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.2);
    opacity: 1;
}

.section-hero-slider--controls-auto .carousel-control-prev-icon,
.section-hero-slider--controls-auto .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    padding: 1.5rem;
    background-size: 50%;
}

.section-hero-slider--controls-auto .carousel-indicators button {
    border: 1px solid rgba(0,0,0,0.3);
}

/* Controls Theme: Light (white icons) - Bootstrap default, just ensure visibility */
.section-hero-slider--controls-light .carousel-control-prev-icon,
.section-hero-slider--controls-light .carousel-control-next-icon {
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
}

/* Controls Theme: Dark (dark icons) */
.section-hero-slider--controls-dark .carousel-control-prev-icon,
.section-hero-slider--controls-dark .carousel-control-next-icon {
    filter: invert(1) drop-shadow(1px 1px 2px rgba(255,255,255,0.4));
}

.section-hero-slider--controls-dark .carousel-indicators button {
    background-color: rgba(0,0,0,0.5);
}

.section-hero-slider--controls-dark .carousel-indicators button.active {
    background-color: rgba(0,0,0,0.9);
}

/* Video with controls - ensure controls are visible */
.section-hero-slider__bg video[controls] {
    z-index: 2;
    object-fit: contain;
    background: #000;
}
