/* ============================================
   Course Detail Page - Code Blue Training
   BEM block: cd (course detail)
   ============================================ */


/* ===== PAGE BACKGROUND ===== */
/* Prevent light body background from flashing between dark sections */
body:has(.cd-hero) {
    background-color: var(--color-midnight-900);
}

/* ===== 1. HERO ===== */

.cd-hero {
    position: relative;
    background-color: var(--color-midnight-950);
    padding-block: var(--space-16) var(--space-20);
    overflow: hidden;
}

/* Brand pattern overlay */
.cd-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: url("/static/images/patterns/Code_Blue_Training_Pattern_Update_5-02.66f68157fc33.png");
    background-size: 400px;
    background-repeat: repeat;
    opacity: 0.06;
    pointer-events: none;
}

.cd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 15% 50%, rgba(193, 0, 0, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 85% 50%, rgba(68, 120, 204, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cd-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-midnight-900));
    pointer-events: none;
    z-index: 1;
}

.cd-hero__ecg {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 120px;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
}

/* Breadcrumbs */
.cd-hero__breadcrumbs {
    margin-block-end: var(--space-6);
}

.cd-hero .breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--text-sm);
}

.cd-hero .breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-slate-500);
}

.cd-hero .breadcrumbs__item + .breadcrumbs__item::before {
    content: '/';
    color: var(--color-midnight-600);
}

.cd-hero .breadcrumbs__link {
    color: var(--color-slate-400);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
}

.cd-hero .breadcrumbs__link:hover {
    color: var(--color-white);
}

.cd-hero .breadcrumbs__item--active {
    color: var(--color-slate-300);
}

/* Grid layout */
.cd-hero__grid {
    display: grid;
    gap: var(--space-12);
    align-items: center;
}

@media (min-width: 64em) {
    .cd-hero__grid {
        grid-template-columns: 1fr 400px;
    }
}

/* Badges row */
.cd-hero__badges {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-block-end: var(--space-4);
}

.cd-hero__category {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: rgb(var(--cc));
    background: rgba(var(--cc), 0.12);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.cd-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    color: var(--badge-color, var(--color-white));
    background: color-mix(in srgb, var(--badge-color, #fff) 20%, transparent);
}

.cd-hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: cd-badge-pulse 1.5s ease-in-out infinite;
}

@keyframes cd-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Title */
.cd-hero__title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--color-white);
    margin-block-end: var(--space-4);
}

@media (min-width: 48em) {
    .cd-hero__title {
        font-size: var(--text-4xl);
    }
}

.cd-hero__subtitle {
    font-family: var(--font-reading);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-400);
    margin-block-end: var(--space-6);
}

/* Instructor in hero */
.cd-hero__instructor {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-block-end: var(--space-6);
}

.cd-hero__instructor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-midnight-800);
    border: 2px solid rgba(var(--cc), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: rgb(var(--cc));
    overflow: hidden;
    flex-shrink: 0;
}

.cd-hero__instructor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-hero__instructor-info {
    display: flex;
    flex-direction: column;
}

.cd-hero__instructor-name {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-white);
}

.cd-hero__instructor-title {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
}

/* Stats row */
.cd-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4) var(--space-6);
    margin-block-end: var(--space-8);
    padding-block: var(--space-4);
    border-top: 1px solid var(--color-midnight-800);
    border-bottom: 1px solid var(--color-midnight-800);
}

.cd-hero__stat {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

.cd-hero__stat strong {
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.cd-hero__stat svg {
    color: var(--color-slate-500);
    flex-shrink: 0;
}

.cd-hero__stat-icon--star {
    color: var(--neon-gold);
}

.cd-hero__stat-label {
    color: var(--color-slate-500);
}

/* CTA */
.cd-hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cd-hero__price-note {
    font-size: var(--text-sm);
    color: var(--color-slate-500);
}

/* Hero image card */
.cd-hero__image-card {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--color-midnight-800);
    border: 2px solid rgb(var(--cc));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(var(--cc), 0.25),
        0 0 80px rgba(var(--cc), 0.08);
}

.cd-hero__image-placeholder {
    color: rgba(var(--cc), 0.4);
}

.cd-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-hero__image-format {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    background: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(8px);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}


/* ===== 2. STICKY BAR ===== */

.cd-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(11, 17, 32, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-midnight-800);
    padding-block: var(--space-3);
}

