.ats-course-database {
    --ch-green: #0E9F4B;
    --ch-green-dark: #067A38;
    --ch-green-accent: #22C55E;
    --ch-green-light: #F0FFF4;
    --ch-text: #17211b;
    --ch-muted: #68756e;
    --ch-border: #e5ebe7;
    --ch-white: #ffffff;

    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 72px;
    color: var(--ch-text);
    font-family: Poppins, Inter, Arial, sans-serif;
}

.ats-course-database *,
.ats-course-database *::before,
.ats-course-database *::after {
    box-sizing: border-box;
}

/* =========================================================
   HERO
   ========================================================= */

.ats-course-database__header {
    text-align: center;
    max-width: 940px;
    margin: 0 auto 34px;
}

.ats-course-database__eyebrow {
    margin: 0 0 13px;
    color: var(--ch-green);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ats-course-database__title {
    margin: 0;
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 800;
    color: var(--ch-text);
}

.ats-course-database__title-prefix,
.ats-course-database__title-suffix {
    display: inline;
}

.ats-course-database__title-count {
    color: var(--ch-green);
    display: inline;
}

.ats-course-database__intro {
    max-width: 720px;
    margin: 17px auto 0;
    color: var(--ch-muted);
    font-size: 16px;
    line-height: 1.75;
    font-weight: 400;
}

.ats-course-database__seo-intro {
    max-width: 780px;
    margin: 30px auto 0;
    padding: 22px 28px;
    border: 1px solid #dceee3;
    border-radius: 16px;
    background: linear-gradient(
        180deg,
        #f7fff9 0%,
        #ffffff 100%
    );
}

.ats-course-database__seo-intro h2 {
    margin: 0 0 9px;
    color: var(--ch-green-dark);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 750;
    letter-spacing: -.02em;
}

.ats-course-database__seo-intro p {
    margin: 0;
    color: #66736b;
    font-size: 13px;
    line-height: 1.8;
    font-weight: 400;
}

/* =========================================================
   FILTERS
   ========================================================= */

.ats-course-database__filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px auto;
    gap: 12px;
    align-items: center;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid var(--ch-border);
    border-radius: 16px;
    background: var(--ch-white);
    box-shadow: 0 8px 30px rgba(17, 47, 29, .05);
}

.ats-course-database__search input,
.ats-course-database__category select {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid #dfe7e2;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: var(--ch-text);
    font-family: inherit;
    font-size: 14px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.ats-course-database__search input::placeholder {
    color: #9aa59f;
}

.ats-course-database__search input:focus,
.ats-course-database__category select:focus {
    border-color: var(--ch-green);
    box-shadow: 0 0 0 3px rgba(14, 159, 75, .12);
}

.ats-course-database__category {
    position: relative;
}

.ats-course-database__category::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 17px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--ch-green-dark);
    border-bottom: 2px solid var(--ch-green-dark);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.ats-course-database__category select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    cursor: pointer;
}

.ats-course-database__filter-button {
    height: 48px;
    min-width: 150px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: var(--ch-green);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.ats-course-database__filter-button:hover {
    background: var(--ch-green-dark);
    box-shadow: 0 7px 18px rgba(14, 159, 75, .2);
    transform: translateY(-1px);
}

.ats-course-database__filter-button:focus-visible {
    outline: 3px solid rgba(34, 197, 94, .3);
    outline-offset: 2px;
}

.ats-course-database__filter-button:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

/* =========================================================
   TABLE
   ========================================================= */

.ats-course-database__table-wrap {
    overflow: hidden;
    border: 1px solid var(--ch-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(17, 47, 29, .055);
}

.ats-course-database__table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.ats-course-database__table th {
    padding: 15px 20px;
    border-bottom: 1px solid var(--ch-border);
    background: #f8fbf9;
    color: #647069;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: .09em;
    text-align: left;
    text-transform: uppercase;
}

.ats-course-database__table th:first-child {
    width: 63%;
}

.ats-course-database__table th:nth-child(2) {
    width: 22%;
}

.ats-course-database__table th:nth-child(3) {
    width: 15%;
}

.ats-course-database__row {
    cursor: pointer;
    transition: background .18s ease;
}

.ats-course-database__row:hover {
    background: #fbfefc;
}

.ats-course-database__row:focus-visible {
    outline: 2px solid var(--ch-green);
    outline-offset: -2px;
}

.ats-course-database__row td {
    padding: 13px 20px;
    border-bottom: 1px solid #edf1ee;
    vertical-align: middle;
}

.ats-course-database__row:last-child td {
    border-bottom: 0;
}

.ats-course-database__course-link {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.ats-course-database__thumbnail {
    display: block;
    flex: 0 0 82px;
    width: 82px;
    height: 58px;
    overflow: hidden;
    border-radius: 8px;
    background: #eef5f0;
}

.ats-course-database__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ats-course-database__thumbnail-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(
            135deg,
            #eef8f1 0%,
            #dcefe2 100%
        );
}

.ats-course-database__course-title {
    min-width: 0;
    color: #1a261f;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 650;
    transition: color .18s ease;
}

.ats-course-database__row:hover .ats-course-database__course-title {
    color: var(--ch-green-dark);
}

.ats-course-database__category-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--ch-green-light);
    color: var(--ch-green-dark);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ats-course-database__category-empty {
    color: #a1aaa5;
}

.ats-course-database__date {
    color: #718078;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.ats-course-database__pagination {
    display: flex;
    justify-content: center;
    margin: 28px 0 0;
}

.ats-course-database__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 3px;
    padding: 0 9px;
    border: 1px solid #e0e8e3;
    border-radius: 9px;
    background: #fff;
    color: #53615a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition:
        border-color .18s ease,
        background .18s ease,
        color .18s ease;
}

