.resident-search {
    clear: both;
    background: #f1f1f1;
    padding: 0 30px 50px 30px;
}

.resident-search__form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 190px auto;
    gap: 30px;
    align-items: end;
    margin: 0;
}

.resident-search__control {
    width: 100%;
    height: 40px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #d8d8d8;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #212121;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    line-height: 40px;
    outline: none;
}

.resident-search__control::placeholder {
    color: #8d8d8d;
    opacity: 1;
}

.resident-search__select {
    color: #8d8d8d;
    cursor: pointer;
}

.resident-search__button {
    height: 40px;
    white-space: nowrap;
    cursor: pointer;
}

.resident-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    clear: both;
    background: #f1f1f1;
    padding: 0 30px 50px 30px;
}

.resident-cards__item {
    min-width: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.resident-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 210px;
    background: #ffffff;
    padding: 10px;
    text-decoration: none;
}

.resident-card:hover,
.resident-card:focus,
.resident-card:active {
    color: #111111;
    text-decoration: none;
}

.resident-card__photo {
    display: block;
    width: 100%;
    aspect-ratio: 1.2 / 1;
    overflow: hidden;
    background: #e6e6e6;
}

.resident-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.resident-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    position: relative;
    min-height: 58px;
    padding: 9px 28px 2px 0;
}

.resident-card__name {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 500;
    line-height: 155%;
    color: #212121;
}

.resident-card__position {
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 125%;
    color: #212121;
}

.resident-card__button {
    position: absolute;
    right: 0;
    bottom: 6px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #436eb3;
    transition: transform .2s ease-out, background-color .2s ease-out;
}

.resident-card:hover .resident-card__button,
.resident-card:focus .resident-card__button {
    background: #315b9d;
    transform: translate(1px, -1px);
}

.resident-cards__empty {
    grid-column: 1 / -1;
    padding: 20px;
    background: #ffffff;
}

.resident-pagination {
    clear: both;
    background: #f1f1f1;
    padding: 0 30px 50px;
}

.resident-pagination .col-xs-12 {
    float: none;
    text-align: center;
}

.resident-pagination .pagination.resident-pagination__list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.resident-pagination__list:before,
.resident-pagination__list:after {
    display: none;
}

.resident-pagination__list > li {
    display: block;
}

.resident-pagination .pagination > .resident-pagination__page > a,
.resident-pagination .pagination > .resident-pagination__page > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 51px;
    height: 51px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #ffffff;
    color: #000000;
    font-family: "Roboto", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.resident-pagination .pagination > .resident-pagination__page > a:hover,
.resident-pagination .pagination > .resident-pagination__page > a:focus {
    background: #436eb3;
    color: #ffffff;
}

.resident-pagination .pagination > .active.resident-pagination__page > span,
.resident-pagination .pagination > .active.resident-pagination__page > a,
.resident-pagination .pagination > .active.resident-pagination__page > span:hover,
.resident-pagination .pagination > .active.resident-pagination__page > a:hover,
.resident-pagination .pagination > .active.resident-pagination__page > span:focus,
.resident-pagination .pagination > .active.resident-pagination__page > a:focus {
    background: #436eb3;
    color: #ffffff;
}

.resident-pagination .pagination > .resident-pagination__nav > a,
.resident-pagination .pagination > .resident-pagination__nav > span {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #436eb3;
    border-radius: 50%;
    background: #ffffff;
    transition: background-color .2s ease-out;
}

.resident-pagination .pagination > .resident-pagination__nav .icon {
    width: 18px;
    height: 18px;
    color: #436eb3;
    transition: color .2s ease-out;
}

.resident-pagination .pagination > .resident-pagination__nav--prev .icon {
    transform: rotate(180deg);
}

.resident-pagination .pagination > .resident-pagination__nav > a:hover,
.resident-pagination .pagination > .resident-pagination__nav > a:focus {
    background: #436eb3;
}

.resident-pagination .pagination > .resident-pagination__nav > a:hover .icon,
.resident-pagination .pagination > .resident-pagination__nav > a:focus .icon {
    color: #ffffff;
}

.resident-pagination .pagination > .resident-pagination__nav.disabled > span {
    opacity: .45;
    cursor: default;
}

#resident-btn {
    width: 30px;
    height: 30px;
    bottom: 0;
    right: 0;
}

/* Круглая кнопка со стрелкой */
.resident-cards .list-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: #436eb3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
}

.resident-card:hover .list-btn {
    transform: rotate(0deg);
}
.resident-cards .icon {
    color: white;
    width: 24px;
    height: 24px;
}

.resident-cards__item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
}

.resident-card__bottom {
    display: flex;
    margin-top: auto;
}

@media (max-width: 991px) {
    .resident-search__form {
        grid-template-columns: 1fr 1fr;
    }

    .resident-search__button {
        justify-content: center;
    }

    .resident-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .resident-search__form {
        grid-template-columns: 1fr;
    }

    .resident-cards {
        grid-template-columns: 1fr;
    }
}