.cd-sticky__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.cd-sticky__title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

@media (min-width: 48em) {
    .cd-sticky__title {
        font-size: var(--text-base);
    }
}

.cd-sticky__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.cd-sticky__price {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

.cd-sticky__price--free {
    color: var(--color-success-600);
    background: rgba(13, 148, 136, 0.15);
}

.cd-sticky__price--premium {
    color: var(--neon-gold);
    background: rgba(234, 179, 8, 0.15);
}

/* Transitions */
.cd-sticky--enter { transition: all var(--duration-normal) ease; }
.cd-sticky--enter-start { opacity: 0; transform: translateY(-100%); }
.cd-sticky--enter-end { opacity: 1; transform: translateY(0); }
.cd-sticky--leave { transition: all var(--duration-fast) ease; }
.cd-sticky--leave-start { opacity: 1; transform: translateY(0); }
.cd-sticky--leave-end { opacity: 0; transform: translateY(-100%); }


/* ===== 3. VERTICAL TABS ===== */

.cd-tabs {
    position: relative;
    background: var(--color-midnight-900);
    padding-block: var(--space-16);
}

.cd-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-midnight-950));
    pointer-events: none;
    z-index: 0;
}

/* Layout: horizontal tabs above content */
.cd-tabs__layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

/* Tab navigation — horizontal bar */
.cd-tabs__nav {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block-end: var(--space-4);
    border-bottom: 1px solid var(--color-midnight-700);
}

.cd-tabs__nav::-webkit-scrollbar {
    display: none;
}

.cd-tabs__btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: none;
    background: none;
    color: var(--color-slate-500);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all var(--duration-fast) var(--ease-default);
    position: relative;
}

.cd-tabs__btn::after {
    content: '';
    position: absolute;
    bottom: calc(-1 * var(--space-4));
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background var(--duration-fast) var(--ease-default);
}

.cd-tabs__btn:hover {
    color: var(--color-slate-300);
    background: rgba(255, 255, 255, 0.03);
}

.cd-tabs__btn--active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.04);
}

.cd-tabs__btn--active::after {
    background: linear-gradient(90deg, #C10000, #4478CC);
}

.cd-tabs__btn--active svg {
    color: rgb(68, 120, 204);
}

/* Panels */
.cd-tabs__panels {
    min-width: 0; /* prevent grid blowout */
}

.cd-tabs__panel {
    /* no extra padding — content styles handle it */
}

/* Panel transitions */
.cd-tabs__panel--enter {
    transition: opacity var(--duration-normal) ease, transform var(--duration-normal) ease;
}

.cd-tabs__panel--enter-start {
    opacity: 0;
    transform: translateY(8px);
}

.cd-tabs__panel--enter-end {
    opacity: 1;
    transform: translateY(0);
}


/* ===== OVERVIEW (inside tab panel) ===== */

.cd-overview__grid {
    display: grid;
    gap: var(--space-10);
}

@media (min-width: 64em) {
    .cd-overview__grid {
        grid-template-columns: 1fr 320px;
        gap: var(--space-8);
    }
}

.cd-overview__main {
    min-width: 0;
}

.cd-overview__description {
    margin-block-end: var(--space-8);
}

.cd-overview__heading {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-4);
}

.cd-overview__text {
    font-family: var(--font-reading);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
    word-break: break-word;
    overflow-wrap: break-word;
}

.cd-overview__text p {
    max-width: none;
    margin-block-end: var(--space-4);
}

.cd-overview__text--collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.cd-overview__text--collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--color-midnight-900));
    pointer-events: none;
}

.cd-overview__expand {
    background: none;
    border: none;
    color: rgb(68, 120, 204);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
    padding: var(--space-2) 0;
    transition: color var(--duration-fast) var(--ease-default);
}

.cd-overview__expand:hover {
    color: rgb(107, 150, 217);
}

/* Prerequisites */
.cd-overview__prereqs {
    margin-block-start: var(--space-6);
    padding-block-start: var(--space-6);
    border-top: 1px solid var(--color-midnight-700);
}

