.agency-inner.sidebar-left{
    order: 1;
}
/* Agencies
-------------------------------------------------------------- */

.tfre-controll-agencies {
    display: flex;
    margin-left: -10px;
    justify-content: right;
}

.tfre-controll-agencies .group-switch-layout,
.tfre-controll-agencies .group_search_agency,
.tfre-controll-agencies .group-agency-order {
    width: calc(33.33333% - 10px);
    margin-left: 10px;
}

.tfre-controll-agencies .group-switch-layout {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: right;
}

.tfre-controll-agencies .group-switch-layout a {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #A3ABB0;
    font-size: 21px;
    cursor: pointer;
}

.tfre-controll-agencies .group-switch-layout a.active,
.tfre-controll-agencies .group-switch-layout a:hover {
    color: #161E2D;
}

.tfre-controll-agencies .group_search_agency input,
.tfre-controll-agencies .group-agency-order .nice-select {
    margin: 0;
    border: 1px solid #E4E4E4;
    padding: 10px 15px;
}

.tfre-controll-agencies .group-agency-order .nice-select .current {
    font-family: 'DM Sans';
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    color: #161E2D;
    padding-right: 46px;
}

.tfre-controll-agencies .group-agency-order .nice-select .current:after {
    font-size: 25px;
}

.tfre-agency-card-item {
    display: flex;
    padding: 20px;
    border-radius: 12px;
    background: #FFF;
    box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
    margin-bottom: 31px;
    overflow: hidden;
}

.tfre-agency-card-item .agency-avatar,
.tfre-agency-card-item.grid .agency-image {
    width: 120px;
    height: 120px;
    margin-right: 20px;
    border-radius: 10px;
    border: 1px solid #EFEFEF;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.tfre-agency-card-item .agency-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tfre-agency-card-item .agency-content-title h3 {
    margin-bottom: 6px;
    margin-top: 2px;
}

.tfre-agency-card-item .agency-content-address {
    display: flex;
    align-items: center;
    color: #8E8E93;
    font-size: 16px;
    font-weight: 400;
    line-height: 150%; 
    margin-bottom: 17px;
    column-gap: 5px;
}

.tfre-agency-card-item .agency-content-address img {
    margin-right: 4px;
}

.tfre-agency-card-item .agency-content-title {
    font-family: 'DM Sans';
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #5C6368;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.tfre-agency-card-item .card-bottom {
    display: flex;
    justify-content: space-between;
}

.tfre-agency-card-item .card-bottom .content-left .agency-userlink a {
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid #EFEFEF;
    margin-right: 8px;
    color: var(--theme-primary-color);
    font-size: 16px;
}

.tfre-agency-card-item .card-bottom .content-left .agency-userlink a:hover {
    background: var(--theme-primary-color);
    color: #fff;
    border-color: var(--theme-primary-color);
}

.tfre-agency-card-item .card-bottom .agency-social a,
.tfre-agency-card-item.grid .agency-social a,
.list-item-agent .agent-social a {
    color: #C8C8CF;
    font-size: 20px;
    margin-left: 20px;
}

.tfre-agency-card-item .card-bottom .agency-social a:hover,
.tfre-agency-card-item.grid .agency-social a:hover,
.list-item-agent .agent-social a:hover {
    color: var(--theme-primary-color);
}

.list-item-agent .agent-social a {
    margin-left: 0;
    margin-right: 20px;
    color: #8E8E93;
}

.tfre-agency-card-item.grid .agency-social a {
    margin-right: 20px;
    font-size: 18px;
    margin-left: 0;
}

.tfre-agency-card-item .card-bottom,
.tfre-agency-card-item.grid .agency-social {
    margin-top: 20px;
    padding: 0 !important;
}

.tfre-agency-card-item.grid .agency-social  {
    padding-top: 16px;
    margin-bottom: -5px;
}

.agency-listing-header {
    margin-bottom: 30px;
}

.tfre-agency-card-item.grid {
    display: block;
    padding: 0;
}

.tfre-agency-card-item.grid .agency-content {
    padding: 20px;
}

.agency-inner-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -30px;
}

.agency-inner-grid .tfre-agency-card-item.grid {
    width: calc(33.33333% - 30px);
    margin-left: 30px;
}

.enable .agency-inner-grid .tfre-agency-card-item.grid {
    width: calc(50% - 30px);
    margin-left: 30px;
}

.tfre-agency-card-item.grid .cover-photo img {
    width: 100%;
    height: 202px;
}

.tfre-agency-card-item.grid .agency-image {
    border: none;
    box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
    margin-left: 20px;
    margin-top: -45px;
    position: relative;
    background: #fff;
    z-index: 5;
    overflow: hidden;
}

.tfre-agency-card-item.grid .agency-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tfre-agency-card-item.grid .agency-title {
    margin-top: 8px;
    margin-bottom: 4px;
}

