/* ============================================================
   XB Single Course Page — Professional Redesign
   Uses CSS custom properties from XcelBrains design system
   ============================================================ */

/* ---------- BOOTSTRAP GRID (standalone — theme has no Bootstrap) ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}
.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 12px;
    padding-left: 12px;
}
.col-lg-4, .col-lg-6, .col-lg-8, .col-md-12 {
    width: 100%;
}
@media (min-width: 768px) {
    .col-md-12 { width: 100%; }
}
@media (min-width: 992px) {
    .col-lg-4  { width: 33.333333%; }
    .col-lg-6  { width: 50%; }
    .col-lg-8  { width: 66.666667%; }
}

/* ---------- BOOTSTRAP TABS (standalone) ---------- */
.tab-content > .tab-pane {
    display: none;
}
.tab-content > .tab-pane.active {
    display: block;
}

/* ---------- HERO BANNER ---------- */
.xb-course-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 0;
}
.xb-course-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.xb-course-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20,20,30,0.35) 0%, rgba(20,20,30,0.88) 100%);
    z-index: 1;
}
.xb-course-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 48px 0 40px;
}
.xb-course-hero__badge {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.xb-course-hero__title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 8px 0;
    max-width: 720px;
}
.xb-course-hero__accent {
    width: 60px;
    height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin-bottom: 20px;
}
.xb-course-hero__stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
.xb-course-hero__stats li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
}
.xb-course-hero__stats li .xb-stat-icon {
    color: var(--gold);
    font-size: 16px;
    flex-shrink: 0;
}

/* ---------- MAIN CONTENT AREA ---------- */
.xb-course-body {
    background: var(--off-white);
    padding-top: 32px;
    padding-bottom: 60px;
}
.xb-course-body .container {
    max-width: 1200px;
}

/* ---------- TABS ---------- */
/* Fix: TutorLMS adds a ::before pseudo-element overlay that blocks clicks */
.xb-course-body::before {
    pointer-events: none !important;
}
.xb-course-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 28px;
    padding: 0;
    list-style: none;
}
.xb-course-tabs .xb-tab-item,
.xb-course-tabs .nav-item {
    margin: 0;
}
.xb-course-tabs .xb-tab-btn,
.xb-course-tabs .nav-link {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-600);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 0;
}
.xb-course-tabs .xb-tab-btn:hover,
.xb-course-tabs .nav-link:hover {
    color: var(--gray-900);
}
.xb-course-tabs .xb-tab-btn.active,
.xb-course-tabs .nav-link.active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}

/* ---------- TAB CONTENT ---------- */
.xb-tab-content {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.xb-tab-content .courses-overview h2,
.xb-tab-content .courses-overview h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 24px;
    margin-bottom: 12px;
}
.xb-tab-content .courses-overview h2:first-child,
.xb-tab-content .courses-overview h3:first-child {
    margin-top: 0;
}
.xb-tab-content .courses-overview p {
    color: var(--gray-700);
    line-height: 1.7;
    font-size: 15px;
}
.xb-tab-content .courses-overview ul,
.xb-tab-content .courses-overview ol {
    color: var(--gray-700);
    line-height: 1.8;
}

/* ---------- SIDEBAR ---------- */
.xb-course-sidebar {
    position: sticky;
    top: 100px;
}
.xb-course-sidebar .tutor-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border-top: 4px solid var(--gold);
}
.xb-course-sidebar .tutor-card-body {
    padding: 24px;
}
.xb-course-sidebar .tutor-card-footer {
    padding: 16px 24px;
    background: #fafbfc;
    border-top: 1px solid #f0f0f0;
}

/* Progress bar — gold */
.xb-course-sidebar .tutor-progress-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
}
.xb-course-sidebar .tutor-progress-value {
    background: var(--gold) !important;
    border-radius: 4px;
}

/* Progress section */
.xb-course-sidebar .tutor-course-progress-wrapper h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}
.xb-course-sidebar .progress-steps,
.xb-course-sidebar .progress-percentage {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Start/Continue buttons inside entry box — gold */
.xb-course-sidebar .tutor-btn-primary {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    transition: all 0.2s;
}
.xb-course-sidebar .tutor-btn-primary:hover {
    background: #e5a82d !important;
    border-color: #e5a82d !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
.xb-course-sidebar .tutor-btn-outline-primary {
    border-color: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    transition: all 0.2s;
}
.xb-course-sidebar .tutor-btn-outline-primary:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
}

/* Enrolled badge */
.xb-course-sidebar .tutor-enrolled-info-text {
    font-size: 13px;
}
.xb-course-sidebar .tutor-color-success {
    color: #16a34a !important;
}

/* Hide duplicate metadata footer items in sidebar if too cluttered */
.xb-course-sidebar .tutor-card-footer .tutor-ul li {
    font-size: 13px;
    color: var(--gray-600);
}
.xb-course-sidebar .tutor-card-footer .tutor-ul li span[class^="tutor-icon"] {
    color: var(--gold);
}

/* ---------- QUICK FACTS BOX (below entry box) ---------- */
.xb-quick-facts {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 16px;
    box-shadow: var(--shadow);
}
.xb-quick-facts__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px 0;
}
.xb-quick-facts__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.xb-quick-facts__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}
.xb-quick-facts__list li:last-child {
    border-bottom: none;
}
.xb-quick-facts__list li .xb-fact-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xb-quick-facts__list li .xb-fact-label i,
.xb-quick-facts__list li .xb-fact-label .xb-fact-icon {
    color: var(--gold);
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.xb-quick-facts__list li .xb-fact-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* ---------- CURRICULUM (Topics Accordion) ---------- */
.xb-tab-content .tutor-accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.xb-tab-content .tutor-accordion-item {
    border-bottom: 1px solid var(--gray-200);
}
.xb-tab-content .tutor-accordion-item:last-child {
    border-bottom: none;
}
.xb-tab-content .tutor-accordion-item-header {
    background: #fafbfc;
    font-weight: 600;
    padding: 14px 20px;
}
.xb-tab-content .tutor-accordion-item-header:hover {
    background: #f0f1f5;
}
.xb-tab-content .tutor-accordion-item-body-content {
    padding: 0 20px 16px;
}

/* ---------- REVIEWS ---------- */
.xb-tab-content .courses-reviews .tutor-review-individual-star-rating {
    color: var(--gold);
}

/* ---------- HIDE PARENT THEME BANNER ---------- */
/* Override the Escada parent theme's page-banner-area that may still render */
.single-courses .page-banner-area {
    display: none !important;
}

/* ---------- HIDE "A COURSE BY" SECTION ---------- */
.xb-course-body .tutor-single-course-sidebar-more {
    display: none;
}

/* Escada theme's widget extra items we don't need */
.xb-course-body .course-widget-single-item > ul {
    display: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .xb-course-hero {
        min-height: 280px;
    }
    .xb-course-hero__title {
        font-size: 26px;
    }
    .xb-course-hero__stats {
        gap: 16px;
    }
    .xb-course-sidebar {
        position: static;
        margin-top: 24px;
    }
    .xb-tab-content {
        padding: 20px;
    }
}
@media (max-width: 575px) {
    .xb-course-hero {
        min-height: 240px;
    }
    .xb-course-hero__title {
        font-size: 22px;
    }
    .xb-course-hero__content {
        padding: 32px 0 28px;
    }
    .xb-course-hero__stats {
        gap: 12px;
    }
    .xb-course-hero__stats li {
        font-size: 13px;
    }
    .xb-course-tabs .xb-tab-btn,
    .xb-course-tabs .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }
}