.cd-overview__prereqs-heading {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.cd-overview__prereqs-text {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

/* Tags */
.cd-overview__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-block-start: var(--space-6);
}

.cd-overview__tag {
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--color-slate-400);
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-default);
}

.cd-overview__tag:hover {
    color: var(--color-white);
    border-color: var(--color-midnight-600);
}

/* Objectives sidebar */
.cd-overview__objectives {
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.cd-overview__objectives-heading {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-4);
}

.cd-overview__objectives-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-3);
}

.cd-overview__objective {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-slate-300);
}

.cd-overview__check {
    color: var(--color-success-600);
    flex-shrink: 0;
    margin-top: 2px;
}


/* ===== 4. CURRICULUM (inside tab panel) ===== */

.cd-curriculum__header {
    margin-block-end: var(--space-8);
}

.cd-curriculum__title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.cd-curriculum__summary {
    font-size: var(--text-sm);
    color: var(--color-slate-500);
}

/* Modules */
.cd-curriculum__modules {
    display: grid;
    gap: var(--space-3);
}

.cd-curriculum__module {
    --cc: var(--curriculum-color, 68, 120, 204);
    background: var(--color-midnight-800);
    border: 2px solid rgb(var(--cc));
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(var(--cc), 0.25),
        0 0 80px rgba(var(--cc), 0.08);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.cd-curriculum__module:hover {
    box-shadow:
        0 0 60px rgba(var(--cc), 0.45),
        0 0 120px rgba(var(--cc), 0.15);
}

.cd-curriculum__module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-default);
}

.cd-curriculum__module-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cd-curriculum__module-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.cd-curriculum__module-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: rgb(var(--cc));
    background: rgba(var(--cc), 0.12);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cd-curriculum__module-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--color-white);
    text-align: left;
}

.cd-curriculum__module-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.cd-curriculum__module-count {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
    display: none;
}

@media (min-width: 36em) {
    .cd-curriculum__module-count {
        display: inline;
    }
}

.cd-curriculum__chevron {
    color: var(--color-slate-500);
    transition: transform var(--duration-normal) var(--ease-out);
}

.cd-curriculum__chevron--open {
    transform: rotate(180deg);
}

/* Lessons */
.cd-curriculum__lessons {
    border-top: 1px solid var(--color-midnight-700);
}

.cd-curriculum__lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    transition: background var(--duration-fast) var(--ease-default);
}

.cd-curriculum__lesson:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cd-curriculum__lesson:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cd-curriculum__lesson-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.cd-curriculum__lesson-icon {
    color: rgb(193, 0, 0);
    flex-shrink: 0;
}

.cd-curriculum__lesson-icon--play {
    color: rgb(34, 197, 94);
}

