.articles {
    background: #FCF5FC;
    padding-top: 80px;
    position: relative;
}

.articles__content {
    position: relative;
    z-index: 2;
}

.articles__header {
    margin-bottom: 60px;
}

.articles__title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 55px;
    line-height: 64px;
    letter-spacing: -0.01em;
    color: rgba(92, 7, 94, 1);
    margin: 0 0 32px 0;
}

.articles__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.articles__filter-button {
    padding: 14px 28px;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(254, 250, 255, 1);
    position: relative;
    overflow: hidden;
}

.articles__filter-button:not(.active) {
    background: rgba(254, 250, 255, 1);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.articles__filter-button:not(.active)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(180deg, #C05FC2 0%, #8D2A8F 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.articles__filter-button:not(.active) {
    background: linear-gradient(180deg, #C05FC2 0%, #8D2A8F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles__filter-button.active {
    background: rgba(141, 42, 143, 1);
    border: 2px solid rgba(141, 42, 143, 1);
    color: rgba(255, 255, 255, 1);
}

.articles__filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(141, 42, 143, 0.2);
}

.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .articles__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .articles__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .articles__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.articles__card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.articles__card.hidden {
    display: none;
}

.articles__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(141, 42, 143, 0.15);
}

.articles__card-image-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    margin-bottom: 24px;
}

.articles__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.articles__card-body {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}

.articles__card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.articles__card-title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 100%;
    color: #5C075E;
    margin-bottom: 16px;
    min-height: calc(1.2em * 3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles__card-description {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #5C075E;
}

.articles__card-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
}

.articles__card-more {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
    margin-top: 32px;
}

.articles__card-more:hover {
    transform: translate(2px, -2px);
}

.articles__card-arrow {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

/* Dropdown фильтр (мобилка) */
.articles__filter-dropdown {
    display: none;
}

.articles__filter-select {
    width: 100%;
    padding: 10px 16px;
    background: #FEFAFF;
    border: 1px solid #C05FC2;
    border-radius: 8px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #B171B2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='7' height='4' viewBox='0 0 7 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L3.5 3L6 1' stroke='%23B171B2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.articles__clear-filters {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #5C075E;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.articles__clear-filters:hover {
    color: #8D2A8F;
}

.articles__clear-filters-x {
    font-size: 16px;
    color: #8D2A8F;
}

@media (max-width: 1024px) {
    .articles { padding-top: 30px !important; }

    .articles__header {
        margin-bottom: 35px;
    }

    .articles__title {
        font-size: 34px;
        line-height: 40px;
        letter-spacing: -0.01em;
        margin-bottom: 35px;
    }

    .articles__filters {
        gap: 20px;
    }

    .articles__filter-button {
        padding: 10px 20px;
        font-size: 12px;
        line-height: 16px;
        border-radius: 8px;
    }

    .articles__filter-button:not(.active)::before {
        border-radius: 8px;
    }

    .articles__card {
        padding: 20px;
        border-radius: 20px;
    }

    .articles__card-image-wrap {
        height: 151px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .articles__card-title {
        font-size: 16px;
        line-height: 22px;
        margin-bottom: 10px;
    }

    .articles__card-description {
        font-size: 12px;
        line-height: 16px;
    }
}

@media (max-width: 576px) {
    .articles { padding-top: 40px; }

    .articles__header {
        margin-bottom: 25px;
    }

    .articles__title {
        font-size: 24px;
        line-height: 27px;
        margin-bottom: 15px;
    }

    /* Скрыть кнопки, показать dropdown */
    .articles__filters {
        display: none;
    }

    .articles__filter-dropdown {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .articles__clear-filters {
        display: flex;
    }

    .articles__card {
        padding: 20px;
        border-radius: 20px;
    }

    .articles__card-image-wrap {
        height: 151px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .articles__card-title {
        font-size: 16px;
        line-height: 22px;
        margin-bottom: 10px;
        min-height: auto;
    }

    .articles__card-description {
        font-size: 12px;
        line-height: 16px;
    }

    .articles__card-body {
        flex-direction: row;
    }

    .articles__card-aside {
        flex-direction: column;
        width: auto;
    }
}