/* Videos Section Styles */

/* Videos Page Layout */
.videos-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Buttons Container */
.category-buttons-container {
    line-height: 1;
}

/* Category buttons now use universal button system */

/* Featured Video Section */
.featured-video-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
}

/* Video Category Badge */
.video-category-badge {
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    background-color: #dbeafe;
    border-radius: 50px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

/* Video Card */
.video-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow duration-300;
}

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

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

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

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.video-info {
    padding: 1rem;
}

.video-title {
    @apply text-lg font-semibold text-gray-800 mb-2 line-clamp-2;
}

.video-title a {
    @apply text-gray-800 hover:text-blue-600 transition-colors duration-200;
    text-decoration: none;
}

.video-description {
    @apply text-gray-600 text-sm mb-3 line-clamp-3;
}

.video-date {
    @apply text-xs text-gray-500;
}

/* Video Detail Page */
.video-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.video-detail-container {
    display: grid;
    gap: 2rem;
}

.video-player-container {
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-details {
    background: white;
}

/* Related Videos */
.related-videos-section {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.related-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .related-video-grid {
        grid-template-columns: 1fr;
    }
}

.related-video-card {
    @apply bg-gray-50 rounded-lg overflow-hidden hover:bg-gray-100 transition-colors duration-200;
}

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

.related-video-info {
    padding: 0.75rem;
}

.related-video-title {
    @apply text-sm font-medium text-gray-800 mb-1 line-clamp-2;
}

.related-video-title a {
    @apply text-gray-800 hover:text-blue-600 transition-colors duration-200;
    text-decoration: none;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Share Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.modal-title {
    @apply text-lg font-semibold text-gray-900;
    flex: 1;
}

.modal-close {
    @apply text-gray-400 hover:text-gray-600 p-1;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.share-option {
    margin-bottom: 1rem;
}

.share-social {
    margin-top: 1rem;
}

.share-btn {
    @apply inline-flex items-center justify-center w-10 h-10 rounded-full text-white no-underline hover:opacity-80 transition-opacity duration-200;
}

.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.linkedin { background-color: #0077b5; }
.share-btn.email { background-color: #6b7280; }

/* Responsive Design */
@media (max-width: 1024px) {
    .videos-page,
    .video-detail-page {
        padding: 0 1rem;
    }
    
    .featured-video-section {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .featured-video-section {
        padding: 1rem;
    }
    
    .featured-video-section .grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .category-filter-btn {
        @apply text-xs px-3 py-1;
    }
    
    .video-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Buttons now use universal button system from buttons.css */

/* Form Input */
.form-input {
    @apply block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}