/* Ultra Version - Team Members CSS with Larger Images and Fixed Lightbox */

/* Fix Bootstrap code padding that causes right shift */
code {
    padding: 0 !important;
}

/* Grid Layout */
.team-members-grid {
    display: grid;
    grid-gap: 8px;
    padding: 20px 0;
    margin: 0 auto;
}

/* Grid Column Configurations */
.team-members-grid.columns-4 { 
    grid-template-columns: repeat(4, 1fr); 
    gap: 8px;
}
.team-members-grid.columns-5 { 
    grid-template-columns: repeat(5, 1fr); 
    gap: 6px;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .team-members-grid.columns-4,
    .team-members-grid.columns-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .team-members-grid.columns-4,
    .team-members-grid.columns-5 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Team Member Card */
.team-member-card {
    position: relative;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.team-member-card:hover {
    transform: translateY(-5px);
}

/* Profile Image Container - ULTRA LARGE */
.team-member-image {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e0e0e0;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

/* Profile Image */
.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transition: transform 0.3s ease;
}

.team-member-card:hover .team-member-image {
    border-color: #2c5aa0;
    box-shadow: 0 8px 25px rgba(44, 90, 160, 0.2);
}

.team-member-card:hover .team-member-image img {
    transform: scale(1.05);
}

/* Hide names when requested */
.team-members-grid.hide-names .team-member-name {
    display: none;
}

/* Hover Overlay */
.team-member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 90, 160, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.team-member-card:hover .team-member-overlay {
    opacity: 1;
}

.team-member-overlay .name {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
}

/* Team Member Info */
.team-member-info {
    padding: 15px 0;
}

.team-member-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.team-member-position {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0;
}

/* Team Lightbox Styles - FIXED VERSION */
.team-lightbox-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    overflow: hidden !important;
}

.team-lightbox-overlay.active {
    display: flex !important;
}

.team-lightbox-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 800px;
    width: auto;
    max-height: 95vh;
    overflow-y: visible;
    position: relative;
    animation: lightboxSlideIn 0.3s ease;
}

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

.team-lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    padding: 5px;
    line-height: 1;
    z-index: 100000;
}

.team-lightbox-close:hover {
    color: #333;
}

/* Prevent body scroll when lightbox is open */
body.team-lightbox-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* Loading Spinner */
.team-lightbox-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.team-loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lightbox Content */
.team-lightbox-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid #2c5aa0;
    overflow: hidden;
}

.team-lightbox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-lightbox-name {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 0 0 10px;
}

.team-lightbox-position {
    font-size: 16px;
    color: #2c5aa0;
    text-align: center;
    margin: 0 0 20px;
    font-weight: 500;
}

.team-lightbox-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    text-align: left;
}

.team-lightbox-contact {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.team-contact-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-size: 14px;
}

.team-contact-item .icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    fill: #2c5aa0;
}

.team-contact-item a {
    color: #2c5aa0;
    text-decoration: none;
}

.team-contact-item a:hover {
    text-decoration: underline;
}

/* Social Links */
.team-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.team-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.team-social-link:hover {
    background: #2c5aa0;
    color: white;
    transform: translateY(-2px);
}

.team-social-link .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}