.agent-data * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.offices {
    position: relative;
}

.offices .entry-content {
    padding-left: 180px;
}
.offices .entry-content,
.single-office .office-contact-info,
.office-photo {
    display: inline-block;
    vertical-align: top;
}

.offices .office-photo {
    position: absolute;
    width: 160px;
    height: 120px;
    overflow: hidden;
}

.offices .office-photo img {
    width: 100%;
    height: 100%;
}

.offices .office h4.office-name {
    margin: 0;
}

.agent-roster-contact-info .social-media img,
.agent-roster-contact-info .social-media a {
    display: inline-block;
    margin-left: 3px;
    margin-right: 3px;
}

.single-office .office-photo {
    margin-right: 1em;
    margin-bottom: 1em;
}

#agent-roster-filters {
    position: relative;
    /*height: 2em;*/
    line-height: 2em;
    margin-bottom: 2em;
}

#agent-roster-filters ul {
    /*position: absolute;*/
    /*left: 0;*/
}

#agent-index li {
    display: inline;
    padding: 0 7px 0 0;
    margin: 0;
    line-height: normal;
}

#archive-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#agent-search-form {
    max-width: 300px;
    width: 100%;
    /*position: absolute;*/
    /*right: 0;*/
}

#agent-search-form input {
    display: inline-block;
    width: 100%;
}

#agent-search-form .loading-image {
    display: none;
}

#agent-search-form .loading-agents .loading-image {
    display: inline-block;
}

.agent-name .designations {
    zoom: 1;
    filter: alpha(opacity=60);
    opacity: 0.6;
    font-size: 85%;
    line-height: normal;
}

.agents-archive .agent-data {
    position: relative;
    width: 32%;
    display: inline-block;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 10px;
    margin-right: 2%;
    border: 1px solid #ddd;
    vertical-align: top;
    margin-bottom: 20px;
}

.agents-row .agent-data:hover {
    background-color:  #f7f7f7;
    -moz-box-shadow:    inset 0 0 1px #fff;
    -webkit-box-shadow: inset 0 0 1px #fff;
    box-shadow:         inset 0 0 1px #fff;
}

.agents-row .agent-data:nth-child(3),
.agents-row.col-2 .agent-data:nth-child(2),
.agents-row.col-3 .agent-data:nth-child(3) {
    margin-right: 0;
}

.agents-row.col-2 .agent-data {
    width: 49%;
}

.agents-row.col-3 .agent-data {
    width: 32%;
}

.agents-archive .agent-data .entry-content{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.agents-archive .agent-data .agent-roster-photo {
    /*float: right;*/
    /*position: absolute;*/
    top: 10px; /* same as .agent-data padding */
    right: 10px; /* same as .agent-data padding */
    width: 100%;
    padding-right: 10px;
    max-width: 210px;
    vertical-align: top;
}

.agents-archive .agent-data .agent-roster-photo img {
    width: 100%;
    height: auto;
}

.agents-archive .agent-data .agent-roster-contact-info {
    /*display: inline-block;*/
    margin-bottom: 0px;
}

.agents-archive .agent-data .agent-name,
.agents-archive .agent-data .agent-roster-contact-info {
    /*width: 70%;*/
}

.agent-roster-soc-media {
    margin: 10px 10px 0px 0;
}

img.agent-roster-soc-media {
    width: 16px;
    height: 16px;
}

.designations {
    display: block;
}

/** Single Agent Page **/
.single-agent .agent-roster-photo, .single-agent .agent-roster-contact-info, .single-agent .calls2action {
    display: inline-block;
    margin: 0 3% 2em 0;
    vertical-align: top;
    width: 22%;
}

.single-agent .agent-roster-soc-media {
    display: inline-block;
}

.single-agent .agent-roster-contact-info, .single-agent .calls2action {
    width: 34.5%;
}

.single-agent .calls2action {
    margin-right: 0;
    text-align: center;
}

.single-agent .calls2action .btn {
    margin: auto;
    width: 60%;
    margin-top: 1em;
    font-weight: normal;
}

.agent-data h4.agent-name {
    margin: 0;
}

.agent-roster-popup-forms {
    display: none;
}

#agent-data-tabs.ui-tabs {
    padding: 0.2em 0.2em 0;
}

#agent-data-tabs.ui-tabs .ui-tabs-nav {
    margin: 0;
    padding: 0.2em 0.2em 0;
}

#agent-data-tabs.ui-tabs .ui-tabs-nav li {
    padding: 0;
    margin: 1px 0.2em 0 0;
}

#agent-contact-form input,
#agent-contact-form textarea,
#agent-roster-contact-form input,
#agent-roster-contact-form textarea {
    max-width: 98%;
}

#agent-contact-form {
    margin: 1em;
}

#agent-roster-contact-form {
    margin: 1em;
    width: 400px;
}

#agent-contact-form label,
#agent-roster-contact-form label {
    display: inline-block;
    width: 100px;
    vertical-align: top;
    line-height: normal;
}

#agent-contact-form .send-button-wrapper,
#agent-roster-contact-form .send-button-wrapper {
    text-align: center;
}

