.image-container img {
    opacity: 0;
}

.image-container img.loaded {
    opacity: 1;
}

.created__course--end {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    position: fixed;
    overflow: hidden;
    transition: width 0.4s ease, border-radius 0.4s ease, background 0.4s ease;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(162.63deg, #8d4df3 0%, #0120d4 98.99%);
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.sign {
    width: 100%;
    transition: padding-left 0.4s ease, opacity 0.4s ease; /* Thêm opacity vào transition */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sign i {
    width: 17px;
    opacity: 1; /* Mặc định hiển thị icon */
    transition: opacity 0.4s ease; /* Thêm transition cho opacity */
    color: white;
}

.text {
    position: absolute;
    left: 100%;
    opacity: 0;
    color: #ecf0f1;
    font-size: 1.2em;
    font-weight: 600;
    transition: transform 0.4s ease, opacity 0.4s ease;
    white-space: nowrap;
}

.created__course--end:hover {
    width: 150px;
    border-radius: 20px;
    transition: width 0.4s ease, border-radius 0.4s ease, background 0.4s ease;
    background: linear-gradient(162.63deg, #8d4df3 0%, #0120d4 98.99%);
}

.created__course--end:hover .sign {
    padding-left: 12px;
}

.created__course--end:hover .text {
    transform: translateX(-124%);
    opacity: 1;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.created__course--end:hover .sign i {
    opacity: 0; /* Ẩn icon khi hover */
}

.main-content {
    top: clamp(40px, 5vw, 50px);
}

.academy__nav {
    box-shadow: 4px 0 10px 0 rgba(0, 0, 0, 0.05);
    z-index: 99;
    height: clamp(40px, 5vw, 50px);
}

.academy__nav--list {
    list-style: none;
}

.academy__nav--link {
    text-decoration: none;
    padding: 0;
    color: #000000;
    font-weight: bold;
    height: 100%;
}

.academy__nav--item {
    padding: 10px;
    cursor: pointer;
    font-size: clamp(13px, 2vw, 16px);
    height: 100%;
}

.academy__nav--link:has(.academy__nav--item.active) {
    pointer-events: none;
}

.academy__nav--item.active {
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(162.63deg, #8d4df3 0%, #0120d4 98.99%);
    border-image-slice: 1;
    width: 100%;
    background: linear-gradient(162.63deg, #8d4df3 0%, #0120d4 98.99%);
    background-clip: text;
    color: transparent;
}

/* Hiệu ứng hover chỉ áp dụng cho phần tử không có class 'active' */
.academy__nav--item:not(.active):hover {
    background: linear-gradient(162.63deg, #8D4DF3 0%, #0120D4 98.99%);
    background-clip: text;
    color: transparent;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(162.63deg, #8D4DF3 0%, #0120D4 98.99%);
    border-image-slice: 1;
    width: 100%;
    transition: all 0.1s ease;
}

/* title web */
.academy__course-content {
    margin: 0 50px;
}

.academy--text {
    font-size: clamp(16px, 5vw, 36px);
    font-weight: 700;
    margin: 25px 0;
}

.academy--span-text {
    font-size: clamp(16px, 5vw, 28px);
    font-style: normal;
    font-weight: 700;
    text-decoration: none;
    color: #3531e0;
    width: fit-content;
    position: relative;
}

.academy--span-text-or {
    font-size: clamp(16px, 5vw, 28px);
}

.academy--span-text:hover {
    color: #3531e0;
}

.academy--span-text::before {
    content: '';
    width: 0;
    height: 3px;
    background-color: #3531e0;
    position: absolute;
    bottom: -.25rem;
    left: 50%;
    transition: width .4s, left .4s;
}

.academy--span-text:hover::before {
    width: 100%;
    left: 0;
}

/* end title web */

/* form search */
.academy__search {
    padding: 30px 0;
}

.academy__search-wrapper {
    padding: 10px 20px;
    border-radius: 25px;
    gap: 2px;
}

#search-input {
    color: #0a0a0a;
    width: 100%;
    margin-inline: min(2em, calc(1.2em + 0.9rem));
    background: none;
    border: none;
}

#search-input::placeholder {
    color: #808190;
}

#search-input:focus {
    outline: none;
}

.remove-search {
    display: none;
}

.remove-search:hover {
    cursor: pointer;
}

/* academy__keyword */
.academy__keyword--list {
    overflow-x: auto; /* Enable horizontal scrolling */
    white-space: nowrap; /* Prevents wrapping of child elements */
}

.keyword--list__title {
    margin-bottom: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.keyword--list-link {
    flex: 0 0 auto; /* Prevent shrinking and growing */
    font-size: 18px;
    text-decoration: none;
    color: #000000;
    margin: 7px 0;
}

.keyword--list-link .p-keyword {
    width: 100%;
    padding: 0.8em;
    padding-inline: 1.2em;
    display: flex;
    align-items: center;
}

.keyword--list-link input[type="checkbox"] {
    display: none;
}

.keyword--list-link input[type="checkbox"] + label {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 25px;
    background: #fff;
}

.keyword--list-link input[type="checkbox"]:checked + label {
    background-color: rgba(128, 129, 144, 1);
}

.keyword--list-link .p-keyword:hover {
    background-color: rgba(217, 217, 217, 1);
    color: #000000;
    border-radius: 25px;
    cursor: pointer;
}

.keyword--list-name {
    margin-left: 5px;
    font-size: clamp(12px, 2vw, 14px);
}

.remove-button {
    display: none;
    margin-left: 20px;
}

.keyword--list-seemore {
    border-radius: 25px;
    background: #fff;
    border: none;
    padding: 7px 15px;
    color: #808190;
    font-size: 14px;
    font-weight: 400;
}

.keyword--list-seemore:hover {
    background-color: rgba(128, 129, 144, 1);
    color: #fff;
    border-radius: 25px;
}

.keyword--list-seemore:active {
    background-color: rgb(104, 111, 187);
    color: #fff;
    border-radius: 25px;
}

.academy__keyword--filter {
    height: fit-content;
    position: relative;
}

.course--filter-created__course--end {
    border: none;
    display: flex;
    align-items: center;
    padding: 7px 15px;
    background-color: #fff;
    height: 40px;
    border-radius: 25px;
    cursor: pointer;
}

.academy__keyword--filter:hover .popup-window-filter {
    display: block;
}

.popup-window-filter {
    width: 570px;
    display: none;
    position: absolute;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.15);
    right: 0;
    transition: var(--burger-transition);
    top: 110%;
}

.popup-window-filter:before {
    content: "";
    position: absolute;
    width: 100%;
    top: -10px;
    right: 0;
    border: 10px solid transparent;
}

.drop--filter-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
}

.drop--filter-row h2 {
    color: #000;
    font-size: clamp(14px, 2vw, 15px);
    font-weight: 700;
    margin-bottom: 10px;
}

.drop--filter-item {
    width: 100%;
}

.form__desc {
    color: #000;
    font-size: 14px;
    font-weight: 400;
}

.line {
    border: 1px solid rgba(128, 129, 144, 1);
    margin: 10px 0;
}

.created__course--filter:hover .drop--filter {
    display: block;
}

.free,
.latest {
    margin: 10px 0;
}

.paid,
.oldest {
    margin-bottom: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    position: relative;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-item label {
    display: flex;
    align-items: center;
    font-size: clamp(14px, 2vw, 15px);
}

.radio-item label:before {
    content: " ";
    display: inline-block;
    position: relative;
    margin: 0 5px 0 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #4937e4;
    background-color: transparent;
}

.radio-item input[type="radio"]:checked + label:after {
    border-radius: 50%;
    width: 12px;
    height: 12px;
    position: absolute;
    top: 50%;
    left: 4px;
    content: " ";
    display: block;
    background: linear-gradient(162.63deg, #8d4df3 0%, #0120d4 98.99%);
    transform: translateY(-50%);
}

.academy__keyword--textfil {
    margin-left: 7px;
    font-size: 14px;
    color: #808190;
}

/* academy__course */
.academy__course {
    margin: 0 auto 30px;
}

.academy__course--list,
.academy__course--system,
.academy__course--select {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.course--list__link {
    cursor: pointer;
}

.course--list__item {
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgb(228, 228, 228);
}

.course--list__item:hover {
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.course--list--image {
    width: 100%;
    aspect-ratio: calc(1 / 0.5625);
    overflow: hidden;
}

.course-image-skeleton {
    width: 100%;
    aspect-ratio: calc(1 / 0.5625);
    background-color: #ccc; /* Màu nền của skeleton */
    animation: skeleton-loading 1.2s infinite linear;
}

@keyframes skeleton-loading {
    0% {
        background-color: #ccc;
    }
    50% {
        background-color: #ddd;
    }
    100% {
        background-color: #ccc;
    }
}

.course--list--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course--list--content {
    padding: 20px;
    height: 220px;
    display: flex;
    flex-direction: column;
}

.course--list--title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    font-size: 18px;
    margin: 0 0 10px;
}

.course--list--desc {
    color: #808190;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: clamp(14px, 2vw, 15px);
    margin-bottom: 10px;
    line-height: 1;
}

.course--list--teacher {
    text-transform: uppercase;
    color: #808190;
    font-size: clamp(14px, 2vw, 15px);
    font-weight: 500;
    margin: auto 0 10px;
}

.course--list--info {
    display: flex;
    justify-content: space-between;
}

.course--list--vote {
    color: #fa9d3e;
    display: flex;
    align-items: center;
}

.star.full {
    background: linear-gradient(
            90deg,
            rgba(251, 205, 50, 1),
            rgba(255, 129, 71, 1)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(14px, 2vw, 15px);
}

.number--vote {
    margin-right: 1px;
}

.course--list--spvote {
    color: rgba(128, 129, 144, 1);
    margin-left: 10px;
}

.course--list--student {
    display: flex;
    align-items: center;
    color: rgba(128, 129, 144, 1);
}

.course--list--price {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.course--list--sale {
    color: #ca3f00;
    margin-right: 10px;
    font-size: clamp(14px, 2vw, 15px);
    font-weight: 700;
}

.course--list--original {
    color: #808190;
    font-size: 14px;
    text-decoration: line-through;
}

.seemore {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.seemore--link {
    border: none;
    display: flex;
    align-items: center;
    border-radius: 25px;
    background: #fff;
    justify-content: center;
    width: 169px;
    text-decoration: none;
    padding: 10px 5px;
    color: rgba(128, 129, 144, 1);
}

.seemore--link:hover {
    background-color: rgba(128, 129, 144, 1);
    color: #fff;
}

/* end academy__course */

/*Responsive*/
/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* CSS rules for xs */
    .main-content {
        bottom: 70px !important;
    }

    .academy__nav--list {
        padding-left: 10px;
    }

    .academy__nav--item {
        padding: 8px;
    }

    .academy__course-content {
        margin: 0 20px;
    }

    .academy--text {
        margin: 20px 0 0;
    }

    .academy__search {
        padding: 20px 0;
    }

    .academy__search-wrapper {
        padding: 5px 15px;
    }

    #search-input {
        margin-inline: min(1em, calc(0.2em + 0.2rem));
    }

    .academy__course--list,
    .academy__course--system,
    .academy__course--select {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .sidebar-header {
        margin-top: 5px;
    }

    /* CSS rules for sm */
    .academy__course-content {
        margin: 0 20px;
    }

    .academy__course--list,
    .academy__course--system,
    .academy__course--select {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-footer span {
        display: block !important;
    }

    #link_detail-account i {
        display: block !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar-header {
        margin-top: 0;
    }

    /* CSS rules for md */
    .academy__course--list,
    .academy__course--system,
    .academy__course--select {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-footer span {
        display: block !important;
    }

    #link_detail-account i {
        display: block !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* CSS rules for lg */
    .sidebar-header {
        margin-top: 0;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* CSS rules for xl */
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    /* CSS rules for xxl */
}
