.mhetm-team-wrapper,
.mhetm-team-wrapper *,
.mhetm-team-wrapper *::before,
.mhetm-team-wrapper *::after {
    box-sizing: border-box !important;
}

.mhetm-team-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.mhetm-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    margin-bottom: 60px !important;
    width: 100% !important;
}

.mhetm-row {
    display: block !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0 0 40px 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    overflow: hidden !important;
}

.mhetm-row:last-child {
    margin-bottom: 0 !important;
}

.mhetm-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Ensure each card doesn't behave strangely */
/* 340px: a leghosszabb e-mail cím (roland.letenovics@mentonhumanexpert.hu) is
   kifér egy sorba, tördelés nélkül. */
.mhetm-card {
    flex: 0 1 340px;
    max-width: 340px;
    min-width: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Group (department) block
   -------------------------------------------------------------------------- */
.mhetm-group {
    margin-bottom: 48px;
}

.mhetm-group-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #003770;
    /* MHE brand navy */
    border-bottom: 2px solid #a57d40;
    /* MHE brand gold accent */
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.mhetm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 28px 20px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease, transform 0.22s ease, border-color 0.22s ease;
}

/* Minden kartya arany szegelyt kap es picit megno hoverre (ugyfelkeres). */
.mhetm-card:hover {
    box-shadow: 0 8px 28px rgba(0, 24, 56, 0.16);
    transform: translateY(-3px) scale(1.02);
    border-color: #cfac6a;
}

/* --------------------------------------------------------------------------
   Bemutatkozoval rendelkezo kartya: kattinthato, arany szegelyt kap hoverre,
   es egy arany "i" jelolest a foto sarkaban.
   -------------------------------------------------------------------------- */
.mhetm-card--has-bio { cursor: pointer; }

/* A felugró ablak forrás-blokkja soha nem látszik a kártyán. */
.mhetm-card__bio-source { display: none !important; }

.mhetm-card--has-bio:focus-within {
    border-color: #cfac6a;
    box-shadow: 0 8px 28px rgba(0, 24, 56, 0.16);
}

.mhetm-card__badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #dcc089 0%, #a57d40 100%);
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 24, 56, 0.3);
    pointer-events: none;
}

.mhetm-card__bio-btn {
    margin: 8px 0 0;
    padding: 0 0 2px;
    background: none;
    border: 0;
    border-bottom: 1.5px solid #cfac6a;
    color: #a57d40;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
}

.mhetm-card__bio-btn::after { content: ' \203A'; }
.mhetm-card__bio-btn:hover { color: #653a17; }

/* --------------------------------------------------------------------------
   Photo / initials
   -------------------------------------------------------------------------- */
.mhetm-card__photo-wrap {
    position: relative;
    width: 230px;
    height: 230px;
    overflow: hidden;
    margin-bottom: 22px;
    flex-shrink: 0;
    background: transparent;
}

.mhetm-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Az arany MHE pin helyorzo: teljes egeszeben latszodjon, ne vagja le a csepp hegyét */
.mhetm-card__photo--placeholder {
    object-fit: contain;
}

.mhetm-card__initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #003770;
    letter-spacing: 0.03em;
    user-select: none;
}

/* --------------------------------------------------------------------------
   Card body
   -------------------------------------------------------------------------- */
.mhetm-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    flex: 1;
    justify-content: flex-start;
}

.mhetm-card__name {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #003770;
    line-height: 1.35;
}

.mhetm-card__position {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.98rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Counties list (értékesítők only)
   -------------------------------------------------------------------------- */
.mhetm-card__counties {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

.mhetm-card__counties li {
    font-size: 0.82rem;
    color: #444;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Contact links
   -------------------------------------------------------------------------- */
.mhetm-card__contacts {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    width: 100%;
}

.mhetm-card__contact {
    font-size: 0.78rem;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    /* break-all helyett: csak akkor tör, ha tényleg nem fér ki, és nem a szó közepén */
    overflow-wrap: anywhere;
    word-break: normal;
}

.mhetm-card__contact:hover {
    color: #a57d40;
}

.mhetm-card__phone::before {
    content: '\260E\FE0E\0020';
    /* phone receiver, text variant */
}

.mhetm-card__email::before {
    content: '\2709\FE0E\0020';
    /* envelope, text variant */
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */

/* Tablet landscape / small desktop: still nowrap, tighter gap */
@media (max-width: 1100px) {
    .mhetm-grid {
        gap: 20px !important;
    }
}

/* Tablet portrait: wrap, 2 columns */
@media (max-width: 768px) {
    .mhetm-team-wrapper {
        gap: 20px !important;
    }

    .mhetm-row {
        overflow: visible !important;
        margin-bottom: 20px !important;
    }

    .mhetm-grid {
        flex-wrap: wrap !important;
        gap: 16px !important;
    }

    .mhetm-card {
        flex: 0 0 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
        min-width: 0 !important;
        padding: 18px 12px 16px !important;
    }

    .mhetm-card__photo-wrap {
        width: 108px !important;
        height: 108px !important;
        margin-bottom: 12px !important;
    }

    .mhetm-card__initials {
        font-size: 1.4rem !important;
    }

    .mhetm-card__name {
        font-size: 0.9rem !important;
    }

    .mhetm-card__position {
        font-size: 0.75rem !important;
    }

    .mhetm-card__contact {
        font-size: 0.72rem !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .mhetm-grid {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .mhetm-card {
        flex: 0 0 100% !important;
        max-width: 340px !important;
        padding: 16px 14px 14px !important;
    }

    .mhetm-card__photo-wrap {
        width: 116px !important;
        height: 116px !important;
    }
}

/* --------------------------------------------------------------------------
   Bemutatkozo felugro ablak
   -------------------------------------------------------------------------- */
.mhetm-bio-modal[hidden] { display: none; }

.mhetm-bio-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mhetm-bio-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 24, 56, 0.62);
    backdrop-filter: blur(2px);
}

.mhetm-bio-modal__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 86vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 22px;
    padding: 34px 36px 32px;
    box-shadow: 0 30px 80px rgba(0, 20, 44, 0.45);
    border-top: 4px solid #cfac6a;
}

.mhetm-bio-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f3f0e8;
    color: #003770;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mhetm-bio-modal__close:hover { background: #cfac6a; color: #fff; }

.mhetm-bio-modal__head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e3decf;
}

.mhetm-bio-modal__photo {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.mhetm-bio-modal__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mhetm-bio-modal__name {
    margin: 0 0 2px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #003770;
}

.mhetm-bio-modal__position {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #a57d40;
}

.mhetm-bio-modal__text {
    font-size: 1rem;
    line-height: 1.7;
    color: #3c4552;
    text-align: left;
}

body.mhetm-bio-open { overflow: hidden; }

@media (max-width: 560px) {
    .mhetm-bio-modal__panel { padding: 28px 22px 24px; border-radius: 18px; }
    .mhetm-bio-modal__head { gap: 14px; }
    .mhetm-bio-modal__photo { width: 72px; height: 72px; }
}

/* --------------------------------------------------------------------------
   Sortable placeholder (admin only – harmless on frontend)
   -------------------------------------------------------------------------- */
.mhetm-sortable-placeholder {
    height: 48px;
    background: #f0f8ff;
    border: 2px dashed #90c0e0;
    border-radius: 4px;
    visibility: visible !important;
}