/* ================================================================
   KuwaPRO — Course Detail CSS  (tightened v2)
   ================================================================ */

.cd-page {
    --cd-white: #ffffff;
    --cd-gray-50: #f8fafc;
    --cd-gray-100: #f1f5f9;
    --cd-gray-200: #e2e8f0;
    --cd-gray-300: #cbd5e1;
    --cd-gray-400: #94a3b8;
    --cd-gray-500: #64748b;
    --cd-gray-600: #475569;
    --cd-gray-700: #334155;
    --cd-gray-800: #1e293b;
    --cd-gray-900: #0f172a;
    --cd-navy: #0f1b35;
    --cd-navy-mid: #162040;
    --cd-blue: #2563eb;
    --cd-blue-dark: #1d4ed8;
    --cd-blue-light: #dbeafe;
    --cd-blue-text: #1e40af;
    --cd-green: #16a34a;
    --cd-green-light: #dcfce7;
    --cd-green-text: #15803d;
    --cd-gold: #d97706;
    --cd-border: #e2e8f0;
    --cd-side-w: 360px;
    --cd-gap: 2rem;
    --cd-pad: clamp(1rem, 5vw, 3rem);
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--cd-white);
    color: var(--cd-gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip; /* Fix: allow sticky positioning */
}

/* ── Mobile enroll bar ── */
.cd-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--cd-white);
    border-top: 1px solid var(--cd-border);
    padding: 10px 1rem;
}

.cd-mobile-bar .cd-btn-enroll {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: var(--cd-blue);
    color: var(--cd-white);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-align: center;
    text-decoration: none;
}

/* ── Hero ── */
.cd-hero {
    background: var(--cd-navy);
    padding: 0 var(--cd-pad);
    position: relative;
    z-index: 10;
}

.cd-hero-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr var(--cd-side-w);
    gap: var(--cd-gap);
    align-items: stretch;
    padding-top: calc(64px + 1.25rem);
    padding-bottom: 0;
    width: 100%;
    transition: padding-top 0.15s ease;
}

/* Shift hero content down when announcement bar occupies space above navbar */
body.has-announcement-bar .cd-hero-grid {
    padding-top: calc(64px + 38px + 1.25rem);
}

/* Left column info wrapper for vertical centering */
.cd-hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 1.5rem;
}

/* Badge */
.cd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    padding: 3px 10px;
    border: 1px solid rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.12);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #93c5fd;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.cd-badge.is-free {
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.12);
    color: #86efac;
}

.cd-badge.is-free .cd-badge-dot {
    background: #22c55e;
}

.cd-badge-dot {
    width: 5px;
    height: 5px;
    background: #60a5fa;
    border-radius: 50%;
    animation: cd-blink 2s infinite;
}

@keyframes cd-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Hero title */
.cd-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--cd-white);
    margin-bottom: 1rem;
    font-family: 'Sora', 'Inter', sans-serif;
}

/* Hero subtitle */
.cd-hero-sub {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

/* Hero meta */
.cd-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0;
}

.cd-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cd-meta-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    flex-shrink: 0;
}

