/* ======================================ส่วนการ์ดคอร์ส (Course Grid Card) & รีวิว   ======================================*/
/* รวมสไตล์ของการ์ดคอร์สและรีวิวเข้าด้วยกันเพื่อลดโค้ดซ้ำ */
.ld_course_grid .thumbnail, 
.my-custom-card {
    background: #ffffff;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
    transition: all 0.3s ease-in-out;
}

.ld_course_grid .thumbnail:hover, 
.my-custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.1) !important;
}

/* จัดระยะเนื้อหาและหัวข้อ */
.ld_course_grid .thumbnail .caption {
    padding: 30px 25px !important;
    box-sizing: border-box;
    height: 100%;
}

.ld_course_grid .caption h4 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    line-height: 1.4;
    color: #333;
    margin: 0 0 20px 0 !important;
}

/* ปุ่มกด (Action Button) */
.ld_course_grid .btn-primary {
    display: block !important;
    width: 100% !important;
    padding: 12px 20px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center;
    text-decoration: none !important;
    background-color: #0073aa !important;
    border: none !important;
    border-radius: 50px !important;
    transition: background 0.2s ease;
}

.ld_course_grid .btn-primary:hover {
    background-color: #005a87 !important;
}

/* ======================================
ปรับแต่งเนื้อหาบทเรียน (Course Content & Lessons)
======================================*/
/* ซ่อนแถบ Infobar ที่ไม่จำเป็น */
.ld-course-status, .ld-infobar, [class*="ld-infobar"] {
    display: none !important;
}

/* ปรับระยะห่างตารางบทเรียน */
.learndash-wrapper #ld-course-content {
    margin-top: -20px !important;
    padding-top: 0 !important;
}

/* สไตล์ตารางบทเรียนแบบ Modern Cards */
.learndash-wrapper .ld-item-list {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.learndash-wrapper .ld-item-list-item {
    background-color: #ffffff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    padding: 0px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
    transition: all 0.3s ease !important;
}

.learndash-wrapper .ld-item-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
    border-color: #0073aa !important;
}

.learndash-wrapper .ld-item-name {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
}

/* ======================================
   3. ฟีเจอร์เสริม (Sticky Button, Comments, etc.)   ======================================*/
/* ปุ่มติดขอบจอมือถือ */
@media (max-width: 800px) {
    .sticky-button {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        width: 100%;
        border-radius: 0;
    }
}

/* ปรับปรุงระบบคอมเมนต์ Focus Mode */
.learndash-wrapper .ld-focus-comments #ld-comments-form.ld-collapsed,
.learndash-wrapper .ld-focus-comments #ld-comments-post-button.ld-open {
    display: inline !important;
}

.ld-focus-comments .ld-expand-button {
    display: none !important;
}