/* ======================================================
   ARTICLES LIBRARY HERO
====================================================== */
.articles-library-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 128px var(--side-padding) 120px;
    overflow: hidden;
    box-sizing: border-box;
}
/* ======================================================
   BACKGROUND GLOW
====================================================== */
.articles-library-hero::before,
.articles-library-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}
/* LEFT RED GLOW */
.articles-library-hero::before {
    width: 620px;
    height: 570px;
    left: -270px;
    top: -240px;
    background:
        color-mix(
            in srgb,
            var(--primary) 18%,
            transparent
        );
    filter: blur(115px);
    opacity: .9;
}
/* RIGHT RED GLOW */
.articles-library-hero::after {
    width: 620px;
    height: 570px;
    right: -260px;
    top: -210px;
    background:
        color-mix(
            in srgb,
            var(--primary) 18%,
            transparent
        );
    filter: blur(115px);
    opacity: .9;
}
/* ======================================================
   CONTAINER
====================================================== */
.articles-library-hero__container {
    width: min(
        100%,
        var(--container, 1100px)
    );
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* ======================================================
   BREADCRUMB
====================================================== */
.articles-library-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 9px;
    color: var(--text-secondary);
    font-size: 7px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.articles-library-hero__breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition:
        color .2s var(--ease);
}
.articles-library-hero__breadcrumb a:hover {
    color: var(--primary);
}
.articles-library-hero__breadcrumb > span:last-child {
    color: var(--text);
}
/* ======================================================
   EYEBROW
====================================================== */
.articles-library-hero__eyebrow {
    display: block;
    margin-bottom: 17px;
    color: var(--primary);
    font-size: 8px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
}
/* ======================================================
   TITLE
====================================================== */
.articles-library-hero__title {
    max-width: 900px;
    margin: 0;
    color: var(--text);
    font-size:
        clamp(
            48px,
            5.3vw,
            70px
        );
    line-height: .99;
    font-weight: 800;
    letter-spacing: -.055em;
}
.articles-library-hero__title > span {
    display: block;
}
.articles-library-hero__accent {
    color: var(--primary);
}
/* ======================================================
   DESCRIPTION
====================================================== */
.articles-library-hero__description {
    max-width: 620px;
    margin:
        19px auto
        0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
}
/* ======================================================
   SEARCH
====================================================== */
.articles-library-search {
    width: min(100%, 585px);
    min-height: 46px;
    margin-top: 25px;
    padding:
        5px
        6px
        5px
        16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--border) 75%,
            transparent
        );
    border-radius: 13px;
    background:
        color-mix(
            in srgb,
            var(--surface) 94%,
            transparent
        );
    box-shadow:
        0 12px 25px
        color-mix(
            in srgb,
            var(--primary) 11%,
            transparent
        );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition:
        border-color .25s var(--ease),
        box-shadow .25s var(--ease),
        background .25s var(--ease);
}
.articles-library-search:focus-within {
    border-color:
        color-mix(
            in srgb,
            var(--primary) 28%,
            var(--border)
        );
    box-shadow:
        0 14px 30px
        color-mix(
            in srgb,
            var(--primary) 16%,
            transparent
        );
}
/* ======================================================
   SEARCH FIELD
====================================================== */
.articles-library-search__field {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.articles-library-search__icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--text-secondary);
    opacity: .8;
}
.articles-library-search__field input {
    width: 100%;
    min-width: 0;
    height: 35px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 11px;
    line-height: 1;
}
.articles-library-search__field input::placeholder {
    color: var(--text-secondary);
    opacity: .7;
}
/* remove browser search decoration */
.articles-library-search__field
input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}
/* ======================================================
   SEARCH BUTTON
====================================================== */
.articles-library-search__button {
    min-width: 70px;
    height: 35px;
    padding:
        0 17px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    outline: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 7px 16px
        color-mix(
            in srgb,
            var(--primary) 32%,
            transparent
        );
    transition:
        transform .25s var(--ease),
        box-shadow .25s var(--ease),
        filter .25s var(--ease);
}
.articles-library-search__button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        0 9px 20px
        color-mix(
            in srgb,
            var(--primary) 38%,
            transparent
        );
}
.articles-library-search__button:active {
    transform: translateY(0);
}
/* ======================================================
   DARK MODE
====================================================== */

html[data-theme="dark"]
.articles-library-hero::before,
html[data-theme="dark"]
.articles-library-hero::after {
    opacity: .38;
}


