
.catalog-page {
    background: #f1f9fd;
}

.catalog-page .site-container {
    width: calc(100% - 40px);
    max-width: 1304px;
}

.catalog-hero {
    min-height: 150px;
    padding-top: 12px;
    background: #d7f1fc url("../images/catalog-hero-v2.png") center / cover no-repeat;
}

.catalog-hero h1 {
    margin: 0;
    padding-left: 60px;
    color: #091e42;
    font-size: 40px;
    line-height: 1.3;
}

.catalog-hero p {
    margin: 0;
    padding-left: 62px;
    color: #294365;
    font-size: 19px;
}

.catalog-container {
    position: relative;
    padding-bottom: 16px;
}

.catalog-search-row {
    display: flex;
    position: relative;
    align-items: center;
    gap: 20px;
    margin: -62px 8% 12px;
}

.catalog-search {
    display: flex;
    min-width: 0;
    height: 44px;
    flex: 1;
    align-items: center;
    padding-left: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid #98caff;
    border-radius: 24px;
}

.catalog-search > .knv-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: #7d90ad;
}

.catalog-search input[type="search"] {
    width: 0;
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0 12px;
    color: #19355c;
    background: transparent;
    border: 0;
    outline-offset: -3px;
    font-size: 14px;
}

.catalog-search button {
    height: 100%;
    min-width: 110px;
    color: white;
    background: #087cff;
    border: 0;
    font-size: 14px;
    cursor: pointer;
}

.catalog-filter-toggle {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    color: #006bef;
    background: white;
    border: 0;
    border-radius: 8px;
    white-space: nowrap;
    cursor: pointer;
}

.catalog-filter-toggle__mobile {
    display: none;
}

.catalog-types {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 10px 8px;
    background: #fafdff;
    border: 0;
    border-radius: 8px 8px 0 0;
}

.catalog-types a {
    display: flex;
    min-width: 0;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 4px;
    background: white;
    font-size: 14px;
}

.catalog-types img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    object-fit: contain;
}

.catalog-filters {
    padding: 10px 18px 8px;
    background: white;
    border-radius: 8px;
}

.catalog-filter-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 24px;
    align-items: start;
    gap: 6px;
    margin-bottom: 5px;
}

.catalog-filter-row h2 {
    margin: 0;
    color: #405c83;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
}

.catalog-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.catalog-filters.is-enhanced .catalog-filter-options:not(.is-expanded) {
    max-height: 24px;
    overflow: hidden;
}

.catalog-filter-options a {
    min-width: 62px;
    height: 24px;
    padding: 2px 14px;
    color: #5a7398;
    background: #eef7fc;
    border-radius: 4px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    white-space: nowrap;
}

.catalog-filter-options a[aria-current] {
    color: white;
    background: #087cff;
}

.catalog-filter-options a:hover {
    box-shadow: inset 0 0 0 1px #1689ff;
}

.catalog-expand-row {
    width: 24px;
    height: 24px;
    padding: 0;
    color: #587397;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.catalog-expand-row[aria-expanded="true"] {
    transform: rotate(180deg);
}

.catalog-advanced {
    margin-top: 6px;
}

.catalog-advanced summary {
    width: fit-content;
    margin-left: auto;
    color: #087cff;
    font-size: 12px;
    cursor: pointer;
}

.catalog-advanced form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    padding-top: 12px;
}

.catalog-advanced label {
    display: grid;
    gap: 6px;
    color: #405c83;
    font-size: 12px;
}

.catalog-advanced select {
    width: 180px;
    min-height: 34px;
    border: 1px solid #cddfed;
    border-radius: 4px;
}

.catalog-advanced button {
    min-height: 34px;
    padding: 0 16px;
    color: white;
    background: #087cff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.catalog-toolbar {
    min-height: 46px;
    gap: 16px;
    margin-top: 2px;
    border: 0;
}

.catalog-sort {
    display: flex;
    gap: 30px;
}

