/* =========================================
   1. HERO SECTION (Specific to Team Page)
   ========================================= */
   .hero-centered {
    background-color: var(--deep-blue);
    color: var(--white);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px; /* Increased height for better balance */
    
    /* FIXED: Added padding to prevent Navbar overlap */
    padding-top: 100px; 
    padding-bottom: 40px;
}

/* Ensure the H1 title inside is white */
.hero-centered h1 {
    color: var(--white);
    font-family: var(--font-serif);
    margin: 0;
}

.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(62, 92, 154, 0.15) 0%, rgba(42, 64, 104, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content-wrapper-center { z-index: 2; position: relative; }

/* =========================================
   2. TAB NAVIGATION
   ========================================= */
.team-tabs-scroll-arrow { display: none; }

.team-tabs-wrapper {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    
    /* FIXED: Sticky positioning logic */
    position: -webkit-sticky; /* Safari support */
    position: sticky;
    
    /* Adjust this value to match your Navbar's actual height */
    /* If navbar is 80px, set this to 80px so tabs sit right below it */
    top: 60px; 
    
    z-index: 900; /* Must be lower than Navbar (1000) but higher than content */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.team-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
}

.tab-btn {
    background: transparent;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.85rem; /* Slightly larger for readability */
    font-weight: 600;
    color: var(--text-grey);
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: var(--primary-blue);
    background-color: rgba(62, 92, 154, 0.05);
}

.tab-btn.active {
    background-color: var(--deep-blue);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(42, 64, 104, 0.3);
}

/* =========================================
   3. TAB CONTENT AREAS
   ========================================= */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
    padding: 3rem 0; /* Adds breathing room between tabs and content */
}

.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   4. SECTION HEADERS
   ========================================= */
.sub-section-title {
    font-family: var(--font-serif);
    color: var(--deep-blue);
    font-size: 1.8rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.sub-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-blue);
}

/* =========================================
   5. MEMBER GRID & CARDS
   ========================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.member-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%; /* Uniform height */
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(62, 92, 154, 0.15);
}

.member-img-wrapper {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #F0F4F8;
}

.member-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--deep-blue);
    margin-bottom: 5px;
    line-height: 1.3;
}

.member-role {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

.member-contact {
    font-size: 0.9rem;
    color: var(--text-grey);
    line-height: 1.6;
}

.member-qualification {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    text-align: left;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-grey);
}

#psychiatrists .member-card,
#heads .member-card {
    display: flex;
    flex-direction: column;
    height: auto;
}

.member-qualification p {
    margin: 0 0 8px 0;
}

.member-qualification p:last-child {
    margin-bottom: 0;
}

.member-qualification strong {
    color: var(--deep-blue);
}

.member-contact a {
    color: var(--text-grey);
    text-decoration: underline;
    text-decoration-color: rgba(0,0,0,0.1);
    transition: color 0.2s;
}

.member-contact a:hover {
    color: var(--primary-blue);
    text-decoration-color: var(--primary-blue);
}

/* =========================================
   6. SIMPLE LISTS
   ========================================= */
.simple-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    text-align: left;
}

.simple-list-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--deep-blue);
    border-left: 3px solid var(--primary-blue);
}

/* =========================================
   7. SUB-TABS (For UG Team)
   ========================================= */
.team-sub-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 15px;
}

.sub-tab-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 30px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.sub-tab-btn.active, .sub-tab-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(62, 92, 154, 0.2);
}

.sub-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.sub-tab-content.active { display: block; }

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 991px) {
    .team-tabs-wrapper {
        top: 80px;
    }
}

@media (max-width: 768px) {
    .team-tabs-wrapper {
        position: -webkit-sticky;
        position: sticky;
    }

    .team-tabs-scroll-arrow {
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: center;
        align-items: center;
        -webkit-justify-content: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
        z-index: 5;
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 50%;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        color: var(--primary-blue);
        font-size: 0.8rem;
        cursor: pointer;
    }

    .team-tabs-scroll-arrow.left { left: 6px; }
    .team-tabs-scroll-arrow.right { right: 6px; }

    .team-tabs-scroll-arrow.hidden {
        visibility: hidden;
        pointer-events: none;
    }

    .team-tabs {
        gap: 6px;
        flex-wrap: nowrap;
        -webkit-flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 10px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn{
        font-size: 0.6rem;
        padding: 7px 12px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .team-tabs::-webkit-scrollbar { display: none; }

    .team-tabs-wrapper .container {
        padding: 0 6px;
    }


    .hero-centered {
        padding-top: 120px; /* More padding on mobile for navbar */
    }
    
    .hero-centered h1 {
        font-size: 2rem;
    }
    
    .team-grid {
        gap: 20px;
    }
}
/* =========================================
   TEAM YEAR SIDEBAR
   ========================================= */
.team-container {
    display: flex;
    gap: 30px;
    padding: 3rem 0;
}

.team-sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    max-width: 150px;
}

.team-year-btn {
    background: transparent;
    border: 2px solid var(--deep-blue);
    color: var(--deep-blue);
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.team-year-btn:hover {
    background-color: rgba(42, 64, 104, 0.05);
    border-color: var(--primary-blue);
}

.team-year-btn.active {
    background-color: var(--deep-blue);
    color: var(--white);
    border-color: var(--deep-blue);
    box-shadow: 0 4px 10px rgba(42, 64, 104, 0.3);
}

.team-content {
    flex: 1;
}

.year-content {
    display: none;
}

.year-content.active {
    display: block;
}

/* Update existing sub-tabs to match the screenshot style */
.team-sub-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 15px;
}

.sub-tab-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px 35px;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.sub-tab-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(62, 92, 154, 0.3);
}

.sub-tab-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(62, 92, 154, 0.2);
}

