/* Team Members Grid Layout */
.tms-team-archive {
    width: 100%;
    padding-bottom: 60px;
}

.tms-team-members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px 30px;
}

/* Individual Member Card */
.tms-team-member-card {
    display: flex;
    flex-direction: column;
}

.tms-team-member-card .tms-team-member-img-wrapper {
    margin-bottom: 15px;
}

.tms-member-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tms-member-thumb img,
.tms-team-member-card img {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
}

/* Name as per image style */
.tms-team-member-card .tms-member-name {
    font-weight: bold;
    font-size: 1.1em;
    margin: 0 0 4px 0;
    text-align: center;
    color: #111;
}

.tms-team-member-card .tms-member-job {
    color: #1278ae;
    font-size: 1em;
    margin-bottom: 0;
    text-align: center;
    font-weight: 400;
}

.tms-team-member-card .tms-member-location {
    color: #5e5e5e;
    font-size: 0.96em;
    margin-top: 0;
    text-align: center;
}

.tms-team-member-card .tms-member-bio {
    color: #181818;
    font-size: 0.96em;
    margin-top: 0;
    text-align: center;
}

.tms-member-img-hover .tms-img-wrap {
    position: relative;
    display: block;
    max-width: 100%;
    padding-bottom: 100%;
}


/* Hide gif by default, show on hover */
.tms-member-img-hover .tms-gif-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    pointer-events: none;
    right: 0;
    bottom: 0;
    object-fit: cover;
}

.tms-member-img-hover .tms-main-img {
    display: block;
    width: 100%;
    height: 100%;
}

/* On hover, hide featured; show gif */
.tms-member-img-hover .tms-img-wrap:hover .tms-main-img {
    opacity: 0;
}

.tms-member-img-hover .tms-img-wrap:hover .tms-gif-img {
    opacity: 1;
    pointer-events: auto;
}

.tms-member-img-hover .tms-gif-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    pointer-events: none;
}

.tms-member-hover-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 196, 144, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    z-index: 11;
    opacity: 0;
    transition: opacity 0.3s;
}

.tms-member-img-hover .tms-img-wrap:hover .tms-main-img,
.tms-member-img-hover .tms-img-wrap.tms-hover .tms-main-img {
    opacity: 0;
}

.tms-member-img-hover .tms-img-wrap:hover .tms-gif-img,
.tms-member-img-hover .tms-img-wrap.tms-hover .tms-gif-img,
.tms-member-img-hover .tms-img-wrap:hover .tms-member-hover-info {
    opacity: 1;
    pointer-events: auto;
}

.tms-member-hover-btn {
    font-size: 16px;
    font-weight: 300;
    text-align: center;
    text-decoration: none;
    outline: none;
    background-color: #00517d;
    color: #fff;
    padding: 10px 15px;
    opacity: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: all 0.35s ease-in-out;
    -moz-transition: all 0.35s ease-in-out;
    transition: all 0.35s ease-in-out;
    line-height: 1.3;
    letter-spacing: normal;
    -webkit-transform: translate(0, 25px);
    -moz-transform: translate(0, 25px);
    -ms-transform: translate(0, 25px);
    -o-transform: translate(0, 25px);
    transform: translate(0, 25px);
}

.tms-member-img-hover .tms-img-wrap:hover .tms-member-hover-btn {
    color: #fff;
    opacity: 1;
    -webkit-transform: translate(0, 0);
    -moz-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    -o-transform: translate(0, 0);
    transform: translate(0, 0);
}

.tms-team-archive a.page-numbers {
    display: inline-block;
    vertical-align: middle;
    min-width: var(--pagination_width_height);
    height: var(--pagination_width_height);
    margin-left: 3px;
    margin-right: 3px;
    text-align: center;
    line-height: var(--pagination_width_height);
}


/**Single Page **/
.tms-member-header {
    margin-bottom: 30px;
}

.tm-breadcrumbs {
    margin-bottom: 20px;
}

.tm-breadcrumbs a {
    color: #1278ae;
    font-size: 1em;
    margin-bottom: 0;
    font-weight: 400;
}

.tms-team-single {
    padding-bottom: 60px;
}

.tms-team-single .tms-member-single-card {
    overflow: hidden;
}

.tms-team-single .tms-member-featured-img img {
    height: 250px;
    width: auto;
    margin: 0 auto;
    display: block;
}

.tms-team-single .tms-member-name {
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #111;
}

.tms-team-single .tms-member-description p:first-child {
    margin-top: 0px;
}

.tms-team-single .tms-member-job {
    color: #1278ae;
    font-size: 1em;
    margin-bottom: 0;
    font-weight: 400;
}

.tms-team-single .tms-member-location {
    color: #5e5e5e;
    font-size: 0.96em;
    margin-top: 0;
}

.tms-team-single .tms-member-bio {
    color: #181818;
    font-size: 0.96em;
    margin-top: 0;
}

@media (min-width: 576px) {
    .tms-team-single .tms-member-featured-img {
        float: left;
        margin-right: 20px;
    }
}

@media (max-width: 991px) {
    .tms-team-members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .tms-team-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tms-team-archive,
    .tms-team-single {
        padding-bottom: 30px;
    }
}

@media (max-width: 575px) {
    .tms-team-members-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 30px;
    }

    .tms-team-single .tms-member-featured-img {
        margin-bottom: 20px;
    }
}