/* ============================================================================
   TIẾNG VIỆT HAY - LMS COURSES STYLESHEET (courses.css)
   Khớp 100% với ảnh mockup bản mẫu: Khoa_Hoc_Phat_Am.png & Khoa_Hoc_Ngu_Phap.png
   - Sidebar: 1 Khối duy nhất liền mạch (215px), Tiêu đề gọn gàng không icon, chữ 1 hàng
   - Icon: Không viền/khung, kích thước lớn và rõ nét
   - Khung Video (Trái) + 3 Thẻ đối tượng ngay bên dưới
   - Khung Meta Thông tin & Giá (Phải)
   - Quy trình 5 bước toàn chiều rộng
   - Đề cương: Có nút toggle xem thêm 40 bài ngữ pháp (giới hạn 5 bài ban đầu)
   ============================================================================ */

/* 1. Page Wrapper & Main Layout */
.course-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 80px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}


.course-layout-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

/* 2. Left Sticky Sidebar: 1 Khối liền mạch (Khớp 100% Mockup) */
.course-left-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-sizing: border-box;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: -0.4px;
    gap: 8px;
    box-sizing: border-box;
}

.nav-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.4px;
}

.nav-item-chevron {
    color: #94a3b8;
    font-weight: 700;
    font-size: 13px;
    transition: color 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}



.sidebar-nav-item:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.sidebar-nav-item.is-active {
    background-color: #fff1f6;
    border: 1px solid #fecdd3;
    color: #ee5d9d;
    box-shadow: none;
}

.sidebar-nav-item.is-active .nav-item-chevron {
    color: #ee5d9d;
}

/* 3. Main Content Area */
.course-main-content {
    flex: 1;
    min-width: 0;
}



/* ============================================================================
   4. TOP AREA GRID:
   - Cột Trái (.top-left-column): Khung Video + 3 Thẻ đối tượng ngay dưới Video
   - Cột Phải (.top-right-column): Khung Meta Thông tin & Giá
   ============================================================================ */

.course-top-layout-grid {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 26px;
}

/* Cột Trái Top */
.top-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Video Card */
.course-intro-video-card {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.intro-video-poster {
    position: relative;
    min-height: 250px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.intro-poster-img {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 92%;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

.intro-poster-overlay {
    position: relative;
    z-index: 2;
    padding: 24px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.85) 55%, rgba(255,255,255,0.1) 100%);
}

.intro-badge-pill {
    align-self: flex-start;
    background: #ee5d9d;
    color: #ffffff;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(238, 93, 157, 0.25);
}

.intro-poster-heading {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #1e293b;
    margin: 0 0 4px;
    letter-spacing: -0.5px;
}

.intro-poster-subtext {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13px;
    color: #475569;
    margin: 0 0 14px;
    font-weight: 500;
}

.btn-intro-play-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.85);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    padding-left: 3px;
}

/* Video Box Player Container */
.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 250px;
    border-radius: 16px;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-real-video {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: contain;
    background: #000000;
    border-radius: 16px;
}

.course-video-watermark {
    position: absolute;
    top: 20%;
    left: 20%;
    color: rgba(255, 255, 255, 0.35);
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 1.5s ease;
}

/* 이런 분께 추천해요 (Khối nằm dưới Video trong Cột Trái) */
.course-recommend-block {
    margin-top: 2px;
}

.course-section-heading {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 18.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}


