/**
 * Video Archive Styles
 * 
 * @package CSI_Diocese_Theme
 * @since 1.0.0
 */

/* ============================================
   VIDEO ARCHIVE PAGE
   ============================================ */

.video-archive {
    background-color: #f8f9fa;
    padding-bottom: 4rem;
}

/* Filter Section */
.video-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 1rem;
}

.video-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-filters label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.video-filters .region-filter {
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.video-filters .region-filter:focus {
    outline: none;
    border-color: var(--color-primary, #1E5BA8);
    box-shadow: 0 0 0 3px rgba(30, 91, 168, 0.1);
}

.video-filters .filter-results {
    color: #6c757d;
    font-size: 0.95rem;
}

.video-filters .filter-results strong {
    color: #212529;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Video Card */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.video-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary, #1E5BA8) 0%, var(--color-secondary, #6B2C5C) 100%);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.5;
}

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

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

.video-play-overlay svg {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

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

/* Duration Badge */
.video-duration-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Video Info */
.video-info {
    padding: 1.5rem;
}

.video-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.video-region-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e7f3ff;
    color: #0066cc;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.video-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.video-meta svg {
    flex-shrink: 0;
}

.video-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* No Videos Found */
.no-videos-found {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.no-videos-found svg {
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.no-videos-found h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Pagination */
.video-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.video-pagination .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.video-pagination a,
.video-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s;
}

.video-pagination a:hover {
    background: var(--color-primary, #1E5BA8);
    color: white;
    border-color: var(--color-primary, #1E5BA8);
}

.video-pagination .current {
    background: var(--color-primary, #1E5BA8);
    color: white;
    border-color: var(--color-primary, #1E5BA8);
    font-weight: 600;
}

/* ============================================
   VIDEO MODAL
   ============================================ */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.video-modal-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
}

.video-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-modal-content {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

#video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .video-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-filters .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-filters .region-filter {
        width: 100%;
    }
    
    .video-modal-container {
        width: 95%;
    }
    
    .video-modal-close {
        top: -2.5rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-title {
        font-size: 1.05rem;
    }
    
    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
