body {
    font-family: 'Times New Roman', serif;
}
.navbar {
    background-color: #054eb9;
}
.navbar-brand img {
    max-height: 40px;
}
.navbar-nav {
    margin-left: 0;
    gap: 10px;
}
.navbar-nav .nav-link {
    color: white !important;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 16px;
}
.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}
.dropdown-menu {
    background-color: black;
}
.dropdown-menu .dropdown-item {
    color: white;
}
.dropdown-menu .dropdown-item:hover {
    background-color: #495057;
}
.ms-auto {
    margin-left: auto !important;
}
.ribbon {
    clip-path: polygon(100% 0, 100% 100%, 80% 80%, 0 100%, 0 0);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}
.course-card:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease-in-out;
}
.language-login {
    display: flex;
    gap: 10px;
    align-items: center;
}


.ban_img {
    width: 100%;
    position: relative;
}

.logoutBtn {
    width: 100%; /* Đảm bảo nút có chiều rộng tương tự các mục menu */
    text-align: left; /* Căn chỉnh chữ giống các mục khác */
    background: none;
    border: none;
    padding: 5px 15px; /* Padding giống dropdown item */
    font-size: 16px;
    color: gold;
    display: flex;
    align-items: center;
    gap: 5px; /* Khoảng cách giữa icon và chữ */
}

.logoutBtn:hover {
    background-color: #f8f9fa; /* Hiệu ứng hover giống các dropdown item */
    color: #000;
}

.notfound-container {
    text-align: center;
    background: white;
    padding: 5rem;
}

.error-container {
    text-align: center;
    background: white;
    padding: 10rem;
}

.scrolling-wrapper {
    overflow-x: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    padding-bottom: 1rem;
}

.scrolling-wrapper::-webkit-scrollbar {
    height: 8px;
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 4px;
}

.scrolling-wrapper .card {
    min-width: 250px;
    max-width: 300px;
    flex: 0 0 auto;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-thumbnail:hover {
    transform: scale(1.03);
    transition: 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.enroll-btn:hover {
    transform: scale(1.05);
    transition: 0.2s ease;
}

.list-unstyled li {
    list-style-type: none;
}

@media (max-width: 768px) {
    #sidebar {
        background: white;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        height: 100vh;
        z-index: 1040;
    }
}
.scrollable-content {
    max-height: 100vh;      /* hoặc giá trị cụ thể nếu muốn */
    overflow-y: auto;
    overflow-x: hidden;
}

.badge-item {
    width: 140px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.badge-item:hover {
    background-color: #f0f9ff;
    transform: translateY(-2px);
}

.badge-icon {
    border-radius: 12px;
    object-fit: cover;
    width: 64px;
    height: 64px;
}

.badge-tooltip {
    cursor: help;
}

.badge-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.badge-date {
    font-size: 0.8rem;
}

.certificate-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.certificate-img-wrapper {
    text-align: center;
    padding-top: 1rem;
}

.certificate-img {
    width: 95%;
    height: auto;
    border-radius: .5rem;
}

.download-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    text-decoration: none;
    border-radius: 40px;
}

.card-body {
    position: relative;
}
.card:hover {
    transform: translateY(-2px);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.object-fit-cover {
    object-fit: cover;
}
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.title {
    display: inline-block;
    max-width: 100px; /* Giới hạn chiều rộng */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CSS để hiển thị grid view */
#resourceContainer.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Đảm bảo các thẻ item trong grid có kích thước hợp lý */
.resource-item {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

/* Hover effect cho item */
.resource-item:hover {
    transform: translateY(-5px);
}

/* Nếu bạn dùng card, đảm bảo grid item có kích thước đúng */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