.recommend-3cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.recommend-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.recommend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Icon không viền/khung, kích thước đồng bộ 26px hài hòa */
.recommend-card-icon-wrap {
    width: 28px;
    height: 28px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.recommend-card-icon-wrap .course-icon-mask {
    width: 26px;
    height: 26px;
}

/* SVG Masking Helper */
.course-icon-mask {
    width: 26px;
    height: 26px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Chuẩn màu đan xen Hồng / Xanh */
.icon-pink {
    color: #ee5d9d;
    background: none !important;
    border: none !important;
}

.icon-blue {
    color: #0284c7;
    background: none !important;
    border: none !important;
}

.recommend-card-text {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
    min-width: 0;
}

.text-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cột Phải Top: Course Meta Info Card */
.top-right-column {
    display: flex;
    flex-direction: column;
}

.course-meta-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.course-detail-title {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 23px;
    font-weight: 900;
    color: #1e293b;
    margin: 0 0 4px;
    letter-spacing: -0.4px;
}

.course-detail-tags {
    margin-bottom: 14px;
}

.tag-text {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ee5d9d;
}

.tag-pink-accent {
    color: #ee5d9d;
}

/* 3 Badges Pill Row */
.course-badges-pill-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.badge-pill-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

/* Pricing Block */
.course-pricing-area {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label-gray {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 12.5px;
    color: #94a3b8;
    font-weight: 600;
}

.price-strikethrough {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13.5px;
    color: #94a3b8;
}

.price-label-pink {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: #ee5d9d;
}

.price-big-pink {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #ee5d9d;
    letter-spacing: -0.5px;
}

/* Purchase Notice Box */
.course-purchase-notice-box {
    background: #fff1f6;
    border: 1px solid #fce7f3;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.notice-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-text {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 12px;
    color: #d63384;
    line-height: 1.45;
    margin: 0;
    font-weight: 500;
}

/* Action CTA Buttons (Quy chuẩn Global/Home) */
.course-action-buttons-row {
    display: flex;
    gap: 10px;
}

.btn-course-enroll-primary {
    flex: 1;
    background-color: #ee5d9d;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(238, 93, 157, 0.35);
    border: none;
}

.btn-course-enroll-primary:hover {
    background-color: #d63384;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 93, 157, 0.45);
}

.btn-course-preview-outline {
    background-color: #ffffff;
    color: #6a92cd;
    border: 1.5px solid #6a92cd;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(106, 146, 205, 0.12);
}

.btn-course-preview-outline:hover {
    background-color: rgba(106, 146, 205, 0.08);
    border-color: #6a92cd;
    color: #6a92cd;
    transform: translateY(-2px);
}

/* ============================================================================
   4.1 GRAMMAR COURSE DETAIL - TOP AREA REDESIGN (Khớp 100% Mockup Client)
   ============================================================================ */

/* 1. Top Area Grid & Left Column */
.grammar-top-grid {
    display: grid;
    grid-template-columns: 1.10fr 0.90fr;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 28px;
}

.grammar-top-grid .top-left-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
}

.grammar-top-grid .top-right-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 3. Tiêu đề '이런 분께 추천해요' */
.grammar-recommend-section {
    margin-top: 8px;
}

.grammar-block-heading {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 18.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}

/* 4. Đỉnh card '이런 분께 추천해요' */
.grammar-recommend-3pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.grammar-recommend-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
    min-height: 54px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grammar-recommend-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.grammar-recommend-pill span {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
    white-space: nowrap;
}



/* Mobile Slider Elements: Default hidden on Desktop */
.mobile-slider-dots {
    display: none;
}

.slide-clone-card {
    display: none !important;
}

/* 5. Tiêu đề '5단계 학습 구성' thẳng hàng với vùng giữa khoảng trống giữa Ưu đãi & 2 nút CTA */
.grammar-5steps-section {
    margin-top: 16px;
}


.grammar-5steps-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

/* 6. Đáy card 5 bước thẳng hàng với đáy Bảng thông tin, chiều cao card bằng từ đáy lên đỉnh chữ 2 nút CTA */
.grammar-step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 4px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex: 1;
    min-width: 0;
    min-height: 90px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grammar-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.step-card-img {
    width: 50px;
    height: 50px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transform: scale(1.55);
    margin: 2px 0;
}

.step-card-label {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    text-align: center;
}


.step-arrow-gt {
    color: #94a3b8;
    font-size: 13.5px;
    -webkit-user-select: none;
    user-select: none;
    padding: 0 2px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* 2. Right Column: Course Meta Info Card */
.grammar-meta-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    height: 100%;
    box-sizing: border-box;
}


/* 1. Header: Phụ đề hồng căn giữa Tiêu đề chính và 3 Nhãn */
.grammar-header-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.grammar-detail-title {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 29px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.grammar-detail-subtitle {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 16.5px;
    font-weight: 500;
    color: #ee5d9d;
    margin: 0 0 24px;
    letter-spacing: -0.2px;
}


/* 1. 3 Nhãn hạ xuống thẳng hàng với nút Play, luôn trên 1 dòng */
.grammar-badges-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-items: center;
}

.grammar-badge-pill {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 6px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
    white-space: nowrap;
}

.badge-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
}

.badge-icon-box svg {
    width: 16px;
    height: 16px;
}

.badge-v-divider {
    width: 1px;
    height: 13px;
    background-color: #bfdbfe;
    display: inline-block;
    flex-shrink: 0;
}

.badge-label-text {
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
}


/* 2. Khung bảng giá: Dòng '6개월·1년 멤버십 이용 시' thẳng hàng với phần cuối khung video */
.grammar-pricing-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 0;
}


