
.team-card-sec .team-flip--layer-front{
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    position: absolute;
    width: 100%;
    height: 100%;
    transition: all .6s ease-in-out;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: none;
    z-index: 1;
}

.team-card-sec .team-flip--layer-back{
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}
.team-card-sec .teams-card-section {
    transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
}

.team-card-sec .pop-modal {
    display: none;
    transform: translateY(-50px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease;
    padding: 0 20px;
}

.team-card-sec .team-card {
    position: relative;
    min-height: 1px;
    display: flex;
}

.team-card-sec .team-card .team-inner{
    position: relative;
    width: 100%;
    flex-wrap: wrap;
    align-content: flex-start;
    display: flex;
    margin: 0px 20px 20px 0px;
    --e-column-margin-right: 20px;
    --e-column-margin-left: 0px;
    padding: 0px 0px 0px 0px;
    width: 100%;
}

@media (min-width: 768px){
    {% if module.module_settings.cards_in_row_ == "thr" %}
    .team-card-sec .team-card {
        width: 33.33%;
    }
    {% endif %}

    {% if module.module_settings.cards_in_row_ == "fr" %}
    .team-card-sec .team-card {
        width: 25%;
    }
    {% endif %}

    {% if module.module_settings.cards_in_row_ == "fve" %}
    .team-card-sec .team-card {
        width: 20%;
    }
    {% endif %}
}


@media (min-width: 991px){
    .team-card-sec .teams-card-section {
        width: 100%;
    }
}

.team-card-sec .team-flip {
    perspective: 1000px;
    transform-style: preserve-3d;
    height: 237px;
    width: 100%;
}
.team-card-sec .team-flip-box__layer__overlay {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: center;
    padding: 35px;
    color: #fff;
}

.team-card-sec .team-flip--layer-back {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    transition: all .6s ease-in-out;
    transform: rotateX(-180deg) rotateY(0);
}

.team-card-sec .team-flip:hover .team-flip--layer-front {
    transform: rotateX(180deg) rotateY(0);
}

.team-card-sec .team-flip:hover .team-flip--layer-back {
    transform: none;
}

.team-card-sec .team-flip--layer-back h3 {
    margin-bottom: 10px;
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 400;
}

.team-card-sec .team-flip--layer-back .member--description {
    margin-bottom: 50px;
    font-size: 18px;
    font-weight: 300;
    font-style: italic;
    line-height: 20px;
}

.team-card-sec .team-flip--layer-back .read-more {
    font-family: "Raleway", Serif;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-color: #359A9B;
    border-width: 0px;
    border-radius: 0px;
    cursor: pointer;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
}

.team-card-sec .team-flip--layer-back .read-more a {
    color: #fff;
}
.team-card-sec .team-flip--layer-back .read-more a img {
    height: auto;
    max-width: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    margin-left: 15px;
}
.team-card-sec .pop-modal.active.show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease;
    pointer-events: all;
    text-align: left;
}

.modal-overlay {
    background: rgba(0 0 0 / 0.5);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.team-card-sec .pop-modal .model-inner {
    z-index: 99;
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 20px;
}

.team-card-sec .pop-modal .model-inner .team-image {
    max-width: 310px;
    width: 100%;
    margin-right: 20px;
}

.team-card-sec .modal-content {
    padding: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
}

.team-card-sec .modal-content .team-details {
    width: 100%;
}

.team-card-sec .model-inner .modal-close-btn {
    position: absolute;
    right: -16px;
    top: -28px;
    width: 50px;
    height: 50px;
    background: #fff;
    box-shadow: 3px 3px 3px 1px rgba(205 205 205/ 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.team-card-sec .modal-content .team-details h2 {
    line-height: 1;
    margin-bottom: 5px;
}
.team-card-sec .model-inner .member-description {
    max-height: 200px;
    overflow: auto;
    padding-right: 20px;
}
.team-card-sec .model-inner .member-description p{
    font-family: raleway, sans-serif !important;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
}
.team-card-sec .model-inner .social-share ul {
    padding: 0;
    list-style: none;
    margin: 0;
    margin-top: 5px;
    display: flex;
    align-items: center;
}

.team-card-sec .model-inner .social-share ul a {
    vertical-align: middle;
}

@media (max-width: 767px){
    .team-card-sec .modal-content {
        flex-direction: column;
        gap: 40px;
    }
}
