/* =====================================================================
   course-details.css — কোর্স বিস্তারিত পেজ
   Mobile-first। সব class এর আগে "cd-" আছে, তাই আপনার style.css এর সাথে সংঘর্ষ হবে না।
   style.css এর :root রঙগুলো (--c-navy, --c-purple, --c-border ...) কাজে লাগানো হয়েছে।
===================================================================== */

.cd-page {
    /* ফন্ট: ইংরেজি অক্ষর Plus Jakarta Sans, বাংলা অক্ষর Anek Bangla */
    --cd-font: 'Plus Jakarta Sans', 'Anek Bangla', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --cd-ink:      var(--c-navy, #1E1B4B);
    --cd-purple:   var(--c-purple, #6D28D9);
    --cd-border:   var(--c-border, #E7E1F5);
    --cd-muted:    #6B6885;
    --cd-bg:       #F5F2FD;
    --cd-gold-a:   #FFD84A;
    --cd-gold-b:   #F5A800;
    --cd-hero-a:   #2B1877;
    --cd-hero-b:   #170C48;

    font-family: var(--cd-font);
    color: var(--cd-ink);
    background: var(--cd-bg);
    line-height: 1.6;
    padding-bottom: 88px; /* মোবাইলের sticky বারের জায়গা */
    -webkit-text-size-adjust: 100%;
}

.cd-page *,
.cd-page *::before,
.cd-page *::after { box-sizing: border-box; }

.cd-page [hidden] { display: none !important; }
.cd-page h1, .cd-page h2, .cd-page h3, .cd-page p, .cd-page ul, .cd-page ol { margin: 0; padding: 0; }
.cd-page ul, .cd-page ol { list-style: none; }
.cd-page button { font-family: inherit; }

.cd-i { flex: none; display: inline-block; vertical-align: middle; }

.cd-page a:focus-visible,
.cd-page button:focus-visible,
.cd-page summary:focus-visible {
    outline: 3px solid rgba(245, 168, 0, .55);
    outline-offset: 2px;
    border-radius: 10px;
}

/* =====================================================================
   HERO
===================================================================== */
.cd-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--cd-hero-a) 0%, var(--cd-hero-b) 100%);
    padding: 16px 0 28px;
}
.cd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 90% at 92% 0%, rgba(139, 92, 246, .38), transparent 62%),
        radial-gradient(45% 70% at 0% 100%, rgba(236, 72, 153, .16), transparent 70%);
}
.cd-hero-grid {
    position: relative;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
}

/* breadcrumb */
.cd-crumbs { margin-bottom: 14px; font-size: 13px; }
.cd-crumbs ol { display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.cd-crumbs li { display: flex; align-items: center; flex: none; min-width: 0; white-space: nowrap; color: rgba(255, 255, 255, .62); }
.cd-crumbs li + li::before { content: "/"; margin: 0 8px; color: rgba(255, 255, 255, .35); }
.cd-crumbs a { color: rgba(255, 255, 255, .7); transition: color .15s; }
.cd-crumbs a:hover { color: #fff; }
.cd-crumbs li:last-child { flex: 0 1 auto; color: #fff; font-weight: 600; }
.cd-crumb-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }

/* pills */
.cd-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cd-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.cd-pill--cat { background: linear-gradient(135deg, #3B82F6, #6366F1); box-shadow: 0 6px 16px rgba(59, 130, 246, .3); }
.cd-pill--hot { background: linear-gradient(135deg, #FB4468, #F43F5E); text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 6px 16px rgba(244, 63, 94, .32); }

.cd-title {
    font-size: clamp(1.5rem, 1.05rem + 2.1vw, 2.6rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -.01em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.cd-cat-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .72);
}

/* avatar */
.cd-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}
.cd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cd-avatar--lg { width: 60px; height: 60px; border-radius: 14px; font-size: 22px; box-shadow: 0 6px 16px rgba(76, 29, 149, .18); }

.cd-hero-ins { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; }
.cd-hero-ins li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cd-hero-ins-name { font-weight: 700; font-size: 15.5px; }

.cd-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 18px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .8);
}
.cd-stats li { display: inline-flex; align-items: center; gap: 7px; }
.cd-stats .cd-i { color: #FDE68A; }

/* thumbnail */
.cd-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0F0A33;
    box-shadow: 0 22px 44px rgba(0, 0, 0, .38);
    cursor: default;
    color: inherit;
}
a.cd-thumb, button.cd-thumb { cursor: pointer; }
.cd-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-thumb-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 18px;
    text-align: center;
    background: linear-gradient(160deg, var(--a), var(--b));
}
.cd-thumb-fallback span { color: #FFD84A; font-weight: 800; font-size: clamp(1.1rem, 4vw, 1.8rem); line-height: 1.3; }

.cd-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #4C1D95;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .18s ease;
}
.cd-play .cd-i { margin-left: 3px; }
.cd-thumb:hover .cd-play { transform: scale(1.08); }

@media (min-width: 992px) {
    .cd-hero { padding: 22px 0 44px; }
    .cd-hero-grid { grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; align-items: center; }
    .cd-crumbs { font-size: 14px; margin-bottom: 18px; }
    .cd-hero-text { padding: 6px 0; }
}

/* =====================================================================
   LAYOUT
===================================================================== */
.cd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 40px;
}
.cd-aside { order: -1; min-width: 0; }
.cd-main  { min-width: 0; display: grid; gap: 28px; align-content: start; }

@media (min-width: 992px) {
    .cd-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; padding-top: 32px; align-items: start; }
    .cd-aside {
        order: 0;
        grid-column: 2;
        grid-row: 1;
        position: sticky;
        top: calc(var(--header-h, 78px) + 16px);
    }
    .cd-main { grid-column: 1; grid-row: 1; gap: 40px; }
}

