/* Team Member Page Styles */

/* Profile Section - Side by Side Layout */
.tm-profile-section {
    margin: 50px auto 70px;
    max-width: 1200px;
    padding: 0 20px;
}

.tm-profile-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 35px;
    align-items: stretch;
    /* Changed from start to stretch */
}

/* Left: Gray Image Box */
.tm-image-box {
    background: #d4d0c8;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.tm-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: Beige Info Card */
.tm-info-card {
    background: #f5f3ef;
    padding: 45px 35px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    /* Match parent height */
    justify-content: center;
    /* Center content vertically */
}

.tm-badge {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 6px 15px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    align-self: flex-start;
}

.tm-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.tm-name-row h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.tm-name-row .tm-credentials {
    font-size: 1.4rem;
    color: #666;
    font-weight: 500;
    border-left: 2px solid #ccc;
    padding-left: 12px;
    line-height: 1.2;
}

.tm-bio-excerpt {
    font-size: 1.5rem;
    line-height: 1.6;
    color: #555;
    margin-top: 5px;
}

.tm-bio-excerpt p {
    margin: 0;
}

.tm-social-icons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tm-social-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e1e1;
    background: transparent;
    border-radius: 50%;
    color: #15171a;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0;
}

.tm-social-btn:hover {
    background: #15171a;
    color: #fff;
    border-color: #15171a;
}

.tm-social-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Main Content Area */
.tm-content-area {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.tm-content-area h2 {
    font-size: 2.4rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.tm-content-area p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 18px;
}

/* Education Section */
.tm-education-section {
    margin-top: 50px;
}

.tm-content-area .tm-education-section h3 {
    font-family: serif;
    font-size: 2.2rem;
    margin-bottom: 35px;
    font-weight: 400;
}

.tm-edu-table {
    width: 100%;
}

.tm-edu-row {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
}

.tm-edu-row:last-child {
    border-bottom: none;
}

.tm-edu-label {
    width: 35%;
    font-weight: 600;
    font-size: 1.5rem;
    color: #000;
}

.tm-edu-value {
    width: 65%;
    font-size: 1.5rem;
    color: #555;
}

/* Responsive */
@media (max-width: 900px) {
    .tm-profile-section {
        overflow-x: hidden;
    }

    .tm-profile-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .tm-image-box {
        max-width: 400px;
        margin: 0 auto;
    }

    .tm-info-card {
        padding: 40px 30px;
    }

    .tm-name-row h1 {
        font-size: 2.6rem;
    }

    .tm-edu-row {
        flex-direction: column;
        gap: 8px;
    }

    .tm-edu-label,
    .tm-edu-value {
        width: 100%;
    }
}

/* Horizontal Scrolling Team List on Team Member Pages */
.team-member-page .team-section.team-section-swipe {
    overflow: hidden;
}

.team-member-page .team-section.team-section-swipe .team-grid-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
}

.team-member-page .team-section.team-section-swipe .team-grid {
    display: flex !important;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0 20px 1rem;
    grid-template-columns: unset !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    cursor: grab;
}

.team-member-page .team-section.team-section-swipe .team-grid::-webkit-scrollbar {
    display: none;
}

.team-member-page .team-section.team-section-swipe .team-card {
    display: block !important;
    flex: 0 0 clamp(240px, 24vw, 280px);
    width: clamp(240px, 24vw, 280px);
    min-width: clamp(240px, 24vw, 280px);
    max-width: clamp(240px, 24vw, 280px);
    scroll-snap-align: start;
}

@media (max-width: 767px) {
    .team-member-page .team-section.team-section-swipe .team-grid {
        gap: 1.5rem;
    }

    .team-member-page .team-section.team-section-swipe .team-card {
        flex-basis: 85vw;
        width: 85vw;
        min-width: 85vw;
        max-width: 85vw;
    }
}