.cd-curriculum__lesson-title {
    font-size: var(--text-sm);
    color: var(--color-slate-300);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-curriculum__lesson-preview {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: rgb(34, 197, 94);
    background: rgba(34, 197, 94, 0.12);
    padding: 1px var(--space-2);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cd-curriculum__lesson-duration {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
    flex-shrink: 0;
}

/* Empty state */
.cd-curriculum__empty {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
    color: var(--color-slate-500);
}

.cd-curriculum__empty svg {
    margin-block-end: var(--space-4);
    opacity: 0.5;
}

.cd-curriculum__empty-text {
    font-size: var(--text-lg);
    color: var(--color-slate-400);
    margin-block-end: var(--space-2);
}

.cd-curriculum__empty-note {
    font-size: var(--text-sm);
    color: var(--color-slate-500);
}


/* ===== 4b. OBJECTIVES TAB ===== */

.cd-objectives {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cd-objectives__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--color-slate-300);
    line-height: 1.6;
    transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.cd-objectives__item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.cd-objectives__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: var(--neon-emerald);
    margin-top: 2px;
}


/* ===== 4c. PREREQUISITES TAB ===== */

.cd-prereqs__text {
    font-size: var(--text-base);
    color: var(--color-slate-300);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    padding: var(--space-4) var(--space-5);
    background: rgba(251,191,36,0.05);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: var(--radius-md);
    border-left: 3px solid rgba(251,191,36,0.5);
}

.cd-prereqs__courses {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cd-prereqs__course {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.cd-prereqs__course:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.cd-prereqs__check {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cd-prereqs__check--done {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: var(--neon-emerald);
}

.cd-prereqs__check--pending {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--color-slate-500);
}

.cd-prereqs__info {
    flex: 1;
    min-width: 0;
}

.cd-prereqs__title {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

.cd-prereqs__title:hover {
    color: var(--neon-blue, #60a5fa);
}

.cd-prereqs__meta {
    font-size: var(--text-sm);
    color: var(--color-slate-500);
    margin-top: 2px;
    display: block;
}

.cd-prereqs__badge--completed {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-3);
    border-radius: 999px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: var(--neon-emerald);
}

.cd-prereqs__badge--required {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-3);
    border-radius: 999px;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.25);
    color: var(--neon-gold, #fbbf24);
}

@media (max-width: 36em) {
    .cd-prereqs__course {
        flex-wrap: wrap;
    }
    .cd-prereqs__badge {
        margin-left: auto;
    }
}


/* ===== 5. LIVE SESSIONS (inside tab panel) ===== */

.cd-sessions__header {
    margin-block-end: var(--space-8);
}

.cd-sessions__title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.cd-sessions__subtitle {
    font-size: var(--text-sm);
    color: var(--color-slate-500);
}

.cd-sessions__list {
    display: grid;
    gap: var(--space-3);
}

.cd-sessions__card {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
}

.cd-sessions__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.cd-sessions__date-day {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    line-height: 1;
}

.cd-sessions__date-month {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-slate-500);
}

.cd-sessions__info {
    flex: 1;
    min-width: 0;
}

.cd-sessions__time {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-white);
}

.cd-sessions__day-name {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
}

.cd-sessions__action {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.cd-sessions__status {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

.cd-sessions__status--open {
    color: var(--color-success-600);
}

.cd-sessions__status--full {
    color: var(--color-slate-500);
}

@media (max-width: 35.99em) {
    .cd-sessions__card {
        flex-direction: column;
        align-items: flex-start;
    }

    .cd-sessions__date {
        flex-direction: row;
        gap: var(--space-2);
    }
}


/* ===== 6. INSTRUCTOR (inside tab panel) ===== */

/* ── Instructor hero card ── */

.cd-instructor__hero {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-6);
    background: var(--color-midnight-800);
    border: 2px solid rgb(var(--cc));
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 40px rgba(var(--cc), 0.25),
        0 0 80px rgba(var(--cc), 0.08);
    margin-block-end: var(--space-6);
}

.cd-instructor__hero-left {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
}

.cd-instructor__avatar-wrap {
    flex-shrink: 0;
}

.cd-instructor__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(var(--cc), 0.5);
    box-shadow: 0 0 20px rgba(var(--cc), 0.15);
}

.cd-instructor__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(var(--cc), 0.1);
    border: 3px solid rgba(var(--cc), 0.5);
    box-shadow: 0 0 20px rgba(var(--cc), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: rgb(var(--cc));
}

.cd-instructor__identity {
    min-width: 0;
}

.cd-instructor__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-1);
}

.cd-instructor__creds {
    font-weight: var(--weight-regular);
    color: rgb(var(--cc));
}

.cd-instructor__title {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    margin-block-end: var(--space-2);
}

.cd-instructor__org,
.cd-instructor__location {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-slate-500);
    margin-block-end: var(--space-1);
}

.cd-instructor__org svg,
.cd-instructor__location svg {
    flex-shrink: 0;
    color: var(--color-slate-600);
}

.cd-instructor__socials {
    display: flex;
    gap: var(--space-2);
    margin-block-start: var(--space-3);
}

.cd-instructor__social {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-midnight-700);
    color: var(--color-slate-400);
    transition: all var(--duration-fast) var(--ease-default);
}

.cd-instructor__social:hover {
    background: rgba(var(--cc), 0.15);
    color: rgb(var(--cc));
}

/* ── Stats row ── */

.cd-instructor__stats {
    display: flex;
    gap: var(--space-4);
    padding-block-start: var(--space-5);
    border-top: 1px solid var(--color-midnight-700);
}

.cd-instructor__stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-1);
}

.cd-instructor__stat-star {
    color: #facc15;
}

