/* ============================================================================
   VIDEO CATEGORY & LIGHTBOX STYLES
   Capital FM Theme - Video Integration
   ========================================================================== */

/* Video Category Header */
.video-category-header {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
}

.video-category-header .page-title {
    font-size: 2.5rem;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.video-category-header .video-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.video-category-header .category-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Video Card */
.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Video Thumbnail */
.video-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-play-trigger {
    width: 100%;
    height: 100%;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    display: block;
}

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

.video-play-trigger:hover .video-thumbnail {
    transform: scale(1.05);
}

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

.video-play-trigger:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-icon {
    transition: transform 0.3s ease;
}

.video-play-trigger:hover .play-icon {
    transform: scale(1.1);
}

.video-duration-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Video Card Content */
.video-card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-card-title {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.video-title-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-title-link:hover {
    color: #667eea;
}

.video-card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
}

.video-card-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #999;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.video-card-meta svg {
    vertical-align: middle;
    margin-right: 4px;
}

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

.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

/* Backdrop */
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Content Container */
.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.4s ease;
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

/* Video Player Wrapper */
.lightbox-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.lightbox-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lightbox-player iframe {
    width: 100%;
    height: 100%;
}

/* Video Info */
.lightbox-info {
    padding: 2rem;
}

.lightbox-video-title {
    font-size: 1.75rem;
    margin: 0 0 1rem;
    color: #1a1a1a;
}

.lightbox-video-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.lightbox-actions {
    display: flex;
    gap: 1rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.button:hover {
    background: #5568d3;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
}

.button-secondary:hover {
    background: #e0e0e0;
}

/* No Videos Message */
.no-videos-message {
    text-align: center;
    padding: 5rem 2rem;
}

.no-videos-message svg {
    opacity: 0.3;
    margin-bottom: 2rem;
}

.no-videos-message h2 {
    font-size: 2rem;
    margin: 0 0 1rem;
    color: #666;
}

.no-videos-message p {
    font-size: 1.1rem;
    color: #999;
    margin: 0 0 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-category-header .page-title {
        font-size: 1.75rem;
    }
    
    .lightbox-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .lightbox-info {
        padding: 1.5rem;
    }
    
    .lightbox-video-title {
        font-size: 1.25rem;
    }
    
    .video-lightbox {
        padding: 0;
    }
}

/* Loading State */
.lightbox-player.loading {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-player.loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.video-lightbox[aria-hidden="true"] {
    display: none !important;
}

.video-play-trigger:focus,
.lightbox-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Prevent body scroll when lightbox is open */
body.video-lightbox-open {
    overflow: hidden;
}

/* ============================================================================
   INLINE ARTICLE CONTENT
   ========================================================================== */

.lightbox-article-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.lightbox-article-full {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom scrollbar */
.lightbox-article-full::-webkit-scrollbar {
    width: 8px;
}

.lightbox-article-full::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.lightbox-article-full::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.lightbox-article-full::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Categories */
.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.category-badge:hover {
    opacity: 0.8;
}

/* Article Content */
.article-content {
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content a {
    color: #667eea;
    text-decoration: underline;
}

.article-content a:hover {
    color: #5568d3;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.tag-link {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.tag-link:hover {
    background: #e0e0e0;
}

/* Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-share strong {
    color: #333;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

.share-button:hover {
    transform: scale(1.1);
}

.share-facebook {
    background: #1877f2;
    color: #fff;
}

.share-twitter {
    background: #1da1f2;
    color: #fff;
}

.share-linkedin {
    background: #0077b5;
    color: #fff;
}

.share-copy {
    background: #f0f0f0;
    color: #333;
}

.share-copy:hover {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .lightbox-article-full {
        max-height: 400px;
    }
    
    .article-meta {
        font-size: 0.85rem;
    }
    
    .article-share {
        flex-wrap: wrap;
    }
}

.lightbox-social-share{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 1.5rem 0;
}

.lightbox-social-share a{
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 8px;
}