/* ============================================
   OUR TEAM - REFINED HERO SECTION
   Wider Layout · Larger Images · Better Alignment
   Mobile-First Alternating Stack Layout
   ============================================ */

.team-hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: 85px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.team-hero-container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 60px;
}

/* ============================================
   TEAM ROW - Alternating Layout (Mobile First)
   ============================================ */
.team-row {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    opacity: 0;
}

/* CEO Row - Image Left, Text Right */
.team-row-ceo {
    flex-direction: row;
    transform: translateX(-60px);
    animation: slideInFromLeft 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.15s;
}

/* Founder Row - Text Left, Image Right */
.team-row-founder {
    flex-direction: row-reverse;
    transform: translateX(60px);
    animation: slideInFromRight 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.35s;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   IMAGE SIDE
   ============================================ */
.team-image-side {
    flex: 0 0 auto;
    width: 130px;
    position: relative;
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.member-image-wrapper {
    position: relative;
    width: 100%;
}

.member-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    z-index: 2;
    transition: all 0.3s ease;
    display: block;
}

.team-row-ceo .member-image {
    transform-origin: left center;
}

.team-row-founder .member-image {
    transform-origin: right center;
}

.image-glow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(36, 132, 198, 0.25) 0%, transparent 70%);
    filter: blur(20px);
    z-index: 1;
}

/* ============================================
   TEXT SIDE
   ============================================ */
.team-text-side {
    flex: 1;
    min-width: 0;
}

.team-row-ceo .team-text-side {
    text-align: left;
}

.team-row-founder .team-text-side {
    text-align: right;
}

.member-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.member-role {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6db3ff;
    margin-bottom: 10px;
}

.member-bio {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}

.team-row-ceo .member-bio {
    max-width: 100%;
}

.team-row-founder .member-bio {
    max-width: 100%;
    margin-left: auto;
}

/* ============================================
   ACHIEVEMENTS SECTION - Between/After Members
   ============================================ */
