/**
 * YouTube Feed Stylesheet
 */

.youtube-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.youtube-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color, #333);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.youtube-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.youtube-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.youtube-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.youtube-card:hover .youtube-play-overlay {
    opacity: 1;
}

.youtube-play-overlay svg {
    width: 48px;
    height: 48px;
    color: #ff0000;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
}

.youtube-card:hover .youtube-play-overlay svg {
    transform: scale(1.1);
}

.youtube-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.youtube-meta {
    font-size: 0.8em;
    color: var(--text-muted, #64748b);
    margin-bottom: 8px;
}

.youtube-card-body h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.youtube-card-body p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specificity override for themes (e.g. Zero Hertz) that apply 'padding: 0 !important' to .media-embed-wrapper */
body .media-embed-wrapper.video-embed {
    padding-bottom: 56.25% !important;
    height: 0 !important;
}

