/* Custom styles for the course platform */

.lesson-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

/* Video container for responsive YouTube embeds */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

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

/* Video thumbnail styling */
.video-thumbnail {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
}

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

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

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease;
    pointer-events: none;
}

.video-thumbnail:hover .play-overlay {
    color: var(--bs-primary);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom badge styles */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Alert link styling */
.alert-link {
    font-weight: 600;
    text-decoration: underline;
}

/* Button enhancements */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Header styling */
header {
    border-bottom: 1px solid var(--bs-border-color);
}

/* Footer styling */
footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Loading animation for video thumbnails */
.video-thumbnail img {
    background: linear-gradient(90deg, #343a40 25%, #495057 50%, #343a40 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.video-thumbnail img[src] {
    animation: none;
    background: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    .play-overlay {
        font-size: 2rem;
    }
}

/* Focus states for accessibility */
.btn:focus,
.card:focus-within {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Card improvements */
.card {
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-header {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-bottom-color: var(--bs-border-color);
}

/* Progress indicator (if needed for future enhancements) */
.progress-indicator {
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-primary) var(--progress, 0%), var(--bs-secondary) var(--progress, 0%), var(--bs-secondary) 100%);
    border-radius: 2px;
}
