/* Team Page specific styles */

.team-main {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #1a1a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 80px; /* offset for fixed header */
}

/* Background decorative lines */
.team-main::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255, 107, 0, 0.05) 49%, rgba(255, 107, 0, 0.05) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 107, 0, 0.05) 49%, rgba(255, 107, 0, 0.05) 51%, transparent 52%);
    background-size: 150px 150px;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.team-slider {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.team-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    visibility: hidden;
    opacity: 0;
}

.team-slide.active {
    visibility: visible;
    opacity: 1;
}

.team-content-split {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5%;
}

.team-text-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 50px;
    padding-left: 10%; /* Added to prevent overlap with the team-selector on the left */
    z-index: 2;
}

.orange-accent-line {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(255,107,0,0.6);
}

.team-name {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.team-role {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.team-desc {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
}

.team-img-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center; /* Aligns image vertically with the text/name */
    justify-content: flex-end;
    height: 100%;
}

.team-person-img {
    height: 45%;
    max-height: 450px;
    object-fit: contain;
    object-position: right center;
    filter: drop-shadow(-20px 0 30px rgba(0,0,0,0.6));
    animation: floatingPerson 6s ease-in-out infinite;
}

@keyframes floatingPerson {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* Team Selection List */
.team-selector {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.team-select-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    text-align: left;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-select-btn::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.team-select-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.team-select-btn.active {
    color: #fff;
    padding-left: 20px;
}

.team-select-btn.active::before {
    width: 30px;
    left: -15px;
}

/* Adjust text area padding to make room for selector */
.team-text-area {
    padding-left: 250px;
}

/* Responsive */
@media (max-width: 1024px) {
    .team-name {
        font-size: 4rem;
    }
    .team-content-split {
        flex-direction: column;
    }
    .team-text-area {
        flex: 1;
        justify-content: flex-end;
        padding-bottom: 30px;
    }
    .team-img-area {
        flex: 1;
        align-items: flex-end;
        justify-content: center;
    }
    .team-person-img {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .team-main {
        padding-top: 100px;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        display: flex; 
        flex-direction: column;
    }
    .team-slider {
        position: relative;
        height: auto; /* Grow with content */
    }
    .team-slide {
        position: absolute; /* Hide inactive */
    }
    .team-slide.active {
        position: relative; /* Take up space when active */
    }
    .team-name {
        font-size: 2.5rem;
    }
    .team-role {
        font-size: 1.2rem;
    }
    .team-desc {
        font-size: 1rem;
    }
    .team-nav {
        display: none; 
    }
    .team-selector {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        flex-direction: row;
        margin-bottom: 20px; 
        padding-left: 20px;
        justify-content: center;
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap; 
        white-space: nowrap;
        order: -1; /* Pull above the slider */
    }
    .team-select-btn {
        margin-bottom: 0;
        margin-right: 15px;
    }
    .team-text-area {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 20px;
    }
    .team-content-split {
        flex-direction: column;
        justify-content: flex-start;
        display: block; 
    }
    .team-img-area {
        height: auto;
        margin-top: 10px;
        display: block; 
    }
    .team-person-img {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
    }
}
