:root {
    --ue-dark-bg: #032147;
    --ue-dark-text: #ffffff;
    --ue-primary: #0d6efd;
    --ue-primary-hover: #0b5ed7;
    --ue-border: #d1d7dc;
    --ue-text-main: #1c1d1f;
    --ue-text-muted: #6a6f73;
}

body {
    background-color: #ffffff;
    color: var(--ue-text-main);
}

/* HERO SECTION */
.ud-hero {
    background-color: var(--ue-dark-bg);
    color: var(--ue-dark-text);
    padding: 120px 0 4rem 0;
    position: relative;
}

.ud-breadcrumb {
    font-size: 0.875rem;
    font-weight: 700;
    color: #c084fc;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ud-breadcrumb a {
    color: #c084fc;
    text-decoration: none;
}

.ud-breadcrumb a:hover {
    color: #e9d5ff;
}

.ud-breadcrumb i {
    font-size: 0.6rem;
    margin: 0 0.5rem;
    color: #ffffff;
}

.ud-hero-content {
    max-width: 65%;
    padding-right: 2rem;
}

.ud-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

.ud-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #f8fafc;
}

.ud-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.ud-badge {
    background-color: #fef08a;
    color: #854d0e;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.ud-rating-score {
    color: #facc15;
    font-weight: 700;
}

.ud-rating-stars {
    color: #facc15;
    font-size: 0.8rem;
}

.ud-rating-count {
    color: #93c5fd;
    text-decoration: underline;
}

.ud-info-row {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: center;
}

.ud-info-row i {
    margin-right: 0.3rem;
}

.ud-info-row a {
    color: #93c5fd;
    text-decoration: underline;
}

/* --- MAIN LAYOUT --- */
.ud-main-wrapper {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.ud-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    position: relative; /* For the sidebar absolute/sticky logic */
}

/* Content Left */
.ud-content {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

/* Sidebar Right */
.ud-sidebar {
    position: relative;
    /* Pull the sidebar up over the hero section */
    margin-top: -300px; 
    z-index: 20;
}

.ud-sidebar-inner {
    width: 340px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #d1d7dc;
    border-radius: 2px;
}

.ud-sidebar-sticky {
    position: sticky;
    top: 2rem;
}

/* Sidebar Pieces */
.ud-video-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1c1d1f;
    border-bottom: 1px solid #d1d7dc;
    cursor: pointer;
    overflow: hidden;
}

.ud-video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.ud-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1d1f;
    font-size: 1.5rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.ud-video-preview::after {
    position: absolute;
    bottom: 1rem; left: 0; right: 0;
    text-align: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9375rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.ud-sidebar-body {
    padding: 1.5rem;
}

.ud-price-area {
    margin-bottom: 1rem;
}

.ud-price-current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ue-text-main);
}

.ud-price-original {
    font-size: 1rem;
    color: var(--ue-text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.ud-price-discount {
    font-size: 0.875rem;
    color: var(--ue-text-main);
    display: block;
    margin-top: 0.25rem;
}

.ud-price-alert {
    color: #b32d0f; /* Udemy dark red */
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ud-btn-cart {
    width: 100%;
    background: #a435f0; /* Udemy Purple */
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.ud-btn-cart:hover {
    background: #8710d8;
}

.ud-btn-buy {
    width: 100%;
    background: transparent;
    color: var(--ue-text-main);
    border: 1px solid var(--ue-text-main);
    padding: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.ud-btn-buy:hover {
    background: rgba(0,0,0,0.04);
}

.ud-guarantee {
    text-align: center;
    font-size: 0.75rem;
    color: var(--ue-text-muted);
    margin-bottom: 1rem;
}

.ud-sidebar-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--ue-text-main);
}

.ud-sidebar-features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- What You'll Learn --- */
.ud-box-learn {
    border: 1px solid var(--ue-border);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.ud-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ue-text-main);
    margin-bottom: 1rem;
}

.ud-list-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ud-list-2col li {
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.ud-list-2col li i {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--ue-text-main);
}

/* --- Topics Pills --- */
.ud-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}
.ud-topic-pill {
    padding: 0.5rem 1rem;
    border: 1px solid var(--ue-border);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--ue-text-main);
    text-decoration: none;
}
.ud-topic-pill:hover {
    background: rgba(0,0,0,0.04);
    color: var(--ue-text-main);
}

/* --- Course Includes --- */
.ud-includes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}
.ud-includes li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}
.ud-includes i {
    width: 16px;
    text-align: center;
}

/* --- Course Content Accordion --- */
.ud-content-summary {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}
.ud-content-summary a {
    color: #5624d0;
    font-weight: 700;
    text-decoration: none;
}
.ud-accordion {
    border: 1px solid var(--ue-border);
    border-bottom: none;
    margin-bottom: 2.5rem;
}
.ud-accordion-item {
    border-bottom: 1px solid var(--ue-border);
}
.ud-accordion-header {
    background: #f7f9fa;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}
.ud-accordion-header:hover {
    background: #e3e7ea;
}
.ud-accordion-header i {
    font-size: 0.8rem;
    margin-right: 0.5rem;
}
.ud-accordion-meta {
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--ue-text-muted);
}
.ud-accordion-body {
    padding: 0;
    background: #ffffff;
    /* initially hide in real implementation, but we show for now */
}
.ud-lesson-list {
    list-style: none;
    margin: 0; padding: 0;
}
.ud-lesson {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
}
.ud-lesson-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.ud-lesson-title i {
    color: var(--ue-text-muted);
}
.ud-lesson-time {
    color: var(--ue-text-muted);
}

