.ainpa-lms-catalog {
    --ainpa-lms-bg: #fbf7f6;
    --ainpa-lms-surface: #ffffff;
    --ainpa-lms-border: #ead9d5;
    --ainpa-lms-border-soft: #f3e8e5;
    --ainpa-lms-text: #10213a;
    --ainpa-lms-muted: #59677c;
    --ainpa-lms-muted-2: #7d8797;
    --ainpa-lms-primary: #9a0000;
    --ainpa-lms-primary-strong: #760000;
    --ainpa-lms-green: #1e9e55;
    --ainpa-lms-green-soft: #e8f7ee;
    --ainpa-lms-blue-soft: #fff0ee;
    --ainpa-lms-purple: #7d1722;
    --ainpa-lms-purple-soft: #fff0ee;
    --ainpa-lms-orange: #c86d12;
    --ainpa-lms-orange-soft: #fff4e8;
    --ainpa-lms-radius: 8px;
    --ainpa-lms-shadow: 0 18px 42px rgba(92, 18, 18, .09);
    --ainpa-lms-font: Inter, Figtree, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ainpa-lms-catalog {
    background: var(--ainpa-lms-bg);
    color: var(--ainpa-lms-text);
    direction: ltr;
    font-family: var(--ainpa-lms-font);
    min-height: 100vh;
    padding: 26px clamp(18px, 4vw, 52px) 36px;
}

.ainpa-lms-catalog *,
.ainpa-lms-catalog *::before,
.ainpa-lms-catalog *::after {
    box-sizing: border-box;
}

.ainpa-lms-shell {
    margin: 0 auto;
    max-width: 1180px;
}

.ainpa-lms-page-head {
    margin-bottom: 18px;
}

.ainpa-lms-breadcrumb {
    align-items: center;
    color: var(--ainpa-lms-muted);
    display: flex;
    font-size: 14px;
    gap: 12px;
    margin-bottom: 12px;
}

.ainpa-lms-breadcrumb a {
    color: var(--ainpa-lms-primary);
    font-weight: 700;
    text-decoration: none;
}

.ainpa-lms-page-head h1 {
    color: var(--ainpa-lms-text);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 0 8px;
}

.ainpa-lms-page-head p {
    color: var(--ainpa-lms-muted);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.ainpa-lms-filter-panel {
    align-items: end;
    background: var(--ainpa-lms-surface);
    border: 1px solid var(--ainpa-lms-border);
    border-radius: var(--ainpa-lms-radius);
    box-shadow: var(--ainpa-lms-shadow);
    display: grid;
    gap: 26px;
    grid-template-columns: minmax(280px, 1fr) 170px 170px 150px;
    margin: 18px 0 18px;
    padding: 16px;
}

.ainpa-lms-filter-panel label {
    color: var(--ainpa-lms-text);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
}

.ainpa-lms-filter-panel input,
.ainpa-lms-filter-panel select {
    appearance: none;
    background: #fff;
    border: 1px solid var(--ainpa-lms-border);
    border-radius: 6px;
    color: var(--ainpa-lms-text);
    font: inherit;
    font-size: 14px;
    min-height: 46px;
    outline: 0;
    padding: 0 14px;
    transition: border-color .16s ease, box-shadow .16s ease;
    width: 100%;
}

.ainpa-lms-filter-panel select {
    background-image: linear-gradient(45deg, transparent 50%, #7d1722 50%), linear-gradient(135deg, #7d1722 50%, transparent 50%);
    background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 36px;
}

.ainpa-lms-filter-panel input:focus,
.ainpa-lms-filter-panel select:focus {
    border-color: var(--ainpa-lms-primary);
    box-shadow: 0 0 0 3px rgba(15, 99, 215, .12);
}

.ainpa-lms-search-field {
    position: relative;
}

.ainpa-lms-search-field > span {
    border: 2px solid #7d8797;
    border-radius: 999px;
    height: 17px;
    left: 15px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    z-index: 1;
}

.ainpa-lms-search-field > span::after {
    background: #7d8797;
    border-radius: 999px;
    content: "";
    height: 7px;
    left: 12px;
    position: absolute;
    top: 12px;
    transform: rotate(-45deg);
    width: 2px;
}

.ainpa-lms-search-field input {
    padding-left: 44px;
}

.ainpa-lms-active-filters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 12px;
}

.ainpa-lms-active-filters strong {
    font-size: 15px;
    margin-right: 10px;
}

.ainpa-lms-active-filters button {
    background: #fff0ee;
    border: 0;
    border-radius: 6px;
    color: #9a0000;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    min-height: 30px;
    padding: 0 11px;
}

.ainpa-lms-active-filters .ainpa-lms-clear {
    background: transparent;
    color: var(--ainpa-lms-primary);
    font-weight: 700;
}

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

.ainpa-lms-course-card {
    background: var(--ainpa-lms-surface);
    border: 1px solid var(--ainpa-lms-border);
    border-radius: var(--ainpa-lms-radius);
    box-shadow: 0 10px 24px rgba(15, 35, 75, .06);
    display: flex;
    flex-direction: column;
    min-height: 255px;
    overflow: hidden;
}

.ainpa-lms-card-media {
    background: #edf2f8;
    display: block;
    height: 150px;
    overflow: hidden;
    text-decoration: none;
}

.ainpa-lms-card-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ainpa-lms-image-fallback {
    align-items: center;
    background: linear-gradient(135deg, #fff0ee, #ffffff);
    color: var(--ainpa-lms-primary);
    display: flex;
    font-size: 22px;
    font-weight: 850;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.ainpa-lms-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 11px 13px 9px;
}

.ainpa-lms-category {
    align-self: flex-start;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.ainpa-lms-category.is-blue {
    color: var(--ainpa-lms-primary);
}

.ainpa-lms-category.is-purple {
    color: var(--ainpa-lms-purple);
}

.ainpa-lms-category.is-orange {
    color: var(--ainpa-lms-orange);
}

.ainpa-lms-category.is-green {
    color: #087d63;
}

.ainpa-lms-course-card h3 {
    font-size: 17px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0 0 9px;
}

.ainpa-lms-course-card h3 a {
    color: var(--ainpa-lms-text);
    text-decoration: none;
}

.ainpa-lms-course-card h3 a:hover,
.ainpa-lms-course-card h3 a:focus {
    color: var(--ainpa-lms-primary);
}

.ainpa-lms-author {
    align-items: center;
    color: var(--ainpa-lms-muted);
    display: flex;
    font-size: 12px;
    gap: 7px;
    margin-bottom: 12px;
}

.ainpa-lms-avatar {
    align-items: center;
    background: #102033;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.ainpa-lms-meta {
    align-items: center;
    color: #566278;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 14px;
    margin-bottom: 12px;
}

.ainpa-lms-meta span {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    white-space: nowrap;
}

.ainpa-lms-meta i {
    border: 1.8px solid #8a95a7;
    border-radius: 4px;
    display: inline-block;
    height: 14px;
    position: relative;
    width: 14px;
}

.ainpa-lms-meta span:nth-child(2) i {
    border-radius: 999px;
}

.ainpa-lms-meta span:nth-child(3) i {
    border-bottom: 0;
    border-left-color: transparent;
    border-right-color: transparent;
    height: 15px;
    transform: translateY(1px);
}

.ainpa-lms-card-foot {
    align-items: end;
    border-top: 1px solid var(--ainpa-lms-border-soft);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(110px, 1fr) auto;
    margin-top: auto;
    padding-top: 10px;
}

.ainpa-lms-state {
    border-radius: 5px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    min-height: 24px;
    padding: 5px 10px;
}

.ainpa-lms-state.is-neutral {
    background: #f2f4f7;
    color: #485365;
}

.ainpa-lms-state.is-progress,
.ainpa-lms-state.is-completed {
    background: var(--ainpa-lms-green-soft);
    color: #157b43;
}

.ainpa-lms-progress-copy {
    color: #667285;
    display: inline-block;
    font-size: 12px;
    margin-left: 10px;
}

.ainpa-lms-progress-track {
    background: #dfe5eb;
    border-radius: 999px;
    height: 5px;
    margin-top: 6px;
    max-width: 120px;
    overflow: hidden;
}

.ainpa-lms-progress-track span {
    background: #39a935;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.ainpa-lms-card-action {
    align-items: center;
    border: 1px solid var(--ainpa-lms-primary);
    border-radius: 6px;
    color: var(--ainpa-lms-primary);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    justify-content: center;
    min-height: 32px;
    min-width: 104px;
    padding: 0 13px;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
    white-space: nowrap;
}

.ainpa-lms-card-action:hover,
.ainpa-lms-card-action:focus {
    background: var(--ainpa-lms-primary);
    color: #fff;
}

.ainpa-lms-pagination {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.ainpa-lms-pagination button,
.ainpa-lms-page-gap {
    align-items: center;
    background: var(--ainpa-lms-surface);
    border: 1px solid var(--ainpa-lms-border);
    border-radius: 6px;
    color: var(--ainpa-lms-text);
    display: inline-flex;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 12px;
}

.ainpa-lms-pagination button {
    cursor: pointer;
}

.ainpa-lms-pagination button.is-active {
    background: var(--ainpa-lms-primary);
    border-color: var(--ainpa-lms-primary);
    color: #fff;
}

.ainpa-lms-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.ainpa-lms-loading,
.ainpa-lms-error,
.ainpa-lms-empty {
    background: var(--ainpa-lms-surface);
    border: 1px solid var(--ainpa-lms-border);
    border-radius: var(--ainpa-lms-radius);
    color: var(--ainpa-lms-muted);
    grid-column: 1 / -1;
    padding: 32px;
    text-align: center;
}

.ainpa-lms-catalog.is-loading {
    cursor: progress;
}

.ainpa-lms-catalog :is(a, button, input, select):focus-visible {
    outline: 3px solid rgba(154, 0, 0, .28);
    outline-offset: 3px;
}

body:has(.ainpa-lms-catalog) .art-theme-footer {
    margin-inline: 0;
    width: 100%;
}

@media (max-width: 900px) {
    html:has(.ainpa-lms-catalog),
    body:has(.ainpa-lms-catalog) {
        max-width: 100%;
        overflow-x: hidden;
    }

    body:has(.ainpa-lms-catalog) .art-header-menu-row {
        max-width: 100vw;
        min-width: 0;
    }

    body:has(.ainpa-lms-catalog) .art-header-latest-wrap,
    body:has(.ainpa-lms-catalog) .art-header-latest-menu {
        max-width: 100%;
        min-width: 0;
        position: static !important;
    }

    body:has(.ainpa-lms-catalog) .art-header-mega {
        inset-inline: 14px !important;
        max-width: none !important;
        top: calc(100% + 8px) !important;
        width: auto !important;
    }
}

@media (max-width: 1060px) {
    .ainpa-lms-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .ainpa-lms-search-field {
        grid-column: 1 / -1;
    }

    .ainpa-lms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ainpa-lms-catalog {
        padding: 18px 14px 28px;
    }

    .ainpa-lms-page-head h1 {
        font-size: clamp(28px, 9vw, 36px);
    }

    .ainpa-lms-page-head p {
        font-size: 15px;
    }

    .ainpa-lms-filter-panel {
        gap: 14px;
        padding: 14px;
    }

    .ainpa-lms-filter-panel,
    .ainpa-lms-grid {
        grid-template-columns: 1fr;
    }

    .ainpa-lms-card-media {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .ainpa-lms-card-foot {
        grid-template-columns: 1fr;
    }

    .ainpa-lms-card-action {
        min-height: 44px;
        width: 100%;
    }

    .ainpa-lms-pagination {
        flex-wrap: wrap;
    }

    .ainpa-lms-pagination button,
    .ainpa-lms-page-gap {
        height: 44px;
        min-width: 44px;
    }
}
