/* MK Team Members: directory + bilingual profile sheet */

/* Directory */
.mk-people-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.mk-people-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mk-people-chip {
    padding: 9px 16px;
    border: 1px solid rgba(57, 110, 176, 0.18);
    border-radius: 999px;
    background: #FFFFFF;
    color: #1B3A5F;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.mk-people-chip:hover {
    border-color: #396EB0;
    color: #396EB0;
}

.mk-people-chip.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #1B3A5F 0%, #396EB0 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(57, 110, 176, 0.25);
}

.mk-people-search {
    position: relative;
    flex: 0 1 320px;
    margin: 0;
}

.mk-people-search i {
    position: absolute;
    top: 50%;
    inset-inline-start: 16px;
    transform: translateY(-50%);
    color: #396EB0;
}

.mk-people-search input {
    width: 100%;
    min-height: 46px;
    padding-inline: 42px 16px;
    border: 1px solid rgba(57, 110, 176, 0.18);
    border-radius: 999px;
    background: #FFFFFF;
    color: #1B3A5F;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mk-people-search input:focus {
    border-color: rgba(57, 110, 176, 0.5);
    box-shadow: 0 0 0 3px rgba(57, 110, 176, 0.12);
}

.mk-people-grid {
    justify-content: flex-start;
}

.mk-person-more {
    margin: -4px 0 12px;
    color: #6B7C93;
    font-size: 13px;
    font-weight: 600;
}

.mk-people-empty {
    margin: 24px 0 0;
    color: #6B7C93;
    text-align: center;
}

/* Profile toolbar */
.mk-tp-wrap {
    padding-top: 44px !important;
}

.mk-tp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.mk-tp-toolbar .mk-profile-breadcrumb span {
    color: #6B7C93;
    font-weight: 600;
}

/* Language visibility */
.mk-tp[data-tp-current="en"] [data-tp-sheet="ar"],
.mk-tp[data-tp-current="ar"] [data-tp-sheet="en"] {
    display: none;
}

.mk-tp [data-tp-sheet] {
    animation: mkTpIn 0.35s ease both;
}

@keyframes mkTpIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Profile sheet */
.mk-tp-sheet {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(57, 110, 176, 0.14);
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 20px 48px rgba(27, 36, 48, 0.08);
    text-align: start;
}

html.mk-lang-en .mk-tp-sheet {
    direction: ltr;
}

html.mk-lang-ar .mk-tp-sheet {
    direction: rtl;
}

html.mk-lang-ar .mk-tp-sheet,
html.mk-lang-ar .mk-tp-sheet h1,
html.mk-lang-ar .mk-tp-sheet h2,
html.mk-lang-ar .mk-tp-sheet h3,
html.mk-lang-ar .mk-tp-sheet li,
html.mk-lang-ar .mk-tp-sheet p {
    font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, sans-serif !important;
}

.mk-tp-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px 24px 32px;
    background: linear-gradient(180deg, #1B3A5F 0%, #2A5288 100%);
    color: rgba(255, 255, 255, 0.92);
}

.mk-tp-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    background: linear-gradient(135deg, #EEF4FB 0%, #DCE8F5 100%);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.mk-tp-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.mk-tp-photo .mk-team-avatar {
    width: 120px;
    height: 120px;
    font-size: 40px;
}

.mk-tp-citizen {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 600;
}

.mk-tp-citizen i {
    color: #9CC3F0;
}

.mk-tp-sheet .mk-tp-qual h3,
.mk-tp-sheet .mk-tp-contact h3 {
    margin: 0 0 6px;
    color: #9CC3F0 !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.mk-tp-qual p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.7;
}

.mk-tp-contact {
    display: grid;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mk-tp-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.mk-tp-contact a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mk-tp-contact a i {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    transition: background-color 0.2s ease;
}

.mk-tp-contact a:hover i {
    background: #396EB0;
}

.mk-tp-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mk-tp-head {
    padding: 32px 40px 28px;
    background: linear-gradient(135deg, #EEF4FB 0%, #F8FBFE 100%);
    border-bottom: 1px solid rgba(57, 110, 176, 0.12);
}

.mk-tp-sheet .mk-tp-name {
    margin: 0 0 12px;
    color: #1B3A5F !important;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.25;
}

.mk-tp-headlines {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mk-tp-headlines li {
    color: #396EB0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
}

.mk-tp-body {
    display: grid;
    gap: 32px;
    padding: 32px 40px 40px;
}

.mk-tp-block h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: #1B3A5F !important;
    font-size: 20px;
    font-weight: 700;
}

.mk-tp-block h2::before {
    content: "";
    width: 6px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(180deg, #396EB0 0%, #1B3A5F 100%);
}

.mk-tp-expertise {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mk-tp-expertise li {
    position: relative;
    padding-inline-start: 26px;
    color: #33475F;
    font-size: 15px;
    line-height: 1.75;
}

.mk-tp-expertise li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    inset-inline-start: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #396EB0;
    box-shadow: 0 0 0 4px rgba(57, 110, 176, 0.14);
}

.mk-tp-empty {
    margin: 0;
    color: #9AA8BA;
    font-style: italic;
}

.mk-tp-roles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mk-tp-roles a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(57, 110, 176, 0.14);
    border-radius: 14px;
    background: #F8FBFE;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mk-tp-roles a:hover {
    border-color: #396EB0;
    background: #FFFFFF;
    box-shadow: 0 10px 22px rgba(27, 36, 48, 0.08);
}

.mk-tp-roles strong {
    color: #1B3A5F;
    font-size: 14px;
    line-height: 1.45;
}

.mk-tp-roles span {
    color: #6B7C93;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.mk-tp-footer {
    margin-top: 28px;
}

html[dir="rtl"] .mk-tp-toolbar .mk-profile-breadcrumb i,
html[dir="rtl"] .mk-tp-footer i {
    transform: scaleX(-1);
}

/* Responsive */
@media (max-width: 991px) {
    .mk-tp-sheet {
        grid-template-columns: 1fr;
    }

    .mk-tp-side {
        display: grid;
        grid-template-columns: 200px minmax(0, 1fr);
        align-items: start;
        gap: 18px 24px;
    }

    .mk-tp-photo {
        grid-row: span 6;
    }
}

@media (max-width: 767px) {
    .mk-people-search {
        flex-basis: 100%;
    }

    .mk-tp-side {
        grid-template-columns: 1fr;
    }

    .mk-tp-photo {
        grid-row: auto;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    .mk-tp-head,
    .mk-tp-body {
        padding-inline: 22px;
    }

    .mk-tp-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media print {
    .mk-tp-toolbar,
    .mk-tp-footer {
        display: none !important;
    }

    .mk-tp-sheet {
        box-shadow: none;
    }
}