.ats-course-database__pagination .page-numbers:hover {
    border-color: var(--ch-green);
    color: var(--ch-green-dark);
}

.ats-course-database__pagination .page-numbers.current {
    border-color: var(--ch-green);
    background: var(--ch-green);
    color: #fff;
}

.ats-course-database__pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
}

/* =========================================================
   EMPTY / LOADING
   ========================================================= */

.ats-course-database__empty {
    padding: 70px 24px;
    border: 1px solid var(--ch-border);
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.ats-course-database__empty h2 {
    margin: 0 0 8px;
    color: var(--ch-text);
    font-size: 24px;
    font-weight: 750;
}

.ats-course-database__empty p {
    margin: 0;
    color: var(--ch-muted);
    font-size: 14px;
}

.ats-course-database--loading .ats-course-database__results {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.ats-course-database .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .ats-course-database {
        width: min(100% - 20px, 620px);
        padding: 30px 0 48px;
    }

    .ats-course-database__header {
        margin-bottom: 24px;
    }

    .ats-course-database__eyebrow {
        margin-bottom: 10px;
        font-size: 9px;
        letter-spacing: .14em;
    }

    .ats-course-database__title {
        font-size: 32px;
        line-height: 1.1;
    }

    .ats-course-database__intro {
        margin-top: 13px;
        font-size: 13px;
        line-height: 1.65;
    }

    .ats-course-database__seo-intro {
        display: none;
    }

    .ats-course-database__filters {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 11px;
        margin-bottom: 18px;
        border-radius: 13px;
    }

    .ats-course-database__filter-button {
        width: 100%;
    }

    .ats-course-database__table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .ats-course-database__table,
    .ats-course-database__table tbody {
        display: block;
        width: 100%;
    }

    .ats-course-database__table thead {
        display: none;
    }

    .ats-course-database__row {
        display: block;
        width: 100%;
        margin-bottom: 9px;
        border: 1px solid var(--ch-border);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(17, 47, 29, .035);
    }

    .ats-course-database__row:last-child {
        margin-bottom: 0;
    }

    .ats-course-database__row td {
        display: none;
        border: 0;
    }

    .ats-course-database__row td:first-child {
        display: block;
        padding: 10px;
    }

    .ats-course-database__course-link {
        gap: 11px;
    }

    .ats-course-database__thumbnail {
        flex-basis: 74px;
        width: 74px;
        height: 54px;
        border-radius: 7px;
    }

    .ats-course-database__course-title {
        font-size: 12.5px;
        line-height: 1.38;
    }

    .ats-course-database__course-link::after {
        content: "›";
        flex: 0 0 auto;
        margin-left: auto;
        color: #a0aaa4;
        font-size: 22px;
        line-height: 1;
    }

    .ats-course-database__pagination {
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 22px;
    }

    .ats-course-database__pagination .page-numbers {
        min-width: 34px;
        height: 34px;
        margin: 0;
        font-size: 11px;
    }
}

@media (min-width: 768px) {

    .ats-course-database__filters {
        position: relative;
        z-index: 2;
    }
}