html[data-theme="dark"]
.articles-library-search {
    background:
        color-mix(
            in srgb,
            var(--surface) 90%,
            transparent
        );
    box-shadow:
        0 14px 30px
        rgba(0, 0, 0, .24);
}


html[data-theme="dark"]
.articles-library-search:focus-within {
    box-shadow:
        0 16px 34px
        rgba(0, 0, 0, .3);
}
/* ======================================================
   RTL
====================================================== */

html[dir="rtl"]
.articles-library-hero__breadcrumb,
html[dir="rtl"]
.articles-library-hero__eyebrow {
    letter-spacing: .06em;
}


html[dir="rtl"]
.articles-library-hero__title {
    letter-spacing: -.02em;
}


html[dir="rtl"]
.articles-library-search {
    padding:
        5px
        16px
        5px
        6px;
}


html[dir="rtl"]
.articles-library-search__field input {
    text-align: right;
}
/* ======================================================
   TABLET
====================================================== */
@media (max-width: 900px) {
    .articles-library-hero {
        min-height: 380px;
        padding-top: 55px;
    }
    .articles-library-hero__title {
        max-width: 760px;
        font-size:
            clamp(
                45px,
                7vw,
                62px
            );
    }
}
/* ======================================================
   MOBILE
====================================================== */
@media (max-width: 600px) {
    .articles-library-hero {
        min-height: auto;
        padding:
            128px
            var(--page-padding, 18px)
            60px;
    }
    .articles-library-hero::before {
        width: 420px;
        height: 420px;
        left: -260px;
        top: -150px;
        filter: blur(85px);
    }
    .articles-library-hero::after {
        width: 420px;
        height: 420px;
        right: -260px;
        top: -120px;
        filter: blur(85px);
    }
    .articles-library-hero__breadcrumb {
        gap: 7px;
        margin-bottom: 10px;
        font-size: 6px;
        letter-spacing: .14em;
    }
    .articles-library-hero__eyebrow {
        margin-bottom: 16px;
        font-size: 7px;
    }
    .articles-library-hero__title {
        max-width: 500px;
        font-size:
            clamp(
                39px,
                11vw,
                49px
            );
        line-height: 1.02;
    }
    .articles-library-hero__description {
        max-width: 460px;
        margin-top: 18px;
        font-size: 13px;
        line-height: 1.6;
    }
    .articles-library-search {
        width: 100%;
        margin-top: 24px;
        padding:
            5px
            5px
            5px
            13px;
        border-radius: 12px;
    }
    html[dir="rtl"]
    .articles-library-search {
        padding:
            5px
            13px
            5px
            5px;
    }
    .articles-library-search__field {
        gap: 8px;
    }
    .articles-library-search__field input {
        font-size: 10px;
    }
    .articles-library-search__button {
        min-width: 67px;
        padding-inline: 13px;
        font-size: 9px;
    }
}
/* ======================================================
   VERY SMALL MOBILE
====================================================== */
@media (max-width: 380px) {
    .articles-library-hero__title {
        font-size: 37px;
    }
    .articles-library-search__icon {
        display: none;
    }
}
/* ======================================================
   REDUCED MOTION
====================================================== */
@media (prefers-reduced-motion: reduce) {
    .articles-library-search,
    .articles-library-search__button,
    .articles-library-hero__breadcrumb a {
        transition: none;
    }
}
/* ======================================================
   ARTICLES CATALOG
====================================================== */
.articles-catalog {
    position: relative;
    isolation: isolate;
    padding:
        22px
        var(--page-padding, 24px)
        90px;
    background: var(--bg);
    color: var(--text);
}
/* ======================================================
   CONTAINER
====================================================== */
.articles-catalog__container {
    width: min(
        100%,
        var(--container, 1100px)
    );
    margin-inline: auto;
}
/* ======================================================
   FILTERS
====================================================== */
.articles-catalog__filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 52px;
}
.articles-filter {
    min-height: 31px;
    padding:
        0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border:
        1px solid
        var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 8px;
    line-height: 1;
    font-weight: 550;
    cursor: pointer;
    box-shadow:
        0 5px 13px
        rgba(0, 0, 0, .035);
    transition:
        color .22s var(--ease),
        background .22s var(--ease),
        border-color .22s var(--ease),
        transform .22s var(--ease),
        box-shadow .22s var(--ease);
}
.articles-filter small {
    color: inherit;
    font-size: 6px;
    opacity: .65;
}
.articles-filter:hover {
    color: var(--primary);
    border-color:
        color-mix(
            in srgb,
            var(--primary) 25%,
            var(--border)
        );
    transform: translateY(-1px);
}
.articles-filter.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow:
        0 7px 17px
        color-mix(
            in srgb,
            var(--primary) 30%,
            transparent
        );
}
/* ======================================================
   TOOLBAR
====================================================== */
.articles-catalog__toolbar {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
/* count */
.articles-catalog__count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-size: 7px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.articles-catalog__count small {
    font-size: 6px;
    letter-spacing: .08em;
    opacity: .65;
}
/* ======================================================
   SORT
====================================================== */
.articles-catalog__sort {
    display: flex;
    align-items: center;
    gap: 9px;
}
.articles-catalog__sort label {
    color: var(--text-secondary);
    font-size: 6px;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
}
.articles-catalog__select {
    position: relative;
}
.articles-catalog__select select {
    min-width: 110px;
    height: 31px;
    padding:
        0 30px
        0 12px;
    border:
        1px solid
        var(--border);
    border-radius: 8px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 8px;
    cursor: pointer;
}
.articles-catalog__select > span {
    position: absolute;
    right: 10px;
    top: 50%;
    color: var(--text-secondary);
    font-size: 9px;
    transform: translateY(-55%);
    pointer-events: none;
}
/* ======================================================
   ARTICLES GRID
====================================================== */
.articles-catalog__grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap:
        25px
        16px;
}
/* ======================================================
   ARTICLE CARD
====================================================== */
.articles-library-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--border) 78%,
            transparent
        );
    border-radius: 17px;
    /* background: var(--surface); */
    /* color: var(--text); */
    text-decoration: none;
    box-shadow:
        0 11px 25px
        rgba(0, 0, 0, .055);
    transition:
        transform .3s var(--ease),
        border-color .3s var(--ease),
        box-shadow .3s var(--ease);
}
.articles-library-card:hover {
    transform: translateY(-5px);
    border-color:
        color-mix(
            in srgb,
            var(--primary) 20%,
            var(--border)
        );
    box-shadow:
        0 18px 34px
        rgba(0, 0, 0, .09);
}
/* filtering */
.articles-library-card[hidden] {
    display: none !important;
}
/* ======================================================
   IMAGE
====================================================== */
.articles-library-card__image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background:
        color-mix(
            in srgb,
            var(--text) 5%,
            var(--surface)
        );
}
.articles-library-card__image img {
    display: block;
    width: 100%;
    aspect-ratio: 1.7 / 1;
    object-fit: cover;
    transition:
        transform .5s var(--ease);
}
.articles-library-card:hover
.articles-library-card__image img {
    transform: scale(1.04);
}
/* ======================================================
   CARD BODY
====================================================== */
.articles-library-card__body {
    min-height: 117px;
    padding:
        13px
        14px
        14px;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}
