/* Page Layout and Centered Heading Styles */
/* Heading Styles */
h2 {
    text-align: center;
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Heading Underline Effect */
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, transparent, #007bff, transparent);
    transition: width 0.3s ease;
}

h2:hover::after {
    width: 120px;
}

/* Responsive Video Container Styles */
.video-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
}

/* YouTube Thumbnail Styles */
.youtube-thumbnail {
    max-width: 70%;
    width: 30%; /* Allows three thumbnails side by side with gap */
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9; /* Maintains 16:9 video aspect ratio */
    object-fit: cover;
    display: block;
}

/* Play Button Overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 5px;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .youtube-thumbnail {
        width: 100%; /* Full width on smaller screens */
    }
}

/* Hover effects */
.youtube-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.youtube-thumbnail:hover .play-button {
    background-color: rgba(255, 0, 0, 0.7); /* YouTube red color on hover */
}