/* =====================================================================
   PRICE CARD
===================================================================== */
.cd-price-card {
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(76, 29, 149, .12);
}

.cd-countdown {
    background: linear-gradient(135deg, #F7476A, #E11D48);
    color: #fff;
    padding: 12px 16px 14px;
    text-align: center;
}
.cd-countdown-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}
.cd-cd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 290px;
    margin: 0 auto;
}
.cd-cd-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 2px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .22);
}
.cd-cd-box b { font-size: 21px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd-cd-box span { font-size: 10.5px; opacity: .88; }

.cd-price-body {
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--cd-border);
}
.cd-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.cd-price { font-size: 32px; font-weight: 800; color: #4C1D95; line-height: 1.2; }
.cd-price--free { color: #059669; }
.cd-old { font-size: 18px; color: #9CA3AF; }
.cd-save {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #047857;
    font-size: 13px;
    font-weight: 700;
}
.cd-price-body:not(:has(.cd-save)) .cd-price-row { margin-bottom: 0; }

.cd-actions { padding: 16px 20px 20px; display: grid; gap: 12px; }

.cd-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cd-gold-a), var(--cd-gold-b));
    color: #3B2A00;
    font-size: 16.5px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 10px 22px rgba(245, 168, 0, .34);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s;
}
.cd-cta:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 14px 26px rgba(245, 168, 0, .4); }
.cd-cta:active { transform: translateY(0); }
.cd-cta--green { background: linear-gradient(135deg, #34D399, #10B981); color: #052E1F; box-shadow: 0 10px 22px rgba(16, 185, 129, .3); }
.cd-cta--green:hover { box-shadow: 0 14px 26px rgba(16, 185, 129, .38); }
.cd-cta--sm { width: auto; min-height: 46px; padding: 0 22px; font-size: 15px; white-space: nowrap; }

.cd-hint { margin: -4px 0 0; text-align: center; font-size: 12.5px; color: var(--cd-muted); }
.cd-hint--ok { display: flex; align-items: center; justify-content: center; gap: 6px; color: #047857; font-weight: 600; }

.cd-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    border: 1.5px solid var(--cd-border);
    border-radius: 999px;
    background: #fff;
    color: var(--cd-ink);
    font-size: 14.5px;
    font-weight: 700;
    transition: background .15s, border-color .15s;
}
.cd-share:hover { background: #F7F4FF; border-color: #CDBFF0; }

.cd-secure {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ECFDF5;
    border: 1px solid #BBF7D0;
    color: #166534;
    font-size: 13px;
    line-height: 1.5;
}
.cd-secure .cd-i { color: #16A34A; margin-top: 1px; }

/* =====================================================================
   DESCRIPTION (max-height + "আরো দেখুন")
===================================================================== */
.cd-desc {
    border-radius: 16px;
    padding: 22px 18px 20px;
    color: #fff;
    background: linear-gradient(160deg, #2E1B7C 0%, #1C0F54 60%, #150A40 100%);
    box-shadow: 0 18px 40px rgba(30, 20, 90, .28);
}
.cd-desc h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); font-weight: 800; margin-bottom: 14px; line-height: 1.3; }

.cd-desc-body {
    position: relative;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.85;
    color: rgba(255, 255, 255, .9);
    overflow-wrap: anywhere;
    transition: max-height .35s ease;
}
.cd-desc-body.is-collapsed {
    max-height: 320px;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

.cd-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: #10B981;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(16, 185, 129, .3);
    transition: background .15s;
}
.cd-more:hover { background: #0EA371; }
.cd-more .cd-i { transition: transform .2s; }
.cd-more[aria-expanded="true"] .cd-i { transform: rotate(180deg); }

@media (min-width: 768px) {
    .cd-desc { padding: 30px 32px 28px; }
    .cd-desc-body { font-size: 15.5px; }
    .cd-desc-body.is-collapsed { max-height: 400px; }
}

/* =====================================================================
   SECTION headings
===================================================================== */
.cd-section { min-width: 0; }
.cd-sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 16px; }
.cd-sec-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--cd-ink);
}
.cd-sec-head .cd-sec-title { margin-bottom: 0; }
.cd-sec-title .cd-i { color: #F5B301; }
.cd-sec-meta { font-size: 13.5px; color: #4C3A8A; font-weight: 600; }

.cd-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cd-gold-a), var(--cd-gold-b));
    color: #3B2A00;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 6px 14px rgba(245, 168, 0, .28);
}

