/*--------------------------------------------------------------
 * L&D EduPlatform — Frontend Stylesheet
 * Mobile-First · Minimalis · Dominan Putih
 *--------------------------------------------------------------*/

/* ============================================================
   0. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
    /* Colors */
    --ld-white: #FFFFFF;
    --ld-bg: #F9FAFB;
    --ld-border: #E5E7EB;
    --ld-border-light: #F3F4F6;
    --ld-text-heading: #1F2937;
    --ld-text-body: #4B5563;
    --ld-text-muted: #9CA3AF;
    --ld-primary: #2563EB;
    --ld-primary-hover: #1D4ED8;
    --ld-primary-light: #EFF6FF;
    --ld-success: #059669;
    --ld-success-light: #ECFDF5;
    --ld-danger: #DC2626;
    --ld-danger-light: #FEF2F2;
    --ld-warning: #D97706;
    --ld-warning-light: #FFFBEB;

    /* Typography */
    --ld-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ld-font-size-xs: 0.75rem;
    /* 12px */
    --ld-font-size-sm: 0.875rem;
    /* 14px */
    --ld-font-size-base: 1rem;
    /* 16px */
    --ld-font-size-lg: 1.125rem;
    /* 18px */
    --ld-font-size-xl: 1.25rem;
    /* 20px */
    --ld-font-size-2xl: 1.5rem;
    /* 24px */
    --ld-font-size-3xl: 1.875rem;
    /* 30px */
    --ld-line-height: 1.6;

    /* Spacing */
    --ld-space-xs: 0.25rem;
    /* 4px  */
    --ld-space-sm: 0.5rem;
    /* 8px  */
    --ld-space-md: 1rem;
    /* 16px */
    --ld-space-lg: 1.5rem;
    /* 24px */
    --ld-space-xl: 2rem;
    /* 32px */
    --ld-space-2xl: 3rem;
    /* 48px */

    /* Radius */
    --ld-radius-sm: 4px;
    --ld-radius: 6px;
    --ld-radius-lg: 8px;
    --ld-radius-xl: 12px;

    /* Shadows */
    --ld-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ld-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --ld-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --ld-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);

    /* Transition */
    --ld-transition: all 0.2s ease;
}

/* ============================================================
   1. BASE / RESET
   ============================================================ */
.ld-catalog,
.ld-path-detail,
.ld-login-gate,
.ld-empty-state,
.ld-placeholder {
    font-family: var(--ld-font-family);
    color: var(--ld-text-body);
    line-height: var(--ld-line-height);
    box-sizing: border-box;
}

.ld-catalog *,
.ld-path-detail *,
.ld-login-gate * {
    box-sizing: border-box;
}

/* ============================================================
   2. BUTTONS
   ============================================================ */
.ld-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ld-space-sm);
    padding: 10px 20px;
    font-family: var(--ld-font-family);
    font-size: var(--ld-font-size-sm);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--ld-radius);
    cursor: pointer;
    transition: var(--ld-transition);
    white-space: nowrap;
}

.ld-btn:focus-visible {
    outline: 2px solid var(--ld-primary);
    outline-offset: 2px;
}

/* Primary — solid */
.ld-btn--primary {
    background-color: var(--ld-primary);
    color: var(--ld-white);
    border-color: var(--ld-primary);
}

.ld-btn--primary:hover {
    background-color: var(--ld-primary-hover);
    border-color: var(--ld-primary-hover);
    color: var(--ld-white);
    transform: translateY(-1px);
    box-shadow: var(--ld-shadow-md);
}

/* Outline */
.ld-btn--outline {
    background-color: transparent;
    color: var(--ld-primary);
    border-color: var(--ld-primary);
}

.ld-btn--outline:hover {
    background-color: var(--ld-primary-light);
    color: var(--ld-primary-hover);
}

/* Full-width */
.ld-btn--full {
    width: 100%;
}

/* Small */
.ld-btn--sm {
    padding: 6px 14px;
    font-size: var(--ld-font-size-xs);
}

/* Success (green) variant */
.ld-btn--success {
    background: #059669;
    color: #fff;
    border: none;
}

.ld-btn--success:hover {
    background: #047857;
}

/* ============================================================
   3. CATALOG GRID (Produk & Path)
   ============================================================ */
.ld-catalog {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 kolom */
    gap: var(--ld-space-lg);
    padding: var(--ld-space-md) 0;
}

/* ============================================================
   4. CARDS
   ============================================================ */
.ld-card {
    display: flex;
    flex-direction: column;
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-lg);
    box-shadow: var(--ld-shadow);
    overflow: hidden;
    transition: var(--ld-transition);
}

.ld-card:hover {
    box-shadow: var(--ld-shadow-md);
    transform: translateY(-2px);
}

/* Card: Image */
.ld-card__image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ld-bg);
}

.ld-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ld-card:hover .ld-card__image img {
    transform: scale(1.03);
}

