.bivb-home-news,
.bivb-home-news *,
.bivb-home-news *::before,
.bivb-home-news *::after,
.bivb-home-news-select2-dropdown,
.bivb-home-news-select2-dropdown * {
    box-sizing: border-box;
}

.bivb-home-news {
    width: 100%;
    max-width: 55.625em;
    margin-inline: auto;
    background: var(--bivb-color-surface);
    color: var(--bivb-color-text);
    font-family: var(--bivb-font-family-base-stack);
}

.bivb-home-news__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5em;
}

.bivb-home-news--guest .bivb-home-news__header {
    margin-bottom: 1.75em;
}

.bivb-home-news__title {
    margin: 0;
    color: var(--bivb-color-text);
    font-size: 1.75em;
    font-weight: var(--bivb-font-weight-bold);
    line-height: 1.2;
}

.bivb-home-news__all-link {
    display: inline-flex;
    min-height: 2.5em;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 0.625em 1.125em;
    border: 1px solid var(--bivb-color-border-black-20);
    border-radius: var(--bivb-radius-50);
    color: var(--bivb-color-text);
    font-size: 0.75em;
    font-weight: var(--bivb-font-weight-bold);
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.bivb-home-news__all-link:hover {
    border-color: var(--bivb-color-primary);
    color: var(--bivb-color-primary);
}

.bivb-home-news__all-link:focus-visible,
.bivb-home-news__card:focus-visible,
.bivb-home-news__filter-chip:focus-visible,
.bivb-home-news .paginationjs-pages button:focus-visible {
    outline: var(--bivb-control-focus-width) solid var(--bivb-color-primary);
    outline-offset: var(--bivb-control-focus-offset);
}

.bivb-home-news__all-link > img {
    display: block;
    width: 0.6667em;
    height: 1em;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.bivb-home-news__all-link:hover > img {
    transform: translateX(0.25em);
}

.bivb-home-news__all-link-label--mobile {
    display: none;
}

.bivb-home-news__filter-bar {
    display: flex;
    min-height: 3.5em;
    align-items: center;
    gap: 0.75em;
    padding: 0.75em 1em;
    margin-top: 1.25em;
    border-radius: var(--bivb-radius-4);
    background: var(--bivb-color-surface-muted);
}

.bivb-home-news__filter-field {
    width: 14.25em;
    flex: 0 0 14.25em;
}

.bivb-home-news__filter-field > .select2-container {
    display: block;
    width: 100% !important;
}

.bivb-home-news__filter-field .select2-container--default .select2-selection--multiple {
    position: relative;
    min-height: 2.125em;
    padding: 0;
    border: 1px solid var(--bivb-color-input-border);
    border-radius: var(--bivb-radius-4);
    background: var(--bivb-color-surface);
    cursor: pointer;
}

.bivb-home-news__filter-field .select2-container--default.select2-container--focus .select2-selection--multiple,
.bivb-home-news__filter-field .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: var(--bivb-color-primary);
    outline: var(--bivb-control-focus-width) solid var(--bivb-color-primary-alpha-18);
}

.bivb-home-news__filter-field .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple,
.bivb-home-news__filter-field .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-radius: var(--bivb-radius-4);
}

.bivb-home-news__filter-field .select2-selection--multiple::after {
    position: absolute;
    top: 50%;
    right: 0.875em;
    width: 0.75em;
    height: 0.75em;
    background: url("../../assets/img/chevron-down.svg") center / contain no-repeat;
    content: "";
    pointer-events: none;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.bivb-home-news__filter-field .select2-container--open .select2-selection--multiple::after {
    transform: translateY(-50%) rotate(180deg);
}

.bivb-home-news__filter-field .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    min-height: 2em;
    align-items: center;
    padding: 0 2.5em 0 0.75em;
    margin: 0;
}

.bivb-home-news__filter-field .select2-container--default .select2-selection--multiple .select2-selection__choice,
.bivb-home-news__filter-field .select2-container--default .select2-selection--multiple .select2-search--inline {
    display: none;
}