/* ======================================================
   BADGE
====================================================== */
.articles-library-card__badge {
    width: max-content;
    max-width: 100%;
    min-height: 17px;
    padding:
        0 7px;
    display: inline-flex;
    align-items: center;
    border:
        1px solid
        color-mix(
            in srgb,
            var(--primary) 22%,
            transparent
        );
    border-radius: 999px;
    background:
        color-mix(
            in srgb,
            var(--primary) 6%,
            var(--surface)
        );
    color: var(--primary);
    font-size: 5px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
}
/* ======================================================
   TITLE
====================================================== */
.articles-library-card h3 {
    margin:
        10px 0
        16px;
    color: var(--text);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.025em;
    transition:
        color .25s var(--ease);
}
.articles-library-card:hover h3 {
    color: var(--primary);
}
/* ======================================================
   META
====================================================== */
.articles-library-card__meta {
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 5px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}
/* ======================================================
   LOAD MORE
====================================================== */
.articles-catalog__load {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}
.articles-catalog__load-button {
    min-width: 125px;
    min-height: 37px;
    padding:
        0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border:
        1px solid
        var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 8px;
    font-weight: 650;
    cursor: pointer;
    box-shadow:
        0 7px 17px
        rgba(0, 0, 0, .045);
    transition:
        color .22s var(--ease),
        border-color .22s var(--ease),
        transform .22s var(--ease),
        box-shadow .22s var(--ease);
}
.articles-catalog__load-button:hover {
    color: var(--primary);
    border-color:
        color-mix(
            in srgb,
            var(--primary) 25%,
            var(--border)
        );
    transform: translateY(-2px);
    box-shadow:
        0 10px 22px
        rgba(0, 0, 0, .07);
}
.articles-catalog__load-button[hidden] {
    display: none;
}
/* ======================================================
   EMPTY STATE
====================================================== */
.articles-library-empty {
    padding:
        55px
        20px;
    text-align: center;
    border:
        1px solid
        var(--border);
    border-radius: 16px;
    background: var(--surface);
}
.articles-library-empty strong {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 17px;
}
.articles-library-empty span {
    color: var(--text-secondary);
    font-size: 11px;
}
.articles-library-empty[hidden] {
    display: none;
}
/* ======================================================
   DARK MODE
====================================================== */