/* Badge (step count) */
.ld-card__badge {
    position: absolute;
    bottom: var(--ld-space-sm);
    left: var(--ld-space-sm);
    padding: 3px 10px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--ld-white);
    font-size: var(--ld-font-size-xs);
    font-weight: 600;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}

/* Card: Body */
.ld-card__body {
    flex: 1;
    padding: var(--ld-space-md) var(--ld-space-md) var(--ld-space-sm);
}

.ld-card__title {
    margin: 0 0 var(--ld-space-xs);
    font-size: var(--ld-font-size-base);
    font-weight: 700;
    color: var(--ld-text-heading);
    line-height: 1.4;
}

.ld-card__excerpt {
    margin: 0;
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
    line-height: 1.5;
}

.ld-card__price {
    margin-top: var(--ld-space-sm);
    font-size: var(--ld-font-size-lg);
    font-weight: 700;
    color: var(--ld-primary);
}

/* Card: Actions */
.ld-card__actions {
    display: flex;
    gap: var(--ld-space-sm);
    padding: var(--ld-space-sm) var(--ld-space-md) var(--ld-space-md);
}

.ld-card__actions .ld-btn {
    flex: 1;
}

/* ============================================================
   5. LEARNING PATH DETAIL — Header
   ============================================================ */
.ld-path-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--ld-space-md) 0;
}

.ld-path-detail__header {
    margin-bottom: var(--ld-space-xl);
}

.ld-path-detail__thumbnail {
    border-radius: var(--ld-radius-lg);
    overflow: hidden;
    margin-bottom: var(--ld-space-md);
}

.ld-path-detail__thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.ld-path-detail__title {
    margin: 0 0 var(--ld-space-sm);
    font-size: var(--ld-font-size-2xl);
    font-weight: 800;
    color: var(--ld-text-heading);
    line-height: 1.3;
}

.ld-path-detail__desc {
    margin: 0 0 var(--ld-space-md);
    font-size: var(--ld-font-size-base);
    color: var(--ld-text-body);
}

.ld-path-detail__meta {
    display: flex;
    gap: var(--ld-space-md);
}

.ld-meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--ld-space-xs);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
}

/* ============================================================
   6. TIMELINE (Roadmap Vertikal)
   ============================================================ */
.ld-timeline {
    position: relative;
    padding-left: 40px;
    /* Space untuk marker + line */
}

/* Garis vertikal utama */
.ld-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    /* Center of 32px marker */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ld-border);
}

/* Timeline Item */
.ld-timeline__item {
    position: relative;
    padding-bottom: var(--ld-space-lg);
}

.ld-timeline__item--last {
    padding-bottom: 0;
}

/* Potong garis di item terakhir */
.ld-timeline__item--last::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--ld-white);
}

/* Marker (lingkaran step) */
.ld-timeline__marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ld-primary);
    color: var(--ld-white);
    border-radius: 50%;
    font-size: var(--ld-font-size-xs);
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--ld-white);
}

/* Locked marker */
.ld-timeline__item--locked .ld-timeline__marker {
    background: var(--ld-text-muted);
}

/* Timeline Card */
.ld-timeline__card {
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-lg);
    padding: var(--ld-space-md);
    box-shadow: var(--ld-shadow-sm);
    transition: var(--ld-transition);
}

.ld-timeline__card:hover {
    box-shadow: var(--ld-shadow);
    border-color: var(--ld-primary);
}

.ld-timeline__item--locked .ld-timeline__card {
    opacity: 0.7;
}

.ld-timeline__item--locked .ld-timeline__card:hover {
    border-color: var(--ld-border);
}

.ld-timeline__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ld-space-sm);
}

/* Format badge (Teks / Video) */
.ld-timeline__format {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: var(--ld-font-size-xs);
    font-weight: 600;
    border-radius: 100px;
}

.ld-timeline__format--text {
    background: var(--ld-primary-light);
    color: var(--ld-primary);
}

.ld-timeline__format--video {
    background: var(--ld-warning-light);
    color: var(--ld-warning);
}

/* Lock badge */
.ld-timeline__lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: var(--ld-font-size-xs);
    font-weight: 600;
    border-radius: 100px;
    background: var(--ld-danger-light);
    color: var(--ld-danger);
}

.ld-timeline__title {
    margin: 0;
    font-size: var(--ld-font-size-base);
    font-weight: 700;
    color: var(--ld-text-heading);
    line-height: 1.4;
}

.ld-timeline__title a {
    color: inherit;
    text-decoration: none;
}

.ld-timeline__title a:hover {
    color: var(--ld-primary);
}

.ld-timeline__excerpt {
    margin: var(--ld-space-xs) 0 0;
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
    line-height: 1.5;
}

/* ============================================================
   7. VIDEO WRAPPER (Responsive iFrame)
   ============================================================ */