.catalog-sort a {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    color: #4b6388;
    font-size: 14px;
}

.catalog-sort a[aria-current] {
    color: #087cff;
    font-weight: 700;
}

.catalog-sort a[aria-current]::after {
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 3px;
    background: #087cff;
    border-radius: 2px;
    content: "";
}

.catalog-toolbar .catalog-count {
    margin-left: auto;
    color: #5a7398;
    font-size: 12px;
    font-weight: 400;
}

.catalog-views {
    display: flex;
    gap: 6px;
}

.catalog-views a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #5a7398;
    border-radius: 4px;
}

.catalog-views a[aria-current] {
    color: #087cff;
    background: #dfedff;
}

.catalog-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    padding-top: 0;
}

.catalog-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    padding: 10px 14px;
    background: white;
    border-radius: 8px;
}

.catalog-card--fixture {
    min-height: 142px;
}

.catalog-card__cover {
    display: block;
    width: 104px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
}

.catalog-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.catalog-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #00aab8;
    background: #edf7fb;
}

.catalog-card__body {
    position: relative;
    min-width: 0;
}

.catalog-card h2 {
    display: -webkit-box;
    min-height: 44px;
    padding-right: 82px;
    margin: 3px 0 6px;
    overflow: hidden;
    color: #0b2348;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalog-card h2 a {
    color: inherit;
}

.catalog-card__access {
    position: absolute;
    top: 0;
    right: 0;
    max-width: 74px;
    padding: 2px 10px;
    color: #577598;
    background: #eaf2fc;
    border-radius: 14px;
    font-size: 11px;
    white-space: nowrap;
}

.catalog-card__access--free {
    color: white;
    background: #00bf91;
}

.catalog-card__access--vip {
    color: #b66b14;
    background: #ffebcc;
}

.catalog-card__tags {
    display: flex;
    gap: 5px;
    overflow: hidden;
}

.catalog-card__tags span {
    padding: 1px 5px;
    color: #408beb;
    background: #edf6ff;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.catalog-card__excerpt {
    display: none;
}

