/* =========================================
   COURSE DETAILS PAGE — Premium Styles
   ========================================= */

/* Hero Layout */
.cd-hero {
    padding-top: 110px;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cd-hero-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Media Column (Left) */
.cd-media {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cd-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy-600);
    aspect-ratio: 3/4;
}

.cd-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cd-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: var(--navy-800);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(245, 166, 35, 0.4);
}

.cd-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(245, 166, 35, 0.6);
}

/* Price Card */
.cd-price-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.cd-price-row {
    margin-bottom: 1rem;
}

.cd-price {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-white);
}

.cd-enroll-btn {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
}

.cd-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cd-guarantee svg {
    flex-shrink: 0;
    color: var(--gold-primary);
}

/* Course Includes */
.cd-includes-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.cd-includes-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cd-includes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.cd-includes-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cd-includes-list li svg {
    flex-shrink: 0;
    color: var(--gold-primary);
}

/* Actions Row */
.cd-actions-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.cd-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem 1.2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.cd-action-btn:hover {
    color: var(--gold-light);
    border-color: rgba(245, 166, 35, 0.3);
    background: rgba(245, 166, 35, 0.08);
}

.cd-report-link {
    text-align: center;
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.cd-report-link:hover {
    color: var(--gold-primary);
}

/* Details Column (Right) */
.cd-details {
    min-width: 0;
}

.cd-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.6rem;
}

.cd-diploma {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gold-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cd-diploma svg {
    flex-shrink: 0;
}

.cd-comments-count,
.cd-instructor-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.cd-instructor-name span {
    color: var(--gold-primary);
}

/* Progress */
.cd-progress {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.2rem 0 1.5rem;
}

.cd-progress-bar {
    flex: 1;
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cd-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--gold-gradient);
    transition: width 0.6s ease;
}

.cd-progress-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* Tabs */
.cd-tabs {
    display: flex;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.8rem;
}

.cd-tab {
    flex: 1;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.cd-tab:not(:last-child) {
    border-right: 1px solid var(--glass-border);
}

[dir="rtl"] .cd-tab:not(:last-child) {
    border-right: none;
    border-left: 1px solid var(--glass-border);
}

.cd-tab:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

.cd-tab.active {
    background: rgba(245, 166, 35, 0.15);
    color: var(--gold-light);
}

/* Tab Panels */
.cd-tab-panel {
    display: none;
}

.cd-tab-panel.active {
    display: block;
}

.cd-section-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cd-about-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Chapter List (Content Tab) */
.cd-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cd-chapter {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.cd-chapter-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.cd-chapter-header:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--gold-light);
}

.cd-chapter-header svg {
    flex-shrink: 0;
    color: var(--gold-primary);
}

/* Reviews Tab */
.cd-review-input {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
    margin-bottom: 0.8rem;
}

.cd-review-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 16px rgba(245, 166, 35, 0.12);
}

.cd-review-input::placeholder {
    color: var(--text-muted);
}

.cd-review-submit {
    float: right;
}

[dir="rtl"] .cd-review-submit {
    float: left;
}

/* =========================================
   SPECS SECTION
   ========================================= */
.cd-specs-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0 3rem;
}

.cd-specs-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.cd-specs-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
}

.cd-specs-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid;
    border-image: var(--gold-gradient) 1;
}

.cd-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cd-spec-row:last-child {
    border-bottom: none;
}

.cd-spec-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cd-spec-label svg {
    flex-shrink: 0;
    color: var(--gold-primary);
}

.cd-spec-value {
    font-size: 0.85rem;
    color: var(--text-white);
    font-weight: 600;
}

/* Instructor Card */
.cd-instructor-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 320px;
}

.cd-instr-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.cd-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--navy-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto;
}

.cd-verified {
    position: absolute;
    bottom: -2px;
    right: -2px;
}

.cd-instr-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 1.2rem;
}

.cd-profile-btn {
    font-size: 0.88rem;
}

/* =========================================
   JOIN CTA
   ========================================= */
.cd-join-section {
    position: relative;
    z-index: 1;
    padding: 0 0 4rem;
}

.cd-join-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    position: relative;
}

.cd-join-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 36, 71, 0.6), rgba(245, 166, 35, 0.08));
    z-index: -1;
}

.cd-join-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 0.3rem;
}

.cd-join-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cd-join-form {
    display: flex;
    gap: 0.5rem;
    min-width: 360px;
}

.cd-join-input {
    flex: 1;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.cd-join-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 16px rgba(245, 166, 35, 0.12);
}

.cd-join-input::placeholder {
    color: var(--text-muted);
}

.cd-join-btn {
    border-radius: var(--radius-full);
    padding: 0.7rem 1.8rem;
    white-space: nowrap;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {

    .cd-hero-layout,
    .cd-specs-layout {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {

    .cd-hero-layout,
    .cd-specs-layout {
        grid-template-columns: 1fr;
    }

    .cd-media {
        order: 1;
    }

    .cd-details {
        order: 2;
    }

    .cd-image-wrap {
        aspect-ratio: 16/9;
        max-height: 300px;
    }

    .cd-join-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .cd-join-form {
        min-width: unset;
        width: 100%;
    }

    .cd-instructor-card {
        max-width: 100%;
    }

    .cd-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cd-tabs {
        flex-direction: column;
    }

    .cd-tab:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    [dir="rtl"] .cd-tab:not(:last-child) {
        border-left: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .cd-join-form {
        flex-direction: column;
    }
}