﻿.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 10px 20px 10px;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

/* Đảm bảo container không bị co khi loading */
#partialListCourses {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

/* Đảm bảo container cha có width đầy đủ */
.main-content-wrapper > div:last-child {
    flex: 1;
    min-width: 0; /* Cho phép flex item shrink nhưng không bị co quá mức */
    width: 100%;
}

/* Đảm bảo course-content có width đầy đủ */
.course-content {
    width: 100%;
    min-width: 0;
}

/* Đảm bảo course-card luôn có width đầy đủ */
.course-card {
    width: 100%;
    min-width: 0; /* Cho phép grid item shrink nhưng không bị co quá mức */
    box-sizing: border-box;
}

.course-content {
    border-top: 2px solid #B60002;
}

.header-courses {
    padding: 8px 32px 10px 32px;
}

.see-more img {
    transform: unset;
}

.course-content {
    gap: unset;
}

.course-info {
    padding: 0;
}

.course-title {
    /*height: 48px;*/
}

.course-description {
    display: -webkit-box; /* cần cho -webkit-line-clamp */
    -webkit-box-orient: vertical; /* hướng box là dọc */
    -webkit-line-clamp: 3; /* giới hạn 3 dòng */
    overflow: hidden; /* ẩn phần vượt */
    text-overflow: ellipsis; /* dấu ... (tùy trình duyệt) */
    /* Tùy chọn để kiểm soát khoảng cách dòng */
    line-height: 1.4; /* hoặc 1.2 / 1.5 tuỳ bạn */
    max-height: calc(1.4em * 3); /* fallback đọc gọn nếu cần */
}
/* Khi màn hình nhỏ hơn 768px (tablet hoặc mobile) */
@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr; /* 1 item mỗi dòng */
    }
}

input[type=checkbox],
input[type=radio] {
    opacity: 1;
    position: unset;
}

/* Empty state styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    width: 100%;
    min-height: 400px;
}

.empty-state-icon {
    margin-bottom: 24px;
    color: #ccc;
}

.empty-state-icon svg {
    width: 80px;
    height: 80px;
    stroke: #999;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.empty-state-message {
    font-size: 16px;
    color: #666;
    max-width: 500px;
    line-height: 1.6;
    margin: 0;
}