﻿/* wwwroot/css/videos.css */

/* --- Ensure CSS variables from site.css (:root) are available --- */

.videos-page-container {
    padding: 3em 1em 4em 1em;
    /* Uses global body background gradient */
    color: var(--light-text);
    min-height: 80vh;
    overflow-x: hidden;
}

.page-title.videos-title {
    font-family: 'Bebas Neue', 'Oswald', Arial, sans-serif;
    font-size: clamp(3.8em, 10vw, 7.5em);
    text-align: center;
    color: var(--primary-purple); /* Purple accent */
    margin-bottom: 0.5em; /* More space below title */
    text-shadow: 0 0 5px var(--primary-purple), 2px 2px 4px rgba(0, 0, 0, 0.6);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Video Grid */
.video-grid {
    display: grid;
    /* Responsive grid - adjust minmax */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5em; /* Gap between cards */
    max-width: 1400px; /* Max width of grid */
    margin: 0 auto; /* Center grid */
}

/* Individual Video Card */
.video-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

    .video-card:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(156, 39, 176, 0.3); /* Subtle purple glow */
    }

/* Thumbnail button styling */
.video-thumbnail-button {
    display: block; /* Make button block level */
    position: relative; /* For positioning overlay */
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: hidden; /* Ensure overlay stays within bounds */
}

.video-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Force aspect ratio */
    object-fit: cover; /* Cover the area */
    transition: transform 0.3s ease;
}

.video-thumbnail-button:hover .video-thumbnail {
    transform: scale(1.05); /* Zoom image slightly on hover */
}

/* Play Button Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevent overlay blocking clicks */
}

.video-thumbnail-button:hover .play-overlay {
    opacity: 1; /* Show overlay on hover */
}

.play-overlay i { /* Font Awesome play icon */
    font-size: 3em;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Video Title Below Thumbnail */
.video-title {
    font-size: clamp(1em, 2.5vw, 1.1em); /* Responsive */
    color: var(--primary-orange);
    padding: 0.8em 0.5em; /* Padding around title */
    margin: 0;
    font-weight: 500;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ... if title is too long */
}

/* Modal Styling */
.video-player-modal .modal-content {
    background-color: #1a1a1a; /* Dark modal background */
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.video-player-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.video-player-modal .modal-title {
    color: var(--primary-orange);
    font-size: 1.25rem;
}

.video-player-modal .modal-body {
    padding: 0; /* Remove padding to let video fill */
}

/* Style the close button for dark background */
.video-player-modal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(2); /* Make it whiter */
}

/* Ensure video player doesn't get unwanted margins */
.video-player-modal video {
    display: block;
    max-width: 100%; /* Ensure it doesn't overflow */
}

/* --- Responsive Adjustments for Videos Page --- */
@media (max-width: 576px) {
    .video-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 1.5em;
    }

    .play-overlay i {
        font-size: 2.5em; /* Smaller play icon */
    }

    .video-title {
        padding: 0.6em 0.5em;
    }
}
