.specialization {
    margin-bottom: 0;
    margin: 80px 0 30px 0;
}

.specialization .card-top {
    flex-direction: column;
    padding: 25px;
    padding-bottom: 35px;
    margin: 0;
    justify-content: end;
}

.specialization h2 {
    margin-bottom: 40px;
}

.arrow {
    position: absolute;
    top: 30px;
    right: 30px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.course-card:hover .arrow {
    transform: rotate(45deg) scale(1);
}


.specialization .course-card {
    flex: 0 0 336px;
    max-width: 336px;
    height: 421px;
    border-radius: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid lightgray;
}

.specialization .course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}


.specialization .carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.specialization .carousel {
    width: 100%;
}

.carousel-track {
    display: flex;
    width: max-content;
    -webkit-animation: marqueeScroll 25s linear infinite;
    animation: marqueeScroll 25s linear infinite;
    padding: 10px 0;
}

.carousel-wrapper:hover .carousel-track {
    animation-play-state: paused;
}

@-webkit-keyframes marqueeScroll {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    100% {
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes marqueeScroll {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    100% {
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
    }
}

.specialization .carousel::-webkit-scrollbar {
    display: none;
}

.specialization .course-card .topimg {
    height: 421px;
    object-fit: cover;
    border-radius: 30px;
}

.specialization .card-overlay {
    border-radius: 30px;
    padding: 25px;
    justify-content: center;
}

.card-top h3,
.card-overlay h3 {
    font-size: 20px;
    line-height: 24px;
    font-weight: 650;
    margin-bottom: 14px;
    color: #fff;
}

.bestfortag {
    width: 61px;
    height: 20px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: #000;
    background: #D4BFFF;
    text-align: center;
    padding: 2px 5px;
}

.bestfor {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    /* margin-bottom: 11px; */
    color: #fff;
    text-transform: capitalize;
}

.rolestag {
    color: #fff;
    background: #6423B3;
    width: 45px;
    height: 20px;
}

.roles {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    background: #fff;
    color: #000000;
    width: auto;
    height: 26px;
    border-radius: 3px;
    text-align: center;
    margin-right: 5px;
    padding: 2px 5px;
    text-transform: capitalize;
}

.card-overlay hr,
.card-top hr {
    width: 100%;
    /* border: 1px solid;
    border-image-source: linear-gradient(90deg, #E3D5FF 0%, rgba(210, 214, 219, 0) 100%); */
    margin-top: 11px;
    margin-bottom: 5px;
    border: none;
    height: 2px;
}

.card-overlay .explorebtn2 {
    width: 171px;
    height: 40px;
    border-radius: 4px;
    position: absolute;
    bottom: 35px;
    text-align: center;
    align-content: center;
    justify-items: anchor-center;
    border: 1px solid transparent;
    background:
        linear-gradient(#000, #000) padding-box,
        linear-gradient(90deg,
            #CFA1FF 6.73%,
            #00D885 23.56%,
            #D2F501 40.87%,
            #85F346 60.1%,
            #42C9CD 77.4%,
            #77C6E7 97.73%) border-box;
    margin-top: 40px;
}

.card-overlay .explorebtn {
    color: #fff;
    font-size: 14px;
    line-height: 35px;
    font-weight: 400;
    text-align: center;
    display: flex;
    gap: 8px;
    margin: auto;
}

/* Carousel Prev/Next Buttons */
.carousel-indicator {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.carousel-indicator .nav {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #E0E0E0;
    color: #999;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator .nav:hover {
    border-color: #999;
    color: #333;
    background-color: #999;
}

.specialization .course-card:hover .card-overlay .arrow img {
    transform: rotate(0);
    transition: transform 0.3s ease;
}

@media (max-width: 640px) {

    .specialization .course-card {
        padding: 0;
        border: 0;
    }

    .specialization .course-card:nth-child(n) {
        display: block !important;
    }

    .card-top,
    .card-overlay {
        display: flex;
    }

    .specialization .carousel {
        flex-direction: row;
    }

    .course-card {
        margin: 3px 8px;
    }

    .course-card.active a {
        margin-top: 0;
        color: white;
        text-decoration: none;
    }
}

@media (max-width: 426px) {}

@media (max-width: 376px) {
    .specialization .course-card {
        flex: 0 0 319px;
        max-width: 319px;
        height: 400px;
    }

    .specialization .carousel-wrapper {
        width: fit-content;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .specialization .course-card .topimg {
        height: 400px
    }

    .carousel-indicator .nav {
        width: 40px;
        height: 40px;
    }

    .arrow {
        width: 30px;
        height: 30px;
    }

    .arrow img {
        width: 30px;
    }

    .carousel-indicator .nav img {
        width: 15px;
    }

    .carousel-track {
        -webkit-animation: marqueeScroll 25s linear infinite;
        animation: marqueeScroll 25s linear infinite;
    }
}

@media (max-width: 340px) {
    .specialization .course-card {
        flex: 0 0 100%;
        max-width: 290px;
        height: 380px;
    }

    .specialization .course-card .topimg {
        height: 380px;
        object-fit: cover;
    }

    .card-top h3,
    .card-overlay h3 {
        font-size: 18px;
        line-height: 22px;
    }

    .roles,
    .bestfortag,
    .bestfor {
        font-size: 12px;
        line-height: 16px;
    }

    .specialization .card-overlay,
    .specialization .card-top {
        padding: 20px 20px 25px 20px;
    }

    .arrow {
        top: 20px;
        right: 20px;
    }

    .course-card.active a,
    .card-overlay .explorebtn {
        font-size: 12px;
        line-height: 30px;
        color: #fff;
        text-decoration: none;

    }

    .card-overlay .explorebtn2 {
        width: auto;
        height: auto;
        padding: 0 15px;
    }

    .carousel-indicator {
        margin-top: 16px;
    }

    .carousel-track {
        -webkit-animation: marqueeScroll 20s linear infinite;
        animation: marqueeScroll 20s linear infinite;
    }
}