.cd-meta-label {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.cd-meta-value {
    font-weight: 600;
    font-size: 13px;
    color: #e2e8f0;
}

/* Hero sidebar preview */
.cd-hero-preview {
    background: var(--cd-white);
    border: 1px solid var(--cd-border);
    overflow: hidden;
    align-self: end;
    position: relative;
    top: 1px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: var(--cd-side-w);
}

.cd-video-thumb {
    aspect-ratio: 16/9;
    background: var(--cd-navy-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.cd-video-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

.cd-video-thumb-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.cd-play-btn {
    width: 48px;
    height: 48px;
    background: var(--cd-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.cd-play-btn:hover {
    background: var(--cd-blue-dark);
}

.cd-play-btn svg {
    fill: white;
    margin-left: 2px;
}

.cd-video-label {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.cd-teaser-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Shared Card Content Styles */
.cd-card-content {
    padding: 1.25rem;
}

.cd-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1rem;
}

.cd-price-main {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--cd-gray-900);
    font-family: 'Sora', sans-serif;
}

.cd-price-was {
    font-size: 14px;
    color: var(--cd-gray-400);
    text-decoration: line-through;
}

.cd-price-badge {
    margin-left: auto;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    background: var(--cd-green-light);
    color: var(--cd-green-text);
    border: 1px solid #86efac;
}

.cd-btn-enroll {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: var(--cd-blue);
    color: var(--cd-white);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    text-align: center;
    text-decoration: none;
}

.cd-btn-enroll:hover {
    background: var(--cd-blue-dark);
}

.cd-guarantee {
    text-align: center;
    font-size: 11px;
    color: var(--cd-gray-500);
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Mobile video strip */
.cd-mobile-video {
    display: none;
}

/* ── Tabs ── */
.cd-tabs-wrapper {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
    position: sticky;
    top: 64px; /* matches navbar height */
    z-index: 50;
    background: var(--cd-navy);
}

.cd-tabs-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--cd-pad);
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.cd-tabs-inner::-webkit-scrollbar {
    display: none;
}

.cd-tab-btn {
    padding: 11px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.15s;
    position: relative;
    top: 1px;
}

.cd-tab-btn:hover {
    color: #e2e8f0;
}

.cd-tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

/* ── Main grid ── */
.cd-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--cd-pad) 4rem;
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr var(--cd-side-w);
    gap: var(--cd-gap);
    align-items: start;
}

.cd-tab-panels {
    padding-top: 0;
}

.cd-tab-panels section {
    margin-bottom: 1.25rem;
}

/* Section titles */
.cd-sec-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--cd-gray-900);
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--cd-border);
}

/* Learn grid */
.cd-learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cd-learn-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    background: var(--cd-gray-50);
    border: 1px solid var(--cd-border);
    transition: border-color 0.15s;
}

.cd-learn-item:hover {
    border-color: var(--cd-gray-300);
}

.cd-learn-check {
    width: 16px;
    height: 16px;
    background: var(--cd-green-light);
    border: 1px solid #86efac;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--cd-green);
}

.cd-learn-text {
    font-size: 12px;
    color: var(--cd-gray-700);
    line-height: 1.5;
}

.cd-desc-text {
    font-size: 14px;
    color: var(--cd-gray-600);
    line-height: 1.8;
}

.cd-desc-text p {
    margin: 0 0 0.5rem 0;
}

.cd-desc-text p:last-child {
    margin-bottom: 0;
}

/* Curriculum */
.cd-curr-item {
    border: 1px solid var(--cd-border);
    margin-bottom: 4px;
}

.cd-curr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--cd-gray-50);
    cursor: pointer;
    transition: background 0.15s;
}

.cd-curr-header:hover {
    background: var(--cd-gray-100);
}

.cd-curr-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--cd-gray-800);
}

.cd-curr-meta {
    font-size: 11px;
    color: var(--cd-gray-500);
    margin-top: 1px;
}

.cd-curr-arrow {
    font-size: 14px;
    color: var(--cd-gray-400);
    transition: transform 0.15s;
}

.cd-curr-item.open .cd-curr-arrow {
    transform: rotate(180deg);
}

.cd-curr-body {
    display: none;
    border-top: 1px solid var(--cd-border);
}

.cd-curr-item.open .cd-curr-body {
    display: block;
}

.cd-lesson {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--cd-gray-600);
    border-bottom: 1px solid var(--cd-gray-100);
    transition: background 0.15s;
}

.cd-lesson:last-child {
    border-bottom: none;
}

.cd-lesson:hover {
    background: var(--cd-gray-50);
}

.cd-lesson-icon {
    color: var(--cd-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cd-lesson-lock {
    color: var(--cd-gray-400);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cd-lesson-dur {
    margin-left: auto;
    font-size: 11px;
    color: var(--cd-gray-400);
    flex-shrink: 0;
}

/* Rating bars */
.cd-rating-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.cd-rating-lbl {
    font-size: 11px;
    color: var(--cd-gray-500);
    width: 24px;
    text-align: right;
}

.cd-rating-track {
    flex: 1;
    height: 4px;
    background: var(--cd-gray-200);
}

.cd-rating-fill {
    height: 100%;
    background: var(--cd-gold);
}

/* Instructor card */
.cd-instructor-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--cd-gray-50);
    border: 1px solid var(--cd-border);
}

.cd-inst-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: var(--cd-navy);
    color: var(--cd-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    overflow: hidden;
}

.cd-inst-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-inst-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 1px;
    color: var(--cd-gray-900);
}

.cd-inst-role {
    font-size: 12px;
    color: var(--cd-blue);
    margin-bottom: 6px;
}

