/* ── Courses Listing Page (Modern) ───────────────────────────────────── */

.cl-hero {
    background: linear-gradient(135deg, var(--primary-50, #eef3ff) 0%, #f5f3ff 100%);
    padding: 50px 0 40px;
    position: relative;
    overflow: hidden;
}
.cl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 280px at 90% 10%, rgba(124,58,237,.10), transparent 60%),
        radial-gradient(500px 230px at 0% 100%, rgba(62, 100, 222,.08), transparent 60%);
    pointer-events: none;
}
.cl-hero-inner { position: relative; z-index: 1; }
.cl-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--ink-500, #64748b);
}
.cl-breadcrumb a { color: var(--ink-500, #64748b); text-decoration: none; transition: color .2s; }
.cl-breadcrumb a:hover { color: var(--primary-700, #395bca); }
.cl-breadcrumb .sep { opacity: .5; }
.cl-breadcrumb .active { color: var(--ink-900, #0f172a); font-weight: 600; }

.cl-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 8px;
    line-height: 1.2;
}
.cl-subtitle {
    color: var(--ink-600, #475569);
    font-size: 15px;
    margin: 0 0 22px;
    line-height: 1.6;
}

/* Search bar in hero */
.cl-search-form {
    display: flex;
    gap: 0;
    max-width: 600px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(15,23,42,.08));
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,23,42,.04));
}
.cl-search-form input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    color: var(--ink-900);
}
.cl-search-form button {
    background: var(--grad-primary, linear-gradient(135deg,#3e64de 0%,#00263e 100%));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.cl-search-form button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(62, 100, 222,.3); }

/* ── Layout ──────────────────────────────────────────────────────────── */
.cl-layout {
    padding: 40px 0 60px;
}
.cl-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sidebar filters */
.cl-filter-side {
    position: sticky;
    top: 90px;
}
.cl-filter-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(15,23,42,.08));
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.cl-filter-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.cl-filter-title i { color: var(--primary-700, #395bca); }

.cl-radio-list { display: flex; flex-direction: column; gap: 4px; }
.cl-radio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--ink-700, #334155);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: start;
    font-family: inherit;
}
.cl-radio:hover { background: var(--ink-50, #f8fafc); }
.cl-radio.active {
    background: var(--primary-50, #eef3ff);
    color: var(--primary-700, #395bca);
    font-weight: 700;
}
.cl-radio .count {
    font-size: 11px;
    color: var(--ink-400, #94a3b8);
    background: var(--ink-50, #f8fafc);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.cl-radio.active .count { background: var(--primary-100, #e0e7ff); color: var(--primary-700, #395bca); }

.cl-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-500, #64748b);
    font-size: 12px;
    text-decoration: none;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all .15s;
}
.cl-clear:hover { background: #fef2f2; color: #ef4444; }

/* Toolbar */
.cl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(15,23,42,.08));
    border-radius: 14px;
}
.cl-results-count {
    font-size: 13px;
    color: var(--ink-600, #475569);
}
.cl-results-count strong { color: var(--ink-900, #0f172a); font-weight: 800; }

.cl-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cl-sort label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-500, #64748b);
    margin: 0;
}
.cl-sort select {
    padding: 8px 14px;
    border: 1px solid var(--border-strong, rgba(15,23,42,.12));
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700, #334155);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}
.cl-sort select:focus { border-color: var(--primary-600, #3e64de); }

/* Mobile filter toggle */
.cl-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-strong, rgba(15,23,42,.12));
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-700, #334155);
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}
.cl-filter-toggle i { color: var(--primary-700, #395bca); }

/* Active filter chips */
.cl-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.cl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-50, #eef3ff);
    color: var(--primary-700, #395bca);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.cl-chip:hover { background: var(--primary-100, #e0e7ff); color: var(--primary-800, #3730a3); }
.cl-chip i { font-size: 12px; }

/* Empty state */
.cl-empty {
    background: var(--surface, #fff);
    border: 1px dashed var(--border-strong, rgba(15,23,42,.12));
    border-radius: 18px;
    padding: 60px 30px;
    text-align: center;
}
.cl-empty .ico {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: var(--primary-50, #eef3ff);
    color: var(--primary-700, #395bca);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 18px;
}
.cl-empty h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink-900, #0f172a);
    margin: 0 0 8px;
}
.cl-empty p {
    color: var(--ink-500, #64748b);
    font-size: 14px;
    margin: 0 0 22px;
}
.cl-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grad-primary, linear-gradient(135deg,#3e64de 0%,#00263e 100%));
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all .2s;
}
.cl-empty .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(62, 100, 222,.3); color: #fff; }

/* Pagination */
.cl-pagination { display: flex; justify-content: center; margin-top: 36px; }
.cl-pagination .pagination {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.cl-pagination .page-link {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid var(--border, rgba(15,23,42,.08));
    color: var(--ink-700, #334155);
    font-size: 13px;
    font-weight: 600;
    background: var(--surface, #fff);
    transition: all .2s;
}
.cl-pagination .page-link:hover {
    background: var(--primary-50, #eef3ff);
    border-color: var(--primary-200, #c7d2fe);
    color: var(--primary-700, #395bca);
}
.cl-pagination .page-item.active .page-link {
    background: var(--grad-primary, linear-gradient(135deg,#3e64de 0%,#00263e 100%));
    border-color: transparent;
    color: #fff;
}
.cl-pagination .page-item.disabled .page-link { opacity: .5; }

/* Mobile */
@media (max-width: 991px) {
    .cl-layout-grid { grid-template-columns: 1fr; gap: 18px; }
    .cl-filter-side {
        position: fixed;
        top: 0;
        inset-inline-end: -340px;
        width: 320px;
        height: 100vh;
        background: var(--surface, #fff);
        z-index: 1200;
        padding: 18px;
        overflow-y: auto;
        transition: inset-inline-end .3s var(--ease, cubic-bezier(.2,.7,.2,1));
        box-shadow: -10px 0 32px rgba(0,0,0,.15);
    }
    .cl-filter-side.open { inset-inline-end: 0; }
    .cl-filter-toggle { display: inline-flex; }
    .cl-filter-bg {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.5);
        z-index: 1100;
    }
    .cl-filter-bg.open { display: block; }
    .cl-filter-mobile-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border);
    }
    .cl-filter-mobile-head h4 { margin: 0; font-size: 16px; font-weight: 800; }
    .cl-filter-mobile-close {
        background: var(--ink-50, #f8fafc);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        cursor: pointer;
    }
}
@media (min-width: 992px) {
    .cl-filter-mobile-head, .cl-filter-mobile-close { display: none; }
}

/* ── Refinements (polish pass) ────────────────────────────────────────────── */

/* Filter cards: more depth + subtle hover */
.cl-filter-card {
    transition: all .2s var(--ease, cubic-bezier(.2,.7,.2,1));
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.cl-filter-card:hover {
    border-color: var(--primary-100, #e0e7ff);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(15,23,42,.06));
}

/* Filter title: more prominent */
.cl-filter-title {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border, rgba(15,23,42,.05));
    display: flex;
    align-items: center;
    gap: 10px;
}
.cl-filter-title i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-50, #eef3ff);
    color: var(--primary-700, #395bca);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* Radio: better active state with check indicator */
.cl-radio {
    position: relative;
    transition: all .15s var(--ease, cubic-bezier(.2,.7,.2,1));
    padding-inline-start: 12px;
}
.cl-radio::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1.5px solid var(--ink-300, #cbd5e1);
    background: #fff;
    flex-shrink: 0;
    transition: all .2s;
    position: relative;
}
.cl-radio:hover::before { border-color: var(--primary-400, #818cf8); }
.cl-radio.active::before {
    border-color: var(--primary-600, #3e64de);
    background: var(--primary-600, #3e64de);
    box-shadow: 0 0 0 3px rgba(62, 100, 222,.15), inset 0 0 0 3px #fff;
}

/* Radio active: stronger background gradient */
.cl-radio.active {
    background: linear-gradient(135deg, var(--primary-50, #eef3ff) 0%, #f5f3ff 100%);
    color: var(--primary-700, #395bca);
    font-weight: 700;
    border: 1px solid var(--primary-100, #e0e7ff);
}

/* Radio: better hover */
.cl-radio:hover { background: var(--ink-50, #f8fafc); }

/* Radio with count: improved spacing */
.cl-radio span:first-of-type { flex: 1; }
.cl-radio .count {
    background: rgba(255,255,255,.7);
    border: 1px solid var(--border, rgba(15,23,42,.06));
    color: var(--ink-600, #475569);
    font-size: 10.5px;
    padding: 2px 8px;
    min-width: 24px;
    text-align: center;
    transition: all .15s;
}
.cl-radio.active .count {
    background: #fff;
    color: var(--primary-700, #395bca);
    border-color: var(--primary-200, #c7d2fe);
    font-weight: 800;
}

/* Sticky sidebar shadow */
.cl-filter-side {
    padding-bottom: 24px;
}

/* Toolbar refinements */
.cl-toolbar {
    background: linear-gradient(135deg, #fff 0%, var(--surface-2, #f8fafc) 100%);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,23,42,.04));
}

/* Sort select: better focus */
.cl-sort select { transition: all .15s; }
.cl-sort select:hover { border-color: var(--primary-300, #a5b4fc); }
.cl-sort select:focus {
    box-shadow: 0 0 0 3px rgba(62, 100, 222,.10);
}

/* Hero search refinements */
.cl-search-form {
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(62, 100, 222,.08);
}
.cl-search-form:focus-within {
    border-color: var(--primary-300, #a5b4fc);
    box-shadow: 0 6px 20px rgba(62, 100, 222,.15);
}

/* Active filter chips: better look */
.cl-chip {
    border: 1px solid var(--primary-200, #c7d2fe);
    transition: all .15s var(--ease);
}
.cl-chip:hover {
    border-color: var(--primary-400, #818cf8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(62, 100, 222,.15);
}
.cl-chip i {
    background: rgba(62, 100, 222,.10);
    width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

/* Clear filters button */
.cl-clear {
    width: 100%;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-weight: 700;
    justify-content: center;
    transition: all .15s;
}
.cl-clear:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* Mobile filter button: better */
.cl-filter-toggle {
    background: var(--grad-primary, linear-gradient(135deg, #3e64de 0%, #00263e 100%));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(62, 100, 222,.20);
}
.cl-filter-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(62, 100, 222,.30); }
.cl-filter-toggle i { color: #fff; }

@media (max-width: 991px) {
    .cl-filter-side { padding: 0; }
    .cl-filter-side.open { padding: 18px; }
}
