.youtube-videos {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px auto;
    max-width: 1200px;
}

.youtube-heading {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
}

.youtube-heading::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: #ff0000;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.youtube-videos .video {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.youtube-videos .video:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.youtube-videos iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.youtube-videos .video-title {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px;
    text-align: center;
    background-color: #f1f1f1;
}

.youtube-videos .video-buttons {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background-color: #f1f1f1;
}

.youtube-videos .video-buttons a {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
    padding: 10px 20px;
    border-radius: 5px;
}

.youtube-videos .video-buttons a i {
    margin-right: 5px;
}

.youtube-videos .watch-youtube {
    background-color: #ff0000;
}

.youtube-videos .watch-youtube:hover {
    background-color: #cc0000;
}

.youtube-videos .subscribe-channel {
    background-color: #007bff;
}

.youtube-videos .subscribe-channel:hover {
    background-color: #0056b3;
}

@media (max-width: 992px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 80%;
    max-width: 1200px;
}

.modal-content iframe {
    width: 100%;
    height: 600px;
}

.close {
    color: white;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    text-align: center;
    color: rgb(0, 0, 0);
    font-size: 1.5em;
    margin-top: 10px;
}