html[data-theme="dark"]
.articles-library-card {
    box-shadow:
        0 12px 27px
        rgba(0, 0, 0, .22);
}


html[data-theme="dark"]
.articles-library-card:hover {
    box-shadow:
        0 18px 38px
        rgba(0, 0, 0, .32);
}


html[data-theme="dark"]
.articles-library-card__image img {
    filter: brightness(.88);
}


html[data-theme="dark"]
.articles-library-card:hover
.articles-library-card__image img {
    filter: brightness(.96);
}


html[data-theme="dark"]
.articles-filter,
html[data-theme="dark"]
.articles-catalog__load-button {
    box-shadow:
        0 6px 15px
        rgba(0, 0, 0, .15);
}
/* ======================================================
   RTL
====================================================== */

html[dir="rtl"]
.articles-catalog__count,
html[dir="rtl"]
.articles-catalog__sort label,
html[dir="rtl"]
.articles-library-card__badge,
html[dir="rtl"]
.articles-library-card__meta {
    letter-spacing: .04em;
}


html[dir="rtl"]
.articles-library-card__body {
    align-items: flex-start;
    text-align: right;
}


html[dir="rtl"]
.articles-library-card h3 {
    letter-spacing: -.01em;
}


html[dir="rtl"]
.articles-catalog__select select {
    padding:
        0 12px
        0 30px;
}


html[dir="rtl"]
.articles-catalog__select > span {
    right: auto;
    left: 10px;
}
/* ======================================================
   TABLET
====================================================== */
@media (max-width: 950px) {
    .articles-catalog__grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}
/* ======================================================
   SMALL TABLET
====================================================== */
@media (max-width: 760px) {
    .articles-catalog__filters {
        margin-bottom: 38px;
    }
    .articles-catalog__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 17px;
    }
}
/* ======================================================
   MOBILE
====================================================== */
@media (max-width: 520px) {
    .articles-catalog {
        padding:
            18px
            var(--page-padding, 18px)
            65px;
    }
    .articles-catalog__filters {
        margin-inline:
            calc(var(--page-padding, 18px) * -1);
        padding-inline:
            var(--page-padding, 18px);
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 7px;
        margin-bottom: 34px;
        scrollbar-width: none;
    }
    .articles-catalog__filters::-webkit-scrollbar {
        display: none;
    }
    .articles-filter {
        flex: 0 0 auto;
        min-height: 34px;
        font-size: 9px;
    }
    .articles-catalog__toolbar {
        align-items: flex-start;
    }
    .articles-catalog__sort {
        gap: 6px;
    }
    .articles-catalog__sort label {
        display: none;
    }
    .articles-catalog__select select {
        min-width: 105px;
    }
    .articles-catalog__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .articles-library-card {
        border-radius: 17px;
    }
    .articles-library-card__image img {
        aspect-ratio: 1.85 / 1;
    }
    .articles-library-card__body {
        min-height: 125px;
        padding: 15px;
    }
    .articles-library-card__badge {
        min-height: 19px;
        padding-inline: 8px;
        font-size: 6px;
    }
    .articles-library-card h3 {
        font-size: 14px;
    }
    .articles-library-card__meta {
        font-size: 6px;
    }
    .articles-catalog__load {
        margin-top: 26px;
    }
    .articles-catalog__load-button {
        min-width: 140px;
        min-height: 41px;
        font-size: 9px;
    }
}
/* ======================================================
   REDUCED MOTION
====================================================== */
@media (prefers-reduced-motion: reduce) {
    .articles-filter,
    .articles-library-card,
    .articles-library-card__image img,
    .articles-library-card h3,
    .articles-catalog__load-button {
        transition: none;
    }
}

