/* Homepage YouTube Videos Display - Mobile-First */

.videos-container {
    max-width: 1200px;
    margin: clamp(2rem, 5vh, 4rem) auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

.videos-container h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: clamp(1.5rem, 3vh, 2rem);
    color: #2c3e50;
}

#videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

.video-card {
    background: white;
    border-radius: clamp(8px, 1.5vw, 12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

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

.video-metadata {
    padding: clamp(1rem, 2.5vh, 1.5rem);
}

.video-metadata h3 {
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    margin-bottom: clamp(0.5rem, 1.5vh, 0.75rem);
    color: #2c3e50;
    line-height: 1.3;
}

.video-desc {
    font-size: clamp(0.9rem, 2.3vw, 1rem);
    color: #666;
    line-height: 1.5;
    margin-bottom: clamp(0.75rem, 2vh, 1rem);
}

.video-article-link {
    display: inline-block;
    padding: clamp(8px, 1.5vh, 10px) clamp(16px, 3vw, 20px);
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    font-weight: 600;
    transition: background 0.3s ease;
}

.video-article-link:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    #videos-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    #videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    #videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
