/* MEMBER PROFILE PAGE  CSS (Mobile-first) */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

/* Outer wrapper spacing */
.memberpage-wrap { padding: 0 0 40px; }

/* Cover Banner */
.mp-cover {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #003d82 0%, #007cba 60%, #003d82 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 0;
}

.mp-cover-tagline {
    position: absolute;
    top: 50%;
    right: 15px;
    font-family: 'Great Vibes', cursive;
    color: #fff;
    font-size: 18px; /* Smaller on mobile */
    line-height: 1.1;
    text-align: right;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    transform: translateY(-50%) rotate(-3deg);
}
.mp-cover-tagline span {
    font-size: 1.3em;
    display: inline-block;
    padding-left: 15px;
}

/* MOBILE LAYOUT (default / < 768px)
   Avatar overlaps cover, full-width card */
.mp-layout { display: block; }

/* Mobile profile card  sits right after cover */
.mp-sidebar {
    width: 100%;
    margin-top: -50px;          /* pulls avatar up over cover */
    position: relative;
    z-index: 10;
}
.mp-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
    overflow: hidden;
    margin-bottom: 14px;
}

/* Avatar */
.mp-avatar-wrap {
    display: flex;
    justify-content: center;
    padding: 14px 0 6px;
}
.mp-avatar {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 14px rgba(0,0,0,.18);
    transition: border-radius 0.3s ease;
}
.mp-avatar:hover {
    border-radius: 50%;
}

/* Sidebar text info */
.mp-sidebar-info {
    padding: 4px 18px 16px;
    text-align: center;
}
.mp-name {
    font-size: 19px;
    font-weight: 700;
    color: #002d6b;
    margin: 4px 0 3px;
    line-height: 1.3;
}
.mp-title {
    font-size: 13px;
    font-weight: 600;
    color: #007cba;
    margin: 0 0 2px;
}
.mp-org-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 2px;
}
.mp-session {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 10px;
}

/* Sidebar Nav */
.mp-nav-card {
    padding: 8px 0;
}
.mp-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mp-sidebar-nav li {
    margin: 0;
    border-bottom: 1px solid #f1f5f9;
}
.mp-sidebar-nav li:last-child {
    border-bottom: none;
}
.mp-sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.mp-sidebar-nav a i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    height: 20px;
    color: #64748b;
}
.mp-sidebar-nav a:hover,
.mp-sidebar-nav a.active {
    background: #f8fafc;
    color: #007cba;
    border-left: 3px solid #007cba;
    padding-left: 15px;
}
.mp-sidebar-nav a:hover i,
.mp-sidebar-nav a.active i {
    color: #007cba;
}

html {
    scroll-behavior: smooth;
}

/* Quick info chips on mobile */
.mp-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 10px 14px 4px;
    border-top: 1px solid #f1f5f9;
}
.mp-qi-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #374151;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 10px;
    line-height: 1.3;
    text-align: left;
}
.mp-qi-icon { font-size: 13px; flex-shrink: 0; }

/* Send Message button */
.mp-msg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 32px);
    margin: 12px 16px 14px;
    padding: 10px 14px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
    font-family: inherit;
}

/* Social icons */
.mp-social-icons {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 12px 16px 14px;
    border-top: 1px solid #f1f5f9;
}
.mp-social-icons a {
    color: #007cba;
    font-size: 22px;
    transition: color .2s, transform .2s;
    display: inline-flex;
}
.mp-social-icons a:hover { color: #003d82; transform: translateY(-2px); }

/* Main content: full width on mobile, padding-top = 0 */
.mp-main { padding-top: 0; min-width: 0; }

/* Cards */
.mp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    margin-bottom: 12px;
    overflow: hidden;
}
.mp-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.mp-card-icon { font-size: 16px; line-height: 1; }
.mp-card-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #002d6b;
}
.mp-card-body { padding: 14px 16px; }

/* Two-col cards  single column on mobile */
.mp-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.mp-two-col .mp-card { margin-bottom: 0; }

