/* =====================================================
   COURSE DETAILS PAGE - LONG-FORM LAYOUT WITH STICKY NAV
   ===================================================== */

:root {
    --cd-primary: #6366f1;
    --cd-primary-dark: #4f46e5;
    --cd-secondary: #8b5cf6;
    --cd-accent: #f59e0b;
    --cd-success: #10b981;
    --cd-danger: #ef4444;
    --cd-dark: #1e1b4b;
    --cd-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    --cd-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --cd-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --cd-radius: 12px;
    --cd-radius-lg: 20px;
}

/* ==================== CONTAINER ALIGNMENT (Match Header) ==================== */
.course-detail-section .container,
.breadcrumb-area .container {
    max-width: 1320px;
    padding-left: 40px;
    padding-right: 40px;
}

/* ==================== PAGE LAYOUT ==================== */
.course-detail-section {
    background-color: #f8f9fa;
    padding: 30px 0 60px;
}

.breadcrumb-area {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

/* ==================== KEY HIGHLIGHTS WRAPPER ==================== */
.key-highlights-wrapper {
    background: transparent;
    margin-top: 30px;
    margin-bottom: 30px;
}


html.dark .key-highlights-wrapper,
[data-theme="dark"] .key-highlights-wrapper,
[data-bs-theme="dark"] .key-highlights-wrapper {
    background: transparent !important;
}

/* ==================== STICKY NAVIGATION ==================== */
.sticky-nav-wrapper {
    position: relative;
    z-index: 100;
    margin: 20px 0;
}

.course-sticky-nav {
    background: #fff;
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    transition: all 0.3s ease;
}

.course-sticky-nav.is-sticky {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1040;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

/* Ensure sticky nav content stays within container width */
.course-sticky-nav.is-sticky .sticky-nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-nav-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

.sticky-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    /* Removed flex: 1 to prevent pushing button to far right */
}

.sticky-nav-list::-webkit-scrollbar {
    display: none;
}

.sticky-nav-list li {
    flex-shrink: 0;
}

.sticky-nav-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sticky-nav-item:hover {
    color: #ef4444;
    text-decoration: none;
}

.sticky-nav-item.active {
    color: #ef4444;
    border-bottom-color: #ef4444;
}

.sticky-nav-item i {
    font-size: 16px;
}

/* Apply Now Button */
.apply-now-btn {
    background: #ef4444;
    color: #fff;
    padding: 10px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s;
}

.apply-now-btn:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
}

.sticky-nav-placeholder {
    display: none;
}

/* ==================== COURSE SECTIONS ==================== */
.course-section {
    background: #fff;
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    margin-bottom: 24px;
}

/* Add top margin to the container after career-transitions section */
.career-transitions-section + .container {
    margin-top: 30px;
}

/* Specific margin for Mentors section after career transitions */
#section-mentors {
    margin-top: 30px;
}

/* Add top margin to course sections that follow other sections */
.course-section + .course-section {
    margin-top: 0;
}

.section-content {
    padding: 24px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cd-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.section-title i {
    color: var(--cd-primary);
}

/* ==================== COURSE HEADER ==================== */
.course-header {
    background: #fff;
    border-radius: var(--cd-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--cd-shadow);
}

.course-header .course-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cd-dark);
    line-height: 1.3;
    margin-bottom: 12px;
}

.course-header .course-modes .badge {
    background: var(--cd-primary);
    padding: 6px 12px;
    font-weight: 500;
    margin-right: 8px;
}

.course-header .course-modes .badge.bg-warning {
    background: var(--cd-accent) !important;
}

.course-meta > div {
    font-size: 0.9rem;
    color: #555;
}

/* ==================== KEY HIGHLIGHTS ==================== */
.key-highlights-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 100%);
    border-radius: var(--cd-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.key-highlights-section .highlights-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-around;
}

