/* Course Detail Page Styles */

/* Course Header */
.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.course-header::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="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.course-header-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.course-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.course-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.course-meta span {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    opacity: 0.9;
}

.course-meta i {
    margin-left: 8px;
    margin-right: 0;
}

.course-rating {
    color: #ffc107;
}

.course-rating i {
    margin-left: 2px;
    margin-right: 0;
}

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

.instructor-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.instructor-info h5 {
    color: white;
    font-weight: 600;
}

.instructor-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.course-thumbnail img {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

/* Course Content */
.course-content {
    padding: 60px 0;
    min-height: 100vh;
}

.course-sidebar {
    position: sticky;
    top: 100px;
}

.course-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.course-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.course-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.course-price-old {
    font-size: 1.2rem;
    text-decoration: line-through;
    opacity: 0.7;
    margin-left: 10px;
}

.course-card-body {
    padding: 25px;
}

.course-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-features li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.course-features li:last-child {
    border-bottom: none;
}

.course-features i {
    color: #28a745;
    margin-left: 12px;
    margin-right: 0;
    width: 20px;
}

.btn-enroll {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.btn-enroll:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

.btn-enrolled {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.btn-continue {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

/* Course Content Tabs */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 15px 25px;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: none;
}

.nav-tabs .nav-link:hover {
    color: #667eea;
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

/* Lesson List */
.lesson-list {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.lesson-item {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item:hover {
    background: #f8f9fa;
}

.lesson-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.lesson-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: 15px;
    margin-right: 0;
}

.lesson-details h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #212529;
}

.lesson-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.lesson-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-duration {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Reviews */
.review-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-left: 15px;
    margin-right: 0;
}

.review-info h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.review-rating {
    color: #ffc107;
    font-size: 0.9rem;
}

.review-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.review-content {
    line-height: 1.6;
    color: #495057;
}

/* Related Courses */
.related-course {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

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

.related-course img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-course-content {
    padding: 20px;
}

.related-course h6 {
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.3;
}

.related-course-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.related-course-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .course-header-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .course-header h1 {
        font-size: 2rem;
    }
    
    .course-meta {
        justify-content: center;
    }
    
    .course-meta span {
        margin: 5px 10px;
    }
    
    .instructor-info {
        justify-content: center;
        text-align: center;
    }
    
    .lesson-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lesson-status {
        align-self: flex-end;
    }
    
    .nav-tabs .nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .course-header {
        padding: 40px 0;
    }
    
    .course-header h1 {
        font-size: 1.75rem;
    }
    
    .course-card-header {
        padding: 20px;
    }
    
    .course-price {
        font-size: 2rem;
    }
    
    .course-card-body {
        padding: 20px;
    }
    
    .lesson-item {
        padding: 15px 20px;
    }
    
    .review-item {
        padding: 20px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.fade-in.delay-1 { animation-delay: 0.1s; }
.fade-in.delay-2 { animation-delay: 0.2s; }
.fade-in.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}