.youtube-slider {
    padding: 3rem 1.5rem;
    background-color: #f1eee9;
    margin-bottom: 3rem;
    .youtube-slider__container {
        max-width: 1350px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        .youtube-slider__introtext {
            order: 1;
            background-color: #fff;
            padding: 1.5rem;
            border-radius: 4px;
            margin-bottom: 1.5rem;
            *:last-child {
                margin-bottom: 0;
            }
            h2, h3, h4, h5, h6 {
                position: relative;
                font-size: 1.6rem;
                line-height: 2.08rem;
                margin: 0 0 1.8rem 0;
                z-index: 1;
                display: inline-block;
            }
        }
        .youtube-slider__videos {
            order: 2;
            position: relative;
            padding-bottom: 40px;
            .video-thumbnail {
                position: relative;
                overflow: hidden;
                margin-bottom: 1rem;
                a.video-item {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    position: absolute;
                    top: 0px;
                    right: 0px;
                    bottom: 0px;
                    left: 0px;
                    text-decoration: none;
                    transition: all 0.3s ease-in-out;
                    i.fa {
                        font-size: 4rem;
                        text-align: center;
                        color: #f5a228;
                        opacity: 1;
                        display: block;
                        position: absolute;
                        z-index: 2;
                    }

                }
                img {
                    border-radius: 4px;
                    display: block;
                    transition: all 0.3s ease-in-out;
                }
            }
            .video-thumbnail:hover {
                a.video-item {
                    background-color: rgba(255,255,255,0.5);
                }

                img {
                    transform: scale(105%);
                }
            }
            .tns-controls {
                display: flex;
                justify-content: space-between;
                width: 100%;
                position: absolute;
                bottom: 0px;
                button {
                    border-radius: 20px;
                    height: 24px;
                    width: 24px;
                    padding: 0px;
                    border: 0px;
                    font-size: 0px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    background-color: #fff;
                    transition: ease all 0.3s;
                    &::before {
                        transition: all ease 0.3s;
                    }
                }
                button[data-controls="prev"]::before {
                    content: '';
                    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="%231f1f1f"><path d="M560-253.85 333.85-480 560-706.15 602.15-664l-184 184 184 184L560-253.85Z"/></svg>');
                    height: 24px;
                    width: 24px;
                    background-color: #222;
                }
                button[data-controls="next"]::before {
                    content: '';
                    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="%231f1f1f"><path d="m517.85-480-184-184L376-706.15 602.15-480 376-253.85 333.85-296l184-184Z"/></svg>');
                    height: 24px;
                    width: 24px;
                    background-color: #222;
                }
                button:hover {
                    background-color: rgb(245, 162, 40);
                    &::before {
                        background-color: #fff;
                    }
                }

            }
            .tns-nav {
                display: flex;
                position: absolute;
                left: 24px;
                right: 24px;
                bottom: 0px;
                height: 24px;
                justify-content: center;
                align-items: center;
                gap: 10px;
                z-index: 2;
                button {
                    width: 10px;
                    height: 10px;
                    border-radius: 10px;
                    border: 0px;
                    display: block;
                    background-color: #fff;
                    padding: 0px;
                }
                button.tns-nav-active {
                    background-color: rgb(245, 162, 40);
                }
            }
        }
    }
}

@media (min-width: 1024px) {
    .youtube-slider {
        .youtube-slider__container {
            flex-direction: row;
            gap: 32px;
            .youtube-slider__videos {
                order: 1;
                width: 65%;
            }
            .youtube-slider__introtext {
                order: 2;
                margin-bottom: 0;
                h2, h3, h4, h5, h6 {
                    position: relative;
                    font-size: 2rem;
                    line-height: 2.6rem;
                    margin: 0 0 1.8rem 0;
                    z-index: 1;
                    display: inline-block;
                }
            }
        }
    }
}
/* Lightbox Styles */
.youtube-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(148, 137, 122, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube-lightbox.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    max-width: 95vw;
    max-height: 95vh;
}

/* Größen für verschiedene Formate */
.lightbox-content.standard {
    width: 90%;
    max-width: 1000px;
}

.lightbox-content.short {
    width: 90%;
    max-width: 400px;
}

/* Schließen Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 300;
    line-height: 1;
}

.close-btn:hover {
    background: #f5a228;
    transform: scale(1.1) rotate(90deg);
}

/* Video Container */
.video-container {
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-container.standard {
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-container.short {
    padding-bottom: 177.78%; /* 9:16 */
    height: 0;
    max-height: 85vh;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #f5a228;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    
    .lightbox-content.standard {
        width: 95%;
        border-radius: 8px;
    }
    
    .lightbox-content.short {
        width: 95%;
        max-width: 320px;
    }
    
    .close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
