.team-slider-title {
    font-size: 32px;
    font-weight: 300;
    text-align: center;
    margin: 24px auto 0 auto;
}
.team-slider-title span {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
}
.team-slider-title .fa-angle-down {
    color: #cccccc;
}

.team-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 2em;

    padding: 0 0 24px 0;
}
.team-slider div {
    text-align: center;
}

.team-slider img {
    border-radius: 3px;
    max-width: 100%;
    height: auto;
}
.team-slider h3 {
    margin: 16px auto 4px auto;
    line-height: 1;
    padding: 0;
}
.team-slider p {
    margin: 0;
    padding: 0;
}
.team-slider .agent-position {
    margin: 0 0 16px 0;
    padding: 0;
    font-size: 14px;
    opacity: 0.75;
}
.team-slider .agent-details {
    font-size: 14px;
}
.team-slider .agent-details--phone {
    text-decoration: none;
    display: block;
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.team-slider .agent-icon--envelope {
    color: deepskyblue;
}
.team-slider .agent-icon--linked-in {
    color: #0077b5;
}

.wrap-agent {
    max-width: 920px;
    margin: 0 auto;
}
.wrap-agent h1 {
    margin: 0 0 48px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
}
.wrap-agent h1 small {
    font-weight: 500;
}
.wrap-agent img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.team-details-agent h3 small,
.team-details-agent .excerpt {
    color: #808e9b;
    font-weight: 400;
}
.team-details-agent img {
    margin-bottom: 48px;
}

#wppd-agent--track .wp-block-column:nth-child(2) {
    background-color: #f1f2f6;
    border: 1px solid #57606f;
    border-radius: 4px;
    padding: 8px;
}
#wppd-agent--track img {
    border-radius: 4px;
}
#wppd-agent--track #qrcode-agent img {
    margin: 0 auto;
}

/* Team Carousel Styles */
.team-carousel {
    margin: 2em 0;
    background: #fcfcfc;
    --carousel-gap: 1.5rem;
    --visible-cards: 3;
}

.team-carousel-slides > ul {
    gap: var(--carousel-gap);
}

.team-carousel > div {
    overflow: auto;
}

.team-carousel ul {
    display: flex;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.team-carousel li {
    display: inline-block;
    width: calc((100% - (var(--visible-cards) - 1) * var(--carousel-gap)) / var(--visible-cards));
    flex: 0 0 calc((100% - (var(--visible-cards) - 1) * var(--carousel-gap)) / var(--visible-cards));
    box-sizing: border-box;
}

.team-carousel .Next,
.team-carousel .Previous {
    position: absolute;
    top: 50%;
    margin-top: -1em;
    padding: 0.5em;
    line-height: 1;
    text-decoration: none;
    color: var(--carousel-text, white);
    cursor: pointer;
    font-size: 44px;
    opacity: 0.65;
}
.team-carousel .Next:hover,
.team-carousel .Previous:hover {
    opacity: 1;
}

.team-carousel .Next {
    right: 0;
}

.team-carousel .Previous {
    left: 0;
}

.slider--fit li {
    padding: 8px;
}

.slider--fit img {
    min-width: 100%;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 420px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.025),
        0 2px 4px rgba(0, 0, 0, 0.025),
        0 4px 8px rgba(0, 0, 0, 0.025),
        0 8px 16px rgba(0, 0, 0, 0.025);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-front {
    background-color: #bbb;
    color: black;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.flip-card-back {
    background-color: var(--carousel-bg, #c8102e);
    color: var(--carousel-text, white);
    transform: rotateY(180deg);
    white-space: initial;
    padding: 20px;
    /*
    display: flex;
    flex-direction: column;
    justify-content: center;
    /**/
    overflow: auto;
    scrollbar-width: thin;

    border-radius: 2px;
    border: 1px solid color-mix(in oklab, var(--carousel-bg) 90%, black);
}

/* [team] shortcode flip=1: photo on front, content on white back */
.team-slider--flip .team-slider div {
    padding: 12px;
}

.team-member-flip {
    perspective: 1000px;
    min-height: 320px;
    width: 100%;
}

.team-member-flip-inner {
    position: relative;
    width: 100%;
    min-height: 320px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.team-member-flip:hover .team-member-flip-inner {
    transform: rotateY(180deg);
}

.team-member-flip-front,
.team-member-flip-back {
    position: absolute;
    left: 0;
    width: 100%;
    min-height: 320px;
    backface-visibility: hidden;
    border-radius: 3px;
}

.team-member-flip-front {
    background: #eee;
}

.team-member-flip-front img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

.team-member-flip-back {
    display: flex;
    align-items: center;

    background: #fff;
    color: #333;
    transform: rotateY(180deg);
    padding: 20px;
    overflow: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.team-slider--flip .team-member-flip-back h3,
.team-slider--flip .team-member-flip-back p {
    text-align: left;
}

.team-slider--flip .team-member-flip-back .agent-position {
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .team-carousel {
        --visible-cards: 2 !important;
    }
}

@media (max-width: 480px) {
    .team-carousel {
        --visible-cards: 1 !important;
    }
}
