.mod-agents-display * {
    color: #203864;
    font-family: inherit;
}

.mod-agents-display h1,
.mod-agents-display h2,
.mod-agents-display h3,
.mod-agents-display h4,
.mod-agents-display h5,
.mod-agents-display h6 {
    font-family: inherit !important;
    font-weight: 700 !important;
}


.mod-agents-display .agent-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 1rem;
}

.mod-agents-display .agent-items-centered {
    grid-template-columns: repeat(auto-fit, minmax(300px, 398px));
    justify-content: center;
}

@media (max-width: 992px) {
    .mod-agents-display .agent-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .mod-agents-display .agent-items-centered {
        grid-template-columns: repeat(auto-fit, minmax(300px, 398px));
    }
}

@media (max-width: 768px) {
    .mod-agents-display .agent-items {
        grid-template-columns: 1fr;
    }

    .mod-agents-display .agent-items-centered {
        grid-template-columns: 1fr;
    }
}

.mod-agents-display .agent-phones {
    display: flex;
    flex-wrap: wrap;
}

.mod-agents-display .agent-phones span {
    margin-right: 10px;
}

.mod-agents-display .card-agent-email a {
    text-decoration: underline;
    font-size: 0.92rem;
}

.modal.agent-modal-card {
    /* Ensure agent modal stays above other page elements */
    z-index: 12000 !important;
}

.modal-backdrop {
    z-index: 11990 !important;
}

.mod-agents-display .agent-card {
    background: #FFFFFF;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mod-agents-display .agent-card .card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}



/*.agent-card .card-image {*/
/*    width: 100px;*/
/*    flex-shrink: 0;*/
/*    margin-right: 30px;*/
/*}*/

.agent-card .card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.5rem;
    min-width: 0;
}

.agent-card .card-info h3 {
    font-weight: 700;
    font-size: 20px;
    line-height: 18px;
    margin-bottom: 0;
}


.agent-card .agent-phone,
.agent-card .card-agent-email,
.agent-card .agent-location {
    font-weight: 500;
    font-size: 0.98rem;
    gap: 5px;
    margin-bottom: 0;
    line-height: 1;
}

.agent-card .agent-phone {
    display: flex;
}

.agent-card .agent-location {
    display: flex;
}

.agent-card .card-image {
    width: 30%;
    flex-shrink: 0;
}

.agent-card .card-agent-email {
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
}

.agent-card .card-agent-email a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    display: inline;
}

.agent-card .card-agent-location {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
    /* 2 lines * 1.4 line-height */
}

.agent-card .agent-location .agent-info-t {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
    /* 2 lines * 1.4 line-height */
}

.agent-card .agent-card-bottom {
    margin-top: 0.2rem;
}

.modal[id^=inquiryModal] {
    background: rgba(0, 0, 0, 0.5);
}

.agent-card .card-agent-email .agent-info-t {
    flex-grow: 1;
    width: 100px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.agent-card .card-agent-email span i {
    margin-right: 2px;
}

.agent-card .agent-phone span i,
.agent-card .card-agent-email span i,
.agent-card .agent-location span i {
    font-size: 15px;
}

.agent-card .card-bottom {
    display: block;
    background: #BEAF87;
    padding: 18px;
    font-style: normal;
    font-weight: bold;
    font-size: 20px;
    line-height: 20px;
    color: #FFFFFF;
    text-align: center;
    cursor: pointer;
}

.inquiryModal {
    background: rgba(73, 73, 73, .6);
}

.inquiryModal.modal {
    z-index: 9999;
}

.inquiryModal.modal .modal-content {
    top: 0;
}