.key-highlights-section .highlight-card {
    background: #fff;
    border-radius: var(--cd-radius);
    padding: 15px 20px;
    text-align: center;
    min-width: 100px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.key-highlights-section .highlight-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cd-primary);
}

.key-highlights-section .highlight-label {
    font-size: 12px;
    color: #64748b;
}

/* ==================== BATCH SELECTOR ==================== */
.batch-selector-section {
    background: var(--cd-gradient);
    border-radius: var(--cd-radius);
    padding: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.batch-selector-section .section-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.batch-selector-section .batch-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--cd-radius);
}

.batch-selector-section .batch-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== PRICING SIDEBAR ==================== */
.pricing-sidebar-card {
    position: sticky;
    top: 100px;
}

.pricing-sidebar-card .card {
    border-radius: var(--cd-radius-lg);
    border: none;
    box-shadow: var(--cd-shadow-lg);
    overflow: hidden;
}

.pricing-sidebar-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.pricing-sidebar-card .preview-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--cd-primary);
    transition: all 0.3s;
}

.pricing-sidebar-card .preview-play-btn:hover {
    background: var(--cd-primary);
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.pricing-sidebar-card .price-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cd-dark);
}

.pricing-sidebar-card .btn-primary {
    background: var(--cd-primary);
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
}

.pricing-sidebar-card .btn-primary:hover {
    background: var(--cd-primary-dark);
}

/* ==================== CURRICULUM ACCORDION ==================== */
.curriculum-section .section-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--cd-radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.curriculum-section .section-header {
    background: #f8fafc;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.curriculum-section .section-header:hover {
    background: #f1f5f9;
}

.curriculum-section .section-header .section-name {
    font-weight: 600;
    color: var(--cd-dark);
}

.curriculum-section .lesson-list {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.curriculum-section .section-item.open .lesson-list {
    max-height: 1000px;
    padding: 15px 20px;
}

.curriculum-section .lesson-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.curriculum-section .lesson-item i {
    color: var(--cd-primary);
}

/* ==================== FAQ ACCORDION ==================== */
.faq-section .faq-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--cd-radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-section .faq-question {
    background: #fff;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--cd-dark);
    transition: all 0.3s;
}

.faq-section .faq-question:hover {
    background: #f8fafc;
}

.faq-section .faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-section .faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}

/* ==================== TESTIMONIALS ==================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.testimonial-card {
    background: #fff;
    border-radius: var(--cd-radius);
    padding: 24px;
    box-shadow: var(--cd-shadow);
    border: 1px solid #f1f5f9;
}

.testimonial-card blockquote {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-card .author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-card .author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card .author-name {
    font-weight: 600;
    color: var(--cd-dark);
}

.testimonial-card .author-designation {
    font-size: 13px;
    color: #94a3b8;
}

/* ==================== CAREER SERVICES ==================== */
.career-services-section {
    background: var(--cd-gradient);
    border-radius: var(--cd-radius);
    padding: 24px;
    color: #fff;
}

.career-services-section .section-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.career-stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--cd-radius);
    padding: 20px;
    text-align: center;
}

.career-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cd-accent);
}

.career-stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
    .course-detail-section .container,
    .breadcrumb-area .container {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .course-sticky-nav.is-sticky .sticky-nav-list {
        padding: 0 30px;
    }
}

