/* ==========================================================================
   Our Team Page
   ========================================================================== */

/* Hero Section */
.team-hero {
    background-color: #F9F9F9;
    color: var(--color-dark);
    padding: var(--space-md) 0 5px;
    position: relative;
    overflow: hidden;
}

.team-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    min-height: 450px;
}

.team-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
}

.team-hero__title {
    font-size: var(--fs-4xl);
    color: var(--color-dark);
    margin-bottom: 0;
    font-weight: var(--fw-bold);
    line-height: 1.4;
}

.team-hero__title .highlight {
    background-color: var(--color-primary);
    padding: 0 10px;
}

.team-hero__desc {
    font-size: var(--fs-base);
    line-height: 1.8;
    color: #444;
    margin-bottom: 0;
    max-width: 700px;
}

.team-hero__actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.team-hero__actions .btn svg,
.team-cta__content .btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.team-hero__image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-watermark {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    width: 400px;
    opacity: 0.15;
    pointer-events: none;
}

/* Team Grid Archive */
.team-archive {
    padding: var(--space-4xl) 0;
    background-color: var(--color-white);
}

.team-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
    max-width: 1000px;
    margin: 0 auto;
}

/* Team Card */
.team-card {
    background-color: var(--color-white);
    border: 2px solid #EEDC5B;
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.team-card__image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-card__content {
    padding: var(--space-xl) var(--space-lg);
}

.team-card__name {
    font-size: var(--fs-xl);
    color: var(--color-dark);
    margin-bottom: var(--space-xs);
    font-weight: var(--fw-bold);
}

.team-card__role {
    display: block;
    font-size: var(--fs-base);
    color: #666;
    margin-bottom: var(--space-md);
    font-weight: var(--fw-semibold);
}

.team-card__contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding-top: var(--space-md);
    border-top: 1px solid #eee;
}

.team-card__icon {
    display: inline-flex;
    color: var(--color-dark);
}

.team-card__icon svg {
    fill: currentColor;
}

.team-card__email {
    font-size: var(--fs-sm);
    color: var(--color-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.team-card__email:hover {
    color: var(--color-primary-hover);
}

/* Team Card Clickable */
.team-card {
    cursor: pointer;
}

/* Team Modal */
.team-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.team-modal.is-active {
    display: flex;
}

.team-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.team-modal__container {
    position: relative;
    background-color: var(--color-white);
    border-radius: var(--radius-sm);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-modal__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    z-index: 10;
    transition: background-color var(--transition-fast);
}

.team-modal__close:hover {
    background-color: #d4c44b;
}

.team-modal__content {
    padding: var(--space-3xl);
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.team-modal__info {
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar - WebKit browsers */
.team-modal__info::-webkit-scrollbar {
    width: 8px;
}

.team-modal__info::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.team-modal__info::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.team-modal__info::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Custom scrollbar - Firefox */
.team-modal__info {
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f1f1f1;
}

.team-modal__name {
    font-size: var(--fs-2xl);
    color: var(--color-dark);
    font-weight: var(--fw-bold);
    margin: 0 0 var(--space-xs);
}

.team-modal__role {
    font-size: var(--fs-lg);
    color: #666;
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-lg);
}

.team-modal__bio {
    font-size: var(--fs-base);
    color: #444;
    line-height: 1.7;
    margin: 0 0 var(--space-xl);
}

.team-modal__bio p {
    margin-bottom: var(--space-md);
    min-height: 1em;
}

.team-modal__bio p:empty {
    min-height: var(--space-md);
    margin-bottom: var(--space-md);
}

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

.team-modal__bio br {
    display: block;
    content: '';
    margin-bottom: var(--space-md);
}

.team-modal__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid #eee;
}

.team-modal__email,
.team-modal__phone {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-dark);
    text-decoration: none;
    font-size: var(--fs-base);
    transition: color var(--transition-fast);
}

.team-modal__email:hover,
.team-modal__phone:hover {
    color: var(--color-primary-hover);
}

.team-modal__email svg,
.team-modal__phone svg {
    flex-shrink: 0;
}

/* RTL: Swap icon and text order in modal contact links */
.team-modal__contact--rtl .team-modal__email,
.team-modal__contact--rtl .team-modal__phone {
    flex-direction: row-reverse;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .team-modal__content {
        padding: var(--space-xl);
        max-height: 85vh;
    }

    .team-modal__name {
        font-size: var(--fs-xl);
    }

    .team-modal__role {
        font-size: var(--fs-base);
    }

    .team-modal__bio {
        font-size: var(--fs-sm);
    }
}

/* CTA Section */
.team-cta {
    padding: var(--space-4xl) 0;
    background-color: var(--color-white);
}

.team-cta__content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.team-cta__title {
    font-size: var(--fs-3xl);
    color: var(--color-dark);
    margin-bottom: var(--space-lg);
    font-weight: var(--fw-bold);
    line-height: 1.4;
}

.team-cta__title .highlight {
    background-color: var(--color-primary);
    padding: 0 10px;
}

.team-cta__desc {
    font-size: var(--fs-base);
    color: #444;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

/* Responsive */
@media (max-width: 992px) {
    .team-hero__grid {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: var(--space-2xl);
    }

    .team-hero__image {
        order: -1;
    }

    .hero-logo-watermark {
        width: 300px;
        margin: 0 auto;
    }

    .team-archive__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }

    .team-cta__title {
        font-size: var(--fs-2xl);
    }
}

@media (max-width: 576px) {
    .team-archive__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .team-card__image {
        height: auto;
    }

    .team-hero__title {
        font-size: var(--fs-3xl);
    }

    .team-cta__title {
        font-size: var(--fs-xl);
    }
}