.bivb-home-news__filter-summary {
    min-width: 0;
    overflow: hidden;
    color: var(--bivb-color-text);
    font-size: 0.875em;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bivb-home-news__filter-chips {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.5em;
}

.bivb-home-news__filter-chips:empty {
    display: none;
}

.bivb-home-news__filter-chip {
    display: inline-flex;
    min-height: 2em;
    align-items: center;
    gap: 0.625em;
    padding: 0.375em 0.625em;
    border: 0;
    border-radius: var(--bivb-radius-4);
    background: var(--bivb-color-surface-elevated);
    color: var(--bivb-color-text-meta);
    font: inherit;
    font-size: 0.8125em;
    line-height: 1;
    cursor: pointer;
}

.bivb-home-news__filter-chip:hover {
    color: var(--bivb-color-primary);
}

.bivb-home-news__filter-chip > img {
    display: block;
    width: 0.75em;
    height: 0.75em;
    flex: 0 0 auto;
}

.bivb-home-news__feed {
    display: grid;
    margin-top: 1.25em;
}

.bivb-home-news__item {
    min-width: 0;
    border-top: 1px solid var(--bivb-color-border-light);
}

.bivb-home-news__item:first-child {
    border-top: 0;
}

.bivb-home-news__card {
    display: grid;
    min-width: 0;
    grid-template-columns: 14.5em minmax(0, 1fr);
    align-items: start;
    gap: 2em;
    padding-block: 1.25em;
    color: inherit;
    text-decoration: none;
}

.bivb-home-news__item--no-media .bivb-home-news__card {
    grid-template-columns: minmax(0, 1fr);
}

.bivb-home-news__media {
    display: flex;
    width: 100%;
    min-width: 0;
    aspect-ratio: 116 / 71;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--bivb-radius-6);
    background: var(--bivb-color-surface-muted);
}

.bivb-home-news__media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bivb-home-news__media--icon {
    background: var(--bivb-color-surface-elevated);
}

.bivb-home-news__media--icon > img {
    width: 3em;
    height: 3em;
    object-fit: contain;
}

.bivb-home-news__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding-block: 0.125em;
}

.bivb-home-news__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    color: var(--bivb-color-text-meta);
    font-size: 0.8125em;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1.35;
}

.bivb-home-news__item-title {
    margin: 0.375em 0 0;
    color: var(--bivb-color-text);
    font-size: 1.125em;
    font-weight: var(--bivb-font-weight-bold);
    line-height: 1.3;
}

.bivb-home-news__card:hover .bivb-home-news__item-title {
    color: var(--bivb-color-primary);
}

.bivb-home-news__excerpt {
    display: block;
    margin-top: 0.625em;
    color: var(--bivb-color-text-meta);
    font-size: 0.9375em;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1.45;
}

.bivb-home-news__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: auto;
    padding-top: 0.875em;
}

.bivb-home-news__tag {
    display: inline-flex;
    min-height: 1.75em;
    align-items: center;
    padding: 0.25em 0.625em;
    border: 1px solid var(--bivb-color-primary);
    border-radius: var(--bivb-radius-50);
    color: var(--bivb-color-primary);
    font-size: 0.6875em;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1;
}

.bivb-home-news__empty {
    padding: 2.5em 1em;
    margin: 1.25em 0 0;
    color: var(--bivb-color-text-muted);
    text-align: center;
}

.bivb-home-news__empty[hidden],
.bivb-home-news__pagination[hidden] {
    display: none;
}

.bivb-home-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.75em;
}

.bivb-home-news__pagination .paginationjs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--bivb-font-family-base-stack);
    line-height: 1;
}

.bivb-home-news__pagination .paginationjs-pages,
.bivb-home-news__pagination .paginationjs-pages ul {
    display: flex;
    align-items: center;
    gap: 0.375em;
    padding: 0;
    margin: 0;
}

.bivb-home-news__pagination .paginationjs-pages li {
    padding: 0;
    margin: 0;
    border: 0;
    list-style: none;
}

.bivb-home-news__pagination .paginationjs-pages li > button {
    display: flex;
    width: 2.25em;
    height: 2.25em;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--bivb-radius-full);
    background: transparent;
    color: var(--bivb-color-text);
    font-family: var(--bivb-font-family-base-stack);
    font-size: 0.875em;
    font-weight: var(--bivb-font-weight-regular);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.bivb-home-news__pagination .paginationjs-pages li > button:hover {
    background: var(--bivb-color-primary-alpha-08);
    color: var(--bivb-color-primary);
}

.bivb-home-news__pagination .paginationjs-pages li.active > button {
    background: var(--bivb-color-primary);
    color: var(--bivb-color-text-inverse);
    cursor: default;
}

.bivb-home-news__pagination .paginationjs-pages li.disabled > button {
    opacity: 0.35;
    cursor: default;
}

.bivb-home-news__pagination .paginationjs-pages li > button > img {
    display: block;
    width: 0.5em;
    height: 0.875em;
}

.bivb-home-news__pagination .paginationjs-prev img {
    transform: rotate(180deg);
}

.bivb-home-news-select2-dropdown {
    overflow: hidden;
    border: 1px solid var(--bivb-color-input-border) !important;
    border-radius: var(--bivb-radius-4) !important;
    background: var(--bivb-color-surface);
    box-shadow: 0 0.5em 1em var(--bivb-shadow-color-black-12);
    color: var(--bivb-color-text);
    font-family: var(--bivb-font-family-base-stack);
}

