.works {
    background: #FCF5FC;
    padding-top: 60px;
}

.works__title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 55px;
    line-height: 64px;
    letter-spacing: -0.01em;
    color: #5C075E;
    margin: 0 0 50px 0;
}

.works__filter-wrap {
    margin-bottom: 50px;
}

.works__filter-track {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
}

.works__filter-btn {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #8D2A8F;
    border-radius: 12px;
    padding: 16px 24px;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 22px;
    color: #5C075E;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.works__filter-btn.active {
    background: #8D2A8F;
    border-color: #8D2A8F;
    color: #fff;
}

.works__filter-btn:not(.active):hover {
    background: rgba(141, 42, 143, 0.08);
}

.works__list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.works__card-service-link svg {
    width: 14px;
    height: 20px;
    flex-shrink: 0;
    vertical-align: middle;
    margin-left: 4px;
}

.works__card {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 48px;
    background: #fff;
    border-radius: 25px;
    padding: 45px;
    box-sizing: border-box;
    align-items: start;
}

.works__card.hidden {
    display: none;
}

.works__card-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
}

.works__card-info-top {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.works__card-title {
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 36px;
    line-height: 49px;
    letter-spacing: -0.01em;
    color: #5C075E;
    margin: 0;
}

.works__card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.works__card-meta-label {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 25px;
    color: #8E468F;
    margin: 0;
}

.works__card-meta-value {
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 27px;
    color: #5C075E;
    margin: 0;
}

.works__card-services {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.works__card-service-link {
    font-family: Manrope, sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 27px;
    color: #5C075E;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.works__card-service-link:hover {
    opacity: 0.7;
}

.works__card-doctor {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FCF5FC;
    border-radius: 15px;
    padding: 10px;
    min-height: 96px;
    margin-top: 96px;
    box-sizing: border-box;
    width: 412px;
}

.works__card-doctor-photo-wrap {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    background: #fff;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.works__card-doctor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.works__card-doctor-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.works__card-doctor-name {
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 27px;
    color: #5C075E;
}

.works__card-doctor-spec {
    font-family: Manrope, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: #5C075E;
}

.works__card-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 84px; 
}

.works__card-photo-wrap {
    position: relative;
    aspect-ratio: 456 / 277;
    border-radius: 25px;
    overflow: hidden;
}

.works__card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.works__card-photo-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 98px;
    height: 35px;
    background: rgba(252, 245, 252, 0.99);
    border: 1px solid #8D2A8F;
    border-radius: 33px;
    box-sizing: border-box;
    font-family: Manrope, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 100%;
    color: #5C075E;
    text-transform: uppercase;
}

.works__card-photo-badge--after {
    background: #8D2A8F;
    border-color: #fff;
    color: #fff;
    font-weight: 800;
}

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

.works__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;
}

.works__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;
}

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

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

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

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

    .works__filter-wrap {
        margin-bottom: 50px;
    }

    .works__filter-track {
        gap: 20px;
    }

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

    .works__list {
        gap: 50px;
    }

    .works__card {
        grid-template-columns: 271px 1fr;
        gap: 20px;
        padding: 30px;
        border-radius: 20px;
    }

    .works__card-title {
        font-size: 22px;
        line-height: 30px;
        letter-spacing: -0.01em;
    }

    .works__card-info-top {
        gap: 20px;
    }

    .works__card-meta {
        gap: 4px;
    }

    .works__card-meta-label {
        font-size: 12px;
        line-height: 16px;
    }

    .works__card-meta-value {
        font-size: 14px;
        line-height: 19px;
    }

    .works__card-service-link {
        font-size: 14px;
        line-height: 19px;
    }

    .works__card-doctor {
        width: 243px;
        margin-top: 50px;
        min-height: 80px;
        padding: 10px;
        border-radius: 10px;
    }

    .works__card-doctor-photo-wrap {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }

    .works__card-doctor-name {
        font-size: 14px;
        line-height: 19px;
    }

    .works__card-doctor-spec {
        font-size: 12px;
        line-height: 16px;
    }

    .works__card-doctor-info {
        gap: 5px;
    }

    .works__card-photos {
        padding-top: 0;
        gap: 10px;
    }

    .works__card-photo-wrap {
        border-radius: 20px;
        aspect-ratio: 291 / 203;
    }

    .works__card-photo-badge {
        top: 15px;
        left: 14px;
        width: 47px;
        height: 31px;
        font-size: 11px;
        padding: 8px 10px;
    }

    .works__card-photo-badge--after {
        width: 69px;
    }
}

@media (max-width: 768px) {
    .works__card {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
        background: #FFFFFF;
        border-radius: 20px;
    }

    .works__card:nth-child(even) {
        background: #FCF5FC;
    }

    .works__card-photos {
        grid-template-columns: 1fr;
        order: -1;
        gap: 10px;
    }

    .works__card-photo-wrap {
        aspect-ratio: 290 / 124;
    }

    .works__card-info {
        gap: 15px;
    }

    .works__card-info-top {
        gap: 15px;
    }

    .works__card-doctor {
        width: 100%;
        margin-top: 0;
        min-height: 71px;
        padding: 8px;
        border-radius: 8px;
        background: #FCF5FC;
        gap: 12px;
    }

    .works__card:nth-child(even) .works__card-doctor {
        background: #FFFFFF;
    }

    .works__card-doctor-photo-wrap {
        width: 50px;
        height: 50px;
        border-radius: 8px;
        background: #FFFFFF;
    }

    .works__card:nth-child(even) .works__card-doctor-photo-wrap {
        background: #FCF5FC;
    }

    .works__card-photo-badge {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 24px;
        font-size: 9px;
        padding: 6px 10px;
    }

    .works__card-photo-badge--after {
        width: 59px;
    }
}

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

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

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

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

    .works__clear-filters {
        display: flex;
    }

    .works__filter-wrap {
        margin-bottom: 50px;
    }

    .works__list {
        gap: 50px;
    }

    .works__card-title {
        font-size: 22px;
        line-height: 30px;
        letter-spacing: -0.01em;
    }

    .works__card-meta-label {
        font-size: 12px;
        line-height: 16px;
    }

    .works__card-meta-value {
        font-size: 14px;
        line-height: 19px;
    }

    .works__card-service-link {
        font-size: 14px;
        line-height: 19px;
    }

    .works__card-doctor-name {
        font-size: 14px;
        line-height: 17px;
    }

    .works__card-doctor-spec {
        font-size: 12px;
        line-height: 16px;
    }

    .works__card-doctor-info {
        gap: 5px;
    }
}