.catalog-card--fixture .catalog-card__excerpt {
    display: -webkit-box;
    margin: 7px 0 0;
    overflow: hidden;
    color: #6f84a2;
    font-size: 11px;
    line-height: 18px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.catalog-card__meta {
    display: flex;
    gap: 18px;
    margin-top: 8px;
    color: #7b90af;
    font-size: 12px;
}

.catalog-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.catalog-card__meta .knv-icon {
    width: 16px;
    height: 16px;
}

.catalog-page[data-view="list"] .catalog-results {
    grid-template-columns: 1fr;
}

.catalog-page[data-view="list"] .catalog-card__excerpt {
    display: block;
    margin: 6px 0;
    overflow: hidden;
    color: #7b90af;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-page .resource-pagination {
    padding-top: 12px;
}

.catalog-page .resource-pagination .page-numbers {
    min-width: 28px;
    min-height: 28px;
    padding: 2px 6px;
    font-size: 12px;
}

.catalog-page .resource-active-filters {
    margin-block: 8px;
}

.catalog-page .resource-active-filters a {
    min-height: 28px;
    padding: 2px 8px;
    font-size: 12px;
}

.catalog-mobile-title {
    display: none;
}

.catalog-page [hidden] {
    display: none !important;
}

@media (width >= 768px) and (width <= 1100px) {
    .catalog-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-hero h1, .catalog-hero p {
        padding-left: 20px;
    }
}

@media (width <= 767px) {
    .post-type-archive-knv_resource {
        padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }

    .post-type-archive-knv_resource .site-header__main {
        min-height: 58px;
        grid-template-columns: 88px minmax(0, 1fr) 60px;
        gap: 6px;
    }

    .post-type-archive-knv_resource .site-search {
        display: none;
    }

    .post-type-archive-knv_resource .catalog-mobile-title {
        display: block;
        text-align: center;
    }

    .catalog-mobile-title strong {
        font-size: 18px;
        color: #0b2348;
    }

    .catalog-mobile-title small {
        display: block;
        font-size: 10px;
        color: #7b90af;
        white-space: nowrap;
    }

    .catalog-page .site-container {
        width: calc(100% - 24px);
    }

    .catalog-hero {
        min-height: 0;
        padding: 0;
        background: none;
    }

    .catalog-hero .site-container {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .catalog-search-row {
        gap: 8px;
        margin: 8px 0 12px;
    }

    .catalog-search {
        height: 46px;
        padding-left: 14px;
    }

    .catalog-search input[type="search"] {
        padding: 0 7px;
        font-size: 13px;
    }

    .catalog-search button {
        min-width: 66px;
        margin: 3px;
        height: 36px;
        border-radius: 18px;
        font-size: 13px;
    }

    .catalog-filter-toggle {
        height: 46px;
        padding: 0 12px;
        gap: 4px;
        font-size: 13px;
        border-radius: 18px;
    }

    .catalog-filter-toggle .knv-icon {
        width: 18px;
        height: 18px;
    }

    .catalog-filter-toggle__desktop {
        display: none;
    }

    .catalog-filter-toggle__mobile {
        display: inline;
    }

    .catalog-types {
        gap: 4px;
        padding: 5px 4px;
        border-radius: 8px;
    }

    .catalog-types a {
        min-height: 62px;
        flex-direction: column;
        gap: 3px;
        padding: 3px 1px;
        background: #edf6fd;
        font-size: 11px;
    }

    .catalog-types img {
        width: 28px;
        height: 28px;
    }

    .catalog-filters {
        margin-top: 8px;
        padding: 12px 10px;
    }

    .catalog-filter-row {
        grid-template-columns: 72px minmax(0, 1fr) 20px;
        gap: 5px;
        margin-bottom: 6px;
    }

    .catalog-filter-row h2 {
        font-size: 12px;
        line-height: 28px;
        white-space: nowrap;
    }

    .catalog-filter-options {
        gap: 4px;
    }

    .catalog-filter-options a {
        min-width: 44px;
        height: 28px;
        padding: 3px 8px;
        font-size: 11px;
        line-height: 22px;
    }

    .catalog-filters.is-enhanced .catalog-filter-options:not(.is-expanded) {
        max-height: 28px;
    }

    .catalog-expand-row {
        width: 20px;
        height: 28px;
    }

    .catalog-advanced summary {
        font-size: 11px;
    }

    .catalog-advanced select {
        width: 132px;
    }

    .catalog-toolbar {
        min-height: 54px;
        gap: 8px;
    }

    .catalog-sort {
        gap: 20px;
    }

    .catalog-sort a {
        min-height: 50px;
        font-size: 13px;
    }

    .catalog-toolbar .catalog-count {
        font-size: 11px;
    }

    .catalog-views {
        display: none;
    }

    .catalog-results {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .catalog-card {
        min-height: 150px;
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 14px;
        padding: 12px;
    }

    .catalog-card__cover {
        width: 86px;
        height: 116px;
    }

    .catalog-card h2 {
        min-height: 44px;
        padding-right: 72px;
        margin: 0 0 6px;
        font-size: 15px;
        line-height: 22px;
    }

    .catalog-card__access {
        max-width: 58px;
        padding: 1px 6px;
        font-size: 11px;
    }

    .catalog-card__tags {
        gap: 3px;
    }

    .catalog-card__tags span {
        padding: 0 3px;
        font-size: 10px;
    }

    .catalog-card__excerpt {
        display: -webkit-box;
        overflow: hidden;
        margin: 4px 0 0;
        color: #7b90af;
        font-size: 11px;
        line-height: 17px;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .catalog-card__meta {
        gap: 12px;
        margin-top: 8px;
        font-size: 11px;
    }

    .catalog-card__meta .knv-icon {
        width: 13px;
        height: 13px;
    }
}
