/* Video Module Styles */
.video-card-enhanced {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.video-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
}

.video-thumbnail-wrapper:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    transition: transform 0.3s ease;
}

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

.video-play-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;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.video-thumbnail:hover .video-play-overlay {
    opacity: 1;
    visibility: visible;
}

.play-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.play-button:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255,255,255,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0);
    }
}

.video-badge {
    z-index: 2;
}

.featured-badge {
    z-index: 2;
}

.video-card-body {
    border-radius: 0 0 12px 12px;
}

.video-title {
    color: #2d3748;
    font-size: 1.1rem;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #718096;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 0.8rem;
}

/* Vimeo Thumbnail */
.vimeo-thumbnail {
    background: linear-gradient(135deg, #1ab7ea 0%, #1171ef 100%);
}

/* File Video Thumbnail */
.file-video-thumbnail {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* Video Modal Enhancements */
.modal-content.bg-dark {
    border: none;
    border-radius: 12px;
}

.modal-xl {
    max-width: 1200px;
}

.modal-header {
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 0;
}

#videoContainer {
    min-height: 400px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

#videoContainer iframe,
#videoContainer video {
    border-radius: 0 0 12px 12px;
}

/* Video Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-card-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .video-thumbnail-wrapper {
        height: 200px !important;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
    }
    
    .play-button i {
        font-size: 1.5rem;
    }
    
    .video-title {
        font-size: 1rem;
        min-height: auto;
    }
    
    .video-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .modal-xl {
        max-width: 95%;
        margin: 1rem auto;
    }
}

@media (max-width: 576px) {
    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start !important;
    }
    
    .video-meta span {
        margin-right: 0 !important;
    }
}

/* Advanced hover effects */
.video-card-enhanced {
    position: relative;
}

.video-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.video-card-enhanced:hover::before {
    opacity: 1;
    animation: shimmer 1s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Video section styling */
#videos {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

#videos .display-font {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #667eea; /* Fallback for browsers that don't support background-clip: text */
}

/* Button enhancements */
.btn-primary.btn-sm {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Badge enhancements */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

.video-badge .badge {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Object fit utility for older browsers */
.object-fit-cover {
    object-fit: cover;
    object-position: center;
}

/* Focus states for accessibility */
.video-thumbnail:focus,
.play-button:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
.video-card-enhanced * {
    transition: inherit;
}