.ld-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    margin-bottom: var(--ld-space-lg);
    border-radius: var(--ld-radius-lg);
    overflow: hidden;
    background: #000;
}

.ld-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================
   8. LOGIN GATE (Video Content Restriction)
   ============================================================ */
.ld-login-gate {
    max-width: 420px;
    margin: var(--ld-space-xl) auto;
    padding: var(--ld-space-xl);
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    box-shadow: var(--ld-shadow-md);
    text-align: center;
}

.ld-login-gate__icon {
    margin-bottom: var(--ld-space-md);
}

.ld-login-gate__title {
    margin: 0 0 var(--ld-space-sm);
    font-size: var(--ld-font-size-xl);
    font-weight: 700;
    color: var(--ld-text-heading);
}

.ld-login-gate__desc {
    margin: 0 0 var(--ld-space-lg);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
}

/* Form */
.ld-login-gate__form {
    text-align: left;
}

.ld-form-row {
    margin-bottom: var(--ld-space-md);
}

.ld-form-row label {
    display: block;
    margin-bottom: var(--ld-space-xs);
    font-size: var(--ld-font-size-sm);
    font-weight: 600;
    color: var(--ld-text-heading);
}

.ld-form-row input[type="text"],
.ld-form-row input[type="email"],
.ld-form-row input[type="password"],
.ld-form-row input[type="url"],
.ld-form-row input[type="number"],
.ld-form-row select,
.ld-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--ld-font-family);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-heading);
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
    transition: var(--ld-transition);
    outline: none;
}

.ld-form-row input:focus,
.ld-form-row select:focus,
.ld-form-row textarea:focus {
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Login message */
.ld-login-gate__message {
    margin-top: var(--ld-space-sm);
    padding: var(--ld-space-sm) var(--ld-space-md);
    font-size: var(--ld-font-size-sm);
    border-radius: var(--ld-radius);
    text-align: center;
}

.ld-login-gate__message.ld-msg-error {
    background: var(--ld-danger-light);
    color: var(--ld-danger);
}

.ld-login-gate__message.ld-msg-success {
    background: var(--ld-success-light);
    color: var(--ld-success);
}

.ld-login-gate__register {
    margin-top: var(--ld-space-md);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
    text-align: center;
}

.ld-login-gate__register a {
    color: var(--ld-primary);
    text-decoration: none;
    font-weight: 600;
}

.ld-login-gate__register a:hover {
    text-decoration: underline;
}

/* ============================================================
   9. EMPTY STATE & PLACEHOLDER
   ============================================================ */
.ld-empty-state,
.ld-placeholder {
    padding: var(--ld-space-2xl);
    text-align: center;
    color: var(--ld-text-muted);
    background: var(--ld-bg);
    border: 2px dashed var(--ld-border);
    border-radius: var(--ld-radius-lg);
}

.ld-empty-state p,
.ld-placeholder p {
    margin: 0;
}

/* ============================================================
   9b. AUTH PAGE (Login / Register Tabs)
   ============================================================ */
.ld-auth {
    max-width: 440px;
    margin: var(--ld-space-xl) auto;
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    box-shadow: var(--ld-shadow-md);
    overflow: hidden;
}

.ld-auth--logged-in {
    text-align: center;
    padding: var(--ld-space-2xl);
}

.ld-auth__icon {
    margin-bottom: var(--ld-space-md);
}

.ld-auth__icon img {
    border-radius: 50%;
    box-shadow: var(--ld-shadow);
}

.ld-auth__title {
    margin: 0 0 var(--ld-space-sm);
    font-size: var(--ld-font-size-xl);
    font-weight: 700;
    color: var(--ld-text-heading);
}

.ld-auth__desc {
    margin: 0 0 var(--ld-space-lg);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
}

/* Tabs */
.ld-auth__tabs {
    display: flex;
    border-bottom: 2px solid var(--ld-border);
}

.ld-auth__tab {
    flex: 1;
    padding: 14px;
    font-family: var(--ld-font-family);
    font-size: var(--ld-font-size-sm);
    font-weight: 600;
    color: var(--ld-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: var(--ld-transition);
}

.ld-auth__tab:hover {
    color: var(--ld-text-heading);
    background: var(--ld-bg);
}

.ld-auth__tab--active {
    color: var(--ld-primary);
    border-bottom-color: var(--ld-primary);
}

/* Panels */
.ld-auth__panel {
    padding: var(--ld-space-lg);
}

/* Remember me */
.ld-auth__remember {
    display: flex;
    align-items: center;
    gap: var(--ld-space-xs);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-body);
    cursor: pointer;
}

.ld-auth__remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ld-primary);
}

/* Auth message */
.ld-auth__message {
    margin-top: var(--ld-space-sm);
    padding: var(--ld-space-sm) var(--ld-space-md);
    font-size: var(--ld-font-size-sm);
    border-radius: var(--ld-radius);
    text-align: center;
}