.cd-instructor__stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.cd-instructor__stat-label {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* ── Content section box (always visible with border + glow) ── */

.cd-instructor__section {
    margin-block-end: var(--space-6);
    padding: var(--space-5);
    background: var(--color-midnight-800);
    border: 1px solid rgba(var(--cc), 0.25);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 30px rgba(var(--cc), 0.1),
        0 0 60px rgba(var(--cc), 0.05);
    transition: box-shadow var(--duration-normal) var(--ease-default),
                border-color var(--duration-normal) var(--ease-default);
}

.cd-instructor__section:hover {
    border-color: rgba(var(--cc), 0.4);
    box-shadow:
        0 0 40px rgba(var(--cc), 0.18),
        0 0 80px rgba(var(--cc), 0.08);
}

/* Section title – static (non-collapsible) boxes */
.cd-instructor__section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin: 0 0 var(--space-4) 0;
    padding-block-end: var(--space-3);
    border-bottom: 1px solid var(--color-midnight-700);
}

.cd-instructor__section-title svg {
    color: rgb(var(--cc));
    flex-shrink: 0;
}

/* Section header – clickable toggle for collapsible boxes */
.cd-instructor__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    cursor: pointer;
    user-select: none;
    margin: 0;
    transition: color var(--duration-fast) var(--ease-default);
}

.cd-instructor__section-header:hover {
    color: rgb(var(--cc));
}

.cd-instructor__section-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.cd-instructor__section-header-left svg {
    color: rgb(var(--cc));
    flex-shrink: 0;
}

/* Chevron rotation */
.cd-instructor__chevron {
    color: var(--color-slate-500);
    transition: transform var(--duration-fast) var(--ease-default),
                color var(--duration-fast) var(--ease-default);
    transform: rotate(-90deg);
    flex-shrink: 0;
}

.cd-instructor__chevron--open {
    transform: rotate(0deg);
}

.cd-instructor__section-header:hover .cd-instructor__chevron {
    color: rgb(var(--cc));
}

/* Collapsible body – content below the header */
.cd-instructor__body {
    margin-block-start: var(--space-4);
    padding-block-start: var(--space-4);
    border-top: 1px solid var(--color-midnight-700);
}

.cd-instructor__bio {
    font-family: var(--font-reading);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

/* ── Two-column grid (specializations + certifications) ── */

.cd-instructor__grid {
    display: grid;
    gap: var(--space-6);
    margin-block-end: var(--space-6);
}

/* Sections inside the grid don't need bottom margin */
.cd-instructor__grid .cd-instructor__section {
    margin-block-end: 0;
}

@media (min-width: 48em) {
    .cd-instructor__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.cd-instructor__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.cd-instructor__tag {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    background: rgba(var(--cc), 0.15);
    border: 1px solid rgba(var(--cc), 0.3);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
}

.cd-instructor__cert-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-2);
}

.cd-instructor__cert-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

.cd-instructor__cert-item svg {
    color: rgb(34, 197, 94);
    flex-shrink: 0;
}

/* ── Education ── */

.cd-instructor__education {
    display: grid;
    gap: var(--space-3);
}

.cd-instructor__edu-item {
    display: flex;
    flex-direction: column;
    padding: var(--space-3) var(--space-4);
    background: rgba(var(--cc), 0.04);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-md);
}

.cd-instructor__edu-degree {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.cd-instructor__edu-institution {
    font-size: var(--text-xs);
    color: var(--color-slate-400);
    margin-block-start: 2px;
}

/* ── Other courses by instructor ── */

.cd-instructor__other-courses {
    display: grid;
    gap: var(--space-2);
}

.cd-instructor__other-course {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: rgba(var(--cc), 0.04);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color var(--duration-fast) var(--ease-default),
                background var(--duration-fast) var(--ease-default);
}

.cd-instructor__other-course:hover {
    border-color: rgba(var(--cc), 0.2);
    background: rgba(var(--cc), 0.08);
}

.cd-instructor__other-cat {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: rgb(var(--cc));
    background: rgba(var(--cc), 0.1);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.cd-instructor__other-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-instructor__other-meta {
    font-size: var(--text-xs);
    color: var(--color-slate-500);
    white-space: nowrap;
}

/* ── Responsive: stack on mobile ── */

@media (max-width: 35.99em) {
    .cd-instructor__hero-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cd-instructor__org,
    .cd-instructor__location {
        justify-content: center;
    }

    .cd-instructor__socials {
        justify-content: center;
    }

    .cd-instructor__stats {
        flex-wrap: wrap;
    }

    .cd-instructor__stat {
        min-width: calc(50% - var(--space-4));
    }

    .cd-instructor__other-course {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }
}


/* ===== 7. RELATED COURSES ===== */

.cd-related {
    position: relative;
    background: var(--color-midnight-950);
    padding-block: var(--space-16);
}

.cd-related::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-midnight-900));
    pointer-events: none;
    z-index: 0;
}

