/* =========================================
   FOSTER ACADEMY - POPULAR COURSES
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --course-navy: #071f43;
    --course-gold: #e5b000;
    --course-grey: #66758b;
    --course-bg: #f5f7fa;
    --course-white: #ffffff;
}

/* MAIN SECTION */

.popular-courses {
    width: 100%;
    padding: 75px 20px 90px;
    background: var(--course-bg);
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.popular-courses * {
    box-sizing: border-box;
}

.popular-courses .container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* =========================================
   SECTION HEADING
========================================= */

.popular-courses .courses-heading {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 55px;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* BADGE */

.popular-courses .heading-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    background: #fff2c7;
    color: #b98a00;

    padding: 11px 22px;
    border-radius: 50px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;

    margin-bottom: 38px;
}

.popular-courses .heading-tag span {
    color: #d5a500;
}

/* MAIN TITLE */

.popular-courses .courses-heading h1 {
    display: block;
    width: 100%;

    margin: 0 0 20px;
    padding: 0;

    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: -1.8px;

    color: var(--course-navy);
    text-align: center;
}

.popular-courses .courses-heading h1 span {
    color: var(--course-gold);
}

/* DESCRIPTION */

.popular-courses .courses-heading p {
    max-width: 850px;
    width: 100%;

    margin: 0 auto;
    padding: 0;

    font-size: 18px;
    font-weight: 400;
    line-height: 1.9;

    color: var(--course-grey);
    text-align: center;
}

/* =========================================
   SEARCH BOX
========================================= */

.course-search-wrapper {
    max-width: 650px;
    width: 100%;
    margin: 0 auto 30px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 15px;

    width: 100%;
    min-height: 58px;

    background: var(--course-white);
    border: 1px solid #e4e8ef;
    border-radius: 12px;

    padding: 0 20px;

    box-shadow: 0 5px 20px rgba(7, 31, 67, 0.04);

    transition: 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--course-gold);
    box-shadow: 0 5px 20px rgba(229, 176, 0, 0.12);
}

.search-box i {
    color: var(--course-gold);
    font-size: 18px;
}

.search-box input {
    flex: 1;
    width: 100%;
    height: 55px;

    border: none;
    outline: none;

    background: transparent;

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--course-navy);
}

.search-box input::placeholder {
    color: #9aa4b3;
}

/* =========================================
   CATEGORY FILTERS
========================================= */

.filter-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 12px;
    margin-bottom: 30px;
}

.filter-button {
    padding: 11px 22px;

    background: #ffffff;
    border: 1px solid #e1e6ed;
    border-radius: 50px;

    color: #526178;

    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background: #fff4ce;
    border-color: var(--course-gold);
    color: var(--course-navy);
}

.filter-button.is-active {
    background: var(--course-navy);
    border-color: var(--course-navy);
    color: #ffffff;
}

/* =========================================
   RESULTS COUNT
========================================= */

.results-count {
    margin-bottom: 22px;

    color: var(--course-grey);

    font-size: 14px;
    font-weight: 500;
}

/* =========================================
   COURSE GRID
========================================= */

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* COURSE CARD */

.course-card {
    min-width: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    background: var(--course-white);

    border: 1px solid #e9edf2;
    border-radius: 16px;

    box-shadow: 0 6px 25px rgba(7, 31, 67, 0.05);

    transition: transform 0.35s ease,
                box-shadow 0.35s ease;

    animation: cardAppear 0.5s ease both;
}

.course-card:hover {
    transform: translateY(-8px);

    box-shadow: 0 15px 35px rgba(7, 31, 67, 0.12);
}

/* COURSE IMAGE */

.course-image {
    position: relative;

    width: 100%;
    height: 220px;

    overflow: hidden;
    background: #e8edf4;
}

.course-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.06);
}

/* CATEGORY LABEL */

