/* ============================================
   DARK CLASS DETAILS CSS - INFIX LMS
   ============================================ */

:root {
    --dark-bg: #0A0C15;
    --dark-surface: #111827;
    --dark-surface-light: #1A1F2E;
    --accent-cyan: #06B6D4;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-orange: #F59E0B;
    --gradient-1: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    --text-white: #FFFFFF;
    --text-gray: #9CA3AF;
}

/* Sibling dark-course-page.css sets this; this file never did, so the
   fixed/translucent site header (backdrop-filter: blur over whatever's
   behind it, i.e. <body>) sampled the page's unset/light background and
   read as flat gray instead of dark glass — same root cause documented for
   the header/dashboard-menu partials. */
body {
    background: var(--dark-bg);
}

/* Container */
.dark-class-details-container {
    background: #0A0C15;
    min-height: 100vh;
}

/* Hero Section */
.class-hero-section {
    position: relative;
    background: linear-gradient(135deg, #0A0C15 0%, #111827 100%);
    padding: 60px 0;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    overflow: hidden;
}

.class-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    animation: floatBubble 20s ease-in-out infinite;
}

.class-hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    animation: floatBubble 15s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.class-hero-content {
    position: relative;
    z-index: 2;
}

/* Breadcrumb */
.class-breadcrumb {
    margin-bottom: 25px;
}

.class-breadcrumb a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.class-breadcrumb a:hover {
    color: #06B6D4;
}

.class-breadcrumb span {
    color: #9CA3AF;
    margin: 0 5px;
}

.class-breadcrumb .current {
    color: #06B6D4;
}

/* Badge */
.class-badge {
    margin-bottom: 25px;
}

.live-badge {
    background: #EF4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-badge i {
    font-size: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Title */
.class-title {
    font-size: 48px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #FFFFFF;
    margin-bottom: 25px;
    line-height: 1.2;
}

/* Meta Info Badges System */
.class-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.meta-badge {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.meta-badge.item-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--text-gray);
    gap: 8px;
}

.meta-badge.item-badge:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: var(--accent-cyan);
    color: var(--text-white);
}

.meta-badge.item-badge i {
    color: var(--accent-cyan);
    font-size: 15px;
}

.meta-badge .stars-custom {
    display: flex;
    gap: 4px;
    color: #F59E0B;
    font-size: 13px;
}

.meta-badge .review-count {
    color: var(--text-gray);
    font-weight: 500;
    margin-left: 4px;
}

/* Description */
.class-description {
    color: #9CA3AF;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 90%;
}

/* Instructor */
.class-instructor {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.instructor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.instructor-info h5 {
    color: #FFFFFF;
    margin-bottom: 5px;
    font-size: 16px;
}

.instructor-info h5 a {
    color: #06B6D4;
    text-decoration: none;
}

.instructor-info h5 a:hover {
    color: #8B5CF6;
}

.instructor-info p {
    color: #9CA3AF;
    font-size: 13px;
    margin: 0;
}

/* Buttons */
.class-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
    color: white;
}

.btn-outline-cyan {
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.5);
    padding: 12px 28px;
    border-radius: 50px;
    color: #06B6D4;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-cyan:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: #06B6D4;
    color: #06B6D4;
}

/* Layout Restructuring Styles from Course Details */
.course-main-layout {
    position: relative;
    margin-top: 40px;
    padding-bottom: 80px;
}

.sticky-sidebar {
    position: sticky;
    top: 30px;
    z-index: 30;
}

.class-image-card {
    margin-top: -450px; /* Significantly pulls card further UP into hero overlapping it */
    background: var(--dark-surface) !important; 
    color: #E5E7EB !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
    max-width: 340px;
    margin-left: auto;
    border-radius: 12px !important;
    overflow: hidden;
}
.class-title{
            font-size:35px;
        }

.class-main-image {
    height: 220px; /* Compact fit */
    overflow: hidden;
    position: relative;
}

.class-main-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
}

/* Tabs Sync System */
.class-tabs {
    margin-top: 0; /* Reset since it's already in grid below */
}

.nav-tabs-custom {
    border-bottom: none !important;
    gap: 12px;
    margin-bottom: 35px;
    display: flex;
}

.nav-tabs-custom .nav-item {
    margin-bottom: 0;
}

.nav-tabs-custom .nav-link {
    background: rgba(255,255,255,0.05) !important;
    color: #E5E7EB !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 22px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 12.5px;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-tabs-custom .nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
    transform: translateY(-2px);
    color: white !important;
}

.nav-tabs-custom .nav-link.active {
    background: var(--gradient-1) !important;
    color: white !important;
    box-shadow: 0 8px 16px -8px rgba(6, 182, 212, 0.5);
}

.nav-tabs-custom .nav-link.active::after {
    display: none; /* Remove old underline style */
}

.tab-content {
    background: var(--dark-surface);
    border-radius: 20px;
    padding: 35px;
    border: 1px solid rgba(6, 182, 212, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.class-info-card {
    padding: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9CA3AF !important;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 500;
    justify-content: flex-start; /* Reset align to start */
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    color: var(--accent-cyan);
    width: 18px;
    text-align: center;
}

.class-price-large {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-cyan);
    margin: 0 0 15px 0;
}

.btn-enroll-full {
    background: var(--gradient-1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    border: none;
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.2);
}

.btn-enroll-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

/* Overview Cards Grid CSS */
.stat-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 22px 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-3px);
}

