/* Course Detail Page Styles */
.course-hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.course-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="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.course-hero-content {
    position: relative;
    z-index: 2;
}

.course-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.course-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.course-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-item i {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
}

.course-thumbnail img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

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

/* Course Content */
.course-content {
    padding: 2rem 0 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

/* Course Header */
.course-header {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.1);
    position: relative;
    overflow: hidden;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.course-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.course-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    background: rgba(220, 53, 69, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.stat-item i {
    font-size: 1.1rem;
    color: var(--primary-red);
}

.course-thumbnail-header {
    text-align: center;
}

.course-thumbnail-header img {
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    border: 2px solid rgba(220, 53, 69, 0.1);
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
}

.course-thumbnail-header img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(220, 53, 69, 0.2);
}

/* Course Features in Header */
.course-features {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(220, 53, 69, 0.1);
}

.course-features h5 {
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.course-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.course-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #2c3e50;
    background: rgba(220, 53, 69, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.course-features i {
    font-size: 1rem;
}

.course-content::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23dc3545" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.course-main-content {
    position: relative;
    z-index: 2;
}

/* Overview Card */
.overview-card {
    background: white;
    border: 2px solid var(--primary-red);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.2);
}

.overview-card h2 {
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
}

.overview-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c3e50;
    margin: 0;
}

/* Curriculum Header */
.curriculum-header {
    position: relative;
    margin-bottom: 2rem;
}

.curriculum-header h2 {
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
}


/* Curriculum */
.curriculum-list {
    border: 2px solid var(--primary-red);
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.1);
}

.chapter-item {
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
}

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

.chapter-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-header:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.02) 100%);
    transform: translateX(5px);
}

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

.chapter-number {
    background: var(--primary-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chapter-details h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

.chapter-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.chapter-toggle {
    transition: transform 0.3s ease;
    color: var(--primary-red);
    font-size: 1.2rem;
}

.chapter-header[aria-expanded="true"] .chapter-toggle {
    transform: rotate(180deg);
}

.chapter-content {
    padding: 0;
    background: #f8f9fa;
}

.video-item, .resource-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.video-item:hover, .resource-item:hover {
    background: rgba(220, 53, 69, 0.05);
    transform: translateX(10px);
}

.video-item:last-child, .resource-item:last-child {
    border-bottom: none;
}

.video-icon, .resource-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.video-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--primary-red);
}

.resource-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.video-icon i, .resource-icon i {
    font-size: 1.1rem;
}

.video-info h5, .resource-info h5 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

.video-duration, .resource-size {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Sidebar */
.course-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

/* Ensure both main content and sidebar have same height */
.course-content .row {
    display: flex;
    align-items: stretch;
}

.course-main-content,
.course-sidebar {
    display: flex;
    flex-direction: column;
}

.course-curriculum,
.enrollment-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.enrollment-card {
    margin-top: 2rem; /* Align with curriculum list */
}

.curriculum-list {
    flex: 1;
}

.enrollment-features {
    margin-top: auto; /* Push to bottom if needed */
}


/* Enrollment Card */
.enrollment-card {
    background: white;
    border: 2px solid var(--primary-red);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.enrollment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.2);
}

.enrollment-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 1rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enrollment-card:hover::before {
    opacity: 0.1;
}

.enrollment-price {
    margin-bottom: 1.5rem;
    text-align: center;
}

.price-free {
    background: var(--primary-red);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.2);
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Trailer Video */
.trailer-video {
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid rgba(220, 53, 69, 0.2);
}

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

.enrollment-actions .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    border: none;
    text-transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.enrollment-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.enrollment-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background: rgba(220, 53, 69, 0.1);
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 0.25rem;
}

.enrollment-features {
    text-align: left;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(220, 53, 69, 0.1);
}

.enrollment-features h5 {
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

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

.enrollment-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.enrollment-features li:hover {
    transform: translateX(5px);
}

.enrollment-features i {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .course-header {
        padding: 1.5rem;
    }
    
    .course-title {
        font-size: 2rem;
    }
    
    .course-stats {
        gap: 1rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .curriculum-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .curriculum-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .course-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .overview-card {
        padding: 1.5rem;
    }
    
    .chapter-header {
        padding: 1rem;
    }
    
    .chapter-info {
        gap: 0.75rem;
    }
    
    .chapter-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
