﻿.mhg-team-list {
    padding: 2.75rem 0 1.75rem;
}

.mhg-team-list__heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
    color: #001b3f;
}

    .mhg-team-list__heading::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #d9dee5;
    }

.mhg-team-card {
    height: 100%;
    min-height: 327px;
    background: #ffffff;
    border: 1px solid #edf0f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 24px 28px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

    .mhg-team-card:hover {
        border-color: #d8dde5;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
    }

.mhg-team-card__image-link {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    text-decoration: none;
    overflow: visible;
}

.mhg-team-card__image,
.mhg-team-card__image-placeholder {
    display: block;
    width: 126px;
    height: 126px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    background: #f7f8fa;
    border: 2px solid #edf0f4;
    filter: grayscale(100%);
}

.mhg-team-card:hover .mhg-team-card__image {
    transform: none;
}

.mhg-team-card__body {
    width: 100%;
    padding: 0;
    text-align: center;
}

.mhg-team-card__name {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

    .mhg-team-card__name a {
        color: #001b3f;
        text-decoration: none;
    }

        .mhg-team-card__name a:hover {
            color: #e31b23;
        }

.mhg-team-card__title {
    min-height: 44px;
    margin-bottom: 0;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.35;
    color: #001b3f;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.mhg-team-card__divider {
    width: 100%;
    height: 1px;
    margin: 18px auto 14px;
    background: #edf0f4;
}

.mhg-team-card__actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.mhg-team-card__action {
    width: auto;
    height: auto;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8d9aaa;
    background: transparent;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .mhg-team-card__action:hover {
        color: #e31b23;
        background: transparent;
        border-color: transparent;
        transform: translateY(-1px);
    }

    .mhg-team-card__action svg {
        display: block;
        width: 16px;
        height: 16px;
    }

.mhg-team-list--team {
    padding-top: 2.4rem;
}

.mhg-team-list--filtered {
    padding-top: 2.4rem;
}

.mhg-team-list[hidden] {
    display: none !important;
}

.mhg-team-filter__reset {
    border: 1px solid #ed1c24;
    background: #ffffff;
    color: #ed1c24;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .mhg-team-filter__reset:hover {
        background: #ed1c24;
        color: #ffffff;
    }

    .mhg-team-filter__reset[hidden] {
        display: none !important;
    }

/* Viewport-safe Say Hi modal */
.mhg-modal-open {
    overflow: hidden;
}

.mhg-say-hi-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Keep it centered */
    align-items: center;
    justify-content: center;
    /* Allow scrolling if needed */
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
}

    .mhg-say-hi-modal.is-open {
        display: flex;
    }

    .mhg-say-hi-modal.is-open {
        display: flex !important;
        align-items: flex-start;
        justify-content: center;
    }

.mhg-say-hi-modal__overlay {
    position: fixed;
    inset: 0;
    background: transparent;
}

.mhg-say-hi-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 32px));
    /* Scroll only when necessary */
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    margin: auto;
    background: #ffffff;
    padding: 24px 32px 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

@media (max-height: 760px) {
    .mhg-say-hi-modal__dialog {
        padding: 18px 28px 24px;
    }

    .mhg-say-hi-modal__logo {
        margin-bottom: 10px;
    }

        .mhg-say-hi-modal__logo img {
            max-width: 120px;
        }

    .mhg-say-hi-modal h2 {
        margin-bottom: 14px;
        font-size: 20px;
    }

    .mhg-say-hi-form__field {
        margin-bottom: 10px;
    }

        .mhg-say-hi-form__field input,
        .mhg-say-hi-form__field textarea {
            padding: 10px 13px;
        }

        .mhg-say-hi-form__field textarea {
            min-height: 82px;
        }

    .mhg-say-hi-form__submit {
        padding: 13px 18px;
    }
}

@media (max-width: 991.98px) {
    .mhg-team-card {
        min-height: 310px;
    }
}

@media (max-width: 767.98px) {
    .mhg-team-list {
        padding: 2rem 0 1.25rem;
    }

    .mhg-team-list__heading {
        font-size: 1.45rem;
    }

    .mhg-team-card {
        min-height: auto;
        padding: 24px 20px;
    }

    .mhg-team-card__image,
    .mhg-team-card__image-placeholder {
        width: 112px;
        height: 112px;
    }
}

@media (max-width: 575px) {
    .mhg-say-hi-modal {
        padding: 12px;
    }

    .mhg-say-hi-modal__dialog {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        margin: 12px auto;
        padding: 22px 18px 24px;
    }

    .mhg-say-hi-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
