/* Videos Page Specific Styles */

/* Hero Section */
.videos-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 76px;
}

.videos-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.videos-hero .container {
    position: relative;
    z-index: 2;
}

.hero-stats {
    margin-top: 40px;
}

.stat-item {
    padding: 20px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.search-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.filter-controls {
    margin-top: 20px;
}

/* Section Titles */
.section-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Featured Videos */
.featured-videos {
    background: #f8f9fa;
}

/* Video Cards */
.video-card {
    background: white;
    border-radius: 15px;

/* Enhanced YouTube Channel Section */
.youtube-channel-section {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    position: relative;
    overflow: hidden;
}

.youtube-channel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="youtube-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23youtube-pattern)"/></svg>');
    opacity: 0.3;
}

.youtube-channel-section .container {
    position: relative;
    z-index: 2;
}

.channel-stats .stat-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px 10px;
    transition: all 0.3s ease;
}

.channel-stats .stat-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}

.channel-actions .btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.channel-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.channel-preview {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Video Categories Overview */
.video-categories-overview {
    background: #f8f9fa;
}

.category-card {
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.category-icon {
    color: #667eea;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Enhanced Channel Playlists */
.channel-playlists {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.playlist-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.playlist-thumbnail {
    position: relative;
    overflow: hidden;
}

.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.playlist-card:hover .playlist-overlay {
    opacity: 1;
}

.playlist-info {
    padding: 20px;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cta-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23cta-pattern)"/></svg>');
    opacity: 0.3;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-buttons .btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Enhanced Video Modal */
.video-modal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.video-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.video-modal .modal-title {
    font-weight: 600;
}

.video-info {
    padding: 20px 0;
}

.video-meta .badge {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 20px;
}

.video-stats span {
    font-size: 0.9rem;
}

.video-tags .badge {
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

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

.video-card:hover .video-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button i {
    color: #667eea;
    font-size: 1.5rem;
    margin-left: 3px;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-content {
    padding: 20px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.video-category {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-speaker {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #6c757d;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-tags {
    margin-top: 10px;
}

.video-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid #e9ecef;
}

/* Category Navigation */
.category-nav {
    margin-bottom: 30px;
}

.category-nav-item {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.category-nav-item:hover,
.category-nav-item.active {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.category-nav-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.category-nav-item h6 {
    margin-bottom: 5px;
    font-weight: 600;
}

.category-nav-item p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
}

/* Video Modal */
.modal-xl {
    max-width: 90%;
}

.video-container {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.video-tag {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

/* Load More Button */
#loadMoreBtn {
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Grid/List View Toggle */
.videos-container.list-view .video-card {
    display: flex;
    height: auto;
}

.videos-container.list-view .video-thumbnail {
    width: 200px;
    flex-shrink: 0;
}

.videos-container.list-view .video-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* AdSense Styles */
.ad-banner {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .videos-hero {
        min-height: auto;
        padding: 100px 0 60px;
        margin-top: 76px;
    }
    
    .videos-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats .row {
        margin-top: 30px;
    }
    
    .stat-item {
        margin-bottom: 20px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 20px;
    }
    
    .filter-controls .row > div {
        margin-bottom: 15px;
    }
    
    .video-card {
        margin-bottom: 30px;
    }
    
    .videos-container.list-view .video-card {
        flex-direction: column;
    }
    
    .videos-container.list-view .video-thumbnail {
        width: 100%;
    }
    
    .category-nav-item {
        margin-bottom: 10px;
    }
    
    .modal-xl {
        max-width: 95%;
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .videos-hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .video-content {
        padding: 15px;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Print Styles */
@media print {
    .ad-banner {
        display: none;
    }
    
    .videos-hero {
        background: white !important;
        color: black !important;
        min-height: auto;
    }
    
    .video-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 1000;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles for keyboard navigation */
.video-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.category-nav-item:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .search-section {
        background: #343a40;
    }
    
    .search-container {
        background: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .featured-videos {
        background: #343a40;
    }
    
    .video-card {
        background: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .video-title {
        color: #e9ecef;
    }
    
    .video-description {
        color: #adb5bd;
    }
    
    .video-speaker {
        color: #adb5bd;
    }
    
    .video-stats {
        color: #adb5bd;
    }
    
    .video-tag {
        background: #6c757d;
        color: #e9ecef;
        border-color: #495057;
    }
    
    .category-nav-item {
        background: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .ad-banner {
        background: #343a40;
        border-color: #6c757d;
    }
}
