{# =========================================
   Module - Base / Shared Styles
========================================= #}
.o-teamMembers__content {
    text-align: center;
}

{# =========================================
   Team Members - Base / Shared Styles
========================================= #}

.m-teamMembers__name,
.m-teamMembers__card p {
    color: var(--color-blue);
    transition: color 0.5s ease;
}

.m-teamMembers__content {
    margin-bottom: 50px;
}

.m-teamMembers__buttons {
    margin-top: 2rem;
}

.m-teamMembers__list {
    overflow: hidden;
}

.m-teamMembers__card {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

a.m-teamMembers__card:hover,
a.m-teamMembers__card:active,
a.m-teamMembers__card:focus {
    text-decoration: none;
    color: inherit;
}

.m-teamMembers__card h5 {
    margin-bottom: 0;
}

.m-teamMembers__card .m-teamMembers__image {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.m-teamMembers__image img {
    width: 100%;
}

.m-teamMembers__card .mobile-details {
    display: grid;
    grid-template-columns: 7fr 1fr;
    column-gap: 12px;
    margin-top: 0;
}

.m-teamMembers__card .mobile-details img {
    position: static;
}


{# =========================================
   Team Members - Desktop Styles
========================================= #}

/* Query for hiding back button on tablet */
@media (min-width: 767px) {
    .team-modal-back {
        display:none;
    }
}


@media (min-width: 992px) {
    .m-teamMembers__card {
        margin-bottom: 30px;
    }

    .m-teamMembers__col.col-lg-custom {
        max-width: 220px;
    }

    .m-teamMembers__buttons {
        margin-top: 0;
    }

    .m-teamMembers__card:hover {
        cursor: pointer;
    }

    .m-teamMembers__card:hover .m-teamMembers__image:before {
        opacity: 1;
    }

    .m-teamMembers__card:hover .m-teamMembers__image {
        content: "";
        opacity: 0.75;
        -webkit-transition: all 0.5s ease;
        transition: all 0.5s ease;
    }

    .m-teamMembers__card:hover .m-teamMembers__name,
    .m-teamMembers__card:hover p {
        color: var(--color-maroon);
        -webkit-transition: all 0.5s ease;
        transition: all 0.5s ease;
    }


    .o-teamMembers .modal-dialog {
        width: 1170px;
        max-width: calc(100% - 40px);
        height: 100%;
        display: flex;
        align-items: center;
        margin: 0 auto;
    }

    .o-teamMembers .modal-content {
        border: 0;
        border-radius: 12px;
        height: auto !important;
    }

    .o-teamMembers .modal-body {
        position: relative;
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: space-between;
        padding: 100px;
    }

    .m-teamMembers__modalImage {
        width: 35.05%;
    }

    .m-teamMembers__modalContent {
        width: 58.55%;
    }

    .o-teamMembers .modal-body h3 {
        margin-bottom: 5px;
    }

    .o-teamMembers .modal-close {
        position: absolute;
        top: 50px;
        right: 50px;
        cursor: pointer;
    }

    .o-teamMembers .modal-body .m-teamMembers__modalImage img {
        border-radius: 12px;
    }

    .team-modal-back {
        display:none;
    }

    
    .m-teamMembers__image {
        opacity: 1;
        transition: opacity 0.5s ease;
    }

    .m-teamMembers__name,
    .m-teamMembers__card p {
      color: var(--color-blue);
      transition: color 0.5s ease;
    }

    .m-teamMembers__card:hover .m-teamMembers__image {
        opacity: 0.75;
    }

    .m-teamMembers__card:hover .m-teamMembers__name,
    .m-teamMembers__card:hover p {
        color: var(--color-maroon);
    }

}


{# =========================================
   Team Members - Mobile / Tablet Styles
========================================= #}

@media (max-width: 991px) {
    .m-teamMembers__card div img {
        bottom: auto;
    }

    .o-teamMembers .modal-dialog {
        margin: 0;
        width: 100vw;
        height: 100vh;
    }

    .o-teamMembers .modal-content {
        width: 100vw;
        height: 100%;
    }

    .o-teamMembers .modal-body {
        padding: 50px 30px;
    }

    .o-teamMembers .modal-body .m-teamMembers__modalImage {
        margin-bottom: 30px;
    }

    .o-teamMembers .modal-body .m-teamMembers__modalImage img {
        width: 60.294%;
        border-radius: 12px;
    }

    .o-teamMembers .modal-body .m-teamMembers__modalContent h3 {
        margin-bottom: 5px;
    }

    .o-teamMembers .modal-body .m-teamMembers__modalContent .subtitle {
        margin-bottom: 30px;
    }

    .o-teamMembers .modal-body .modal-close {
        position: absolute;
        top: 50px;
        right: 30px;
        width: 26px;
        height: 26px;
    }

    .o-teamMembers .modal-body .modal-close img {
        width: 100%;
    }

    .m-teamMembers__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
        margin-left: 0;
        margin-right: 0;
        align-items: start;
    }

    .m-teamMembers__grid > .m-teamMembers__col {
        width: auto;
        max-width: none; 
        flex: initial;
        padding-left: 0;
        padding-right: 0;
    }

    .m-teamMembers__card {
        text-align: center;
    }

    .m-teamMembers__card .m-teamMembers__image {
        margin-bottom: 12px;
    }
    
}

@media (min-width: 308px) and (max-width: 991px) {
    .o-teamMembers .modal-content {
        position: relative;
        width: 80% !important;
        height: auto !important;
        margin: 0 auto;
    }
}


{# =========================================
   Modal Styles
========================================= #}

.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20000;
    display: none;
    width: 100%;
    height: 100%;
    overflow: auto;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.team-modal[aria-hidden="false"] {
    display: flex;
}

.team-modal-dialog {
    position: relative;
    z-index: 10000;
    width: 90%;
    max-width: 700px;
    margin: auto;
    animation: slideUp 0.3s ease-in-out;
    outline: none;
}

.team-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-in-out;
}

.team-modal-header {
    position: relative;
    padding: 60px 50px 60px 50px;
    margin-bottom: 0;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.team-modal-header-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.team-modal-image {
    flex-shrink: 0;
}

.team-modal-image img {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
}

.team-modal-image::before,
.team-modal-image::after {
    content: "";
    position: absolute;
    z-index: -1;
    opacity: 0;
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

.team-modal-info {
    flex: 1;
    min-width: 0;
}

.team-modal-body {
    padding: 0 40px 50px 40px;
    margin-top: 0;
    max-height: 60vh;
    overflow-y: auto;
    background-color: var(--color-white);
    border-radius: 0 0 12px 12px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.team-modal-description p {
    margin-bottom: 16px;
}

.team-modal-description p:last-child {
    margin-bottom: 0;
}

.team-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.team-modal-close:hover {
    color: #000;
}

.team-modal-close:focus {
    outline: none;
}

.team-modal-close:focus-visible {
    outline: 2px solid #4c9ffe;
    outline-offset: 2px;
    border-radius: 4px;
}

.team-modal-linkedin {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-desktop-xs);
    text-decoration: none;
    color: var(--color-blue);
    
    opacity: 1;
    transition: opacity 0.5s ease;
    -webkit-transition: opacity 0.5s ease;
}

.team-modal-linkedin:hover {
    opacity: 0.7;
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease;
}


{# =========================================
   Modal - Mobile Styles
========================================= #}

@media (max-width: 767px) {
    /* .o-teamMembers {
        --team-member-mobile-offset: 128px;
    } */

    .team-modal {
        top: var(--team-member-mobile-offset);
        left: 0;
        width: 100vw;
        height: calc(100dvh - var(--team-member-mobile-offset));
        padding: 0;
        overflow: hidden;
        align-items: stretch;
        justify-content: stretch;
    }

    .team-modal[aria-hidden="false"] {
        display: block;
    }

    .team-modal-backdrop {
        display: none;
    }

    @media (max-width: 991px) {
        .team-modal-dialog {
            width: 100%;
            max-width: none;
            height: 100%;
            margin: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            animation: slideInRight 0.5s ease-in-out;
            background-color: var(--color-white);
        }

        .team-modal.is-closing .team-modal-dialog {
            animation: slideOutLeft 0.5s ease-in-out;
        }
    }

    .team-modal-header {
        padding: 24px 32px 24px 32px;
        background-color: var(--color-white);
        border-radius: 0;
    }

    .team-modal-header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .team-modal-back {
        display: inline-flex;
    }

    .team-modal-close {
        display: none;
    }

    .team-modal-info {
        width: 100%;
    }

    .team-modal-name {
        margin: 0;
    }

    .team-modal-image img {
        width: 130px;
        height: 130px;
    }

    .team-modal-linkedin {
        margin-top: 0;
    }

    .team-modal-body {
        max-height: none;
        overflow: visible;
        padding: 0 32px 40px 32px;
        background-color: var(--color-white);
        border-radius: 0;
    }

    .team-modal-linkedin {
        margin-top: 0;
    }

    .team-modal-close {
        display: none;
    }

    .team-modal-back {
        align-items: center;
        gap: 8px;
        padding: 0;
        margin: 0 0 24px 0;
        border: none;
        background: none;
        color: var(--color-blue);
        cursor: pointer;
        text-decoration: none;
    }

    .team-modal-back:hover {
        opacity: 0.75;
        transition: all 0.3s ease;
    }

    .team-modal-back:focus {
        outline: none;
    }

    .team-modal-back:focus-visible {
        outline: 2px solid #4c9ffe;
        outline-offset: 2px;
        border-radius: 4px;
    }

    .team-modal-back-icon {
        font-size: 28px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

}


{# =========================================
   Utilities
========================================= #}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}


{# =========================================
   Animations
========================================= #}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 1;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 1;
        transform: translateX(-100%);
    }
}