.ld-auth__message.ld-msg-error {
    background: var(--ld-danger-light);
    color: var(--ld-danger);
}

.ld-auth__message.ld-msg-success {
    background: var(--ld-success-light);
    color: var(--ld-success);
}

/* ============================================================
   9c. MEMBER DASHBOARD
   ============================================================ */
.ld-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--ld-space-md) 0;
    font-family: var(--ld-font-family);
    color: var(--ld-text-body);
}

.ld-dashboard *,
.ld-affiliate * {
    box-sizing: border-box;
}

/* Welcome Card */
.ld-dashboard__welcome {
    display: flex;
    align-items: center;
    gap: var(--ld-space-md);
    padding: var(--ld-space-lg);
    background: linear-gradient(135deg, var(--ld-primary-light), var(--ld-white));
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    box-shadow: var(--ld-shadow);
    margin-bottom: var(--ld-space-lg);
    flex-wrap: wrap;
}

.ld-dashboard__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--ld-white);
    box-shadow: var(--ld-shadow-md);
}

.ld-dashboard__welcome-text {
    flex: 1;
    min-width: 200px;
}

.ld-dashboard__greeting {
    margin: 0 0 var(--ld-space-xs);
    font-size: var(--ld-font-size-xl);
    font-weight: 700;
    color: var(--ld-text-heading);
}

.ld-dashboard__email {
    margin: 0;
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
}

/* Quick Links */
.ld-dashboard__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--ld-space-md);
    margin-bottom: var(--ld-space-xl);
}

.ld-dashboard__link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ld-space-sm);
    padding: var(--ld-space-lg);
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-lg);
    box-shadow: var(--ld-shadow-sm);
    text-decoration: none;
    color: var(--ld-text-body);
    font-size: var(--ld-font-size-sm);
    font-weight: 600;
    transition: var(--ld-transition);
}

.ld-dashboard__link-card:hover {
    border-color: var(--ld-primary);
    color: var(--ld-primary);
    box-shadow: var(--ld-shadow-md);
    transform: translateY(-2px);
}

.ld-dashboard__link-card svg {
    color: var(--ld-primary);
}

/* Dashboard Section */
.ld-dashboard__section {
    margin-bottom: var(--ld-space-xl);
}

.ld-dashboard__section-title {
    margin: 0 0 var(--ld-space-md);
    font-size: var(--ld-font-size-lg);
    font-weight: 700;
    color: var(--ld-text-heading);
    padding-bottom: var(--ld-space-sm);
    border-bottom: 2px solid var(--ld-border);
}

/* Status Badges */
.ld-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: var(--ld-font-size-xs);
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
}

.ld-badge--pending {
    background: var(--ld-warning-light);
    color: var(--ld-warning);
}

.ld-badge--success {
    background: var(--ld-success-light);
    color: var(--ld-success);
}

.ld-badge--failed {
    background: var(--ld-danger-light);
    color: var(--ld-danger);
}

/* ============================================================
   9d. AFFILIATE AREA
   ============================================================ */
.ld-affiliate {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--ld-space-md) 0;
    font-family: var(--ld-font-family);
    color: var(--ld-text-body);
}

/* Referral Link Box */
.ld-affiliate__link-box {
    padding: var(--ld-space-lg);
    background: linear-gradient(135deg, var(--ld-primary-light), var(--ld-white));
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    box-shadow: var(--ld-shadow);
    margin-bottom: var(--ld-space-lg);
}

.ld-affiliate__link-title {
    display: flex;
    align-items: center;
    gap: var(--ld-space-sm);
    margin: 0 0 var(--ld-space-md);
    font-size: var(--ld-font-size-lg);
    font-weight: 700;
    color: var(--ld-text-heading);
}

.ld-affiliate__link-row {
    display: flex;
    gap: var(--ld-space-sm);
    margin-bottom: var(--ld-space-sm);
}

.ld-affiliate__link-input {
    flex: 1;
    padding: 10px 14px;
    font-family: var(--ld-font-family);
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-heading);
    background: var(--ld-white);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius);
    outline: none;
}

.ld-affiliate__link-input:focus {
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ld-affiliate__link-desc {
    margin: 0;
    font-size: var(--ld-font-size-sm);
    color: var(--ld-text-muted);
}

/* KPI Stat Cards */
.ld-affiliate__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--ld-space-md);
    margin-bottom: var(--ld-space-xl);
}

.ld-affiliate__stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ld-space-xs);
    padding: var(--ld-space-lg);
    background: var(--ld-success-light);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-lg);
    box-shadow: var(--ld-shadow-sm);
    text-align: center;
}

.ld-affiliate__stat-card--warning {
    background: var(--ld-warning-light);
}

.ld-affiliate__stat-card--info {
    background: var(--ld-primary-light);
}

.ld-affiliate__stat-value {
    font-size: var(--ld-font-size-2xl);
    font-weight: 800;
    color: var(--ld-text-heading);
    line-height: 1.2;
}