.math_question_description {
    display: block;
    font-size: 90%;
    color: #666;
    padding-left: 105px;
    padding-bottom: 1em;
}

.error-msg {
    line-height: 2em;
    color: #ff0000;
}

#community_data {
    text-align: center;
}



/** Buttons **/
/*
 * Button styling - borrowed from Twitter Bootstrap
 * http://twitter.github.com/bootstrap/base-css.html#buttons
 */
.btn:hover {
    color: #333;
    text-decoration: none;
    background-color: #E6E6E6;
    background-position: 0 -15px;
    -webkit-transition: background-position 0.1s linear;
    -moz-transition: background-position 0.1s linear;
    -o-transition: background-position 0.1s linear;
    transition: background-position 0.1s linear;
}

.btn {
    border-color: #C5C5C5;
    border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
}

.btn {
    display: inline-block;
    padding: 4px 14px;
    margin-bottom: 0;
    line-height: 20px;
    color: #333;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    vertical-align: middle;
    cursor: pointer;
    background-color: whiteSmoke;
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), to(#E6E6E6));
    background-image: -webkit-linear-gradient(top, white, #E6E6E6);
    background-image: -o-linear-gradient(top, white, #E6E6E6);
    background-image: linear-gradient(to bottom, white, #E6E6E6);
    background-image: -moz-linear-gradient(top, white, #E6E6E6);
    background-repeat: repeat-x;
    border: 1px solid #BBB;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    border-color: #E6E6E6 #E6E6E6 #BFBFBF;
    border-bottom-color: #A2A2A2;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
    filter: progid:dximagetransform.microsoft.gradient(enabled=false);
    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

a.btn, a.btn:hover, a.btn:visited {
    text-decoration: none;
}

.btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
    color: white;
    background-color: #04C;
}

.btn-primary {
    color: white;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    background-color: #006DCC;
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08C), to(#04C));
    background-image: -webkit-linear-gradient(top, #08C, #04C);
    background-image: -o-linear-gradient(top, #08C, #04C);
    background-image: linear-gradient(to bottom, #08C, #04C);
    background-image: -moz-linear-gradient(top, #08C, #04C);
    background-repeat: repeat-x;
    border-color: #04C #04C #002A80;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
    filter: progid:dximagetransform.microsoft.gradient(enabled=false);
}

a.btn-primary:visited {
    color: white;
}

/*** Testimonials ***/

#testimonials .testimonial_image{
    float: left;
    margin: 0 0.8em 2em 0;
}

#testimonial-submission label {
    display: inline-block;
    width: 200px;
    vertical-align: top;
    text-align: right;
    color: #666;
}
#testimonial-submission input {
    width: 300px;
}
#testimonial-submission textarea {
    width: 300px;
    height: 200px;
    display: inline-block;
}
#testimonial-submission .description {
    display: block;
    font-size: 90%;
    color: #888;
    margin-left: 210px;
}
#testimonial-submission .required,
#agent-roster-contact-form .required,
#agent-roster-contact-form .required {
    display: inline;
    color: red;
    vertical-align: top;
}
#testimonial-submission .submit-testimonial {
    text-align: center;
    margin: 0;
}
#testimonial-submission .submit-button {
    margin: 0 auto;
    width: auto;
}
#testimonial-submission .not-valid {
    display: block;
    margin-left: 210px;
    color: red;
    font-size: 0.8rem;
    line-height: normal;
}
.testimonial-submission-confirmation,
.agent-contact-confirmation {
    border: 1px solid green;
    background: lightgreen;
    padding: 1em;
}

.agents-archive.team .office-phone span {
    display: none;
}

.agents-archive.team .office-phone:before {
    content: "Phone: "
}

.agents-archive.team .mobile-phone span {
    display: none;
}

.agents-archive.team .mobile-phone:before {
    content: "Mobile: "
}

/**
 * Single Agent Custom Template
 */

.single-agent.custom-template .agent-name { margin-top: 0; }
.single-agent.custom-template .agent-roster-contact-info.block-one { width: 42%; margin-right: 3%; }
.single-agent.custom-template .agent-roster-contact-info.block-two { width: 30%; margin-right: 0; }
.single-agent.custom-template .calls2action { width: 100%; }
.single-agent.custom-template .calls2action .btn { width: 40%; float: left;}
.single-agent.custom-template .calls2action .btn.send-testimonial { width: 57%; float: left; margin-left: 3%; }

/**
 * Responsive CSS
 */
@media screen and (max-width: 900px)
{
    .single-agent.custom-template .calls2action .btn,
    .single-agent.custom-template .calls2action .btn.send-testimonial{
        display: block;
        width: 100%;
        float: none;
        margin-left: 0;
    }

    .single-agent.custom-template .agent-roster-contact-info.block-one {
        width: 34.5%;
    }
    .single-agent.custom-template .agent-roster-contact-info.block-two {
        width: 37.5%;
    }
}

