.youtube-video-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.youtube-video-gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
}

.youtube-video-gallery-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio for videos */
    border: none;
    margin-bottom: 10px;
}

.youtube-video-gallery-item .video-title {
    font-size: 1.1em;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Responsive adjustments */
@media (min-width: 992px) { /* Large devices (laptops, 992px and up) */
    .youtube-video-gallery-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) { /* Medium devices (tablets, 768px and down) */
    .youtube-video-gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) { /* Small devices (phones, 576px and down) */
    .youtube-video-gallery-container {
        grid-template-columns: repeat(1, 1fr);
    }
}