.ld-affiliate__stat-label {
    font-size: var(--ld-font-size-sm);
    font-weight: 600;
    color: var(--ld-text-muted);
}

/* Affiliate Section */
.ld-affiliate__section {
    margin-bottom: var(--ld-space-xl);
}

/* ============================================================
   10. TABLE WRAPPER (Mobile scroll)
   ============================================================ */
.ld-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ld-table-wrapper table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.ld-table-wrapper th,
.ld-table-wrapper td {
    padding: var(--ld-space-sm) var(--ld-space-md);
    text-align: left;
    font-size: var(--ld-font-size-sm);
    border-bottom: 1px solid var(--ld-border);
}

.ld-table-wrapper th {
    font-weight: 700;
    color: var(--ld-text-heading);
    background: var(--ld-bg);
    white-space: nowrap;
}

/* ============================================================
   11. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: ≥ 640px — 2 columns */
@media (min-width: 640px) {
    .ld-catalog {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: ≥ 1024px — 3 columns */
@media (min-width: 1024px) {
    .ld-catalog {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Allow override via data-columns attribute */
    .ld-catalog[data-columns="2"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .ld-catalog[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Path detail: side-by-side header on desktop */
    .ld-path-detail__header {
        display: flex;
        gap: var(--ld-space-xl);
        align-items: flex-start;
    }

    .ld-path-detail__thumbnail {
        flex: 0 0 300px;
        margin-bottom: 0;
    }

    .ld-path-detail__title {
        font-size: var(--ld-font-size-3xl);
    }
}

/* ============================================================
   12. UTILITY CLASSES
   ============================================================ */
.ld-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   13. ANIMATIONS
   ============================================================ */
@keyframes ld-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ld-card {
    animation: ld-fade-in 0.3s ease both;
}

.ld-timeline__item:nth-child(1) {
    animation: ld-fade-in 0.3s ease 0.0s both;
}

.ld-timeline__item:nth-child(2) {
    animation: ld-fade-in 0.3s ease 0.05s both;
}

.ld-timeline__item:nth-child(3) {
    animation: ld-fade-in 0.3s ease 0.10s both;
}

.ld-timeline__item:nth-child(4) {
    animation: ld-fade-in 0.3s ease 0.15s both;
}

.ld-timeline__item:nth-child(5) {
    animation: ld-fade-in 0.3s ease 0.20s both;
}

.ld-timeline__item:nth-child(6) {
    animation: ld-fade-in 0.3s ease 0.25s both;
}

.ld-timeline__item:nth-child(7) {
    animation: ld-fade-in 0.3s ease 0.30s both;
}

.ld-timeline__item:nth-child(8) {
    animation: ld-fade-in 0.3s ease 0.35s both;
}

.ld-timeline__item:nth-child(9) {
    animation: ld-fade-in 0.3s ease 0.40s both;
}

.ld-timeline__item:nth-child(10) {
    animation: ld-fade-in 0.3s ease 0.45s both;
}

/* Loading spinner for buttons */
.ld-btn--loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.ld-btn--loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ld-white);
    border-right-color: transparent;
    border-radius: 50%;
    animation: ld-spin 0.6s linear infinite;
}

@keyframes ld-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   12. SPONSOR INFO (Register Page)
   ============================================================ */
.ld-auth__sponsor {
    display: flex;
    align-items: center;
    gap: var(--ld-space-sm);
    padding: var(--ld-space-sm) var(--ld-space-md);
    margin-bottom: var(--ld-space-md);
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: var(--ld-radius-md);
}

.ld-auth__sponsor img {
    border-radius: 50%;
    flex-shrink: 0;
}

.ld-auth__sponsor-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ld-auth__sponsor-label {
    font-size: 0.75rem;
    color: var(--ld-muted);
}

.ld-auth__sponsor-text strong {
    font-size: 0.95rem;
    color: var(--ld-primary);
}

/* ============================================================
   13. MEMBER PROFILE PAGE
   ============================================================ */
.ld-profile {
    max-width: 640px;
    margin: 0 auto;
}

.ld-profile__header {
    display: flex;
    align-items: center;
    gap: var(--ld-space-md);
    margin-bottom: var(--ld-space-xl);
    padding-bottom: var(--ld-space-lg);
    border-bottom: 1px solid var(--ld-border);
}

.ld-profile__avatar img {
    border-radius: 50%;
    border: 3px solid var(--ld-primary);
}

.ld-profile__name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--ld-heading);
}

.ld-profile__username {
    font-size: 0.875rem;
    color: var(--ld-muted);
    margin: 4px 0 0;
}

.ld-profile__section {
    margin-bottom: var(--ld-space-xl);
}

.ld-profile__section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ld-heading);
    margin: 0 0 var(--ld-space-md);
    padding-bottom: var(--ld-space-xs);
    border-bottom: 2px solid var(--ld-primary);
    display: inline-block;
}