@media (max-width: 991px) {
    .course-detail-section .container,
    .breadcrumb-area .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .course-sticky-nav.is-sticky .sticky-nav-list {
        padding: 0 20px;
    }
    
    .pricing-sidebar-card {
        position: static;
        margin-bottom: 30px;
    }
    
    .sticky-nav-item {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .course-detail-section .container,
    .breadcrumb-area .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .course-sticky-nav.is-sticky .sticky-nav-list {
        padding: 0 15px;
    }
    
    .course-header .course-title {
        font-size: 1.4rem;
    }
    
    .section-content {
        padding: 16px;
    }
    
    .sticky-nav-item {
        padding: 10px 14px;
    }
    
    .key-highlights-section .highlights-row {
        flex-wrap: wrap;
    }
    
    .key-highlights-section .highlight-card {
        min-width: calc(50% - 10px);
    }
}

/* =====================================================
   DARK MODE SUPPORT
   ===================================================== */

html.dark,
[data-theme="dark"],
[data-bs-theme="dark"] {
    --cd-dark: #f9fafb;
}

/* Page Background */
html.dark body,
[data-theme="dark"] body,
[data-bs-theme="dark"] body {
    background-color: #0f1117 !important;
}

/* Course Detail Section */
html.dark .course-detail-section,
[data-theme="dark"] .course-detail-section,
[data-bs-theme="dark"] .course-detail-section {
    background-color: #0f1117 !important;
}

/* Breadcrumb Area */
html.dark .breadcrumb-area,
[data-theme="dark"] .breadcrumb-area,
[data-bs-theme="dark"] .breadcrumb-area {
    background: #1a1d29 !important;
    border-bottom-color: #2d3142 !important;
}

/* Sticky Navigation */
html.dark .course-sticky-nav,
[data-theme="dark"] .course-sticky-nav,
[data-bs-theme="dark"] .course-sticky-nav {
    background: #1a1d29 !important;
}

html.dark .course-sticky-nav.is-sticky,
[data-theme="dark"] .course-sticky-nav.is-sticky,
[data-bs-theme="dark"] .course-sticky-nav.is-sticky {
    background: #1a1d29 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

html.dark .sticky-nav-item,
[data-theme="dark"] .sticky-nav-item,
[data-bs-theme="dark"] .sticky-nav-item {
    color: #9ca3af !important;
}

html.dark .sticky-nav-item:hover,
html.dark .sticky-nav-item.active,
[data-theme="dark"] .sticky-nav-item:hover,
[data-theme="dark"] .sticky-nav-item.active,
[data-bs-theme="dark"] .sticky-nav-item:hover,
[data-bs-theme="dark"] .sticky-nav-item.active {
    color: #ef4444 !important;
}

/* Course Sections */
html.dark .course-section,
[data-theme="dark"] .course-section,
[data-bs-theme="dark"] .course-section {
    background: #1a1d29 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html.dark .section-title,
[data-theme="dark"] .section-title,
[data-bs-theme="dark"] .section-title {
    color: #f9fafb !important;
    border-bottom-color: #2d3142 !important;
}

/* Course Header */
html.dark .course-header,
[data-theme="dark"] .course-header,
[data-bs-theme="dark"] .course-header {
    background: #1a1d29 !important;
}

html.dark .course-header .course-title,
[data-theme="dark"] .course-header .course-title,
[data-bs-theme="dark"] .course-header .course-title {
    color: #f9fafb !important;
}

html.dark .course-meta > div,
[data-theme="dark"] .course-meta > div,
[data-bs-theme="dark"] .course-meta > div {
    color: #9ca3af !important;
}

/* Key Highlights Wrapper */
html.dark .key-highlights-wrapper,
[data-theme="dark"] .key-highlights-wrapper,
[data-bs-theme="dark"] .key-highlights-wrapper {
    background: transparent !important;
}

/* Key Highlights Section (override the gradient) */
html.dark .key-highlights-section,
[data-theme="dark"] .key-highlights-section,
[data-bs-theme="dark"] .key-highlights-section {
    background: #1a1d29 !important;
}

html.dark .key-highlights-section .highlight-card,
[data-theme="dark"] .key-highlights-section .highlight-card,
[data-bs-theme="dark"] .key-highlights-section .highlight-card {
    background: #252836 !important;
}

html.dark .key-highlights-section .highlight-value,
[data-theme="dark"] .key-highlights-section .highlight-value,
[data-bs-theme="dark"] .key-highlights-section .highlight-value {
    color: #818cf8 !important;
}

html.dark .key-highlights-section .highlight-label,
[data-theme="dark"] .key-highlights-section .highlight-label,
[data-bs-theme="dark"] .key-highlights-section .highlight-label {
    color: #9ca3af !important;
}

/* Curriculum Section */
html.dark .curriculum-section .section-item,
[data-theme="dark"] .curriculum-section .section-item,
[data-bs-theme="dark"] .curriculum-section .section-item {
    border-color: #2d3142 !important;
}

html.dark .curriculum-section .section-header,
[data-theme="dark"] .curriculum-section .section-header,
[data-bs-theme="dark"] .curriculum-section .section-header {
    background: #252836 !important;
}

html.dark .curriculum-section .section-header:hover,
[data-theme="dark"] .curriculum-section .section-header:hover,
[data-bs-theme="dark"] .curriculum-section .section-header:hover {
    background: #2d3142 !important;
}

html.dark .curriculum-section .section-header .section-name,
[data-theme="dark"] .curriculum-section .section-header .section-name,
[data-bs-theme="dark"] .curriculum-section .section-header .section-name {
    color: #f9fafb !important;
}

html.dark .curriculum-section .lesson-item,
[data-theme="dark"] .curriculum-section .lesson-item,
[data-bs-theme="dark"] .curriculum-section .lesson-item {
    border-bottom-color: #2d3142 !important;
    color: #d1d5db !important;
}

/* FAQ Section */
html.dark .faq-section .faq-item,
[data-theme="dark"] .faq-section .faq-item,
[data-bs-theme="dark"] .faq-section .faq-item {
    border-color: #2d3142 !important;
}

html.dark .faq-section .faq-question,
[data-theme="dark"] .faq-section .faq-question,
[data-bs-theme="dark"] .faq-section .faq-question {
    background: #1a1d29 !important;
    color: #f9fafb !important;
}

html.dark .faq-section .faq-question:hover,
[data-theme="dark"] .faq-section .faq-question:hover,
[data-bs-theme="dark"] .faq-section .faq-question:hover {
    background: #252836 !important;
}

html.dark .faq-section .faq-answer,
[data-theme="dark"] .faq-section .faq-answer,
[data-bs-theme="dark"] .faq-section .faq-answer {
    color: #d1d5db !important;
}

/* Testimonials */
html.dark .testimonial-card,
[data-theme="dark"] .testimonial-card,
[data-bs-theme="dark"] .testimonial-card {
    background: #252836 !important;
    border-color: #2d3142 !important;
}

html.dark .testimonial-card blockquote,
[data-theme="dark"] .testimonial-card blockquote,
[data-bs-theme="dark"] .testimonial-card blockquote {
    color: #d1d5db !important;
}

html.dark .testimonial-card .author-name,
[data-theme="dark"] .testimonial-card .author-name,
[data-bs-theme="dark"] .testimonial-card .author-name {
    color: #f9fafb !important;
}

html.dark .testimonial-card .author-designation,
[data-theme="dark"] .testimonial-card .author-designation,
[data-bs-theme="dark"] .testimonial-card .author-designation {
    color: #9ca3af !important;
}

/* Pricing Sidebar */
html.dark .pricing-sidebar-card .card,
[data-theme="dark"] .pricing-sidebar-card .card,
[data-bs-theme="dark"] .pricing-sidebar-card .card {
    background: #1a1d29 !important;
}

html.dark .pricing-sidebar-card .price-display,
[data-theme="dark"] .pricing-sidebar-card .price-display,
[data-bs-theme="dark"] .pricing-sidebar-card .price-display {
    color: #f9fafb !important;
}

/* Projects Section */
html.dark #section-projects,
[data-theme="dark"] #section-projects,
[data-bs-theme="dark"] #section-projects {
    background: #1a1d29 !important;
}

/* Container backgrounds */
html.dark .container,
[data-theme="dark"] .container,
[data-bs-theme="dark"] .container {
    background: transparent !important;
}