.stat-label {
    color: #9CA3AF;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.overview-content h3,
.course-desc-title {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin-top: 40px;
    margin-bottom: 20px;
}

.overview-content p {
    color: #D1D5DB;
    line-height: 2.0;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Course Schedule Layout CSS */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.schedule-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 22px 15px;
    text-align: center;
    transition: all 0.3s ease;
    align-items: center;
    text-decoration: none !important;
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

.sch-col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sch-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.sch-lbl {
    color: #9CA3AF;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sch-val {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
    margin: 0;
}

/* Recordings Overwrite */
.recording-grid-item {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Empty state (no upcoming sessions / no recordings yet) — a single
   horizontal bar matching the .schedule-item look, not a standalone card */
.empty-session-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 22px 25px;
}

.empty-session-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-session-icon i {
    font-size: 20px;
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-session-text h4 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

.empty-session-text p {
    color: #9CA3AF;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}

.upcoming-session h3,
.class-recording h3 {
    color: #FFFFFF;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upcoming-session h3 i,
.class-recording h3 i {
    color: #06B6D4;
}

.session-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    transition: all 0.3s ease;
}

.session-card:hover {
    background: rgba(6, 182, 212, 0.05);
}

.session-date {
    text-align: center;
    min-width: 100px;
}

.session-date .day {
    display: block;
    color: #06B6D4;
    font-weight: 600;
    font-size: 14px;
}

.session-date .time {
    display: block;
    color: #9CA3AF;
    font-size: 12px;
}

.session-info h4 {
    color: #FFFFFF;
    font-size: 16px;
    margin-bottom: 5px;
}

.session-info p {
    color: #9CA3AF;
    font-size: 13px;
}

.btn-join-session {
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-join-session.disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

.recording-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.recording-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recording-info i {
    font-size: 24px;
    color: #06B6D4;
}

.recording-info h4 {
    color: #FFFFFF;
    font-size: 16px;
    margin-bottom: 5px;
}

.recording-info p {
    color: #9CA3AF;
    font-size: 12px;
}

.btn-watch {
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.5);
    color: #06B6D4;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-watch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-watch:not(.disabled):hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: #06B6D4;
}

/* Reviews Summary */
.rating-title{
    color:white; margin-bottom:20px; margin-left:5px;
}
.reviews-summary {
    background: #111827;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    margin-bottom: 30px;
}

.rating-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.average-rating {
    text-align: center;
    min-width: 120px;
}

.average-rating .rating-number {
    font-size: 48px;
    font-weight: 800;
    color: #FFFFFF;
}

.average-rating .stars {
    color: #F59E0B;
    margin: 10px 0;
}

.average-rating .rating-count {
    color: #9CA3AF;
    font-size: 14px;
}

.rating-bars {
    flex: 1;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rating-bar-item .star-label {
    width: 40px;
    color: #F59E0B;
}

.rating-bar-item .bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-item .bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    border-radius: 4px;
}

.rating-bar-item .percentage {
    width: 50px;
    color: #9CA3AF;
    font-size: 14px;
}

/* Write Review Form */
.write-review-form,
.write-qa-form {
    background: #111827;
    border-radius: 24px;
    padding: 25px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    margin-bottom: 30px;
}

.write-review-form h4,
.write-qa-form h4 {
    color: #FFFFFF;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: #FFFFFF;
    margin-bottom: 8px;
    display: block;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 12px 15px;
    color: #FFFFFF;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #06B6D4;
}

.rating-input {
    display: flex;
    gap: 10px;
    font-size: 24px;
    cursor: pointer;
}

.rating-input i {
    color: #9CA3AF;
    transition: all 0.3s ease;
}

.rating-input i.fas {
    color: #F59E0B;
}

.btn-submit {
    background: linear-gradient(135deg, #06B6D4, #8B5CF6);
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    color: #9CA3AF;
    background: #111827;
    border-radius: 24px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 991px) {
    .class-title {
        font-size: 32px;
    }
    
    .class-description {
        max-width: 100%;
    }
    
    .class-hero-section {
        padding: 40px 0;
    }
    
    .class-image-card {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .class-title {
        font-size: 28px;
        text-align: center;
    }
    
    .class-meta-info {
        justify-content: center;
    }
    
    .class-description {
        text-align: center;
    }
    
    .class-instructor {
        justify-content: center;
    }
    
    .class-actions {
        justify-content: center;
    }
    
    .class-hero-content {
        text-align: center;
    }
    
    .session-card {
        flex-direction: column;
        text-align: center;
    }
    
    .recording-card {
        flex-direction: column;
        text-align: center;
    }
    
    .recording-info {
        flex-direction: column;
    }
    
    .rating-stats {
        flex-direction: column;
        align-items: center;
    }

    /* .schedule-item/.recording-grid-item had no mobile override anywhere
       in this file — three equal columns squeeze to ~90-100px on a 360-430px
       screen, crushing the date/time/duration labels. Drop to a 2-col grid
       here and stack the divider-column rule (.sch-col:not(:last-child)
       ::after, above) still reads fine since it only draws on non-last
       columns. */
    .schedule-item,
    .recording-grid-item {
        grid-template-columns: 1fr 1fr;
        row-gap: 14px;
    }
}

@media (max-width: 430px) {
    .schedule-item,
    .recording-grid-item {
        grid-template-columns: 1fr;
    }
    .sch-col:not(:last-child)::after {
        display: none;
    }
}