/* ==========================================================================
   Team Section
   ========================================================================== */

.team-section {
    background: #FEF6F0;
    padding: 80px 0 100px;
}

.team-section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Title */
.team-section-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 60px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.team-section.animate-in .team-section-title {
    opacity: 1;
    transform: translateY(0);
}

/* Slider */
.team-slider {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
    padding: 20px; /* Padding to show shadow */
    margin: -20px; /* Compensate for padding */
}

.team-section.animate-in .team-slider {
    opacity: 1;
    transform: translateY(0);
}

.team-slider-wrapper {
    position: relative;
    overflow: visible;
}

/* Slide */
.team-slide {
    display: none;
}

.team-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Team Card */
.team-card {
    display: flex;
    flex-direction: row-reverse; /* RTL: Image on right, content on left */
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    min-height: 28rem;
    padding: 32px; /* Inner padding */
    gap: 40px;
    align-items: stretch;
}

.team-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.team-card-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
    line-height: 1.3;
}

.team-card-bio {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    flex: 1;
}

.team-card-bio p {
    margin: 0 0 16px;
}

.team-card-bio p:last-child {
    margin-bottom: 0;
}

/* Team Image - Fixed height */
.team-card-image {
    flex: 0 0 380px;
    width: 380px;
    height: 480px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Navigation Arrows */
.team-slider-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 60px 0 20px;
}

.team-nav-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary, #153C6D);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.team-nav-arrow:hover {
    background: #0f2d52;
    transform: scale(1.05);
}

.team-nav-arrow svg {
    width: 20px;
    height: 20px;
}

/* Rotate arrows for RTL */
.team-nav-prev {
    transform: rotate(180deg);
}

.team-nav-prev:hover {
    transform: rotate(180deg) scale(1.05);
}

.team-nav-next {
    transform: rotate(180deg);
}

.team-nav-next:hover {
    transform: rotate(180deg) scale(1.05);
}

/* No bottom line */
.team-section-bottom-line {
    display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .team-card {
        padding: 28px;
        gap: 32px;
    }
    
    .team-card-image {
        flex: 0 0 340px;
        width: 340px;
        height: 440px;
    }
}

@media (max-width: 1024px) {
    .team-section {
        padding: 60px 0 80px;
    }
    
    .team-section-container {
        padding: 0 32px;
    }
    
    .team-section-title {
        font-size: 36px;
        margin-bottom: 48px;
    }
    
    .team-card {
        min-height: 22rem;
        padding: 24px;
        gap: 28px;
    }
    
    .team-card-content {
        padding: 12px 0;
    }
    
    .team-card-name {
        font-size: 24px;
    }
    
    .team-card-bio {
        font-size: 14px;
    }
    
    .team-card-image {
        flex: 0 0 300px;
        width: 300px;
        height: 400px;
    }
    
    .team-slider-nav {
        padding: 48px 0 16px;
    }
}

@media (max-width: 768px) {
    .team-section {
        padding: 48px 0 80px;
    }
    
    .team-section-container {
        padding: 0 24px;
    }
    
    .team-section-title {
        font-size: 28px;
        margin-bottom: 32px;
    }
    
    .team-slider {
        padding: 10px;
        margin: -10px;
    }
    
    .team-card {
        flex-direction: column;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        min-height: auto;
        padding: 0;
        gap: 24px;
    }
    
    .team-card-image {
        display: block;
        flex: none;
        width: 100%;
        height: 320px;
        order: -1; /* Image first */
        border-radius: 12px;
    }
    
    .team-card-content {
        padding: 0;
        order: 1;
    }
    
    .team-card-name {
        font-size: 22px;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .team-card-bio {
        font-size: 14px;
        text-align: right;
    }
    
    .team-slider-nav {
        padding: 40px 0 20px;
    }
    
    .team-nav-arrow {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: 40px 0 70px;
    }
    
    .team-section-container {
        padding: 0 16px;
    }
    
    .team-section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .team-card-image {
        height: 280px;
    }
    
    .team-card-name {
        font-size: 20px;
    }
    
    .team-card-bio {
        font-size: 13px;
    }
    
    .team-slider-nav {
        padding: 32px 0 16px;
    }
    
    .team-nav-arrow {
        width: 40px;
        height: 40px;
    }
}
