/**
 * Team Gallery Styles
 */

/* Container */
.team-gallery-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Space for arrows */
}

.team-gallery-wrapper {
    overflow: hidden;
    position: relative;
}

.team-gallery-track {
    display: flex;
    transition: transform 0.3s ease;
}

/* Navigation Arrows */
.team-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s ease;
    padding: 0;
}

.team-gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.team-gallery-arrow.prev {
    left: 0;
}

.team-gallery-arrow.next {
    right: 0;
}

/* Team Member Card */
.team-member-card {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px;
    height: 300px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.team-member-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-member-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    transition: background 0.3s ease;
}

h3.team-member-name {
    color: #fff !important;
    margin: 0 0 0;
    font-size: 18px;
}

.team-member-position {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 14px;
}

.team-member-view-profile {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover States */
.team-member-card:hover .team-member-background,
.team-member-card:focus-within .team-member-background {
    filter: grayscale(0);
}

.team-member-card:hover .team-member-overlay,
.team-member-card:focus-within .team-member-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.team-member-card:hover .team-member-view-profile,
.team-member-card:focus-within .team-member-view-profile {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Modal */
.team-member-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.team-member-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.team-member-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    display: flex;
    gap: 30px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.team-member-modal.active .team-member-modal-content {
    transform: scale(1);
}

.team-member-modal-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.team-member-modal-info {
    flex: 1;
}

.team-member-modal-name {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.team-member-modal-position {
    margin: 0 0 20px;
    font-size: 18px;
    color: #666;
}

.team-member-modal-bio {
    margin: 0;
    color: #444;
    line-height: 1.6;
    text-align: justify;
}

.team-member-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .team-member-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .team-member-card {
        flex: 0 0 calc(100% - 20px);
    }
    
    .team-member-modal-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}