.cd-inst-stats {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.cd-inst-stat {
    font-size: 11px;
    color: var(--cd-gray-500);
}

.cd-inst-stat strong {
    color: var(--cd-gray-700);
}

.cd-inst-bio {
    font-size: 13px;
    color: var(--cd-gray-600);
    line-height: 1.6;
}

/* Review card */
.cd-review-card {
    padding: 0.85rem 1rem;
    border: 1px solid var(--cd-border);
    margin-bottom: 8px;
}

.cd-review-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}

.cd-review-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--cd-navy);
    color: var(--cd-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    overflow: hidden;
}

.cd-review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-review-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--cd-gray-800);
}

.cd-review-date {
    font-size: 11px;
    color: var(--cd-gray-400);
}

.cd-review-stars {
    color: var(--cd-gold);
    font-size: 12px;
    margin-bottom: 4px;
}

.cd-review-text {
    font-size: 13px;
    color: var(--cd-gray-600);
    line-height: 1.6;
}

/* Sticky sidebar */
.cd-sidebar-col {
    position: sticky;
    top: 76px;
}

.cd-sidebar-card {
    background: var(--cd-white);
    border: 1px solid var(--cd-border);
    margin-bottom: 8px;
}

.cd-divider {
    height: 1px;
    background: var(--cd-border);
    margin: 0.85rem 0;
}

.cd-includes-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--cd-gray-700);
    margin-bottom: 8px;
}

.cd-include-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--cd-gray-100);
    font-size: 12px;
    color: var(--cd-gray-600);
}

.cd-include-row:last-child {
    border-bottom: none;
}

.cd-include-icon {
    color: var(--cd-blue);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cd-share-row {
    display: flex;
    gap: 5px;
}

.cd-share-btn {
    flex: 1;
    padding: 7px;
    border: 1px solid var(--cd-border);
    background: var(--cd-white);
    color: var(--cd-gray-600);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cd-share-btn:hover {
    background: var(--cd-gray-50);
    border-color: var(--cd-gray-300);
    color: var(--cd-gray-900);
}

/* Stats bar */
.cd-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--cd-border);
}

.cd-stat-cell {
    padding: 0.85rem;
    text-align: center;
    border-right: 1px solid var(--cd-border);
    background: var(--cd-white);
}

.cd-stat-cell:last-child {
    border-right: none;
}

.cd-stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cd-gray-900);
    margin-bottom: 1px;
}

.cd-stat-lbl {
    font-size: 10px;
    color: var(--cd-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .cd-hero-grid {
        grid-template-columns: 1fr;
    }

    .cd-hero-preview {
        display: none;
    }

    .cd-mobile-video {
        display: block;
        background: var(--cd-navy-mid);
    }

    .cd-mobile-video .cd-video-thumb {
        aspect-ratio: 16/9;
        display: flex;
    }

    .cd-main {
        grid-template-columns: 1fr;
    }

    .cd-sidebar-col {
        display: none;
    }

    .cd-mobile-bar {
        display: block;
    }

    .cd-learn-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding-bottom: 72px;
    }
}

@media (max-width: 600px) {
    .cd-hero-title {
        letter-spacing: -0.2px;
    }

    .cd-tab-btn {
        padding: 9px 12px;
        font-size: 12px;
    }
}
/* ── Recommended Courses (Premium UI) ── */
.cd-recommended-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.cd-rec-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--cd-white);
    border: 1px solid var(--cd-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    padding: 1rem;
    gap: 1.5rem;
}

.cd-rec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.cd-rec-thumb-wrap {
    width: 200px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.cd-rec-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cd-rec-card:hover .cd-rec-thumb-wrap img {
    transform: scale(1.05);
}

.cd-rec-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3);
}

.cd-rec-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cd-rec-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cd-gray-900);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cd-rec-instructor {
    font-size: 0.875rem;
    color: var(--cd-gray-500);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cd-rec-bottom {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cd-rec-price {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--cd-navy);
}

.cd-rec-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cd-gray-100);
    color: var(--cd-gray-600);
    transition: all 0.3s ease;
}

.cd-rec-card:hover .cd-rec-action {
    background: var(--cd-blue);
    color: #fff;
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .cd-rec-card {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        border-radius: 16px;
    }
    
    .cd-rec-thumb-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 16px 16px 0 0;
    }
    
    .cd-rec-content {
        padding: 1.25rem;
    }
}