/* ============================================================
   14. ENHANCED CATALOG CARDS (E-Commerce Style)
   ============================================================ */
.ld-card__image {
    aspect-ratio: 4 / 3;
}

.ld-card__image img {
    transition: transform 0.4s ease;
}

.ld-card:hover .ld-card__image img {
    transform: scale(1.05);
}

.ld-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ld-card__price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ld-primary);
    margin-top: auto;
    padding-top: var(--ld-space-sm);
}

.ld-card__price--free {
    color: #059669;
    background: #ecfdf5;
    padding: 2px 10px;
    border-radius: var(--ld-radius-sm);
    font-size: 0.85rem;
}

.ld-card__footer {
    padding: var(--ld-space-sm) var(--ld-space-md) var(--ld-space-md);
}

.ld-card__footer .ld-btn {
    width: 100%;
    text-align: center;
}

/* ============================================================
   CHECKOUT PAGE — Premium Design
   ============================================================ */
.ld-checkout {
    display: grid !important;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 0;
    font-family: var(--ld-font-family);
}

@media (max-width: 768px) {
    .ld-checkout {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .ld-checkout__sidebar {
        order: -1;
    }
}

/* Main Form Column */
.ld-checkout__main {
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    padding: 28px 32px;
    box-shadow: var(--ld-shadow);
}

.ld-checkout__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--ld-text-heading);
    padding-bottom: 16px;
    border-bottom: 2px solid var(--ld-border);
}

.ld-checkout__subtitle {
    font-size: 1rem;
    font-weight: 700;
    margin: 28px 0 16px;
    color: var(--ld-text-heading);
    padding-top: 20px;
    border-top: 1px solid var(--ld-border-light);
}

/* Form Groups */
.ld-checkout__form .ld-form-group {
    margin-bottom: 18px;
}

.ld-checkout__form .ld-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--ld-text-heading);
}

.ld-checkout__form input[type="text"],
.ld-checkout__form input[type="tel"],
.ld-checkout__form input[type="email"],
.ld-checkout__form input[type="number"],
.ld-checkout__form input[type="url"],
.ld-checkout__form textarea,
.ld-checkout__form select {
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1.5px solid var(--ld-border) !important;
    border-radius: var(--ld-radius-lg) !important;
    font-size: 0.95rem !important;
    font-family: var(--ld-font-family) !important;
    background: var(--ld-bg) !important;
    color: var(--ld-text-heading) !important;
    transition: var(--ld-transition) !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.ld-checkout__form input:focus,
.ld-checkout__form textarea:focus,
.ld-checkout__form select:focus {
    border-color: var(--ld-primary) !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.ld-checkout__form input::placeholder,
.ld-checkout__form textarea::placeholder {
    color: var(--ld-text-muted);
}

/* Payment Method Cards */
.ld-payment-methods {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.ld-payment-method {
    display: flex !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border: 2px solid var(--ld-border) !important;
    border-radius: var(--ld-radius-lg) !important;
    cursor: pointer !important;
    transition: var(--ld-transition) !important;
    background: #fff !important;
    margin: 0 !important;
}

.ld-payment-method:hover {
    border-color: var(--ld-primary) !important;
    background: var(--ld-primary-light) !important;
}

.ld-payment-method input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 14px 0 0 !important;
    accent-color: var(--ld-primary) !important;
    flex-shrink: 0;
}

.ld-payment-method__label {
    font-size: 0.95rem;
}

.ld-payment-method__label strong {
    color: var(--ld-text-heading);
    font-weight: 600;
}

.ld-payment-method:has(input:checked) {
    border-color: var(--ld-primary) !important;
    background: var(--ld-primary-light) !important;
    box-shadow: 0 0 0 1px var(--ld-primary) !important;
}

.ld-payment-method:has(input:checked) .ld-payment-method__label strong {
    color: var(--ld-primary);
}

/* Checkout Message */
.ld-checkout__message {
    padding: 12px 16px;
    border-radius: var(--ld-radius-lg);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.ld-checkout__message.ld-msg-error {
    background: var(--ld-danger-light);
    color: var(--ld-danger);
    border: 1px solid #fecaca;
}

/* Alert Box Styles */
.ld-alert {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--ld-radius-lg);
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.ld-alert__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.ld-alert__content {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ld-alert__content strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.ld-alert__content p {
    margin: 8px 0;
    color: #4b5563;
}

.ld-alert__content ul {
    margin: 8px 0;
    padding-left: 20px;
    color: #4b5563;
}

.ld-alert__content li {
    margin: 4px 0;
}

.ld-alert--info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ld-alert--info .ld-alert__content {
    color: #0c4a6e;
}

.ld-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.ld-alert--success .ld-alert__content {
    color: #065f46;
}

.ld-alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.ld-alert--warning .ld-alert__content {
    color: #78350f;
}

.ld-alert--error {
    background: #fef2f2;
    border-color: #fecaca;
}

.ld-alert--error .ld-alert__content {
    color: #7f1d1d;
}

/* Submit Button */
.ld-btn--block {
    display: block !important;
    width: 100% !important;
    margin-top: 24px !important;
    padding: 14px 24px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: var(--ld-radius-lg) !important;
}

/* ─── Order Summary Sidebar ─── */
.ld-order-summary {
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    padding: 24px;
    position: sticky;
    top: 100px;
    box-shadow: var(--ld-shadow);
}

.ld-order-summary__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--ld-text-heading);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ld-border);
}

.ld-order-summary__img {
    width: 100%;
    border-radius: var(--ld-radius-lg);
    margin-bottom: 16px;
    object-fit: cover;
    max-height: 200px;
}

.ld-order-summary__product {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ld-border-light);
}

