@import url('home.css');

/* Animations */
.team-member-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.team-member-card:nth-child(1) { animation-delay: 0.1s; }
.team-member-card:nth-child(2) { animation-delay: 0.2s; }
.team-member-card:nth-child(3) { animation-delay: 0.3s; }
.team-member-card:nth-child(4) { animation-delay: 0.4s; }
.team-member-card:nth-child(5) { animation-delay: 0.5s; }

body {
    background-color: var(--white);
}

.page-banner {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 50px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.banner-tag {
    animation: fadeInUp 0.6s ease-out;
}

.banner-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.banner-ar {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.page-banner .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.banner-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    background-color: rgba(250, 203, 35, 0.18);
    color: var(--accent-color) !important;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-size: 13px;
}

.banner-title {
    font-size: 44px;
    font-family: var(--font-heading-en);
    line-height: 1.05;
    color: var(--white) !important;
    margin-top: 4px;
}

.banner-ar {
    font-family: var(--font-body-ar);
    font-size: 22px;
    direction: rtl;
    text-align: center;
    color: var(--white) !important;
    margin-top: 2px;
}

.team-overview {
    padding: 90px 0;
}

.team-overview .container {
    max-width: 1400px;
    padding: 0 40px;
}

.team-intro {
    max-width: 900px;
    margin: 0 auto 80px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.intro-text {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.intro-ar {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.intro-text {
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.7;
    margin-bottom: 16px;
    font-weight: 500;
}

.intro-ar {
    font-family: var(--font-body-ar);
    font-size: 18px;
    color: var(--text-gray);
    direction: rtl;
    text-align: center;
    line-height: 1.8;
}

.team-section {
    margin-bottom: 80px;
}

.team-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 36px;
    font-family: var(--font-heading-en);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.section-title-ar {
    font-family: var(--font-body-ar);
    font-size: 22px;
    color: var(--text-gray);
    direction: rtl;
    text-align: center;
    margin-bottom: 48px;
    font-weight: 600;
}

/* Team Grid - Circular Images */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px;
    margin-top: 40px;
    max-width: 100%;
}

/* Force 3-2 layout: 3 columns max, then position cards */
@media (min-width: 769px) {
    .team-grid {
        grid-template-columns: repeat(6, 1fr);
        justify-items: center;
        align-items: start;
    }
    
    /* Top row: 3 cards, each spanning 2 columns */
    .team-member-card:nth-child(1) {
        grid-column: 1 / 3;
    }
    
    .team-member-card:nth-child(2) {
        grid-column: 3 / 5;
    }
    
    .team-member-card:nth-child(3) {
        grid-column: 5 / 7;
    }
    
    /* Bottom row: 2 cards centered together (spanning columns 2-3 and 4-5) */
    .team-member-card:nth-child(4) {
        grid-column: 2 / 4;
    }
    
    .team-member-card:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.team-member-card {
    background: var(--white);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    position: relative;
    max-width: 400px;
    height: 400px;
}

.team-member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.team-member-image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    border: 4px solid var(--white);
}

.team-member-card:hover .team-member-image-wrapper {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.team-member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.4s ease;
}

.team-member-card:hover .team-member-image {
    transform: scale(1.1);
    object-position: center 30%;
}

.team-member-info {
    text-align: center;
    width: 100%;
    position: relative;
}

.team-member-name {
    font-size: 20px;
    font-family: var(--font-heading-en);
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.team-member-role {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-banner {
        padding: 50px 0 50px;
    }

    .banner-title {
        font-size: 38px;
    }

    .team-overview .container {
        padding: 0 24px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 28px;
    }

    .team-member-card {
        max-width: 350px;
        height: 350px;
    }

    .team-member-image-wrapper {
        width: 180px;
        height: 180px;
    }

    .section-title {
        font-size: 32px;
    }

    .section-title-ar {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 80px 0 60px;
    }

    .banner-title {
        font-size: 30px;
    }

    .banner-ar {
        font-size: 18px;
    }

    .team-overview {
        padding: 70px 0;
    }

    .team-overview .container {
        padding: 0 20px;
    }

    .team-intro {
        margin-bottom: 60px;
    }

    .intro-text {
        font-size: 18px;
    }

    .intro-ar {
        font-size: 16px;
    }

    .team-section {
        margin-bottom: 60px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-title-ar {
        font-size: 18px;
        margin-bottom: 36px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 24px;
    }

    .team-member-card {
        padding: 20px;
        max-width: 300px;
        height: auto;
    }

    .team-member-image-wrapper {
        width: 160px;
        height: 160px;
        margin-bottom: 16px;
    }

    .team-member-name {
        font-size: 18px;
    }

    .team-member-role {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .team-member-card {
        padding: 16px;
        max-width: 100%;
        height: auto;
        min-height: 280px;
    }

    .team-member-image-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 12px;
        border-width: 3px;
    }

    .team-member-name {
        font-size: 16px;
    }

    .team-member-role {
        font-size: 14px;
    }

    .intro-text {
        font-size: 16px;
    }

    .intro-ar {
        font-size: 15px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-title-ar {
        font-size: 16px;
        margin-bottom: 28px;
    }
}