.cd-empty {
    padding: 24px 18px;
    text-align: center;
    color: var(--cd-muted);
    background: #fff;
    border: 1px dashed #D4C9F0;
    border-radius: 14px;
    font-size: 14.5px;
}

/* routine */
.cd-row-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(76, 29, 149, .05);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cd-row-card:hover { border-color: #F5C842; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(76, 29, 149, .09); }
.cd-row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cd-row-text strong { font-size: 16px; font-weight: 700; }
.cd-row-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; color: #B87400; }
.cd-row-ic { color: #F5A800; }

/* =====================================================================
   CURRICULUM (native <details>)
===================================================================== */
.cd-acc {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(76, 29, 149, .05);
}
.cd-acc[open] { border-color: #D9CDF5; }
.cd-acc summary,
.cd-ins summary { list-style: none; cursor: pointer; }
.cd-acc summary::-webkit-details-marker,
.cd-ins summary::-webkit-details-marker { display: none; }

.cd-acc summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.cd-acc-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cd-acc-text strong { font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.cd-acc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--cd-muted); }
.cd-state { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.cd-state--free { color: #B45309; }
.cd-state--open { color: #047857; }

.cd-chev { flex: none; color: #4C3A8A; display: grid; place-items: center; transition: transform .2s ease; }
.cd-acc[open] > summary .cd-chev,
.cd-ins[open] > summary .cd-chev { transform: rotate(180deg); }

.cd-items { border-top: 1px solid var(--cd-border); max-height: 480px; overflow-y: auto; overscroll-behavior: contain; }
.cd-items li + li { border-top: 1px solid #F0EBFA; }

.cd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
    font: inherit;
}
.cd-item.is-open { cursor: pointer; transition: background .15s; }
.cd-item.is-open:hover { background: #F8F5FF; }
.cd-item.is-static { cursor: default; }
.cd-item.is-static:hover { background: transparent; }
.cd-item.is-locked { opacity: .82; }

.cd-item-no {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #F1ECFB;
    color: #5B3FB0;
    font-size: 12.5px;
    font-weight: 700;
}
.cd-item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cd-item-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.cd-item-sub { font-size: 12.5px; color: var(--cd-muted); }
.cd-free {
    justify-self: start;
    padding: 1px 9px;
    border-radius: 999px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 11.5px;
    font-weight: 700;
    font-style: normal;
}
.cd-item-dur { flex: none; font-size: 12.5px; color: var(--cd-muted); font-variant-numeric: tabular-nums; }
.cd-item-ic { flex: none; display: grid; place-items: center; color: #9CA3AF; }
.cd-item.is-open .cd-item-ic { color: #7C3AED; }

/* =====================================================================
   INSTRUCTORS
===================================================================== */
.cd-ins-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cd-ins {
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(76, 29, 149, .05);
    overflow: hidden;
}
.cd-ins-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.cd-ins-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cd-ins-text strong { font-size: 16px; font-weight: 800; line-height: 1.35; }
.cd-ins-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4F6FE8;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    min-width: 0;
}
.cd-ins-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cd-ins-body { padding: 0 16px 16px 90px; font-size: 14px; color: var(--cd-muted); }
.cd-ins-body b { color: var(--cd-ink); }

@media (min-width: 640px) {
    .cd-ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   VIDEO PLAYER (dialog)
===================================================================== */
.cd-player {
    width: min(960px, 96vw);
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0B0620;
    color: #fff;
}
.cd-player::backdrop { background: rgba(10, 6, 32, .74); backdrop-filter: blur(3px); }
.cd-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; }
.cd-player-head h3 { font-size: 15px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-player-close {
    flex: none;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}
.cd-player-close:hover { background: rgba(255, 255, 255, .22); }
.cd-player-stage { aspect-ratio: 16 / 9; background: #000; }
.cd-player-stage iframe,
.cd-player-stage video { width: 100%; height: 100%; border: 0; display: block; }

/* =====================================================================
   MOBILE STICKY CTA
===================================================================== */
.cd-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--cd-border);
    box-shadow: 0 -10px 26px rgba(30, 27, 75, .12);
    transition: transform .25s ease;
}
.cd-sticky.is-hidden { transform: translateY(110%); }
.cd-sticky-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.cd-sticky-price b { font-size: 21px; font-weight: 800; color: #4C1D95; line-height: 1.2; }
.cd-sticky-price s { font-size: 13.5px; color: #9CA3AF; }

/* মোবাইলে sticky বার থাকলে chat বাটন উপরে তোলা */
@media (max-width: 991px) {
    body:has(.cd-sticky:not(.is-hidden)) .chat-fab { bottom: 88px; }
}

@media (min-width: 992px) {
    .cd-sticky { display: none; }
    .cd-page { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cd-page *, .cd-page *::before, .cd-page *::after { transition: none !important; animation: none !important; }
}