.pt-scroll-arrow { display: none; }

/* Responsive adjustments */
@media (max-width: 968px) {
    .team-container {
        flex-direction: column;
    }
    
    .team-sidebar {
        flex-direction: row;
        min-width: 100%;
        max-width: 100%;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .team-sidebar::-webkit-scrollbar {
        height: 4px;
    }
    
    .team-year-btn {
        min-width: 120px;
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 10px 15px;
    }

    .team-sub-tabs {
        flex-wrap: nowrap !important;
        -webkit-flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        gap: 8px !important;
        padding-bottom: 6px;
    }
    .team-sub-tabs::-webkit-scrollbar { display: none; }
    .team-sub-tabs .sub-tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .pt-scroll-wrap {
        position: relative;
    }
    .pt-scroll-arrow {
        display: -webkit-flex;
        display: flex;
        -webkit-align-items: center;
        align-items: center;
        -webkit-justify-content: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
        z-index: 5;
        width: 28px;
        height: 28px;
        border: none;
        border-radius: 50%;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        color: var(--primary-blue);
        font-size: 0.75rem;
        cursor: pointer;
    }
    .pt-scroll-arrow.left { left: -2px; }
    .pt-scroll-arrow.right { right: -2px; }
    .pt-scroll-arrow.hidden {
        visibility: hidden;
        pointer-events: none;
    }
}
/* Center align when there are only 2 items */
.team-grid.center-two {
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
}
.hall-filter-wrapper {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.hall-filter-wrapper label {
    color: #333;
    font-size: 1rem;
}

#hall-filter {
    min-width: 150px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#hall-filter:hover,
#hall-filter:focus {
    border-color: #8fb3ff;
    outline: none;
}
#ug-core .team-grid {
    justify-content: center;
}
/* Hall-wise column layout */
.hall-columns-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    margin-top: 30px;
    overflow-x: auto;
}

.hall-column {
    flex: 1;
    min-width: 180px;
    padding: 0 20px;
}

.hall-title {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--deep-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--deep-blue);
}

.hall-members {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hall-divider {
    width: 1px;
    align-self: stretch;
    border-left: 2px dotted #c0c8d8;
    margin: 0;
    flex-shrink: 0;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .hall-columns-wrapper {
        flex-direction: column;
    }
    .hall-divider {
        width: 100%;
        height: 1px;
        border-left: none;
        border-top: 2px dotted #c0c8d8;
        align-self: auto;
    }
}
/* ===== UG TEAM PAGE FIXES ===== */

/* Fix 1: Sub-tab button positioning */
#ug-team > div[style] {
    position: static !important;
    padding: 0 !important;
    display: block !important;
    width: 100%;
}
.team-sub-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0 0 30px 0;
    position: static !important;
    width: 100%;
}
/* Fix 2: Coordinators grid */
#ug-coords .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-width: 1100px;
    margin: 0 auto;
}

/* Fix 3: Equal-height hall member cards */
.hall-members {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}
.hall-column {
    display: flex;
    flex-direction: column;
}
.member-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
/* Paste at very bottom of your CSS */
.hall-members .member-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
}
.container {
    padding: 0 40px;
}
#pg-team .team-grid {
    max-width: 1200px;
    margin: 0 auto;
}
#pg-team .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
#ug-coords .team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

#ug-coords .member-card {
    width: 220px;
    flex: 0 0 220px;
}
.hall-column[data-hall="6"] {
    flex: 2;
    min-width: 360px;  /* ensure enough space for 2 columns */
}

@media (max-width: 420px) {
    .hall-column[data-hall="6"] {
        min-width: 0;
        width: 100%;
    }
    .hall-column[data-hall="6"] .hall-members {
        grid-template-columns: 1fr;
    }
}

.hall-column[data-hall="6"] .hall-members {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hall-column[data-hall="6"] .hall-title {
    grid-column: 1 / -1;  /* title spans both columns */
}
.hall-column[data-hall="6"] .member-card {
    padding: 15px 8px;
}

.hall-column[data-hall="6"] .member-img-wrapper {
    width: 110px;
    height: 110px;
}
/* Revert the padding approach */
#ug-team {
    padding: 0;
}

/* Make the hall wrapper scrollable if needed */
.hall-columns-wrapper {
    overflow-x: auto;
}

/* Shrink cards inside hall columns */
.hall-column .member-img-wrapper {
    width: 110px;
    height: 110px;
}

.hall-column .member-name {
    font-size: 0.95rem;
}

.hall-column .member-contact {
    font-size: 0.75rem;
}

.hall-column {
    min-width: 140px;
    padding: 0 10px;
}

/* Keep hall 6 two columns but with tighter sizing */
.hall-column[data-hall="6"] {
    flex: 2;
    min-width: 280px;
}

.hall-column[data-hall="6"] .hall-members {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width: 768px) {

    /* Fix 1: Psychiatrists - stack cards vertically */
    #psychiatrists .team-grid {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        align-items: center;
    }

    #psychiatrists .member-card {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Fix 2: UG Team - center align cards */
    .hall-columns-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .hall-column {
        width: 100%;
        padding: 0;
    }

    .hall-column .hall-members {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hall-column .member-card {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hall-column[data-hall="6"] .hall-members {
        grid-template-columns: 1fr !important;
    }

    /* Fix 3: PG Team - fix email + filter layout */
    #pg-team > h5 {
        text-align: center;
        padding: 0 15px;
        word-break: break-all;
        font-size: 0.85rem;
    }

    #pg-team > div[style] {
        justify-content: center !important;
        margin-right: 0 !important;
        margin-top: 10px !important;
        padding: 0 15px;
    }

    #pg-hall-filter {
        width: 100%;
    }
}