/* 1. The Layout Container */
.video-repository {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 2. Hero Section */
.hero-spotlight {
    margin-bottom: 4rem;
}

.hero-spotlight h2 {
    font-size: 2.5rem;
    margin-top: 1rem;
    letter-spacing: -0.05em;
}

/* 3. The Grid Layout (The "Modern" part) */
.video-grid {
    display: grid;
    /* Automatically creates columns based on available space */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* 4. The Video Card */
.video-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: translateY(-5px); /* Subtle "lift" effect on hover */
}

.thumbnail-wrapper {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9; /* Keeps everything perfectly aligned */
    overflow: hidden;
    border-radius: 8px; /* Softens the look */
    background: #000;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures thumbnails don't look stretched */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.video-card:hover img {
    opacity: 1; /* Brightens the image when hovering */
}

/* 5. Play Overlay (Clean & Minimalist) */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    pointer-events: none; /* Allows clicks to pass through to the link */
}

/* 6. Typography */
.video-card h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.meta-date {
    font-family: monospace; /* Gives it that "admin" / "repository" feel */
    font-size: 0.85rem;
    color: #888;
}

/* 7. Responsive Fix for Hero Iframe */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Base Layout (Desktop) */
.video-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-spotlight {
    flex: 1 1 100%; /* Hero takes full width */
}

.video-card {
    flex: 1 1 300px; /* Cards share the remaining space */
}

@media (max-width: 768px) {
    .video-grid-container {
        flex-direction: column;
    }

    .hero-spotlight, .video-card {
        flex: 1 1 100%; /* Force everything to 100% width on mobile */
        width: 100%;
    }

    /* Ensure video container maintains aspect ratio */
    .video-container {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}