/* Info Table */
.mp-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.mp-info-table tr {
    display: flex;
    flex-wrap: wrap;
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}
.mp-info-table tr:last-child { border-bottom: none; }
.mp-info-table td {
    padding: 1px 3px;
    color: #374151;
    vertical-align: top;
}
/* Label: full width on mobile */
.mp-info-table td:first-child {
    flex: 0 0 100%;
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
/* Colon: hidden on mobile */
.mp-info-table td:nth-child(2) {
    display: none;
}
/* Value: full width on mobile */
.mp-info-table td:nth-child(3) {
    flex: 0 0 100%;
}
.mp-empty { color: #9ca3af; font-style: italic; }
.mp-member-id { color: #007cba; font-size: 13px; letter-spacing: .5px; }

/* About Me */
.mp-about-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

/* Leadership Timeline */
.mp-timeline { position: relative; padding-left: 22px; }
.mp-timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 8px; bottom: 8px;
    width: 2px;
    background: #e2e8f0;
}
.mp-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}
.mp-timeline-item:last-child { margin-bottom: 0; }
.mp-tl-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
    flex-shrink: 0;
    margin-left: -22px;
    margin-top: 3px;
    position: relative;
    z-index: 1;
}
.mp-tl-dot-active { background: #007cba; box-shadow: 0 0 0 2px #007cba; }
.mp-tl-content { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mp-tl-year {
    font-size: 11px; font-weight: 700; color: #007cba;
    background: #eff6ff; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.mp-tl-post { font-size: 13px; font-weight: 700; color: #002d6b; }
.mp-tl-org  { font-size: 12px; color: #6b7280; }
.mp-tl-active .mp-tl-post { color: #007cba; }

/* Skills */
.mp-skills-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-skill-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

/* Related Batchmates */
.mp-related-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    margin-top: 16px;
    margin-bottom: 24px;
    overflow: visible;
}
.mp-related-header {
    padding: 12px 16px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.mp-related-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #002d6b;
    flex: 1;
}
.mp-related-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    scrollbar-width: none;
    flex: 0 0 100%;
}
.mp-related-tabs::-webkit-scrollbar { display: none; }
.mp-rtab {
    padding: 8px 6px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    font-family: inherit;
    flex: 1 1 auto;
    min-width: 22%;
    text-align: center;
}
.mp-rtab:hover { color: #007cba; }
.mp-rtab-active { color: #007cba; border-bottom-color: #007cba; font-weight: 700; }
.mp-related-pane { display: none; padding: 14px; }
.mp-rpane-active { display: block; }
.mp-related-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
    padding-bottom: 8px;
}
.mp-related-grid::-webkit-scrollbar { height: 4px; }
.mp-related-grid::-webkit-scrollbar-track { background: transparent; }
.mp-related-grid::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
.mp-rel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 10px;
    gap: 6px;
    transition: box-shadow .2s, transform .2s;
    min-width: 150px;
    flex-shrink: 0;
    scroll-snap-align: start;
}
.mp-rel-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }
.mp-rel-photo {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.mp-rel-info { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.mp-rel-name { font-size: 12px; font-weight: 700; color: #002d6b; }
.mp-rel-meta { font-size: 10px; color: #6b7280; }
.mp-rel-pos  { font-size: 10px; color: #4b5563; }
.mp-rel-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 12px;
    background: #fff;
    border: 1.5px solid #007cba;
    color: #007cba;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.mp-rel-btn:hover { background: #007cba; color: #fff; }
.mp-related-empty { color: #9ca3af; font-style: italic; text-align: center; padding: 20px 0; margin: 0; }

/* Carousel */
.mp-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mp-car-arrow {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #007cba;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s, border-color .2s;
    padding: 0;
}
.mp-car-arrow:hover { background: #007cba; color: #fff; border-color: #007cba; }
.mp-car-arrow:disabled { opacity: 0.3; cursor: default; }
.mp-car-arrow:disabled:hover { background: #fff; color: #007cba; border-color: #e2e8f0; }

/* TABLET ( 600px)  horizontal sidebar card */
@media (min-width: 600px) {
    .mp-cover { border-radius: 0 0 10px 10px; }
    .mp-cover-tagline { font-size: 24px; top: 50%; right: 20px; transform: translateY(-50%) rotate(-3deg); }
    .mp-cover-tagline span { padding-left: 20px; }
    .mp-sidebar { margin-top: -56px; }
    .mp-sidebar-card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
    }
    .mp-avatar-wrap {
        padding: 20px 12px 16px 20px;
        flex-shrink: 0;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .mp-avatar { width: 200px; height: 200px; }
    .mp-sidebar-info {
        flex: 1;
        text-align: left;
        padding: 16px 14px 14px 4px;
    }
    .mp-name { font-size: 18px; }
    .mp-quick-info {
        justify-content: flex-start;
        padding: 8px 0 0;
        border-top: none;
    }
    .mp-msg-btn {
        width: auto;
        margin: 10px 0 0;
        padding: 8px 18px;
        align-self: flex-start;
    }
    .mp-social-icons {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding: 16px 18px;
        border-top: none;
        border-left: 1px solid #f1f5f9;
    }
    .mp-related-header { flex-direction: row; flex-wrap: nowrap; gap: 12px; padding: 14px 18px 0; }
    .mp-related-header h2 { margin: 0; flex-shrink: 0; flex: unset; }
    .mp-related-tabs { margin-left: auto; flex: unset; width: auto; }
    .mp-rel-card { min-width: 180px; }
    .mp-card-body { padding: 16px 18px; }
    .mp-card-head { padding: 12px 18px; }
    .mp-related-tabs { flex-wrap: nowrap; flex: unset; width: auto; overflow-x: auto; }
    .mp-rtab { font-size: 13px; padding: 8px 16px; flex: unset; min-width: unset; white-space: nowrap; }
}

/* DESKTOP ( 900px)  two-column layout */
@media (min-width: 900px) {
    .mp-cover {border-radius: 0 0 12px 12px;}
    .mp-cover-tagline { font-size: 32px; top: 50%; right: 30px; transform: translateY(-50%) rotate(-3deg); }
    .mp-layout {
        display: flex;
        gap: 22px;
        margin-top: -65px;
        align-items: flex-start;
    }
    .mp-sidebar {
        width: 260px;
        flex-shrink: 0;
        margin-top: 0;
        align-self: flex-start;
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: sticky;
        top: 20px;
    }
    .mp-sidebar-card {
        display: block;
    }
    .mp-nav-card {
        /* part of sticky sidebar */
    }
    .mp-avatar-wrap {
        display: flex;
        justify-content: center;
        padding: 24px 0 8px;
    }
    .mp-avatar { width: 200px; height: 200px; }
    .mp-sidebar-info {
        text-align: center;
        padding: 0 18px 18px;
    }
    .mp-name { font-size: 20px; }
    .mp-quick-info {
        display: block;
        border-top: 1px solid #f1f5f9;
        padding: 12px 0 0;
        justify-content: unset;
    }
    .mp-qi-item {
        display: flex;
        background: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-bottom: 7px;
        font-size: 13px;
    }
    .mp-msg-btn {
        width: 100%;
        margin: 4px 0 0;
    }
    .mp-social-icons {
        flex-direction: row;
        justify-content: center;
        border-left: none;
        border-top: 1px solid #f1f5f9;
        padding: 14px 18px 18px;
        gap: 14px;
    }
    .mp-main { padding-top: 70px; }
    .mp-card-head { padding: 14px 20px; }
    .mp-card-head h2 { font-size: 15px; }
    .mp-card-body { padding: 18px 20px; }
    .mp-two-col { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
    .mp-info-table { font-size: 13.5px; }
    .mp-info-table tr { display: table-row; border-bottom: none; padding: 0; }
    .mp-info-table td { padding: 6px 3px; }
    .mp-info-table td:first-child { flex: unset; width: 150px; font-size: 13.5px; text-transform: none; letter-spacing: 0; font-weight: 500; }
    .mp-info-table td:nth-child(2) { display: table-cell; width: 14px; color: #9ca3af; text-align: center; }
    .mp-info-table td:nth-child(3) { flex: unset; }
    .mp-rel-card { min-width: 200px; }
}
