/*==========================================
            Courses Section
==========================================*/

.courses {
    padding: 90px 0;
    background: #f8fafc;
}

/*==========================
        Section Title
==========================*/

.section-title {
    margin-bottom: 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef4ff;
    color: #0d6efd;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
}

.section-title h2 {
    font-size: 34px;
    font-weight: 800;
    margin: 18px 0 12px;
    color: #222;
}

.section-title p {
    color: #777;
    font-size: 15px;
    max-width: 650px;
    margin: auto;
    line-height: 2;
}

/*==========================
        Slick Slider
==========================*/

.course-carousel {
    margin: 0;
    overflow: visible !important;
    padding: 0 30px;
    position: relative;
}

.course-carousel .slick-slide {
    padding: 10px;
}

.course-carousel .slick-track {
    display: flex;
}

.course-carousel .slick-slide > div {
    height: 100%;
}

/*==========================
        Slick Arrows - RTL Fix (جهت فلش‌ها عوض شد)
==========================*/

/* ====== ریست کامل فلش‌ها ====== */
.slick-prev,
.slick-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    border: 2px solid #0d6efd !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

/* ====== فلش چپ (رفتن به قبلی) ====== */
.slick-prev {
    right: -25px !important;   /* ← راست برای RTL */
    left: auto !important;
}

/* ====== فلش راست (رفتن به بعدی) ====== */
.slick-next {
    left: -25px !important;    /* ← چپ برای RTL */
    right: auto !important;
}

/* ====== هاور فلش‌ها ====== */
.slick-prev:hover,
.slick-next:hover {
    background: #0d6efd !important;
    box-shadow: 0 8px 30px rgba(13, 110, 253, 0.4) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

/* ====== آیکون فلش‌ها ====== */
.slick-prev:before,
.slick-next:before {
    font-family: 'slick' !important;
    font-size: 24px !important;
    color: #0d6efd !important;
    opacity: 1 !important;
    transition: all 0.3s !important;
}

.slick-prev:hover:before,
.slick-next:hover:before {
    color: #ffffff !important;
}

/* ====== برای RTL فلش‌ها رو برعکس کن ====== */
.slick-slider[dir="rtl"] .slick-prev {
    right: -25px !important;
    left: auto !important;
}

.slick-slider[dir="rtl"] .slick-next {
    left: -25px !important;
    right: auto !important;
}

/*==========================
        Slick Dots
==========================*/

.slick-dots {
    bottom: -45px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 0 !important;
    list-style: none !important;
    position: relative !important;
}

.slick-dots li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}

.slick-dots li button {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #d1d9e6 !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    font-size: 0 !important;
}

.slick-dots li button:before {
    display: none !important;
}

.slick-dots li.slick-active button {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    transform: scale(1.2) !important;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.4) !important;
}

.slick-dots li button:hover {
    background: #0d6efd !important;
    transform: scale(1.1) !important;
}

/*==========================
        Course Card
==========================*/

.course-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: 0.35s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

/*==========================
        Course Image
==========================*/

.course-image {
    position: relative;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: 0.45s;
}

.course-card:hover .course-image img {
    transform: scale(1.08);
}

/*==========================
        Discount Ribbon
==========================*/

.discount-badge {
    position: absolute;
    top: 18px;
    left: -38px;
    width: 120px;
    background: #ff4757;
    color: #fff;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 700;
    transform: rotate(-45deg);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

/*==========================
        Course Body
==========================*/

.course-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/*==========================
        Rating
==========================*/

.course-rate {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.course-rate i {
    color: #ffc107;
    margin-left: 4px;
}

/*==========================
        Title
==========================*/

.course-title,
.course-body h4 {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    line-height: 1.8;
    margin-bottom: 15px;
}

/*==========================
        Categories
==========================*/

.course-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.course-categories span {
    background: #eef5ff;
    color: #0d6efd;
    border: 1px solid #dce8ff;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 11px;
    transition: 0.3s;
}

.course-categories span:hover {
    background: #0d6efd;
    color: #fff;
}

/*==========================
        Meta
==========================*/

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    color: #666;
    font-size: 13px;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-meta i {
    color: #0d6efd;
}

/*==========================
        Price
==========================*/

.course-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    margin-bottom: 18px;
}

.price {
    color: #0d6efd;
    font-size: 18px;
    font-weight: 800;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 13px;
}

/*==========================
        Button
==========================*/

.btn-course {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #0d6efd;
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-course:hover {
    background: #084298;
    color: #fff;
}

/*==========================
        Responsive
==========================*/

@media (max-width: 1200px) {
    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 992px) {
    .course-image img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 26px;
    }

    .section-title p {
        font-size: 14px;
    }

    .course-image img {
        height: 170px;
    }

    .course-carousel {
        padding: 0 15px;
    }

    /* ====== فلش‌ها در موبایل ====== */
    .slick-prev {
        right: -12px !important;
        left: auto !important;
        width: 36px !important;
        height: 36px !important;
    }

    .slick-next {
        left: -12px !important;
        right: auto !important;
        width: 36px !important;
        height: 36px !important;
    }

    .slick-slider[dir="rtl"] .slick-prev {
        right: -12px !important;
        left: auto !important;
    }

    .slick-slider[dir="rtl"] .slick-next {
        left: -12px !important;
        right: auto !important;
    }

    .slick-prev:before,
    .slick-next:before {
        font-size: 18px !important;
    }

    .slick-dots {
        bottom: -35px !important;
        gap: 6px !important;
    }

    .slick-dots li button {
        width: 10px !important;
        height: 10px !important;
    }
}

@media (max-width: 576px) {
    .course-body {
        padding: 15px;
    }

    .course-title {
        font-size: 16px;
    }

    .price {
        font-size: 16px;
    }
}