/* Globale Box-Sizing für konsistentes Layout */
.my-youtube-feed-container *,
.my-youtube-feed-container *::before,
.my-youtube-feed-container *::after {
    box-sizing: border-box;
}

/* YouTube Feed Container */
.my-youtube-feed-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Einzelnes Video-Element */
.my-youtube-feed-item {
    flex: 0 0 calc(33.33% - 13.33px); /* Drei pro Reihe */
    max-width: calc(33.33% - 13.33px);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
}

/* Thumbnail Styling */
.my-youtube-feed-container .my-youtube-feed-item .my-youtube-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Seitenverhältnis */
    overflow: hidden;
    border-radius: 8px;
}

/* Image Styling */
.my-youtube-feed-container .my-youtube-feed-item .my-youtube-thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Überschreibt Elementor */
    object-fit: cover;
    object-position: center; /* Vertikal und horizontal zentriert */
    border-radius: 8px;
    display: block;
}

/* Title Styling */
.my-youtube-feed-container .my-youtube-feed-item .my-youtube-title-wrapper {
    padding: 10px;
    display: block;
    border-radius: 0 0 8px 8px; /* Sicherstellen, dass der untere Rand abgerundet ist */
    background-color: #fff;
}

.my-youtube-feed-item h3 {
    font-size: 1em;
    margin: 0;
    color: #333;
    font-weight: bold;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Button Container */
.my-youtube-button-container {
    text-align: center;
    margin: 20px 0;
}

/* "Mehr anzeigen" Button Styling */
.my-youtube-load-more-button {
    font-family: "PT Sans", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.75em;
    transition-duration: 0.3s;
    border-radius: 6px;
    padding: 16px;
    background-color: #B60001;
    color: #fff;
    border: none;
    cursor: pointer;
}

.my-youtube-load-more-button:hover {
    background-color: #AB0001;
}

/* Responsive Anpassungen */
@media (max-width: 1024px) {
    .my-youtube-feed-item {
        flex: 0 0 calc(50% - 10px); /* Zwei pro Reihe */
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .my-youtube-feed-item {
        flex: 0 0 100%; /* Ein Element pro Reihe */
        max-width: 100%;
    }
}