@media screen and (max-width: 800px)
{
    .agents-archive .office-phone span {
        display: none;
    }

    .agents-archive .office-phone:before {
        content: "Phone: "
    }

    .agents-archive .mobile-phone span {
        display: none;
    }

    .agents-archive .mobile-phone:before {
        content: "Mobile: "
    }

    .agent-roster-contact-info .social-media {
        display: block;
        white-space: nowrap;
    }

    .single-agent .ui-tabs .ui-tabs-panel {
        padding: 0.5em;
    }

    .agents-archive.team .agents-row .agent-data {
        float: left;
        width: 48%;
    }

    body .agents-archive.team .agent-data {
        margin-right: 1%!important;
        margin-left: 1%!important;
    }
}

@media screen and (max-width: 768px)
{
    .agents-archive .agent-data .agent-roster-contact-info {
        display: inline-block;
        margin-bottom: 0;
    }

    #agent-roster-filters {
        height: auto;
        margin-bottom: 1em;
    }
    ul#agent-index,
    #agent-search-form {
        position: relative;
        text-align: center;
    }
}

@media screen and (max-width: 600px)
{
    .single-agent.custom-template .agent-roster-contact-info.block-one,
    .single-agent.custom-template .agent-roster-contact-info.block-two {
        width: 62%;
        float: left;
        margin-right: 0;
    }

    .single-agent.custom-template .agent-roster-photo {
        width: 35%;
        float: left;
    }

    .single-agent.custom-template .calls2action {
        margin-bottom: 0;
    }

    .agents-archive .agents-row .agent-data {
        float: left;
        width: 48%;
    }

    body .agents-archive .agent-data {
        margin-right: 1%!important;
        margin-left: 1%!important;
    }

    .single-agent .agent-roster-photo {
        text-align: right;
        width: 45%;
    }

    .single-agent .agent-roster-contact-info {
        width: 50%;
        margin-right: 0;
    }

    .single-agent .calls2action {
        display: block;
        width: 100%;
    }

    #agent-roster-contact-form {
        width: 100%;
        margin: 0;
    }
    #testimonial-submission label,
    #agent-roster-contact-form label {
        text-align: left;
    }

    #testimonial-submission input,
    #testimonial-submission textarea {
        width: 90%;
    }
    #testimonial-submission .description,
    #agent-roster-contact-form .math_question_description {
        margin: 0;
        padding: 0;
    }
}

@media screen and (max-width: 480px)
{
    .single-agent.custom-template .agent-roster-contact-info.block-one,
    .single-agent.custom-template .agent-roster-contact-info.block-two {
        width: 100%;
        float: none;
        margin-right: 0;
    }

    .single-agent.custom-template #bio .agent-roster-photo {
        width: 100%;
        float: none;
        text-align: center;
        margin: 0;
    }

    #agent-index li {
        padding: 0 5px 0 0;
    }
    .agents-archive .agents-row .agent-data,
    .agents-archive.team .agents-row .agent-data{
        float: none;
        width: 100%;
        max-width: 480px;
    }

    body .agents-archive .agent-data,
    body .agents-archive.team .agent-data{
        margin-right: 0%!important;
        margin-left: 0%!important;
        overflow: hidden;
    }

    #agent-index li:nth-child(15):after {
        content: ".";
        display: block;
        clear: both;
        visibility: hidden;
        line-height: 0;
        height: 0;
    }
}

@media screen and (max-width: 320px)
{
    .single-agent.custom-template .calls2action {
        margin-bottom: 0;
    }

    .single-agent .agent-roster-photo {
        width: 70%;
        margin: 0 15%;
        text-align: center;
    }

    .single-agent .agent-roster-contact-info {
        width: 100%;
    }

    #agent-data-tabs.ui-tabs .ui-tabs-nav li {
        margin: 1px 0.5% 0 0;
        width: 99%
    }

    #agent-data-tabs.ui-tabs .ui-tabs-nav li a {
        float: none;
        display: block;
    }

    .agents-archive.team .agent-data .agent-roster-photo {
        margin: 0;
    }

    .agents-archive.team .agent-data .agent-roster-contact-info {
        font-size: 0.8rem;
    }

    #testimonial-submission input,
    #testimonial-submission textarea,
    #agent-roster-contact-form input,
    #agent-roster-contact-form textarea {
        width: 85%;
    }

    .offices .office-photo {
        position: relative;
        width: auto;
        height: auto;
        text-align: center;
    }

    .offices .entry-content {
        padding: 0;
    }
}

@media screen and (min-width: 481px) and (max-width: 600px)
{
    .agents-archive.team .agent-data {
        text-align: center;
    }
    .agents-archive.team .agent-name {
        margin-bottom: 1em;
    }
    .agents-archive.team .agent-data .agent-name,
    .agents-archive.team .agent-data .agent-roster-contact-info {
        width: 100%;
    }
    .agents-archive.team .agent-roster-photo {
        position: relative;
        top: 0;
        right: 0;
        margin: 0;
        width: 70%;
        margin: 0 15%;
    }
}

.office-listings--wrapper {
    padding: 0 15px;
}

.testimonials-block .card-testimonial {
    display: flex;
    margin-bottom: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.testimonials-block .card--testimonial img {
    float: unset;
    margin: 0;
}

#testimonials.testimonials-block .testimonial_image {
    float: unset;
}