.ld-order-summary__product strong {
    font-size: 0.95rem;
    color: var(--ld-text-heading);
}

.ld-order-summary__desc {
    color: var(--ld-text-muted);
    font-size: 0.8rem;
    margin: 6px 0 0;
    line-height: 1.4;
}

.ld-order-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--ld-text-body);
}

.ld-order-summary__total {
    border-top: 2px solid var(--ld-text-heading);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1rem;
}

.ld-order-summary__total strong {
    color: var(--ld-primary);
}

/* ============================================================
   ROADMAP ACCORDION — Learning Path Detail
   ============================================================ */

/* Overall Progress */
.ld-roadmap-progress {
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--ld-shadow-sm);
}

.ld-roadmap-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ld-roadmap-progress__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ld-text-heading);
}

.ld-roadmap-progress__pct {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ld-primary);
}

.ld-roadmap-progress__bar {
    height: 10px;
    background: var(--ld-border-light);
    border-radius: 999px;
    overflow: hidden;
}

.ld-roadmap-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ld-primary), #60a5fa);
    border-radius: 999px;
    transition: width 0.5s ease;
    min-width: 0;
}

/* Accordion Container */
.ld-roadmap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Accordion Item */
.ld-roadmap-item {
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    overflow: hidden;
    box-shadow: var(--ld-shadow-sm);
    transition: var(--ld-transition);
    border-left: 4px solid var(--ld-border);
}

.ld-roadmap-item:hover {
    box-shadow: var(--ld-shadow-md);
}

.ld-roadmap-item--completed {
    border-left-color: var(--ld-success) !important;
}

.ld-roadmap-item--active {
    border-left-color: var(--ld-primary) !important;
    box-shadow: var(--ld-shadow-md);
}

.ld-roadmap-item--locked {
    border-left-color: var(--ld-border) !important;
    opacity: 0.7;
}

/* Accordion Header */
.ld-roadmap-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.ld-roadmap-item--locked .ld-roadmap-item__header {
    cursor: default;
}

.ld-roadmap-item__left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.ld-roadmap-item__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.ld-roadmap-item__title-wrap {
    min-width: 0;
}

.ld-roadmap-item__num {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ld-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ld-roadmap-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 2px 0 0;
    color: var(--ld-text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-roadmap-item--completed .ld-roadmap-item__title {
    color: var(--ld-success);
}

.ld-roadmap-item--locked .ld-roadmap-item__title {
    color: var(--ld-text-muted);
}

/* Right side */
.ld-roadmap-item__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ld-roadmap-item__badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ld-primary-light);
    color: var(--ld-primary);
    font-weight: 600;
    white-space: nowrap;
}

.ld-roadmap-item__status {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ld-text-muted);
    white-space: nowrap;
}

.ld-roadmap-item--completed .ld-roadmap-item__status {
    color: var(--ld-success);
}

.ld-roadmap-item--active .ld-roadmap-item__status {
    color: var(--ld-primary);
    font-weight: 600;
}

.ld-roadmap-item__arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    color: var(--ld-text-muted);
}

.ld-roadmap-item--open .ld-roadmap-item__arrow {
    transform: rotate(180deg);
}

/* Accordion Body */
.ld-roadmap-item__body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--ld-border-light);
}

.ld-roadmap-item__video {
    margin: 16px 0;
    border-radius: var(--ld-radius-lg);
    overflow: hidden;
}

.ld-roadmap-item__video iframe {
    width: 100% !important;
    aspect-ratio: 16/9;
    height: auto !important;
    border-radius: var(--ld-radius-lg);
}

.ld-roadmap-item__content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--ld-text-body);
    margin: 12px 0;
}

.ld-roadmap-item__content p {
    margin-bottom: 12px;
}

/* Mark Complete button */
.ld-btn--sm {
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
}

.ld-mark-complete {
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 640px) {
    .ld-roadmap-item__header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px 16px;
    }

    .ld-roadmap-item__right {
        width: 100%;
        justify-content: flex-end;
    }

    .ld-roadmap-item__title {
        white-space: normal;
    }
}