.cd-related__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-block-end: var(--space-8);
}

.cd-related__heading {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.cd-related__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: rgb(68, 120, 204);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
    flex-shrink: 0;
}

.cd-related__link:hover {
    color: rgb(107, 150, 217);
}

.cd-related__grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 36em) {
    .cd-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64em) {
    .cd-related__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ===== 8. BOTTOM CTA ===== */

.cd-cta {
    position: relative;
    background: var(--color-midnight-900);
    padding-block: var(--space-16);
}

.cd-cta__card {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-xl);
    max-width: 40rem;
    margin-inline: auto;
}

.cd-cta__title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-block-end: var(--space-3);
}

@media (min-width: 48em) {
    .cd-cta__title {
        font-size: var(--text-3xl);
    }
}

.cd-cta__text {
    font-size: var(--text-base);
    color: var(--color-slate-400);
    margin-block-end: var(--space-8);
}

.cd-cta__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}


/* ===== VIDEO PLAY BUTTON (hero image card) ===== */

.cd-hero__play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
}

.cd-hero__play-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(11, 17, 32, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.cd-hero__play-btn:hover .cd-hero__play-circle {
    background: rgba(193, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(193, 0, 0, 0.4);
}

.cd-hero__play-circle svg {
    color: var(--color-white);
    margin-left: 3px; /* optical centering for play triangle */
}

.cd-hero__play-label {
    position: absolute;
    bottom: var(--space-5);
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(8px);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

/* ===== VIDEO MODAL ===== */

.cd-video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.cd-video-modal {
    position: relative;
    width: 100%;
    max-width: 960px;
}

.cd-video-modal__close {
    position: absolute;
    top: calc(-1 * var(--space-10));
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-default);
}

.cd-video-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cd-video-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cd-video-modal__player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ===== REVIEWS TAB ===== */

.cd-reviews__summary {
    margin-bottom: var(--space-6);
}

.cd-reviews__heading {
    font-size: var(--text-xl);
    font-weight: var(--weight-semi-bold);
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

.cd-reviews__stats {
    margin-bottom: var(--space-4);
}

.cd-reviews__avg {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.cd-reviews__avg-number {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--color-white);
    line-height: 1;
}

.cd-reviews__avg-stars {
    display: flex;
    gap: 2px;
}

.cd-reviews__avg-count {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

.cd-reviews__empty {
    color: var(--color-slate-400);
    font-size: var(--text-sm);
    padding: var(--space-8) 0;
    text-align: center;
}

.cd-reviews__cta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}

.cd-reviews__your-review-label {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    margin: 0;
}

.cd-reviews__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cd-reviews__item {
    padding: var(--space-5);
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

.cd-reviews__item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-3);
}

.cd-reviews__item-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.cd-reviews__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: var(--weight-semi-bold);
    text-transform: uppercase;
    flex-shrink: 0;
}

.cd-reviews__item-name {
    display: block;
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    color: var(--color-white);
}

.cd-reviews__item-date {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-slate-400);
}

.cd-reviews__item-stars {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

.cd-reviews__item-title {
    font-size: var(--text-base);
    font-weight: var(--weight-semi-bold);
    margin-bottom: var(--space-2);
    color: var(--color-white);
}

.cd-reviews__item-body {
    font-size: var(--text-sm);
    color: var(--color-slate-300);
    line-height: 1.6;
    margin: 0;
    max-width: none;
}


/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .cd-badge-pulse {
        animation: none;
    }
}