.team-achievements {
    margin-top: 48px;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.55s;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.achievements-label {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #aad0ff;
    margin-bottom: 32px;
    position: relative;
}

.achievements-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 24px 32px;
    padding: 0;
    margin: 0;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.achievement-item:nth-child(1) { animation-delay: 0.65s; }
.achievement-item:nth-child(2) { animation-delay: 0.75s; }
.achievement-item:nth-child(3) { animation-delay: 0.85s; }
.achievement-item:nth-child(4) { animation-delay: 0.95s; }
.achievement-item:nth-child(5) { animation-delay: 1.05s; }

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.achievement-number {
    font-family: 'Sora', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #aad0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.achievement-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* ============================================
   TEAM GRID SECTION (REST OF TEAM)
   ============================================ */
.team-grid-section {
    padding: 80px 24px 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #6db3ff;
    margin-bottom: 16px;
    padding: 6px 18px;
    background: rgba(36, 132, 198, 0.12);
    border-radius: 30px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(36, 132, 198, 0.2);
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(135deg, #aad0ff 0%, #6db3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Team Grid Section */
.team-grid-section {
    padding: 80px 24px 100px;
}

.team-grid-container {
    max-width: 1200px;
    margin: 0 auto;
}

.team-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Team Card */
.team-card {
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 24px;
    text-decoration: none;
    display: block;
    position: relative;
}

/* Name Behind Image - On Card Background */
.team-card::before {
    content: attr(data-name);
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6db3ff;
    text-align: center;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 1px;
}

.team-card::after {
    content: attr(data-role);
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.08);
    text-align: center;
    z-index: 0;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: rgba(36, 132, 198, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Team Image Container */
.team-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    z-index: 1;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card:hover .team-card-image img {
    transform: scale(1.05);
}

/* Show name on hover */
.team-card:hover::before {
    color: rgba(255, 255, 255, 0.06);
    font-size: 3rem;
    transition: all 0.3s ease;
}

/* Hiring Card */
.hiring-card {
    cursor: pointer;
}

.hiring-card::before,
.hiring-card::after {
    display: none; /* Hide name overlay for hiring card */
}

.hiring-card:hover {
    border-color: rgba(36, 132, 198, 0.6) !important;
    box-shadow: 0 20px 40px rgba(36, 132, 198, 0.25) !important;
}

.hiring-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1e4a 0%, #1a3a6e 30%, #1a5fa6 60%, #2484c6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hiring-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.hiring-content {
    text-align: center;
    padding: 30px 20px;
    position: relative;
    z-index: 2;
}

.hiring-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(36, 132, 198, 0.15);
    border: 2px solid rgba(36, 132, 198, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseHiring 2s infinite;
}

@keyframes pulseHiring {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(36, 132, 198, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(36, 132, 198, 0); }
}

.hiring-icon i {
    font-size: 2rem;
    color: #6db3ff;
}

.hiring-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.hiring-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #2484c6, #1a5fa6);
    color: white;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.hiring-card:hover .hiring-btn {
    background: white;
    color: #1e3b7a;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(36, 132, 198, 0.4);
}

.hiring-btn i {
    transition: transform 0.3s ease;
}

.hiring-card:hover .hiring-btn i {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1000px) {
    .team-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .team-grid-4 {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .team-card::before {
        font-size: 1rem;
        top: 12px;
    }
    
    .team-card::after {
        font-size: 0.65rem;
        top: 34px;
    }
}

/* ============================================
   RESPONSIVE STYLES - Mobile First (Default)
   ============================================ */

/* Mobile (up to 480px) - Default styling */
@media (max-width: 480px) {
    .team-hero-section {
        padding-top: 75px;
        min-height: auto;
    }
    
    .team-hero-container {
        padding: 20px 20px 40px;
    }
    
    .team-row {
        gap: 16px;
        margin-bottom: 40px;
    }
    
    .team-image-side {
        width: 110px;
    }
    
    .member-name {
        font-size: 1.4rem;
    }
    
    .member-role {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }
    
    .member-bio {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .achievements-list {
        gap: 18px 20px;
    }
    
    .achievement-number {
        font-size: 1.8rem;
    }
    
    .achievement-text {
        font-size: 0.7rem;
    }
}

/* Small Mobile (up to 360px) */
@media (max-width: 360px) {
    .team-hero-container {
        padding: 16px 16px 32px;
    }
    
    .team-image-side {
        width: 95px;
    }
    
    .member-name {
        font-size: 1.2rem;
    }
    
    .member-role {
        font-size: 0.65rem;
    }
    
    .member-bio {
        font-size: 0.75rem;
    }
}

/* Tablet (481px to 900px) */
@media (min-width: 481px) and (max-width: 900px) {
    .team-hero-container {
        padding: 40px 40px 50px;
    }
    
    .team-row {
        gap: 30px;
        margin-bottom: 50px;
    }
    
    .team-image-side {
        width: 180px;
    }
    
    .member-name {
        font-size: 2rem;
    }
    
    .member-role {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .member-bio {
        font-size: 0.95rem;
    }
    
    .achievement-number {
        font-size: 2.5rem;
    }
    
    .achievement-text {
        font-size: 0.85rem;
    }
}

/* Desktop (901px and above) - Three Column Layout */
@media (min-width: 901px) {
    .team-hero-container {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr 1.2fr;
        align-items: center;
        gap: 40px;
        padding: 60px 60px;
    }
    
    /* Reset mobile/tablet row styles for desktop */
    .team-row-ceo,
    .team-row-founder {
        display: contents;
        transform: none;
        animation: none;
        margin-bottom: 0;
        gap: 0;
    }
    
    /* Desktop Team Member Styles */
    .team-member-desktop {
        display: flex;
        flex-direction: column;
        opacity: 0;
    }
    
    .team-member-left {
        align-items: flex-start;
        text-align: left;
        transform: translateX(-120px);
        animation: slideInLeft 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        animation-delay: 0.2s;
        padding-left: 20px;
    }
    
    .team-member-right {
        align-items: flex-end;
        text-align: right;
        transform: translateX(120px);
        animation: slideInRight 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        animation-delay: 0.4s;
        padding-right: 20px;
    }
    
    @keyframes slideInLeft {
        0% {
            opacity: 0;
            transform: translateX(-120px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    @keyframes slideInRight {
        0% {
            opacity: 0;
            transform: translateX(120px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Desktop Image Side Reset */
    .desktop-image-wrapper {
        position: relative;
        margin-bottom: 35px;
        animation: floatImage 6s ease-in-out infinite;
        align-self: flex-start;
    }
    
    .team-member-right .desktop-image-wrapper {
        align-self: flex-end;
    }
    
    .desktop-member-image {
        width: 520px;
        height: 520px;
        object-fit: contain;
        filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4));
        z-index: 2;
        transition: all 0.4s ease;
        display: block;
    }
    
    .team-member-left .desktop-member-image:hover {
        transform: scale(1.03) translateX(-5px);
        filter: drop-shadow(0 30px 60px rgba(36, 132, 198, 0.25));
    }
    
    .team-member-right .desktop-member-image:hover {
        transform: scale(1.03) translateX(5px);
        filter: drop-shadow(0 30px 60px rgba(36, 132, 198, 0.25));
    }
    
    .desktop-image-glow {
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        height: 40px;
        background: radial-gradient(ellipse at center, rgba(36, 132, 198, 0.35) 0%, transparent 70%);
        filter: blur(25px);
        z-index: 1;
    }
    
    .team-member-left .desktop-image-glow {
        left: 40%;
    }
    
    .team-member-right .desktop-image-glow {
        left: 60%;
    }
    
    /* Desktop Text Side Reset */
    .desktop-member-info {
        max-width: 320px;
    }
    
    .team-member-left .desktop-member-info {
        text-align: left;
        margin-left: 0;
    }
    
    .team-member-right .desktop-member-info {
        text-align: right;
        margin-right: 0;
    }
    
    .desktop-member-name {
        font-family: 'Sora', sans-serif;
        font-size: 2.4rem;
        font-weight: 700;
        color: white;
        margin-bottom: 10px;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }
    
    .team-member-left .desktop-member-name {
        text-align: left;
    }
    
    .team-member-right .desktop-member-name {
        text-align: right;
    }
    
    .desktop-member-role {
        display: inline-block;
        font-size: 0.95rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 3px;
        color: #6db3ff;
        margin-bottom: 18px;
        padding-bottom: 18px;
        position: relative;
    }
    
    .team-member-left .desktop-member-role::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 50px;
        height: 2px;
        background: linear-gradient(90deg, #2484c6, transparent);
    }
    
    .team-member-right .desktop-member-role::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 2px;
        background: linear-gradient(270deg, #2484c6, transparent);
    }
    
    .desktop-member-bio {
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.7;
        font-size: 1rem;
        max-width: 300px;
    }
    
    .team-member-left .desktop-member-bio {
        text-align: left;
        margin-left: 0;
    }
    
    .team-member-right .desktop-member-bio {
        text-align: right;
        margin-right: 0;
    }
    
    /* Desktop Achievements */
    .team-achievements {
        margin-top: 0;
        animation-delay: 0.6s;
    }
    
    .achievements-list {
        flex-direction: column;
        gap: 28px;
    }
    
    .achievement-number {
        font-size: 3rem;
    }
    
    .achievement-text {
        font-size: 0.95rem;
        letter-spacing: 2.5px;
    }
    
    .achievements-label::before,
    .achievements-label::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 50px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(36, 132, 198, 0.6), transparent);
    }
    
    .achievements-label::before {
        right: calc(100% + 25px);
    }
    
    .achievements-label::after {
        left: calc(100% + 25px);
    }
}

/* Large Desktop (1300px and above) */
@media (min-width: 1300px) {
    .desktop-member-image {
        width: 520px;
        height: 520px;
    }
    
    .desktop-member-name {
        font-size: 2.6rem;
    }
}

/* Ultra Wide (1600px and above) */
@media (min-width: 1600px) {
    .desktop-member-image {
        width: 580px;
        height: 580px;
    }
}

/* Hide mobile/tablet rows on desktop */
@media (min-width: 901px) {
    .team-row {
        display: none;
    }
}

/* Hide desktop elements on mobile/tablet */
@media (max-width: 900px) {
    .team-member-desktop {
        display: none;
    }
}

/* Fix Our Impact vertical centering - Desktop only */
@media (min-width: 901px) {
    .team-achievements {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        margin: 0;
    }
    
    .achievements-list {
        align-items: center;
    }
}