.articles {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    margin-bottom: 45px;
}

@media screen and (max-width: 900px) {
    .articles {
        margin-bottom: 30px;
    }
}

.articles-bg-1,
.articles-bg-2 {
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    width: 290px;
    height: 570px;
    z-index: -1;
}

.articles-bg-1 {
    background-image: url(../../images/light-left-bg.webp);
    top: 10%;
    left: -3%;
}

.articles-bg-2 {
    background-image: url(../../images/light-right-bg.webp);
    top: 30%;
    right: 0;
}

.articles h1 {
    font-family: Buyan;
    font-weight: 700;
    font-size: 92px;
    line-height: 105%;
    text-transform: uppercase;
    background-image: radial-gradient(159.48% 598.74% at 19.84% 55.71%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    text-align: center;
    margin-bottom: 60px;
}

@media screen and (max-width: 900px) {
    .articles h1 {
        font-size: 60px;
        margin-bottom: 55px;
    }
}


@media screen and (max-width: 600px) {
    .articles h1 {
        font-size: 50px;
        margin-bottom: 40px;
    }
}


.articles-categories {
    display: flex;
    gap: 21px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

@media screen and (max-width: 900px) {
    .articles-categories {
        gap: 15px;
    }
}


@media screen and (max-width: 600px) {
    .articles-categories {
        gap: 11px;
        margin-bottom: 30px;
    }
}

.articles-category {
    padding: 5px 26px;
    height: 60px;
    background: transparent;
    border: 2px solid #B5B4B4;
    border-radius: 24px;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 105%;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.articles-category:hover,
.articles-category.active {
    background: #FFFFFF;
    border: 2px solid #FFFFFF;
    transform: translateY(-2px);
    color: #0D0D0D;
}

@media screen and (max-width: 900px) {
    .articles-category {
        height: 47px;
        font-size: 10px;
    }
}


@media screen and (max-width: 600px) {
    .articles-category {
        padding: 5px 15px;
        height: 34px;
        border: 1px solid #B5B4B4;
        font-size: 8px;
    }
}

.articles-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

.articles-search {
    margin: 30px 0 20px 0;
}

#articles-search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
}

.articles-sort {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
}

.articles-sort-select {
    width: 250px;
}

@media screen and (max-width: 600px) {
    .articles-sort-select {
        width: 100%;
    }
}

@media screen and (max-width: 900px) {
    #articles-search-input {
        font-size: 12px;
    }
}


@media screen and (max-width: 600px) {
    #articles-search-input {
        font-size: 10px;
    }
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 34px;
}

@media screen and (max-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-bottom: 19.5px;
    }
}


@media screen and (max-width: 600px) {
    .articles-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 25px;
        margin-bottom: 19px;
    }
}

.article-card {
    background: #464646;
    border-radius: 25px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media screen and (max-width: 900px) {
    .article-card {
        border-radius: 20px;
    }
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card__image {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    padding-bottom: 66.5%;
}

.article-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card__image img {
    transform: scale(1.05);
}

@media screen and (max-width: 900px) {
    .article-card__image {
        padding-bottom: 71.9%;
    }
}

@media screen and (max-width: 600px) {
    .article-card__image {
        padding-bottom: 68.3%;
    }
}

.article-card__content {
    padding: 18px 15px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

@media screen and (max-width: 900px) {
    .article-card__content {
        padding: 15px 15px 15px 20px;
        gap: 4px;
    }
}

@media screen and (max-width: 600px) {
    .article-card__content {
        padding: 14px 20px 13px 20px;
    }
}

.article-card__category {
    display: inline-block;
    align-self: flex-start;
    background: linear-gradient(
        263.56deg,
        #FFE9C8 -4.53%,
        #FFD9AD 18.44%,
        #FFDDB5 51.46%,
        #FFDDB5 76.6%,
        #FFCC8F 111.92%
    );
    padding: 5px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 9px;
    line-height: 128%;
    color: #000000;
}

.article-card__title {
    font-family: 'Buyan', sans-serif;
    font-weight: 700;
    font-size: 25px;
    line-height: 128%;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(25px * 1.28 * 2);
}

.article-card__description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 128%;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(14px * 1.28 * 3);
}

@media screen and (max-width: 900px) {
    .article-card__title {
        font-size: 23px;
        min-height: calc(23px * 1.28 * 2);
    }
    
    .article-card__description {
        font-size: 12px;
        min-height: calc(12px * 1.28 * 4);
    }
}

.custom-select-container {
    position: relative;
    flex: 1;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-button {
    width: 100%;
    background-color: #868686;
    color: #D2D2D2;
    border-radius: 9px;
    padding: 11px 23px;
    font-family: Montserrat;
    font-weight: 500;
    font-size: 14px;
    line-height: 120%;
    border: none;
    cursor: pointer;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #D2D2D2;
    transition: transform 0.2s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.custom-select.open .custom-select-button::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #868686;
    border-radius: 0 0 9px 9px;
    margin-top: 2px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 11px 23px;
    cursor: pointer;
    color: #D2D2D2;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Montserrat;
    font-weight: 500;
    font-size: 14px;
    line-height: 120%;
}

.custom-select-option:hover {
    background-color: #777777;
}

[data-placeholder] {
    color: white;
}

.custom-select.disabled {
    opacity: 0.5;
    pointer-events: none;
}