.tfre-agency-card-item.grid .agency-content-address {
    margin-bottom: 20px;
}

.tfre-agency-card-item.grid .agency-infor-list {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tfre-agency-card-item.grid .agency-infor-list strong {
    font-weight: 600;
    width: 30%;
    flex-shrink: 0;
    margin-right: 10px;
}

.tfre-agency-single-wrap .cover-photo img {
    height: 300px;
    border-radius: 10px;
    object-fit: cover;
}

.tfre-agency-single-wrap .agency-wrap-info {
    display: flex;
    align-items: end;
    margin: 0 30px;
    margin-top: -13%;
}

.tfre-agency-single-wrap .agency-wrap-info .agency-image {
    margin-right: 15px;
    flex-shrink: 0;
    width: 190px;
    height: 190px;
    border-radius: 10px;
    box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tfre-agency-single-wrap .agency-wrap-info .agency-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tfre-agency-single-wrap .agency-wrap-info .agency-title {
    margin-bottom: 8px;
}

.tfre-agency-single-wrap .agency-wrap-info .agent-content-address {
    color: #8E8E93;
}

.tfre-agency-single-wrap .agency-wrap-info .agency-info {
    margin-bottom: -5px;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
}

.tfre-agency-single-wrap .agent-contact-information {
    border-radius: 10px;
background: #FFF;
box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.08);
padding: 20px;
margin-top: 34px;
}

.tfre-agency-single-wrap .group-infor {
    border-radius: 10px;
    background: var(--theme-primary-rgba);
    padding: 20px;
    margin-bottom: 33px;
}

.tfre-agency-single-wrap .group-infor strong {
    font-weight: 600;
    width: 10%;
    flex-shrink: 0;
    margin-right: 10px;
}

.tfre-agency-single-wrap .group-infor .agency-infor-list {
    display: flex;
    align-items: center;
    margin-bottom: 12.1px;
}

.tfre-agency-single-wrap .group-infor .agency-infor-list:last-child {
    margin-bottom: 0;
}

.tfre-agency-single-wrap .agency-title {
    border-bottom: 1px solid #EFEFEF;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.tfre-agency-single-wrap .agent-content {
    margin-bottom: 34px;
}

.tfre-agency-single-wrap .agent-content p {
font-family: 'DM Sans';
font-size: 18px;
font-weight: 400;
line-height: 28px;
color: #5C6368;
}

.tfre-agency-single-wrap .map-container #map-agency {
    height: 360px;
}

.agent-contact-information {
    margin-bottom: 30px;
}

.single-agent-property.agent-tabs {
    margin-bottom: 26px;
}

@media only screen and (max-width: 991px) {
    .agency-inner-grid,
    .tfre-agency-card-item .card-bottom,
    .tfre-controll-agencies {
        flex-wrap: wrap;
    }
    .tfre-controll-agencies .group-switch-layout,
     .tfre-controll-agencies .group_search_agency
      {
        width: calc(50% - 10px);

    }
    .tfre-controll-agencies .group-agency-order {
        width: calc(50% - 10px);
    }

    .disable .agency-inner-grid .tfre-agency-card-item.grid {
        width: calc(50% - 30px);
    }

    .tfre-agency-card-item .card-bottom .content-left,
    .agency-inner h2 {
        margin-bottom: 20px;
    }
    .tfre-controll-agencies .group-agency-order,
    .tfre-controll-agencies {
        margin-top: 0px;
    }
    .tfre-controll-agencies .group_search_agency {
        margin-bottom: 10px;
    }
    .tfre-agency-single-wrap .group-infor strong {
        width: 20%;
    }
    .tfre-controll-agencies .group_search_agency,
    .tfre-controll-agencies .group-agency-order {
        width: calc(55% - 10px);
    }
    .tfre-controll-agencies .group-switch-layout {
        width: unset;
    }
    .tfre-controll-agencies {
        flex-wrap: nowrap;
        align-items: baseline;
    }
    .tfre-agency-single-wrap .agency-wrap-info {
        align-items: center;
    }
    .tfre-agency-single-wrap .agency-wrap-info .agency-image {
        width: 150px;
        height: 150px;
    }
}

@media only screen and (max-width: 767px) {
    .enable .agency-inner-grid .tfre-agency-card-item.grid,
    .disable .agency-inner-grid .tfre-agency-card-item.grid {
        width: calc(100% - 30px);
    }
    .tfre-controll-agencies .group-switch-layout {
        justify-content: left;
    }
    .tfre-agency-single-wrap .agency-wrap-info {
        margin: 0;
        margin-top: 20px;
    }
    .tfre-controll-agencies .group_search_agency,
    .tfre-controll-agencies .group-agency-order {
        width: calc(100% - 10px);
    }
    .tfre-controll-agencies .group-switch-layout {
        width: unset;
        margin-bottom: 10px;
        margin-top: 10px;
    }
    .tfre-controll-agencies {
        justify-content: left;
    }
}