/* --- Requirements & Description --- */
.ud-requirements {
    list-style: none;
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}
.ud-requirements li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    position: relative;
}
.ud-requirements li::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: var(--ue-text-main);
}
.ud-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* --- Instructor --- */
.ud-instructor {
    margin-bottom: 2.5rem;
}
.ud-inst-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5624d0;
    text-decoration: underline;
    margin-bottom: 0.25rem;
}
.ud-inst-title {
    font-size: 1rem;
    color: var(--ue-text-muted);
    margin-bottom: 1rem;
}
.ud-inst-profile {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.ud-inst-img {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
}
.ud-inst-stats {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ud-inst-stats li {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ud-inst-stats li i {
    width: 16px;
    text-align: center;
    color: var(--ue-text-main);
}
.ud-inst-bio {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* RWD */
@media (max-width: 992px) {
    .ud-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 2rem;
    }
    .ud-hero {
        padding: 90px 0 8rem 0; /* extra padding to allow sidebar overlap */
    }
    .ud-hero-content {
        max-width: 100%;
        padding-right: 0;
    }
    .ud-breadcrumb {
        display: none !important;
    }
    .ud-title {
        font-size: 1.5rem;
    }
    .ud-subtitle {
        font-size: 1rem;
    }
    .ud-sidebar {
        margin-top: -6rem; /* Pull back up to overlap the hero section */
        display: flex;
        justify-content: center;
    }
    .ud-sidebar-inner {
        position: static;
        width: 100%;
        margin-top: 0;
    }
    .ud-list-2col, .ud-includes {
        grid-template-columns: 1fr;
    }
}

/* --- PREVIEW MODAL --- */
.ud-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ud-modal-dialog {
    width: 100%;
    max-width: 680px;
    background-color: #1c1d1f;
    color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.ud-modal-header {
    border-bottom: 1px solid #3e4143;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.ud-modal-subtitle {
    color: #c084fc;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.ud-modal-title {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 700;
}
.ud-btn-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}
.ud-btn-close:hover {
    opacity: 1;
}
.ud-modal-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.ud-modal-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Ratio */
    height: 0;
    flex-shrink: 0;
    background: #000;
}
.ud-modal-video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.ud-video-watermark {
    position: absolute;
    bottom: 12px;
    right: 15px;
    width: 50px;
    z-index: 10;
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ud-modal-video-container:hover .ud-video-watermark {
    opacity: 0.3;
}
.ud-modal-playlist {
    background-color: #1c1d1f;
}
.ud-playlist-header {
    padding: 1rem 1.5rem;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid #3e4143;
}
.ud-playlist-group {
    display: flex;
    flex-direction: column;
}
.ud-playlist-item {
    background-color: #1c1d1f;
    color: #ffffff;
    border: none;
    border-bottom: 1px solid #3e4143;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    width: 100%;
}
.ud-playlist-item:hover {
    background-color: #2d2f31;
}
.ud-playlist-item.active {
    background-color: #3e4143;
}
.ud-playlist-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ud-playlist-thumb {
    width: 100px;
    height: 56px;
    object-fit: cover;
    border-radius: 2px;
}
.ud-playlist-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ud-playlist-item-info i {
    color: #a435f0;
}
.ud-playlist-title {
    font-weight: 700;
    font-size: 0.9rem;
}
.ud-playlist-duration {
    font-size: 0.8rem;
    color: #d1d7dc;
}

/* Expert Section */
.expert-subtitle { font-size: 0.85rem; font-weight: 700; color: #c084fc; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.expert-title-line { width: 60px; height: 4px; background: linear-gradient(90deg, #c084fc, #a435f0); border-radius: 2px; margin-bottom: 24px; }
.expert-card { display: flex; gap: 24px; padding: 24px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.expert-image-wrapper { position: relative; flex-shrink: 0; width: 140px; height: 140px; }
.expert-image { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; background: #e2e8f0; border: 3px solid #f8fafc; }
.expert-badge { position: absolute; bottom: -8px; right: -8px; width: 38px; height: 38px; background: #10b981; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 4px solid white; font-size: 16px; }
.expert-info { flex-grow: 1; }
.expert-name { font-size: 1.4rem; font-weight: 800; color: #1c1d1f; margin-bottom: 12px; }
.expert-details { display: flex; flex-direction: column; gap: 8px; }
.expert-detail-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: #f8fafc; border-radius: 8px; font-size: 0.95rem; color: #1c1d1f; border: 1px solid #e2e8f0; }
.expert-detail-icon { width: 24px; height: 24px; background: #f3e8ff; color: #a435f0; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 2px; }
@media (max-width: 768px) { .expert-card { flex-direction: column; align-items: center; text-align: center; } .expert-image-wrapper { margin: 0 auto; } .expert-info { display: flex; flex-direction: column; align-items: center; } .expert-details { text-align: left; width: 100%; margin-top: 12px; } .expert-detail-item { width: 100%; } }

.expert-cards-container { display: flex; flex-direction: column; gap: 20px; }

