/**
 * Udemy-Style Course Cards
 * Clean, modern, information-rich design
 */

/* Course Card Container */
.courses__item {
    background: #ffffff00;
    border: 1px solid #D1D7DC;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: none !important;
}

.courses__item:hover {
    box-shadow: 0 2px 29px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Thumbnail Section */
.courses__item-thumb {
    position: relative;
    overflow: hidden;
    background: #F7F9FA;
    aspect-ratio: 16/9;
}

.courses__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.courses__item:hover .courses__item-thumb img {
    transform: scale(1.05);
}

/* Wishlist Button - Udemy Style */
.courses__wishlist-two {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.courses__wishlist-two:hover {
    background: #FFFFFF;
    transform: scale(1.1);
}

.courses__wishlist-two i {
    font-size: 16px;
    color: #1C1D1F;
}

.courses__wishlist-two i.fas {
    color: #EC5252;
}

/* Content Section */
.courses__item-content {
    /* padding: 12px; */
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Meta Information (Category + Rating) */
.courses__item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 8px;
}

.courses__item-tag {
    margin: 0;
}

.courses__item-tag a {
    color: #6A6F73;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.courses__item-tag a:hover {
    color: #1C1D1F;
}

/* Rating - Udemy Style */
.courses__item-meta .avg-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1C1D1F;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.courses__item-meta .avg-rating i {
    color: #F69C08;
    font-size: 13px;
}

/* Course Title */
.courses__item-content .title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #1C1D1F;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Cairo', 'beIN', sans-serif;
}

.courses__item-content .title a {
    color: #1C1D1F;
    text-decoration: none;
    transition: color 0.2s ease;
}

.courses__item-content .title a:hover {
    color: #5624D0;
}

/* Instructor Name */
.courses__item-content .author {
    margin: 0;
    font-size: 12px;
    color: #6A6F73;
    font-weight: 400;
}

.courses__item-content .author a {
    color: #6A6F73;
    text-decoration: none;
    transition: color 0.2s ease;
}

.courses__item-content .author a:hover {
    color: #1C1D1F;
}

/* Bottom Section (Button + Price) */
.courses__item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

/* Action Button - Udemy Style */
.courses__item-bottom .button {
    /* flex: 1; */
    max-width: 120px;
}

.courses__item-bottom .button a {
    display: inline-block;
    border: 1px solid #1C1D1F;
    color: #1C1D1F;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Cairo', 'beIN', sans-serif;
    white-space: nowrap;
}

.courses__item-bottom .button a:hover {
    background: #1C1D1F;
    color: #FFFFFF;
}

/* Add to Cart Button */
.courses__item-bottom .add-to-cart {
    background: #A435F0;
    border-color: #A435F0;
    color: #FFFFFF;
}

.courses__item-bottom .add-to-cart:hover {
    background: #8710D8;
    border-color: #8710D8;
}

/* Enrolled Button */
.courses__item-bottom .already-enrolled-btn {
    background: #19A59E;
    border-color: #19A59E;
    color: #FFFFFF;
}

.courses__item-bottom .already-enrolled-btn:hover {
    background: #138A84;
    border-color: #138A84;
}

/* Price - Udemy Style */
.courses__item-bottom .price {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #1C1D1F;
    font-family: 'Cairo', 'beIN', sans-serif;
    white-space: nowrap;
}

/* Free Course Badge */
.courses__item-bottom .price:contains("Free") {
    color: #19A59E;
}

/* Bestseller Badge (if you want to add it later) */
.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ECEB98;
    color: #3D3C0A;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 2px;
    z-index: 2;
}

/* Course Stats (Duration, Students, etc.) - Optional Enhancement */
.course-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6A6F73;
    margin-top: 4px;
}

.course-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-stats i {
    font-size: 12px;
}

/* Original Price Strikethrough */
.price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-original {
    font-size: 14px;
    font-weight: 400;
    color: #6A6F73;
    text-decoration: line-through;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .courses__item-content .title {
        font-size: 15px;
        min-height: 42px;
    }

    .courses__item-bottom .price {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .courses__item-content {
        padding: 16px;
    }

    .courses__item-content .title {
        font-size: 14px;
        min-height: 40px;
    }

    .courses__item-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .courses__item-bottom .button {
        max-width: 100%;
        width: 100%;
    }

    .courses__item-bottom .button a {
        width: 100%;
        display: block;
    }
}

/* RTL Support */
[dir="rtl"] .courses__wishlist-two {
    right: auto;
    left: 12px;
}

[dir="rtl"] .course-badge {
    left: auto;
    right: 12px;
}
