/* Video Grid - Video Wrapper */
#videos-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for large screens */
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media screen and (max-width: 800px) {
    #videos-wrapper {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
    }
}

@media screen and (max-width: 600px) {
    #videos-wrapper {
        grid-template-columns: 1fr; /* 1 column for small screens */
    }
}

/* Card Style for Video */
.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Pointer cursor to indicate interactivity */
}

.video-card:hover {
    transform: scale(1.05); /* Slight zoom effect */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* More prominent shadow on hover */
}

/* Styling the Video Element */
.video-card video {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Title inside Video Card - Centered */
.video-title {
    position: absolute;
    bottom: 60px; /* Adjust space from the bottom to add space for tags */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Styling for Tags under Video Title */
.video-info {
    position: absolute;
    bottom: 20px; /* Space between title and tags */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.video-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 10px; /* Add padding to ensure spacing around tags */
}

/* Styling for Individual Tags */
.video-tags .tag {
    background-color: #f44336; /* Red background for the tag */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    margin: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover effect for tags */
.video-tags .tag:hover {
    background-color: #d32f2f; /* Darker red on hover */
    transform: scale(1.1); /* Slight zoom effect on hover */
}

/* Accessibility: Focus state for tags */
.video-tags .tag:focus {
    outline: 2px solid #ff4081;
}

/* Download Button for Videos */
.video-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    color: white;
    font-size: 14px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.video-download-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* Accessibility: Focus state for buttons */
.video-download-btn:focus {
    outline: 2px solid #ff4081;
}

/* Responsive Adjustments for Lightbox */
#video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Darker background for better contrast */
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#video-lightbox.hidden {
    visibility: hidden;
    opacity: 0;
}

#video-lightbox .lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
}

/* Lightbox Video */
#lightbox-video {
    max-width: 100%;
    max-height: 70vh; /* Limit video height to 70% of the viewport */
    object-fit: contain; /* Preserve aspect ratio */
}

/* Close Button for Lightbox */
#video-lightbox .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

#video-lightbox .close-btn:hover {
    color: #ff4081; /* Highlight close button on hover */
}

#video-lightbox .close-btn:focus {
    outline: 2px solid #ff4081;
}
