/* YouTube-Style Grid Layout for Podcast Archive Page */

.podcast-page-header {
    margin: 40px 0;
    text-align: center;
}

.podcast-page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111111;
}

.podcast-page-description {
    font-size: 16px;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

.youtube-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.youtube-grid-item {
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.youtube-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
}

.podcast-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.podcast-video img.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-grid-item:hover .podcast-video img.video-thumbnail {
    transform: scale(1.05);
}

.podcast-thumbnail-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #1F2937;
}

.podcast-thumbnail-placeholder i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
}

.podcast-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.podcast-play-button i {
    color: #fff;
    font-size: 24px;
}

.youtube-grid-item:hover .podcast-play-button {
    opacity: 1;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.video-title a {
    color: #111111;
    text-decoration: none;
}

.video-title a:hover {
    color: #3861fb;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666666;
    margin-bottom: 10px;
}

.video-excerpt {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-pagination {
    margin: 40px 0 60px;
    text-align: center;
}

.podcast-pagination .page-numbers {
    padding: 8px 14px;
    margin: 0 3px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.podcast-pagination .page-numbers.current {
    background: #3861fb;
    color: white;
}

.podcast-pagination .page-numbers:hover:not(.current) {
    background: #e5e5e5;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .youtube-style-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .youtube-style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .youtube-style-grid {
        grid-template-columns: 1fr;
    }
    
    .podcast-page-header {
        margin: 30px 0;
    }
    
    .podcast-page-title {
        font-size: 26px;
    }
}

/* Video Popup Styles */
.video-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.video-popup.active {
    display: flex;
}

.video-popup-inner {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
}

.close-popup {
    position: absolute;
    top: -40px;
    right: -5px;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    z-index: 1001;
}

#popupVideo {
    width: 100%;
    height: 100%;
}