.grammar-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.grammar-price-type {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #334155;
}

.grammar-price-sublabel {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}

.grammar-price-sublabel span {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.grammar-price-sublabel strong {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 16px;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

.grammar-price-val {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-align: right;
}

.grammar-price-val.pink {
    color: #ee5d9d;
}

.grammar-price-val.blue {
    color: #2563eb;
}

/* Purchase Benefit Card */
.grammar-benefit-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.benefit-gift-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.benefit-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.benefit-card-title {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.benefit-card-desc {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 15.5px;
    font-weight: 500;
    color: #ee5d9d;
    margin: 0;
}


/* Action CTA Buttons */
.grammar-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 0;
}


.btn-grammar-enroll {
    background-color: #2563eb;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 14px 10px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 15.5px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-grammar-enroll:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-grammar-sample {
    background-color: #ffffff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    border-radius: 10px;
    padding: 14px 10px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-grammar-sample:hover {
    background-color: #eff6ff;
    transform: translateY(-2px);
}

.grammar-bottom-notice {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    margin: 0;
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .grammar-top-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grammar-meta-info-card {
        height: auto;
        padding: 24px 20px;
        gap: 16px;
    }

    .grammar-recommend-3pills {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .grammar-5steps-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .step-arrow-gt {
        display: none;
    }

    .grammar-step-card {
        min-width: 45%;
    }
}


/* ============================================================================
   5. FULL-WIDTH SECTIONS:
   - Section 5 Bước & Section Đề cương (Curriculum)
   ============================================================================ */

.course-fullwidth-section {
    margin-bottom: 26px;
}

/* Section: 5단계 학습 구성 (5-Step Flow) */
.process-5steps-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.process-step-item {
    flex: 1;
    min-width: 0;
}

.step-card-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.step-card-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Icon step không viền/khung, đồng bộ 26px */
.step-icon-wrap {
    width: 28px;
    height: 28px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.step-icon-wrap .course-icon-mask {
    width: 26px;
    height: 26px;
}

.step-content-meta {
    flex: 1;
    min-width: 0;
}

.step-number-title {
    display: block;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-description {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 10.5px;
    color: #64748b;
    margin: 2px 0 0;
    line-height: 1.3;
}

.step-arrow-divider {
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    flex-shrink: 0;
    padding: 0 2px;
}

/* 6. Curriculum Section: Pronunciation (Khóa Phát âm) */
.pronunciation-curriculum-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 14px;
    align-items: flex-start;
}

/* Left Accordion Chapters */
.chapters-accordion-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chapter-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 13px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: left;
}

.chapter-accordion-header:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.chapter-accordion-item.is-active .chapter-accordion-header {
    background-color: #fff1f6;
    border-color: #ee5d9d;
    box-shadow: 0 3px 10px rgba(238, 93, 157, 0.12);
}

.chapter-header-title-box {
    display: flex;
    align-items: center;
    gap: 7px;
}

.chapter-num-badge {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.chapter-accordion-item.is-active .chapter-num-badge {
    color: #ee5d9d;
}

.chapter-title-text {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
}

.chapter-accordion-item.is-active .chapter-title-text {
    color: #ee5d9d;
}

.chapter-header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chapter-lesson-count {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
}

.chapter-accordion-item.is-active .chapter-lesson-count {
    color: #ee5d9d;
}

.chapter-arrow-icon {
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.chapter-accordion-item.is-expanded .chapter-arrow-icon {
    transform: rotate(180deg);
}

.chapter-accordion-item.is-active .chapter-arrow-icon {
    color: #ee5d9d;
}

/* 7. Grammar Curriculum Section (Theo chuẩn Mockup Client) */
.grammar-curriculum-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    padding: 0;
}


.grammar-level-tabs-header {
    display: flex;
    gap: 8px;
}

.grammar-level-tab-btn {
    width: 84px;
    padding: 10px 0;
    text-align: center;
    border-radius: 10px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 800;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.grammar-level-tab-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.grammar-level-tab-btn.is-active {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.grammar-curriculum-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
}

.curriculum-info-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}


.grammar-sublevel-and-table-grid {
    display: grid;
    grid-template-columns: 176px 1fr;
    gap: 8px;
    align-items: flex-start;
}


.grammar-sublevel-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grammar-sublevel-pill-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: left;
    white-space: nowrap;
    gap: 6px;
}


.grammar-sublevel-pill-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.grammar-sublevel-pill-btn.is-active {
    background-color: #ffffff;
    border-color: #f472b6;
    color: #db2777;
    box-shadow: 0 2px 8px rgba(244, 114, 182, 0.15);
}

.sublevel-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.sublevel-count-badge {
    font-size: 12.5px;
    font-weight: 800;
    color: #db2777;
    background: #fce7f3;
    padding: 2.5px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
}


/* 8. Lessons Table Styles & Expand/Collapse Toggle */
.lessons-table-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Ẩn các hàng từ hàng thứ 6 trở đi khi ở trạng thái thu gọn */
.lessons-table-card.is-collapsed tr.lesson-table-row:nth-child(n+6) {
    display: none !important;
}

.curriculum-lessons-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    table-layout: auto;
}

.curriculum-lessons-table thead th {
    background-color: #ffffff;
    padding: 15px 12px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1.5px solid #f1f5f9;
    white-space: nowrap !important;
}

.curriculum-lessons-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

.curriculum-lessons-table tbody tr:last-child td {
    border-bottom: none;
}

.curriculum-lessons-table tbody tr:hover {
    background-color: #fafcff;
}

.th-num {
    color: #64748b !important;
    font-weight: 600 !important;
    width: 38px;
    min-width: 38px;
    padding-left: 8px !important;
    padding-right: 4px !important;
    text-align: center !important;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    white-space: nowrap !important;
}

.td-num {
    width: 38px;
    min-width: 38px;
    padding-left: 8px !important;
    padding-right: 4px !important;
    text-align: center !important;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-weight: 500;
    color: #475569;
    font-size: 14px;
    white-space: nowrap !important;
}

.th-title {
    color: #64748b !important;
    font-weight: 600 !important;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14.5px;
    line-height: 1.35;
    padding-left: 8px !important;
    padding-right: 10px !important;
}

.td-title {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-weight: 700;
    color: #0f172a;
    font-size: 14.5px;
    line-height: 1.35;
    letter-spacing: -0.4px;
    padding-left: 8px !important;
    padding-right: 10px !important;
}

/* Khi có cột nội dung riêng (Ngữ pháp) */
.curriculum-lessons-table:not(.has-no-content-col) .th-title,
.curriculum-lessons-table:not(.has-no-content-col) .td-title {
    width: 44%;
    min-width: 270px;
}

.curriculum-lessons-table:not(.has-no-content-col) .th-content,
.curriculum-lessons-table:not(.has-no-content-col) .td-content {
    width: auto;
    min-width: 230px;
}

/* Khi KHÔNG có cột nội dung riêng (Phát âm: 강의명 chiếm trọn không gian) */
.curriculum-lessons-table.has-no-content-col .th-title,
.curriculum-lessons-table.has-no-content-col .td-title {
    width: auto;
    padding-right: 20px !important;
}

.lesson-subtitle-blue {
    font-size: 13.5px;
    font-weight: 600;
    color: #2563eb;
    margin-top: 4px;
    line-height: 1.45;
    word-break: keep-all;
}

.th-content {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-weight: 600 !important;
    color: #64748b !important;
    font-size: 14.5px;
    white-space: nowrap !important;
}

.td-content {
    font-family: var(--font-heading), 'Pretendard', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #475569;
    line-height: 1.35;
    letter-spacing: -0.4px;
    word-break: keep-all;
}

.th-duration {
    color: #64748b !important;
    font-weight: 600 !important;
    width: 68px;
    min-width: 68px;
    text-align: center !important;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    white-space: nowrap !important;
}

.td-duration {
    width: 68px;
    min-width: 68px;
    text-align: center !important;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap !important;
}

.curriculum-lessons-table.has-no-content-col .th-duration,
.curriculum-lessons-table.has-no-content-col .td-duration {
    width: 80px;
    min-width: 80px;
}

.th-check, .td-check {
    width: 58px;
    min-width: 58px;
    text-align: center !important;
    white-space: nowrap !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

.th-action, .td-action {
    width: 68px;
    min-width: 68px;
    text-align: center !important;
    white-space: nowrap !important;
    padding-left: 2px !important;
    padding-right: 8px !important;
}

.curriculum-lessons-table.has-no-content-col .th-action,
.curriculum-lessons-table.has-no-content-col .td-action {
    width: 78px;
    min-width: 78px;
}





/* Action Cell: Custom Checkbox + Button Xem hoặc Ổ khóa */
.lesson-check-action-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}


/* Custom Checkbox */
.custom-checkbox-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.custom-checkbox-wrap.is-disabled {
    cursor: not-allowed;
}

.custom-checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkmark {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.custom-checkbox-wrap:hover input:not(:disabled) ~ .custom-checkmark {
    border-color: #2563eb;
}

.custom-checkbox-wrap input:checked ~ .custom-checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

.custom-checkbox-wrap input:checked ~ .custom-checkmark::after {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-0.5px, -1px);
}

.custom-checkmark.is-disabled {
    background-color: #ffffff;
    border-color: #cbd5e1;
    opacity: 0.85;
}

/* Nút Xem 강의 보기 */
.btn-lesson-view-action {
    background: #ffffff;
    border: 1.5px solid #2563eb;
    color: #2563eb;
    border-radius: 6px;
    padding: 4px 11px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.btn-lesson-view-action .view-triangle {
    font-size: 10px;
}

.btn-lesson-view-action:hover {
    background-color: #eff6ff;
    transform: translateY(-1px);
}

.btn-lesson-view-action.is-preview {
    border-color: #2563eb;
    color: #2563eb;
}

/* Ổ khóa */
.icon-lesson-locked-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 32px;
}

.curriculum-lock-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 1;
    display: block;
}



/* Nút Toggle mở rộng bảng: 더보기 */
.table-expand-toggle-box {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.btn-curriculum-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 28px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}


.btn-curriculum-more:hover {
    border-color: #cbd5e1;
    color: #1e293b;
    background: #f8fafc;
}


/* 9. Video Preview & Locked Modal Styles */
.course-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.course-modal-dialog {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 780px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-dialog-sm {
    max-width: 440px;
    padding: 24px;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.course-modal-header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-badge-preview {
    background: #0284c7;
    color: #ffffff;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.modal-lesson-title {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.btn-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-modal-close:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.course-modal-body {
    padding: 20px 24px;
}

.custom-modal-player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
}

.modal-video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Floating Watermark in Modal Player */
.modal-floating-watermark {
    position: absolute;
    top: 15%;
    left: 15%;
    color: rgba(255, 255, 255, 0.35);
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 1.5s ease;
}

.modal-lesson-meta-box {
    margin-top: 16px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-row {
    display: flex;
    font-size: 13px;
    gap: 8px;
}

.meta-label {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-weight: 700;
    color: #64748b;
    width: 75px;
    flex-shrink: 0;
}

.meta-value {
    font-family: var(--font-vietnamese), 'Be Vietnam Pro', sans-serif;
    color: #1e293b;
    font-weight: 600;
}

.course-modal-footer {
    padding: 14px 24px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.btn-modal-enroll {
    background-color: #ee5d9d;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 14px rgba(238, 93, 157, 0.3);
}

.btn-modal-enroll:hover {
    background-color: #d63384;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 93, 157, 0.45);
}

.btn-modal-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-secondary:hover {
    background: #e2e8f0;
}

/* Locked Modal Specific Styles */
.locked-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.locked-modal-heading {
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}

.locked-modal-subtext {
    font-family: var(--font-body), 'SUIT', sans-serif;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* ============================================================================
   RESPONSIVE TABLE WRAPPER & SLIDER DOTS & MOBILE CHAPTER SELECTOR
   ============================================================================ */

/* 1. Responsive Table Wrapper */
.lessons-table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Slide Clone Card: Tuyệt đối ẩn trên Desktop, chỉ hiển thị trong Mobile Slider */
.slide-clone-card {
    display: none !important;
}

/* 2. Pagination Dots for Mobile Slider */
.mobile-slider-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 4px;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #cbd5e1;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.slider-dot.active {
    width: 20px;
    border-radius: 10px;
    background-color: #ee5d9d;
}

/* 3. Mobile Chapter Dropdown Selector Card (Gom gọn 8 chương trên Mobile) */
.mobile-chapter-selector-card {
    display: none;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 15;
}

.mobile-chapter-selector-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    text-align: left;
}

.selected-chapter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-chapter-num {
    font-size: 12.5px;
    font-weight: 800;
    color: #ee5d9d;
    background: #fff1f6;
    padding: 3px 7px;
    border-radius: 6px;
}

.selected-chapter-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.selector-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-chapter-count {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 20px;
}

.selector-arrow-icon {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.mobile-chapter-selector-trigger[aria-expanded="true"] .selector-arrow-icon {
    transform: rotate(180deg);
}

.mobile-chapters-dropdown-sheet {
    border-top: 1px solid #f1f5f9;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 280px;
    overflow-y: auto;
}

.mobile-chapter-option-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading), 'Pretendard', sans-serif;
    font-size: 13px;
    color: #334155;
    transition: all 0.2s ease;
    text-align: left;
}

.mobile-chapter-option-item .opt-num {
    font-weight: 800;
    color: #64748b;
    margin-right: 8px;
}

.mobile-chapter-option-item .opt-title {
    flex: 1;
    font-weight: 600;
}

.mobile-chapter-option-item .opt-count {
    font-size: 11.5px;
    color: #94a3b8;
}

.mobile-chapter-option-item:hover {
    background: #f8fafc;
}

.mobile-chapter-option-item.is-active {
    background: #fff1f6;
    border-color: rgba(238, 93, 157, 0.3);
    color: #ee5d9d;
    font-weight: 700;
}

.mobile-chapter-option-item.is-active .opt-num {
    color: #ee5d9d;
}

/* ============================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ============================================================================ */

/* Tablet Screens (<= 1024px) */
@media (max-width: 1024px) {
    .course-page-wrapper {
        padding: 16px 16px 60px;
        gap: 16px;
    }

    .course-layout-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .course-left-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        gap: 10px;
        box-sizing: border-box;
    }
    
    .sidebar-heading-box {
        display: none;
    }
    
    .sidebar-nav-list {
        flex-direction: row;
        width: 100%;
        gap: 10px;
    }
    
    .sidebar-nav-item {
        flex: 1;
        justify-content: center;
    }
    
    .course-top-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pronunciation-curriculum-layout,
    .grammar-sublevel-and-table-grid {
        grid-template-columns: 1fr;
    }
    
    .process-5steps-flow {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .process-step-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .step-arrow-divider {
        display: none;
    }
}

/* Mobile Screens (<= 767px) */
@media (max-width: 767px) {
    /* 1. Mobile Reordering: Video -> Recommend (Slider) -> Process (Slider) -> Price Card -> Curriculum */
    .course-main-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .course-top-layout-grid,
    .grammar-top-grid {
        display: contents;
    }


    .top-left-column {
        display: contents;
    }

    #introVideoCard {
        order: 1;
        margin-bottom: 20px;
    }

    #courseRecommendSection {
        order: 2;
        margin-bottom: 24px;
        width: 100%;
        overflow: hidden;
    }

    #courseProcessSection {
        order: 3;
        margin-bottom: 24px;
        width: 100%;
        overflow: hidden;
    }

    #courseMetaPricingBlock {
        order: 4;
        margin-bottom: 28px;
    }

    #courseCurriculumSection {
        order: 5;
        width: 100%;
    }

    .slide-clone-card {
        display: flex !important;
    }

    /* 2. Touch Slider & Pagination Dots: Cơ chế Slide động và Vuốt mượt mà đồng bộ 100% với Home */
    .course-slider-wrap {
        overflow: hidden !important;
        width: 100% !important;
        position: relative !important;
        padding: 4px 0 6px !important;
    }

    .course-slider-wrap .recommend-3cards-grid,
    .course-slider-wrap .process-5steps-flow,
    .course-slider-wrap .grammar-recommend-3pills,
    .course-slider-wrap .grammar-5steps-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        width: 100% !important;
        transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        padding: 0 !important;
        overflow: visible !important;
    }

    .course-slider-wrap .recommend-card,
    .course-slider-wrap .process-step-item,
    .course-slider-wrap .grammar-recommend-pill,
    .course-slider-wrap .grammar-step-card,
    .course-slider-wrap .slide-clone-card {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 4px !important;
        margin: 0 !important;
    }

    .course-slider-wrap .grammar-recommend-pill {
        padding: 14px 16px !important;
        min-height: 60px !important;
        justify-content: center !important;
    }

    .course-slider-wrap .grammar-step-card {
        padding: 14px 10px !important;
        min-height: 105px !important;
        justify-content: center !important;
    }

    .course-slider-wrap .step-card-box {
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .course-slider-wrap .step-arrow-divider,
    .course-slider-wrap .step-arrow-gt {
        display: none !important;
    }

    .mobile-slider-dots {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        margin-top: 14px !important;
    }

    .slider-dot-btn {
        width: 8px !important;
        height: 8px !important;
        border-radius: 50% !important;
        background-color: #cbd5e1 !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    .slider-dot-btn.active {
        width: 24px !important;
        border-radius: 12px !important;
        background-color: #ee5d9d !important;
    }


    /* 3. Badges & CTA Button Stacking */
    .course-badges-pill-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .course-action-buttons-row {
        flex-direction: column;
        gap: 8px;
    }

    /* 4. Mobile Chapter & Grammar Selector Dropdown */
    .mobile-chapter-selector-card {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .curriculum-chapters-column,
    .grammar-level-tabs-header,
    .grammar-sublevel-column {
        display: none !important;
    }

    .grammar-curriculum-layout,
    .grammar-sublevel-and-table-grid,
    .grammar-table-column,
    .pronunciation-curriculum-layout,
    .curriculum-lessons-column {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .mobile-dropdown-level-header {
        font-family: var(--font-heading), 'Pretendard', sans-serif;
        font-size: 11px;
        font-weight: 800;
        color: #94a3b8;
        padding: 8px 12px 3px;
        letter-spacing: 0.3px;
        border-bottom: 1px dashed #f1f5f9;
        margin-top: 4px;
    }

    .mobile-dropdown-level-header:first-child {
        margin-top: 0;
    }

    /* 5. Desktop Standard Table on Mobile with True Smooth Horizontal Scroll */
    .course-page-wrapper {
        max-width: 100vw !important;
        overflow-x: clip !important;
    }

    .lessons-table-card {
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .lessons-table-responsive-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
        padding-bottom: 4px !important;
    }

    .lessons-table-responsive-wrapper::-webkit-scrollbar {
        height: 6px !important;
        display: block !important;
        -webkit-appearance: none !important;
    }

    .lessons-table-responsive-wrapper::-webkit-scrollbar-track {
        background: #f1f5f9 !important;
        border-radius: 3px !important;
    }

    .lessons-table-responsive-wrapper::-webkit-scrollbar-thumb {
        background: #ee5d9d !important;
        border-radius: 3px !important;
    }

    .curriculum-lessons-table {
        min-width: 580px !important;
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
    }

    .curriculum-lessons-table thead th {
        background: #f8fafc !important;
        color: #64748b !important;
        font-weight: 700 !important;
        font-size: 12px !important;
        padding: 11px 12px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        white-space: nowrap !important;
    }

    .curriculum-lessons-table tbody tr {
        display: table-row !important;
        padding: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .curriculum-lessons-table tbody td {
        display: table-cell !important;
        padding: 12px 12px !important;
        vertical-align: middle !important;
    }

    .td-num {
        width: 42px !important;
        min-width: 42px !important;
        text-align: center !important;
        font-size: 12px !important;
        color: #94a3b8 !important;
    }

    .td-title {
        min-width: 140px !important;
        text-align: left !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        color: #1e293b !important;
        white-space: normal !important;
    }

    .td-content {
        min-width: 220px !important;
        text-align: left !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        color: #334155 !important;
        white-space: normal !important;
    }

    .td-duration {
        width: 75px !important;
        min-width: 75px !important;
        text-align: center !important;
        font-size: 12px !important;
        color: #64748b !important;
        white-space: nowrap !important;
    }

    .td-status {
        width: 105px !important;
        min-width: 105px !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    .btn-lesson-preview-action {
        padding: 5px 12px !important;
        font-size: 11.5px !important;
        gap: 4px !important;
        border-radius: 6px !important;
    }

    .btn-lesson-preview-action svg {
        width: 12px !important;
        height: 12px !important;
    }

    .badge-lesson-locked {
        padding: 4px 6px !important;
        font-size: 11.5px !important;
        gap: 4px !important;
    }

    .badge-lesson-locked svg {
        width: 12px !important;
        height: 12px !important;
    }
}
