/* ==========================================================================
   Team Page Specific Styles
   ========================================================================== */

/* Page Hero (Keep existing) */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--neutral-100);
    padding: var(--space-8) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
}

.page-hero__title {
    color: var(--neutral-100);
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-2);
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-hero__subtitle {
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    position: relative;
}

/* ==========================================================================
   Team Section - Updated Card Format (Based on Template)
   ========================================================================== */
   /* WARNING: All styles below are strictly scoped to team section */

.team-section {
    padding: var(--space-8) 0;
    background-color: var(--neutral-100);
}

/* Section Header - Following template style */
.team-section .section__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-8);
}

.team-section .section__tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--neutral-100);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-section h2 {
    color: var(--primary-dark);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.team-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.team-section .section__description {
    color: var(--neutral-700);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Team Grid - Following template's 3-column layout */
.team-section .team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto var(--space-8);
}

/* Team Card - New format based on template */
.team-section .team-card {
    background-color: var(--neutral-100);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--neutral-200);
}

.team-section .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(46, 125, 50, 0.15);
    border-color: var(--primary-light);
}

/* Card Image - Following template's image placement */
.team-section .team-card__image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-section .team-card__image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--neutral-100);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease;
    position: relative;
    z-index: 2;
}

.team-section .team-card:hover .team-card__image {
    transform: scale(1.05);
}

/* Decorative element behind image */
.team-section .team-card__image-wrapper::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Card Content - Following template's text structure */
.team-section .team-card__content {
    padding: 25px 20px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.team-section .team-card__name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.team-section .team-card__role {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--neutral-300);
}

.team-section .team-card__institution {
    font-size: 0.85rem;
    color: var(--neutral-600);
    margin-bottom: 15px;
    font-weight: 500;
}

.team-section .team-card__bio {
    font-size: 0.9rem;
    color: var(--neutral-700);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Research Tags - As seen in template's bottom section */
.team-section .team-card__research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.team-section .research-tag {
    background-color: var(--neutral-200);
    color: var(--neutral-700);
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 30px;
    transition: var(--transition);
    font-weight: 500;
}

.team-section .research-tag:hover {
    background-color: var(--primary-light);
    color: var(--neutral-100);
}

/* Card Footer - ORCID and Email links */
.team-section .team-card__footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--neutral-300);
    margin-top: auto;
}

.team-section .team-card__orcid,
.team-section .team-card__email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--neutral-600);
    text-decoration: none;
    transition: var(--transition);
}

.team-section .team-card__orcid:hover,
.team-section .team-card__email:hover {
    color: var(--primary);
}

.team-section .team-card__orcid svg {
    width: 16px;
    height: 16px;
    fill: #A6CE39; /* ORCID green */
}

.team-section .team-card__email svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Team Values Banner - Inspired by template's bottom section */
.team-section .team-values {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--neutral-200), var(--neutral-100));
    border-radius: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.team-section .team-values__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-section .team-values__icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.team-section .team-values__text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

/* Loading State (Keep existing) */
.team-grid--loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--neutral-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State (Keep existing) */
.team-grid--error {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--neutral-600);
}

/* Expertise Grid (Keep existing) */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-gap);
    margin-top: var(--space-6);
}

.expertise-card {
    background-color: var(--neutral-100);
    padding: var(--space-4);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.expertise-card__icon {
    font-size: 3rem;
    margin-bottom: var(--space-3);
}

.expertise-card__title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
    color: var(--primary-dark);
}

.expertise-card__description {
    font-size: var(--font-size-sm);
    color: var(--neutral-600);
    line-height: 1.6;
}

/* Call to Action Section (Keep existing) */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--neutral-100);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    color: var(--neutral-100);
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-3);
}

.cta-text {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Mobile (up to 639px) */
@media (max-width: 639px) {
    .team-section {
        padding: var(--space-6) 0;
    }
    
    .team-section h2 {
        font-size: 2rem;
    }
    
    .team-section .section__description {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .team-section .team-grid {
        gap: 20px;
        padding: 0 15px;
    }
    
    .team-section .team-card__image-wrapper {
        height: 180px;
    }
    
    .team-section .team-card__image {
        width: 100px;
        height: 100px;
    }
    
    .team-section .team-card__name {
        font-size: 1.3rem;
    }
    
    .team-section .team-values {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        border-radius: 30px;
        margin: 40px 20px 0;
    }
}

/* Tablet (640px to 1023px) - 2 columns */
@media (min-width: 640px) and (max-width: 1023px) {
    .team-section .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0 20px;
    }
    
    .team-section .team-card__image-wrapper {
        height: 190px;
    }
}

/* Desktop (1024px and up) - 3 columns as per template */
@media (min-width: 1024px) {
    .team-section .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .team-section .team-card__image-wrapper {
        height: 200px;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .team-section .team-grid {
        max-width: 1300px;
    }
}

/* Original responsive breakpoints (Keep existing for other sections) */
@media (min-width: 768px) {
    .page-hero {
        padding: var(--space-12) 0;
    }
    
    .page-hero__title {
        font-size: 4rem;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    .team-section {
        background-color: var(--neutral-900);
    }
    
    .team-section .section__description {
        color: var(--neutral-300);
    }
    
    .team-section .team-card {
        background-color: var(--neutral-800);
        border-color: var(--neutral-700);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .team-section .team-card__image-wrapper {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    }
    
    .team-section .team-card__institution {
        color: var(--neutral-400);
    }
    
    .team-section .team-card__bio {
        color: var(--neutral-300);
    }
    
    .team-section .research-tag {
        background-color: var(--neutral-700);
        color: var(--neutral-300);
    }
    
    .team-section .research-tag:hover {
        background-color: var(--primary);
        color: var(--neutral-100);
    }
    
    .team-section .team-card__footer {
        border-top-color: var(--neutral-700);
    }
    
    .team-section .team-values {
        background: linear-gradient(135deg, var(--neutral-800), var(--neutral-900));
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .team-section .team-values__text {
        color: var(--neutral-100);
    }
}

/* Print Styles (Keep existing) */
@media print {
    .site-header,
    .site-footer,
    .cta-section {
        display: none;
    }
    
    .page-hero {
        background: none;
        color: var(--neutral-900);
        padding: var(--space-4) 0;
    }
    
    .page-hero__title {
        color: var(--primary-dark);
    }
    
    .team-section .team-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .team-section .team-values {
        display: none;
    }
}