/* Stellt sicher, dass das Carousel und das Video vollflächig angezeigt werden (DESKTOP) */
#myCarousel,
#myCarousel .carousel-inner,
#myCarousel .carousel-item {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Vollbild für das Video im Carousel */
#myCarousel .carousel-item video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -2;
}

/* Overlay für bessere Lesbarkeit */
#myCarousel .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Halbtransparente schwarze Überlagerung */
    z-index: -1; /* Zwischen Video und Text */
}

/* Styling für den Text und das Logo im Carousel */
#myCarousel .carousel-caption {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -30%);
    color: white;
    text-align: center;
    z-index: 1;
    max-width: 80%;
    padding: 20px;
}

/* Logo Styling */
#myCarousel .carousel-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

/* Titel und Text Größe */
#myCarousel .carousel-caption h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

#myCarousel .carousel-caption p.lead {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

#myCarousel .carousel-caption p {
    font-size: 1rem;
}

#myCarousel .carousel-caption,
#myCarousel .carousel-caption h1,
#myCarousel .carousel-caption h2,
#myCarousel .carousel-caption h3,
#myCarousel .carousel-caption h4,
#myCarousel .carousel-caption h5,
#myCarousel .carousel-caption h6,
#myCarousel .carousel-caption p,
#myCarousel .carousel-caption a,
#myCarousel .carousel-caption span {
    color: #fff !important;
}

#myCarousel .carousel-caption img:not(.carousel-logo) {
    max-width: min(100%, 550px);
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Pfeile schmaler machen */
#myCarousel .carousel-control-prev-icon,
#myCarousel .carousel-control-next-icon {
    background-size: 20px 20px;
}

#myCarousel .carousel-control-prev,
#myCarousel .carousel-control-next {
    width: 5%;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    /* Auf Mobilgeräten Höhe nicht erzwingen, damit Text nicht abgeschnitten wird */
    #myCarousel,
    #myCarousel .carousel-inner,
    #myCarousel .carousel-item {
        height: auto;
        width: 100%;
        overflow: hidden; /* Overflow hidden statt visible */
    }

    /* Die Caption nicht absolut positionieren, damit sie mitwächst */
    #myCarousel .carousel-caption {
        position: static;
        transform: none;
        top: auto;
        left: auto;
        max-width: 90%; /* Breitere Textbox für Mobilgeräte */
        margin: 20px auto; /* Zentriert durch margin */
    }

    #myCarousel .carousel-logo {
        max-width: 100px;
    }

    #myCarousel .carousel-caption h1 {
        font-size: 2rem;
    }

    #myCarousel .carousel-caption p.lead {
        font-size: 1.2rem;
    }

    #myCarousel .carousel-caption p {
        font-size: 0.9rem;
    }
}
