/* Team Page Styles */
.team-hero {
    padding: 5rem 0;
    position: relative;
    background-image: url('../images/indexbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    overflow: hidden;
}

.team-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(10, 116, 218, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(157, 78, 221, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(0, 191, 165, 0.1) 0%, transparent 50%);
    z-index: 1;
    animation: pulse 8s ease-in-out infinite;
}

.team-hero .container {
    position: relative;
    z-index: 2;
}

.team-hero .page-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(10, 116, 218, 0.4),
        0 0 60px rgba(157, 78, 221, 0.3),
        0 0 90px rgba(0, 191, 165, 0.2);
    position: relative;
}

.team-hero .page-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.team-hero .page-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.leadership-team,
.org-structure,
.join-us {
    padding: 5rem 0;
}

.leadership-team {
    background: var(--white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    justify-items: stretch;
}

.team-member {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 600px;
}

.team-member:nth-child(1),
.team-member:nth-child(2),
.team-member:nth-child(3) {
    grid-column: span 2;
}

.team-member:nth-child(4) {
    grid-column: 4 / 6;
    grid-row: 2;
    justify-self: end;
    max-width: 400px;
}

.team-member:nth-child(5) {
    grid-column: 2 / 4;
    grid-row: 2;
    justify-self: start;
    max-width: 400px;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.member-photo {
    height: 400px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit:cover;
    object-position: center 0px;
    display: block;
}

.photo-placeholder {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.photo-placeholder i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.8);
}

.member-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.member-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.member-role {
    color: var(--primary-blue);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
}

.member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--light-gray);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.member-bio {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.member-social {
    display: flex;
    gap: 1rem;
}

.member-social a {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition-fast);
}

.member-social a:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.org-structure {
    background: var(--light-gray);
}

.org-flowchart {
    margin-top: 3rem;
    position: relative;
}

.flowchart-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    padding: 2rem 0;
    width: 100%;
    height: 300px;
   
}

.flowchart-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1rem;
    width: 100%;
    position: relative;
    padding: 1rem 0 12rem 0;
    overflow: visible;
    min-height: 350px;
}

.department-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    flex: 0 0 180px;
    width: 180px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: visible;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.department-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition-normal);
}

.department-card:hover::before {
    opacity: 0.3;
}

.dept-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.department-card:hover .dept-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(10, 116, 218, 0.3);
}

.dept-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.department-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.dept-description {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--white);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
    width: 320px;
    max-width: calc(100vw - 2rem);
    word-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
}

.department-card:hover .dept-description {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dept-description p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.flow-arrow {
    color: var(--primary-blue);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    animation: pulse-arrow 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-arrow {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

.flowchart-connector {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    height: 3rem;
    margin: 0.5rem 0;
}

.connector-line {
    position: absolute;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-purple));
    z-index: 1;
    box-shadow: 0 2px 8px rgba(10, 116, 218, 0.3);
}

.connector-line.vertical {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    animation: flow-vertical 2s ease-in-out infinite;
}

@keyframes flow-vertical {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.connector-line.horizontal {
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

.join-us {
    background: var(--white);
}

.join-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
}

.join-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: var(--transition-normal);
}

.join-btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    color: var(--white);
}

.join-btn.secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
}

.benefit-item i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.benefit-item h3 {
    margin-bottom: 0.75rem;
}

.benefit-item p {
    color: var(--text-gray);
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-member:nth-child(4),
    .team-member:nth-child(5) {
        grid-column: auto;
    }
    
    .flowchart-row {
        gap: 0.75rem;
    }
    
    .department-card {
        flex: 0 0 160px;
        width: 160px;
        padding: 1.25rem;
    }
    
    .flow-arrow {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-member:nth-child(4),
    .team-member:nth-child(5) {
        grid-column: auto;
    }
    
    .join-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .join-btn {
        text-align: center;
    }
    
    .flowchart-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .flowchart-row {
        gap: 0.5rem;
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .department-card {
        flex: 0 0 140px;
        width: 140px;
        padding: 1rem;
        min-height: 180px;
    }
    
    .dept-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 0.75rem;
    }
    
    .dept-icon i {
        font-size: 1.5rem;
    }
    
    .department-card h3 {
        font-size: 0.9rem;
    }
    
    .flow-arrow {
        font-size: 0.9rem;
    }
    
    .dept-description {
        padding: 0.75rem;
        width: 280px;
        max-width: calc(100vw - 3rem);
    }
    
    .dept-description p {
        font-size: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
