/* --- TEAM PAGE STYLES --- */

/* Fix Horizontal Scroll globally for this page */
.team-hero, .category-section, .join-cta {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* 1. HERO SECTION */
.team-hero {
    padding: 160px 0 80px;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent 60%), var(--bg-dark);
    text-align: center;
}

.sub-tag {
    color: var(--primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.team-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.team-hero p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* 2. CATEGORY SECTIONS */
.category-section {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cat-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    min-height: 50px; /* To keep space if blank */
}

/* --- MEMBER CARD (Dual Image Logic) --- */
.member-card {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.4s;
    position: relative;
    group: hover;
}

/* Image Wrapper */
.img-wrapper {
    width: 100%;
    aspect-ratio: 1/1.1; /* Portrait ratio */
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #1e293b;
}

/* Both Images */
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* Main Image (Visible by default) */
.img-main {
    z-index: 1;
    opacity: 1;
}

/* Hover Image (Hidden by default) */
.img-hover {
    z-index: 2;
    opacity: 0;
}

/* HOVER EFFECTS */
.member-card:hover .img-hover {
    opacity: 1; /* Show 2nd image */
    transform: scale(1.05);
}

/* If no 2nd image, just zoom main image */
.member-card:hover .img-main {
    transform: scale(1.05);
}

/* Info Section */
.info-box {
    padding: 15px 5px;
    text-align: left;
}

.info-box h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-box p {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3. CTA SECTION */
.join-cta {
    text-align: center;
    padding: 80px 0;
}
.join-cta h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .team-hero h1 { font-size: 2.5rem; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}