@charset "utf-8";

/* ==========================================================================
   1. THE GRID SYSTEM
   ========================================================================== */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 10px auto;
    justify-content: center;
    padding-bottom: 10px;
}

/* ==========================================================================
   2. INDIVIDUAL VIDEO CARDS
   ========================================================================== */
.video-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    flex: 0 1 calc(33.333% - 20px); 
    min-width: 320px; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd; /* Match gallery border */
}

.video-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 15px 45px rgba(0,0,0,0.2);
    border: 4px solid #AF1101;
}

/* ==========================================================================
   3. RESPONSIVE VIDEO CONTAINERS
   ========================================================================== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000; 
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.video-card:hover .video-container video,
.video-card:hover .video-container iframe {
    transform: scale(1.05);
}

/* ==========================================================================
   4. TEXT STYLES
   ========================================================================== */
.video-title {
    margin: 18px 15px;
    font-family: 'Inter', sans-serif; 
    font-weight: 500; 
    font-size: .95rem;
    color: #003366;
    text-align: center;
    line-height: 1.4;
    letter-spacing: -0.3px;
    flex-grow: 1; 
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .video-card {
        flex: 0 1 calc(50% - 15px);
    }
} 

@media screen and (max-width: 950px) {
    .video-grid {
        padding: 0 20px;
        gap: 25px;
    }
    .video-card {
        flex: 0 1 100%; 
        max-width: 450px;
    }
}

@media screen and (max-width: 450px) {
    .video-grid {
        padding: 0;
        margin-left: 0;
        justify-content: flex-start;
        gap: 15px;
    }
    .video-card {
        min-width: 0;
        width: calc(100% - 65px); 
    }
    .video-title {
        font-size: 0.85rem;
        margin-top: 12px;
    }
}