.bivb-home-news-select2-dropdown.select2-dropdown--below {
    margin-top: 0.375em;
}

.bivb-home-news-select2-dropdown.select2-dropdown--above {
    margin-bottom: 0.375em;
}

.bivb-home-news-select2-dropdown .select2-results__options {
    max-height: none;
    padding: 0.375em 0;
}

.bivb-home-news-select2-dropdown .select2-results__option {
    display: flex;
    min-height: 2.5em;
    align-items: center;
    padding: 0.5em 1.25em;
    background: var(--bivb-color-surface);
    color: var(--bivb-color-text);
    font-size: 0.875em;
}

.select2-container--default .bivb-home-news-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--bivb-color-primary-alpha-08);
    color: var(--bivb-color-text);
}

.select2-container--default .bivb-home-news-select2-dropdown .select2-results__option--selected {
    background: var(--bivb-color-surface);
    color: var(--bivb-color-text);
}

.select2-container--default .bivb-home-news-select2-dropdown .select2-results__option--selected.select2-results__option--highlighted {
    background: var(--bivb-color-primary-alpha-08);
    color: var(--bivb-color-text);
}

.bivb-home-news__filter-option {
    display: flex;
    align-items: center;
    gap: 0.875em;
}

.bivb-home-news__filter-option > input {
    width: 1.375em;
    height: 1.375em;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--bivb-color-primary);
    pointer-events: none;
}

.bivb-home-news-select2-dropdown__clear {
    display: flex;
    width: 100%;
    min-height: 3.3333em;
    align-items: center;
    justify-content: flex-end;
    padding: 0.625em 1.25em;
    border: 0;
    background: var(--bivb-color-surface);
    color: var(--bivb-color-primary);
    font-family: var(--bivb-font-family-base-stack);
    font-size: 0.75em;
    font-weight: var(--bivb-font-weight-medium);
    line-height: 1;
    cursor: pointer;
}

.bivb-home-news-select2-dropdown__clear:hover,
.bivb-home-news-select2-dropdown__clear:focus-visible {
    background: var(--bivb-color-primary-alpha-08);
}

.bivb-home-news-select2-dropdown__clear:focus-visible {
    outline: var(--bivb-control-focus-width) solid var(--bivb-color-primary);
    outline-offset: calc(-1 * var(--bivb-control-focus-width));
}

.bivb-home-news-select2-dropdown__clear:disabled {
    background: var(--bivb-color-surface);
    color: var(--bivb-color-text-muted);
    cursor: default;
}

@media (max-width: 767px) {
    .bivb-home-news {
        padding: 1.75em 1em 2em;
    }

    .bivb-home-news__header {
        flex-wrap: wrap;
        gap: 1em;
        margin-bottom: 1.25em;
    }

    .bivb-home-news__title {
        font-size: 1.375em;
    }

    .bivb-home-news__all-link {
        min-width: 11.25em;
        min-height: 3.75em;
        gap: 1em;
        padding: 0.625em 1.125em;
        border: 1px solid var(--bivb-color-border-black-20);
        border-radius: var(--bivb-radius-50);
        font-size: 0.75em;
    }

    .bivb-home-news__all-link-label--desktop {
        display: none;
    }

    .bivb-home-news__all-link-label--mobile {
        display: inline;
    }

    .bivb-home-news__filter-bar {
        display: none;
    }

    .bivb-home-news__feed {
        margin-top: 0;
    }

    .bivb-home-news__card {
        display: block;
        padding-block: 1.25em;
    }

    .bivb-home-news__media {
        aspect-ratio: 37 / 18;
        margin-bottom: 1.125em;
    }

    .bivb-home-news__content {
        padding-block: 0;
    }

    .bivb-home-news__meta {
        font-size: 0.75em;
        font-weight: var(--bivb-font-weight-medium);
        text-transform: uppercase;
    }

    .bivb-home-news__item-title {
        margin-top: 0.5em;
        font-size: 1em;
    }

    .bivb-home-news__excerpt {
        margin-top: 0.75em;
        font-size: 0.875em;
        line-height: 1.5;
    }

    .bivb-home-news__tags {
        margin-top: 0.875em;
        padding-top: 0;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .bivb-home-news {
        padding: 2em 2.1875em 2.5em;
    }
}

@media (min-width: 1025px) {
    .bivb-home-news {
        padding: 2em 3.125em 2.5em;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .bivb-home-news {
        padding: 2em 3.125em 2.5em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bivb-home-news__all-link > img,
    .bivb-home-news__filter-field .select2-selection--multiple::after {
        transition: none;
    }
}
