/* YouTube/RuTube iframe responsive styles */
.youtube-item .slider-image {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.youtube-item .slider-image iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Three items per row layout */
.youtube-item {
    display: inline-block;
    width: 27%;
    padding: 0 3%;
    vertical-align: top;
}

.youtube-item:nth-child(3n) {
    margin-right: 0;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .youtube-item {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .youtube-item .slider-image {
        padding-bottom: 56.25%; /* Maintain 16:9 ratio on mobile */
    }
}

/* Large screens optimization */
@media (min-width: 1200px) {
    .youtube-item .slider-image {
        padding-bottom: 56.25%; /* Consistent ratio on large screens */
    }
}

/* Tablet optimization */
@media (min-width: 769px) and (max-width: 1199px) {
    .youtube-item .slider-image {
        padding-bottom: 56.25%; /* Consistent ratio on tablets */
    }
}