﻿/* ===============================
   COURSE SECTION
================================ */

.course-section {
    background: #f5f7fb;
    padding: 70px 0;
}

    /*.course-section .container {
        max-width: 1140px;*/ /* keeps left-right breathing space */
    /*}*/

/* ===============================
   SECTION HEADER
================================ */

.section-title {
    font-size: 30px;
    font-weight: 700;
    color: #111827;
}

.section-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-top: 10px;
}

/* ===============================
   FILTER BUTTONS
================================ */

.filter-wrapper {
    margin-top: 25px;
    margin-bottom: 45px;
}

.filter-btn {
    background: #e5e7eb;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    margin: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .filter-btn:hover {
        background: #d1d5db;
    }

    .filter-btn.active {
        background: #4f46e5;
        color: #fff;
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
    }

/* ===============================
   COURSE CARD
================================ */

.course-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 90%;
    display: flex;
    flex-direction: column;
}

    .course-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    }

/* ===============================
   IMAGE
================================ */

.course-img-wrapper {
    position: relative;
    height: 180px; /* compact height */
    overflow: hidden;
}

    .course-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

.course-card:hover img {
    transform: scale(1.05);
}

/* ===============================
   CATEGORY BADGE
================================ */

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
}

/* ===============================
   CARD BODY
================================ */

.course-body {
    padding: 18px;
    flex-grow: 1;
}

.course-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.course-features {
    padding-left: 18px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 0;
}

    .course-features li {
        margin-bottom: 5px;
    }

        .course-features li::marker {
            color: #4f46e5;
        }

/* ===============================
   CARD FOOTER
================================ */

.course-footer {
    padding: 15px 18px 18px;
    border-top: 1px solid #f1f1f1;
}

.course-price {
    font-size: 14px;
    font-weight: 600;
    color: #4f46e5;
}

.course-link {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    transition: 0.3s ease;
}

    .course-link:hover {
        color: #4f46e5;
    }

/*    for media*/
/* =====================================
   MOBILE RESPONSIVE FIXES
===================================== */

@media (max-width: 991px) {

    .course-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .section-subtitle {
        font-size: 14px;
        padding: 0 10px;
    }

    .filter-wrapper {
        margin-top: 20px;
        margin-bottom: 35px;
    }

    .filter-btn {
        font-size: 12px;
        padding: 6px 14px;
        margin: 4px;
    }

    /* Slightly reduce image height */
    .course-img-wrapper {
        height: 160px;
    }

    .course-body {
        padding: 15px;
    }

    .course-title {
        font-size: 15px;
    }

    .course-features {
        font-size: 12px;
    }

    .course-footer {
        padding: 12px 15px 15px;
    }
}

/* Extra Small Devices (Mobile under 576px) */

@media (max-width: 575px) {

    .course-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section-title {
        font-size: 22px;
    }

    .filter-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Make footer stack vertically */
    .course-footer {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .course-img-wrapper {
        height: 150px;
    }
}
