/* ====== TEAM PAGE STYLES ====== */
/* Team Hero Section */
.team-hero-section {
    position: relative;
    height: 60vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                     url('../img/team.png');
    background-size: cover;
    background-position: center;
    margin-top: 80px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #F8EEEF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #F8EEEF;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    background-color: #D7B263;
    color: #862220;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-btn.secondary {
    background-color: transparent;
    border: 2px solid #D7B263;
    color: #F8EEEF;
}

.hero-btn:hover {
    background-color: #862220;
    color: #F8EEEF;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn.secondary:hover {
    background-color: #D7B263;
    color: #862220;
}

/* Team Introduction */
.team-intro {
    padding: 80px 0;
    background-color: white;
}

.intro-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.intro-text h2 {
    font-size: 2.5rem;
    color: #862220;
    margin-bottom: 20px;
}

.intro-text p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
}

.intro-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #D7B263;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.intro-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.intro-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Leadership Team - 3 COLUMN LAYOUT */
.team-leadership {
    padding: 80px 0;
    background-color: #F8EEEF;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center; /* Center items in grid cells */
}

.team-member.featured {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 350px; /* Reduced width for better fit in 3 columns */
    width: 100%;
}

.team-member.featured:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

/* 3:4 Aspect Ratio for member images (better for portraits) */
.member-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 133%; /* 3:4 Aspect Ratio (3/4 = 0.75 -> 75%) */
}

.member-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member.featured:hover .member-image img {
    transform: scale(1.05);
}

/* Social Icons - FIXED BLUE UNDERLINE */
.member-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(134, 34, 32, 0.9));
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.team-member.featured:hover .member-social,
.team-member:not(.featured):hover .member-social {
    opacity: 1;
}

.member-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none; /* FIX: Remove underline from links */
    outline: none; /* FIX: Remove focus outline */
}

.member-social a:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.3);
}

.member-social i {
    font-size: 16px;
    color: white;
}

.member-info {
    padding: 25px; /* Reduced from 30px */
    display: flex;
    flex-direction: column;
}

.member-badge {
    background: linear-gradient(135deg, #D7B263, #b89442);
    color: #862220;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px; /* Reduced from 20px */
    align-self: flex-start;
}

.member-info h3 {
    font-size: 1.5rem; /* Reduced from 1.8rem */
    color: #862220;
    margin-bottom: 8px; /* Reduced from 10px */
}

.position {
    color: #D7B263;
    font-weight: 600;
    margin-bottom: 15px; /* Reduced from 20px */
    font-size: 0.9rem; /* Reduced from 1rem */
}

.bio {
    color: #555;
    line-height: 1.6; /* Reduced from 1.7 */
    margin-bottom: 20px; /* Reduced from 25px */
    flex-grow: 1;
    font-size: 0.95rem; /* Added font size */
}

.member-expertise {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Reduced from 10px */
}

.expertise-tag {
    background-color: #F8EEEF;
    color: #862220;
    padding: 5px 10px; /* Reduced from 6px 12px */
    border-radius: 15px;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    font-weight: 500;
}

/* Department Heads - CENTERED LAYOUT */
.team-departments {
    padding: 80px 0;
    background-color: white;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center; /* Center all department head cards */
}

/* Center the second row with fewer items */
.departments-grid .team-member:nth-child(n+4) {
    grid-column: span 1;
}

/* For 5 items, center the last one */
.departments-grid .team-member:nth-child(5) {
    grid-column: 2 / span 1; /* Center the 5th item in a 4-column grid */
}

.team-member:not(.featured) {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    max-width: 280px; /* Consistent width */
    width: 100%;
}

.team-member:not(.featured):hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.team-member:not(.featured) .member-image {
    position: relative;
    width: 100%;
    padding-top: 133%; /* 3:4 Aspect Ratio */
}

.team-member:not(.featured) .member-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member:not(.featured) .member-info {
    padding: 20px; /* Reduced from 25px */
    text-align: center;
}

.team-member:not(.featured) h3 {
    font-size: 1.3rem; /* Reduced from 1.4rem */
    color: #862220;
    margin-bottom: 8px;
}

.team-member:not(.featured) .position {
    margin-bottom: 12px; /* Reduced from 15px */
    color: #D7B263;
    font-weight: 600;
    font-size: 0.9rem; /* Added font size */
}

.team-member:not(.featured) .bio {
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem; /* Added font size */
}

/* Join Our Team */
.join-team {
    padding: 80px 0;
    background-color: #F8EEEF;
}

.join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.join-text h2 {
    font-size: 2.5rem;
    color: #862220;
    margin-bottom: 20px;
}

.join-text p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
}

.join-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    background-color: #862220;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-btn.secondary {
    background-color: transparent;
    border: 2px solid #862220;
    color: #862220;
}

.cta-btn:hover {
    background-color: #6a1b1a;
    transform: translateY(-3px);
}

.cta-btn.secondary:hover {
    background-color: #862220;
    color: white;
}

.join-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.join-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ====== RESPONSIVE STYLES ====== */
@media (max-width: 1200px) {
    .leadership-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .team-member.featured {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .leadership-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
    
    .intro-content,
    .join-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .intro-stats {
        justify-content: center;
    }
    
    .intro-image,
    .join-image {
        order: -1;
    }
    
    .departments-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /* Center the last item in a 2-column layout */
    .departments-grid .team-member:nth-child(5) {
        grid-column: 1 / span 2;
        justify-self: center;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 30px;
    }
    
    .team-hero-section {
        height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .departments-grid .team-member:nth-child(5) {
        grid-column: 1;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .join-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .team-hero-section {
        height: 60vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-btn {
        width: 100%;
        text-align: center;
    }
    
    .intro-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .member-info {
        padding: 20px;
    }
    
    .member-info h3 {
        font-size: 1.4rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
}