/* GraphicBidu V8 — mentor portraits and directory card recovery.
   Kept isolated from the candidate/dashboard systems. */

/* Fix the V9 selector collision: mentor-v9-headline is card copy, never a hero h1. */
.mentor-v9-hero h1 {
    margin: 0;
    max-width: 900px;
    font-size: clamp(2.4rem, 5.5vw, 5.35rem);
    line-height: .99;
    letter-spacing: -.065em;
    color: #111827;
}

.mentor-v9-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    justify-content: start;
}

.mentor-v9-card {
    min-width: 0;
    padding: 22px;
    gap: 15px;
}

.mentor-v9-card-identity {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    min-width: 0;
}

.mentor-v9-avatar,
.mentor-public-avatar,
.mentor-workspace-avatar,
.mentor-photo-card__preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dfe3ea;
    background: linear-gradient(135deg, #eef1f6, #f7f8fb);
    color: #111827;
    font-weight: 900;
    letter-spacing: -.04em;
}

.mentor-v9-avatar {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    font-size: 1.2rem;
}

.mentor-v9-avatar img,
.mentor-public-avatar img,
.mentor-workspace-avatar img,
.mentor-photo-card__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mentor-v9-card h3 {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
    line-height: 1.15;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.mentor-v9-card .mentor-v9-headline {
    max-width: none;
    margin: 5px 0 0;
    color: #536076;
    font-size: .91rem;
    line-height: 1.45;
    letter-spacing: normal;
}

.mentor-v9-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
    margin: 0;
}

.mentor-v9-facts > div {
    min-width: 0;
    padding-top: 10px;
    border-top: 1px solid #eceef2;
}

.mentor-v9-facts dt {
    color: #728096;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mentor-v9-facts dd {
    margin: 4px 0 0;
    color: #111827;
    font-size: .87rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mentor-v9-card .mentor-v9-expertise {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #475569;
    font-size: .88rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.mentor-v9-card .chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 30px;
}

.mentor-v9-card .chip-wrap .chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mentor-v9-card-action {
    width: 100%;
    margin-top: auto;
    text-align: center;
}

/* New self-service mentor portrait panel on /mentor/services. */
.mentor-photo-section {
    padding-top: 0;
    padding-bottom: 4px;
}

.mentor-photo-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(255px, .72fr);
    gap: clamp(18px, 3vw, 30px);
    align-items: center;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid #e1e4e9;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 13px 32px rgba(15,23,42,.045);
}

.mentor-photo-card__preview {
    width: 132px;
    height: 132px;
    flex: 0 0 132px;
    border-radius: 26px;
    font-size: 2rem;
}

.mentor-photo-card__copy {
    min-width: 0;
}

.mentor-photo-card__copy .eyebrow {
    margin: 0 0 8px;
}

.mentor-photo-card__copy h2 {
    max-width: 23ch;
    margin: 0;
    color: #111827;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    line-height: 1.12;
    letter-spacing: -.04em;
}

.mentor-photo-card__copy > .muted {
    max-width: 66ch;
    margin: 10px 0 0;
    line-height: 1.6;
}

.mentor-photo-card__rules {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    color: #536076;
    font-size: .84rem;
    line-height: 1.45;
    list-style: none;
}

.mentor-photo-card__rules li {
    position: relative;
    padding-left: 18px;
}

.mentor-photo-card__rules li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #166534;
    font-weight: 900;
}

.mentor-photo-card__form {
    display: grid;
    gap: 12px;
    min-width: 0;
    align-self: stretch;
    align-content: center;
    padding: 16px;
    border: 1px solid #e3e5e9;
    border-radius: 15px;
    background: #fafafa;
}

.mentor-photo-file-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #111827;
    font-size: .87rem;
    font-weight: 800;
}

.mentor-photo-file-field input[type="file"] {
    width: 100%;
    min-width: 0;
    padding: 9px;
    border: 1px dashed #c6ccd6;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font: inherit;
}

.mentor-photo-card__form .button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Photo feedback in the mentor workspace and public profile. */
.mentor-workspace-heading,
.mentor-public-hero-copy {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.mentor-workspace-heading > div:last-child,
.mentor-public-hero-copy > div:last-child {
    min-width: 0;
}

.mentor-workspace-avatar {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 19px;
    font-size: 1.25rem;
}

.mentor-public-avatar {
    width: 116px;
    height: 116px;
    flex: 0 0 116px;
    border-radius: 26px;
    font-size: 2rem;
}

@media (max-width: 860px) {
    .mentor-photo-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .mentor-photo-card__form {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .mentor-photo-card__form .button {
        width: auto;
    }
}

@media (max-width: 640px) {
    .mentor-v9-grid {
        grid-template-columns: 1fr;
    }

    .mentor-v9-facts {
        grid-template-columns: 1fr 1fr;
    }

    .mentor-photo-card {
        grid-template-columns: 1fr;
    }

    .mentor-photo-card__preview {
        width: 104px;
        height: 104px;
        border-radius: 22px;
    }

    .mentor-photo-card__form {
        grid-column: auto;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .mentor-photo-card__form .button {
        width: 100%;
    }

    .mentor-workspace-heading,
    .mentor-public-hero-copy {
        align-items: flex-start;
    }

    .mentor-public-avatar {
        width: 84px;
        height: 84px;
        flex-basis: 84px;
        border-radius: 20px;
        font-size: 1.45rem;
    }
}
