.works-section {
    padding: 0 0 60px;
}

.works-section__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.works-section__tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 2px;
    background: #F1F4F4;
    border-radius: 100px;
    height: 49px;
}

.works-tab {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 13px 25px;
    gap: 10px;
    height: 45px;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 135%;
    color: #2C2F37;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    white-space: nowrap;
    flex: none;
    flex-grow: 0;
}

.works-tab:hover {
    color: #2C2F37;
    background: #e4e8e8;
}

.works-tab--active {
    background: #2C2F37;
    color: #FFFFFF;
}

.works-tab--active:hover {
    background: #3d4149;
    color: #FFFFFF;
}

.works-section__filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.works-city-dropdown {
    position: relative;
    min-width: 200px;
}

.works-city-dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.works-city-dropdown__toggle:hover {
    border-color: #8639F1;
}

.works-city-dropdown--open .works-city-dropdown__toggle {
    border-color: #8639F1;
    border-radius: 8px 8px 0 0;
}

.works-city-dropdown__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.works-city-dropdown__arrow {
    flex-shrink: 0;
    color: #666;
    transition: transform 0.2s;
}

.works-city-dropdown--open .works-city-dropdown__arrow {
    transform: rotate(180deg);
}

.works-city-dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #8639F1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow: hidden;
    flex-direction: column;
}

.works-city-dropdown--open .works-city-dropdown__menu {
    display: flex;
}

.works-city-dropdown__search {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.works-city-dropdown__input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.works-city-dropdown__input:focus {
    border-color: #8639F1;
}

.works-city-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 220px;
}

.works-city-dropdown__item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.15s;
}

.works-city-dropdown__item:hover {
    background: #f5f5f5;
}

.works-city-dropdown__item--active {
    background: #8639F1;
    color: #fff;
}

.works-city-dropdown__item--active:hover {
    background: #7030d4;
}

.works-city-dropdown__item--hidden {
    display: none;
}

.works-reset-btn {
    padding: 10px 20px;
    border: 2px solid #7c3aed;
    border-radius: 8px;
    background: transparent;
    color: #7c3aed;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
    white-space: nowrap;
}

.works-reset-btn:hover {
    background: #7c3aed;
    color: #fff;
}

.works-section__tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 4px;
    margin-bottom: 24px;
    padding: 0;
    position: relative;
}

.works-section__tags--collapsed {
    max-height: 36px;
    overflow: hidden;
}

.works-tag {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 9px 15px;
    gap: 10px;
    height: 36px;
    background: #F1F4F4;
    border-radius: 100px;
    border: none;
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    line-height: 135%;
    color: #2C2F37;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex: none;
    flex-grow: 0;
}

.works-tag:hover {
    background: #e4e8e8;
    color: #2C2F37;
}

.works-tag--active {
    background: #2C2F37;
    color: #FFFFFF;
}

.works-tag--active:hover {
    background: #3d4149;
    color: #FFFFFF;
}

.works-tag--more {
    background: #F1F4F4;
    color: #2C2F37;
    font-weight: 400;
}

.works-tag--hidden {
    display: none;
}

.works-section__dynamic-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 28px;
    color: #222;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    transition: opacity 0.3s;
}

.works-grid--loading {
    opacity: 0.4;
    pointer-events: none;
}

.works-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    height: 100%;
}

.works-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.works-card__gallery {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.works-card__main-img {
    display: block;
    width: 100%;
    height: 100%;
}

.works-card__main-img img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 20px 20px 0 0;
}

.works-card__gallery::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, rgba(44, 47, 55, 0) 60.65%, rgba(44, 47, 55, 0.7) 100%);
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

.works-card__thumbs {
    position: absolute;
    top: 10px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.works-card__thumb {
    display: block;
    width: 59px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #2C2F37;
    box-sizing: border-box;
}

.works-card__thumb:first-child {
    border-color: #8639F1;
}

.works-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.works-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 30px 30px;
    gap: 15px;
    width: 100%;
    background: #F1F4F4;
    border-radius: 0 0 20px 20px;
    flex: 1;
}

.works-card__location {
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 130%;
    color: #474A4A;
}

.works-card__zhk {
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 130%;
    color: #8639F1;
}

.works-card__title {
    font-family: 'Mulish', Arial, sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 110%;
    color: #2C2F37;
    margin: 0;
}

.works-card__specs {
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 130%;
    color: #474A4A;
}

.works-card__specs ul,
.works-card__specs ol {
    padding-left: 18px;
    margin: 0;
}

.works-card__specs li {
    margin-bottom: 2px;
}

.works-card__description {
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 130%;
    color: #474A4A;
}

.works-card__actions {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-top: auto;
}

.works-card__btn {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 14px 15px;
    gap: 10px;
    height: 45px;
    background: #8639F1;
    border: 1px solid #8639F1;
    border-radius: 8px;
    font-family: 'Golos Text', 'GolosText', Arial, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 135%;
    text-align: center;
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.25s;
    white-space: nowrap;
    flex: 1;
}

.works-card__btn:hover {
    opacity: 0.85;
}

.works-card__btn--primary {
    background: #8639F1;
    border-color: #8639F1;
    color: #FFFFFF;
}

.works-card__btn--secondary {
    background: #8639F1;
    border-color: #8639F1;
    color: #FFFFFF;
}

.works-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .works-section__controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .works-section__title {
        font-size: 26px;
    }
    .works-section__tabs {
        width: 100%;
        overflow-x: auto;
    }
    .works-section__filters {
        width: 100%;
        flex-wrap: wrap;
    }
    .works-city-filter {
        flex: 1;
        min-width: 140px;
    }
    .works-section__tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .works-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .works-card__body {
        padding: 16px 20px 24px;
    }
    .works-card__actions {
        flex-direction: column;
    }
    .works-card__btn {
        text-align: center;
        width: 100%;
    }
}
