
:root {
    --primary: #173b70;
    --secondary: #6654d9;
    --accent: #eaf0ff;
    --text: #202b3c;
    --muted: #68758a;
    --white: #ffffff;
    --border: #e5eaf2;
    --shadow: 0 8px 28px rgba(23, 59, 112, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #f7f9fd;
}

.courses-page {
    min-height: 100vh;
}

.courses-hero {
    padding: 65px 20px 75px;
    text-align: center;
    color: var(--white);
    background: linear-gradient(135deg, #173b70, #6654d9);
}

.hero-tag {
    display: inline-block;
    padding: 8px 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.courses-hero h1 {
    margin: 0 0 15px;
    font-size: clamp(30px, 5vw, 46px);
}

.courses-hero p {
    max-width: 650px;
    margin: auto;
    line-height: 1.8;
    color: #eef1ff;
    font-size: 16px;
}

.courses-container {
    width: min(1180px, 92%);
    margin: -25px auto 60px;
    position: relative;
}

.courses-heading {
    padding: 30px 0 20px;
}

.section-label {
    color: var(--secondary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.courses-heading h2 {
    margin: 9px 0;
    color: var(--primary);
    font-size: clamp(25px, 4vw, 34px);
}

.courses-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.course-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    padding: 0 18px;
    margin: 12px 0 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.course-search i {
    color: var(--secondary);
}

.course-search input {
    width: 100%;
    min-width: 0;
    padding: 17px 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

.course-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 11px 17px;
    border: 1px solid #dce3f0;
    border-radius: 30px;
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: .25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.course-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(26, 49, 89, .045);
    transition: transform .25s ease, box-shadow .25s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: #d4d9ff;
}

.course-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border-radius: 15px;
    background: var(--accent);
    color: var(--secondary);
    font-size: 25px;
}

.course-category {
    margin-bottom: 9px;
    color: var(--secondary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.course-card h3 {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 23px;
}

.course-card > p {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
    flex: 1;
}

.course-footer {
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.course-footer > span {
    display: block;
    margin-bottom: 17px;
    color: var(--muted);
    font-size: 12px;
}

.course-footer > span i {
    margin-right: 5px;
    color: var(--secondary);
}

.course-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.course-link i {
    color: var(--secondary);
    transition: transform .2s ease;
}

.course-link:hover i {
    transform: translateX(5px);
}

.course-card[hidden] {
    display: none;
}

.no-results[hidden] {
    display: none;
}

.no-results {
    padding: 50px 20px;
    text-align: center;
    color: var(--muted);
}

.no-results > i {
    color: var(--secondary);
    font-size: 35px;
}

.no-results h3 {
    color: var(--primary);
}

@media (max-width: 900px) {
    .courses-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .course-card {
        padding: 22px;
    }
}

@media (max-width: 600px) {
    .courses-hero {
        padding: 48px 18px 65px;
    }

    .courses-hero p {
        font-size: 14px;
    }

    .courses-container {
        width: 92%;
    }

    .courses-heading {
        padding-top: 24px;
    }

    .course-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-btn {
        flex: 0 0 auto;
        padding: 10px 14px;
        font-size: 12px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .course-card {
        padding: 23px;
    }

    .course-search input {
        font-size: 14px;
    }
}