.course-category {
    position: absolute;
    left: 15px;
    bottom: 15px;

    padding: 7px 12px;

    background: #fff2c7;
    color: #9a7400;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

/* COURSE NUMBER */

.course-number {
    position: absolute;
    top: 15px;
    right: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    background: rgba(7, 31, 67, 0.85);
    color: #ffffff;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 700;
}

/* COURSE CONTENT */

.course-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 24px;
}

.course-content h3 {
    margin: 0 0 13px;

    color: var(--course-navy);

    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
}

.course-content p {
    margin: 0 0 18px;

    color: #718096;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.9;
}

/* COURSE TOOLS */

.course-tools {
    width: 100%;

    padding: 12px 0;
    margin-top: auto;
    margin-bottom: 18px;

    border-top: 1px solid #edf0f4;

    color: #66758b;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.8;
}

/* ENQUIRY LINK */
/* ENQUIRY LINK - COURSE CARDS ONLY */

.popular-course-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 11px 18px;

    background: var(--course-navy);
    color: #ffffff !important;

    border-radius: 7px;

    text-decoration: none !important;

    font-size: 12px;
    font-weight: 600;

    transition: all 0.3s ease;
}

.popular-course-link:hover {
    background: var(--course-gold);
    color: var(--course-navy) !important;
}

.popular-course-link i {
    transition: transform 0.3s ease;
}

.popular-course-link:hover i {
    transform: translateX(5px);
}
/* =========================================
   EMPTY SEARCH RESULT
========================================= */

.empty-state {
    padding: 65px 20px;
    text-align: center;

    background: #ffffff;
    border-radius: 15px;

    margin-top: 25px;
}

.empty-state[hidden] {
    display: none !important;
}

.empty-state > i {
    color: var(--course-gold);
    font-size: 40px;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--course-navy);
    font-size: 22px;
    margin: 0 0 10px;
}

.empty-state p {
    color: var(--course-grey);
    font-size: 14px;
}

.empty-state button {
    margin-top: 15px;

    padding: 11px 22px;

    background: var(--course-navy);
    color: #ffffff;

    border: none;
    border-radius: 7px;

    font-family: 'Poppins', sans-serif;
    font-weight: 600;

    cursor: pointer;
}

.empty-state button:hover {
    background: var(--course-gold);
    color: var(--course-navy);
}

/* =========================================
   ANIMATION
========================================= */

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   TABLET RESPONSIVE
========================================= */

@media (max-width: 992px) {

    .course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .popular-courses {
        padding: 65px 20px 70px;
    }

    .popular-courses .courses-heading h1 {
        font-size: 44px;
    }

}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 600px) {

    .popular-courses {
        padding: 50px 16px 55px;
    }

    .popular-courses .courses-heading {
        margin-bottom: 35px;
    }

    .popular-courses .heading-tag {
        padding: 10px 17px;
        font-size: 10px;
        letter-spacing: 1.5px;
        margin-bottom: 25px;
    }

    .popular-courses .courses-heading h1 {
        font-size: 31px;
        line-height: 1.3;
        letter-spacing: -0.8px;
        margin-bottom: 15px;
    }

    .popular-courses .courses-heading p {
        font-size: 14px;
        line-height: 1.8;
    }

    .course-search-wrapper {
        margin-bottom: 22px;
    }

    .search-box {
        min-height: 52px;
        padding: 0 15px;
    }

    .search-box input {
        height: 50px;
        font-size: 12px;
    }

    .filter-list {
        gap: 8px;
        margin-bottom: 25px;
    }

    .filter-button {
        padding: 9px 14px;
        font-size: 11px;
    }

    .course-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .course-image {
        height: 215px;
    }

    .course-content {
        padding: 20px;
    }

    .course-content h3 {
        font-size: 19px;
    }

    .results-count {
        font-size: 12px;
    }

}

/* SMALL MOBILE */

@media (max-width: 360px) {

    .popular-courses .courses-heading h1 {
        font-size: 27px;
    }

    .course-image {
        height: 185px;
    }

}