/* ============================================
   NGO TEAM PAGE STYLES
   ============================================ */

/* Team Page Header */
.team-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
}

.team-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.team-page-header p.lead {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-page-header .team-subtitle {
    font-size: 0.9rem;
    color: white;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.team-page-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.team-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 140px;
    transition: all 0.3s ease;
}

.team-stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.team-stat-icon {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

.team-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.team-stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Team Page Container */
.team-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.team-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    justify-items: stretch;
}

/* Override fixed width properties from ngo_detail.css for grid layout */
.team-page-grid .team-member-card-link {
    flex: none !important;
    max-width: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

.team-page-grid .team-member-card {
    flex: none !important;
    max-width: 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(102, 126, 234, 0.1) !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.team-page-grid .team-member-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.team-page-grid .team-member-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

/* Enhanced card styling for team page */
.team-page-grid .team-member-photo-wrapper {
    height: 200px !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.team-page-grid .team-member-photo {
    border-radius: 16px 16px 0 0 !important;
    object-fit: cover !important;
}

.team-page-grid .team-member-photo-placeholder {
    border-radius: 16px 16px 0 0 !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.team-page-grid .team-member-photo-placeholder .photo-placeholder-icon {
    font-size: 4rem !important;
    color: #667eea;
    opacity: 0.5;
}

.team-page-grid .team-photo-overlay {
    display: flex !important;
    opacity: 0 !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    transition: opacity 0.3s ease !important;
}

.team-page-grid .team-member-card:hover .team-photo-overlay {
    opacity: 1 !important;
}

.team-page-grid .view-profile-btn {
    background: white !important;
    color: #667eea !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

.team-page-grid .team-member-info {
    padding: 1rem 0.75rem 0.75rem !important;
    background: white !important;
}

.team-page-grid .team-member-name {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
}

.team-page-grid .team-member-role {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.75rem !important;
    margin: 0 auto !important;
    display: inline-block !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px !important;
    color: #667eea !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 1rem) !important;
}

.team-page-grid .team-member-role i {
    font-size: 0.75rem !important;
    margin-right: 0.25rem;
}

.team-page-grid .team-member-info p.text-muted {
    display: block !important;
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center !important;
}

.team-page-grid .team-member-location {
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
    color: #9ca3af !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.team-page-grid .team-member-location i {
    font-size: 0.8rem !important;
    color: #667eea;
}

.team-page-grid .team-member-header {
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 2px solid #f3f4f6;
    text-align: center !important;
}

.team-page-grid .bi-patch-check-fill {
    font-size: 1.1rem !important;
}

/* Animation delays for staggered card appearance */
.team-page-grid .team-member-card:nth-child(1) { animation-delay: 0.05s; }
.team-page-grid .team-member-card:nth-child(2) { animation-delay: 0.1s; }
.team-page-grid .team-member-card:nth-child(3) { animation-delay: 0.15s; }
.team-page-grid .team-member-card:nth-child(4) { animation-delay: 0.2s; }
.team-page-grid .team-member-card:nth-child(5) { animation-delay: 0.25s; }
.team-page-grid .team-member-card:nth-child(6) { animation-delay: 0.3s; }
.team-page-grid .team-member-card:nth-child(7) { animation-delay: 0.35s; }
.team-page-grid .team-member-card:nth-child(8) { animation-delay: 0.4s; }

/* Back to Profile Link */
.back-to-profile {
    margin-bottom: 2rem;
}

.back-to-profile a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

[data-theme="dark"] .back-to-profile a {
    color: #667eea;
}

.back-to-profile a:hover {
    gap: 0.75rem;
    color: #764ba2;
}

/* Empty Team State */
.empty-team {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-team i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-team h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-team p {
    font-size: 1rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .team-page-header h1 {
        font-size: 2rem;
    }

    .team-page-header p {
        font-size: 1rem;
    }

    .team-stat-value {
        font-size: 1.5rem;
    }

    .team-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }

    .team-page-container {
        padding: 0 1rem 3rem;
    }

    .team-page-grid .team-member-photo-wrapper {
        height: 160px !important;
    }

    .team-page-grid .team-member-role {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    .team-page-grid .team-member-role i {
        font-size: 0.6rem !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .team-page-header {
        padding: 2rem 0;
    }

    .team-page-header h1 {
        font-size: 1.75rem;
    }

    .team-stat-value {
        font-size: 1.25rem;
    }

    .team-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .team-page-grid .team-member-photo-wrapper {
        height: 140px !important;
    }

    .team-page-grid .team-member-name {
        font-size: 1rem !important;
    }

    .team-page-grid .team-member-role {
        font-size: 0.55rem !important;
        padding: 0.2rem 0.4rem !important;
        border-radius: 12px !important;
    }

    .team-page-grid .team-member-role i {
        font-size: 0.5rem !important;
        margin-right: 0.15rem !important;
    }

    .team-page-grid .team-member-location {
        font-size: 0.75rem !important;
    }

    .team-page-grid .team-member-info {
        padding: 1rem 0.75rem 0.75rem !important;
    }
}