/* ============================================================
   COURSE CATALOG GRID
   ============================================================ */
.ld-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.ld-course-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--ld-shadow-sm);
}

.ld-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.ld-course-card__thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.ld-course-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ld-course-card:hover .ld-course-card__img {
    transform: scale(1.05);
}

.ld-course-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

.ld-course-card__level {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.ld-course-card__level--pemula {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.ld-course-card__level--menengah {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.ld-course-card__level--mahir {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.ld-course-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ld-course-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ld-text-heading);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ld-course-card__instructor {
    font-size: 0.8rem;
    color: var(--ld-text-muted);
    margin: 0 0 10px;
}

.ld-course-card__meta {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--ld-text-muted);
    margin-bottom: 14px;
}

.ld-course-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ld-border-light);
}

.ld-course-card__price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ld-text-heading);
}

.ld-course-card__price--free {
    color: var(--ld-success);
}

.ld-course-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ld-primary);
    transition: transform 0.2s ease;
}

.ld-course-card:hover .ld-course-card__cta {
    transform: translateX(4px);
}

/* ============================================================
   COURSE DETAIL PAGE
   ============================================================ */
.ld-course-detail {
    max-width: 900px;
    margin: 0 auto;
}

/* Hero */
.ld-course-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-xl);
    overflow: hidden;
    box-shadow: var(--ld-shadow-md);
    margin-bottom: 24px;
}

.ld-course-hero__thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.ld-course-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-course-hero__info {
    padding: 28px 28px 28px 0;
}

.ld-course-hero__level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ld-course-hero__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ld-text-heading);
    margin: 0 0 10px;
    line-height: 1.3;
}

.ld-course-hero__desc {
    font-size: 0.9rem;
    color: var(--ld-text-body);
    line-height: 1.6;
    margin: 0 0 16px;
}

.ld-course-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--ld-text-muted);
    margin-bottom: 16px;
}

.ld-course-hero__price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ld-primary);
}

/* Curriculum */
.ld-curriculum {
    margin-top: 8px;
}

.ld-curriculum__heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--ld-text-heading);
}

/* Topic (Accordion parent) */
.ld-topic {
    background: #fff;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--ld-shadow-sm);
    border-left: 4px solid var(--ld-border);
    transition: var(--ld-transition);
}

.ld-topic:hover {
    box-shadow: var(--ld-shadow-md);
}

.ld-topic--active {
    border-left-color: var(--ld-primary) !important;
}

.ld-topic--done {
    border-left-color: var(--ld-success) !important;
}

.ld-topic__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
}

.ld-topic__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ld-topic__icon {
    font-size: 1.2rem;
}

.ld-topic__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ld-text-heading);
    margin: 0;
}

.ld-topic__meta {
    font-size: 0.75rem;
    color: var(--ld-text-muted);
    margin-top: 2px;
}

.ld-topic__arrow {
    font-size: 1.1rem;
    color: var(--ld-text-muted);
    transition: transform 0.3s ease;
}

.ld-topic--active .ld-topic__arrow {
    transform: rotate(180deg);
}

/* Lessons list */
.ld-topic__lessons {
    border-top: 1px solid var(--ld-border-light);
    padding: 8px 12px 12px;
}

/* Individual Lesson */
.ld-lesson {
    border: 1px solid var(--ld-border-light);
    border-radius: var(--ld-radius-md);
    margin-bottom: 6px;
    overflow: hidden;
    transition: var(--ld-transition);
}

.ld-lesson--active {
    border-color: var(--ld-primary);
    background: var(--ld-primary-light);
}

.ld-lesson--done {
    opacity: 0.85;
}

.ld-lesson__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}

.ld-lesson__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.ld-lesson__title {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ld-text-heading);
}

.ld-lesson--done .ld-lesson__title {
    text-decoration: line-through;
    color: var(--ld-text-muted);
}

.ld-lesson__badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ld-primary-light);
    color: var(--ld-primary);
    font-weight: 600;
    white-space: nowrap;
}

.ld-lesson__arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: var(--ld-text-muted);
}

.ld-lesson--open .ld-lesson__arrow {
    transform: rotate(180deg);
}

/* Lesson Body */
.ld-lesson__body {
    padding: 0 14px 14px;
    border-top: 1px solid var(--ld-border-light);
}

.ld-lesson__video {
    margin: 12px 0;
    border-radius: var(--ld-radius-lg);
    overflow: hidden;
}

.ld-lesson__video iframe {
    width: 100% !important;
    aspect-ratio: 16/9;
    height: auto !important;
    border-radius: var(--ld-radius-lg);
}

.ld-lesson__content {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--ld-text-body);
    margin: 10px 0;
}

.ld-mark-lesson-complete {
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .ld-course-hero {
        grid-template-columns: 1fr;
    }

    .ld-course-hero__info {
        padding: 20px;
    }

    .ld-course-grid {
        grid-template-columns: 1fr;
    }
}