.mjtm-team-wrapper,
.mjtm-team-wrapper *,
.mjtm-team-wrapper *::before,
.mjtm-team-wrapper *::after {
    box-sizing: border-box !important;
}

.mjtm-team-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.mjtm-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    margin-bottom: 60px !important;
    width: 100% !important;
}

.mjtm-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;
}

.mjtm-row:last-child {
    margin-bottom: 0 !important;
}

.mjtm-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 */
.mjtm-card {
    flex: 0 1 286px;
    max-width: 286px;
    min-width: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Group (department) block
   -------------------------------------------------------------------------- */
.mjtm-group {
    margin-bottom: 48px;
}

.mjtm-group-title {
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #00306c;
    /* HQS brand navy */
    border-bottom: 2px solid #00306c;
    /* HQS brand blue accent */
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.mjtm-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 26px 18px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.mjtm-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Photo / initials
   -------------------------------------------------------------------------- */
.mjtm-card__photo-wrap {
    width: 198px;
    height: 198px;
    overflow: hidden;
    margin-bottom: 22px;
    flex-shrink: 0;
    background: transparent;
}

.mjtm-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mjtm-card__initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a3c5e;
    letter-spacing: 0.03em;
    user-select: none;
}

/* --------------------------------------------------------------------------
   Card body
   -------------------------------------------------------------------------- */
.mjtm-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    flex: 1;
    justify-content: flex-start;
}

.mjtm-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
}

.mjtm-card__position {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Counties list (értékesítők only)
   -------------------------------------------------------------------------- */
.mjtm-card__counties {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

.mjtm-card__counties li {
    font-size: 0.82rem;
    color: #444;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Contact links
   -------------------------------------------------------------------------- */
.mjtm-card__contacts {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    width: 100%;
}

.mjtm-card__contact {
    font-size: 0.78rem;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    word-break: break-all;
}

.mjtm-card__contact:hover {
    color: #00306c;
}

.mjtm-card__phone::before {
    content: '\260E\FE0E\0020';
    /* phone receiver, text variant */
}

.mjtm-card__email::before {
    content: '\2709\FE0E\0020';
    /* envelope, text variant */
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */

/* Tablet landscape / small desktop: still nowrap, tighter gap */
@media (max-width: 1100px) {
    .mjtm-grid {
        gap: 20px !important;
    }
}

/* Tablet portrait: wrap, 2 columns */
@media (max-width: 768px) {
    .mjtm-team-wrapper {
        gap: 20px !important;
    }

    .mjtm-row {
        overflow: visible !important;
        margin-bottom: 20px !important;
    }

    .mjtm-grid {
        flex-wrap: wrap !important;
        gap: 16px !important;
    }

    .mjtm-card {
        flex: 0 0 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
        min-width: 0 !important;
        padding: 18px 12px 16px !important;
    }

    .mjtm-card__photo-wrap {
        width: 90px !important;
        height: 90px !important;
        margin-bottom: 12px !important;
    }

    .mjtm-card__initials {
        font-size: 1.4rem !important;
    }

    .mjtm-card__name {
        font-size: 0.9rem !important;
    }

    .mjtm-card__position {
        font-size: 0.75rem !important;
    }

    .mjtm-card__contact {
        font-size: 0.72rem !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .mjtm-grid {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .mjtm-card {
        flex: 0 0 100% !important;
        max-width: 340px !important;
        padding: 16px 14px 14px !important;
    }

    .mjtm-card__photo-wrap {
        width: 100px !important;
        height: 100px !important;
    }
}

/* --------------------------------------------------------------------------
   Sortable placeholder (admin only – harmless on frontend)
   -------------------------------------------------------------------------- */
.mjtm-sortable-placeholder {
    height: 48px;
    background: #f0f8ff;
    border: 2px dashed #90c0e0;
    border-radius: 4px;
    visibility: visible !important;
}