/* ==========================================================================
   VIDEOS COMPONENT (Horizontal Showcase)
   ========================================================================== */

.carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    /* Extra bottom padding to prevent shadows from getting clipped */
    padding: 1rem 0.5rem 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Smooth momentum scroll for iOS */
    scrollbar-width: none;
    /* Firefox: Hide scrollbar */
}

/* Hide scrollbar for Chrome/Safari/Edge */
.carousel::-webkit-scrollbar {
    display: none;
}

.video-card {
    flex: 0 0 280px;
    scroll-snap-align: center;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.video-card p {
    padding: 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    /* Flex-grow ensures the text area fills the card even with short titles */
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 600px) {
    .video-card {
        flex: 0 0 240px;
        /* Slightly narrower cards for smaller phone screens */
    }

    .video-card p {
        font-size: 0.9rem;
        padding: 1rem;
    }
}