/**
 * Team Members CSS
 * 
 * Styling for the ID Team Members plugin
 * 
 * Author: Insight Dezign
 * Author URI: https://insightdezign.com
 */

/* Container and grid layout */
.our-team-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.team-members-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/* Row configurations */
.team-members-row-3 .team-member {
    width: 33.333%;
    padding: 0 15px;
    margin-bottom: 30px;
}

.team-members-row-4 .team-member {
    width: 25%;
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Member card styling */
.team-member {
    cursor: pointer;
    position: relative;
}

/* Expand icon indicator */
.team-member-expand {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 32px;
    height: 32px;
    background-color: rgba(49, 83, 153, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.team-member-inner:hover .team-member-expand {
    opacity: 1;
    transform: scale(1);
}

.team-member-inner {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-member-inner:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Box style variations */
.team-member-box-gray .team-member:nth-child(odd) .team-member-inner {
    background-color: #f5f5f5; /* Light gray background for odd boxes */
}

.team-member-box-white .team-member .team-member-inner {
    background-color: #fff !important; /* Force white background for all boxes */
}

/* Image styling */
.team-member-image {
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.team-member-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: all 0.3s ease-in-out;
}

/* Image shape styles */
.team-member-image-square img {
    border-radius: 0;
}

.team-member-image-circle {
    border-radius: 50%;
}

.team-member-image-circle img {
    border-radius: 50%;
}

/* Black and white image style with color on hover */
.team-member-image-bw img {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
}

.team-member-inner:hover .team-member-image-bw img {
    filter: grayscale(0%);
    -webkit-filter: grayscale(0%);
    -moz-filter: grayscale(0%);
    -ms-filter: grayscale(0%);
    -o-filter: grayscale(0%);
}

/* Text styling */
.team-member-name-container {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.team-member-name {
    margin: 0 0 5px;
    font-size: 20px;
    color: #315399; /* Friendly House blue color */
    line-height: 1.2;
    text-align: center;
}

.team-member-divider {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #bd3e26; /* Friendly House red color */
    display: block;
}

.team-member-role {
    font-size: 17px; /* Increased font size for board titles */
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-member-company {
    font-size: 14px; /* Smaller font for company */
    color: #777;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-member-position {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

/* Main content area - this will push the social icons to the bottom */
.team-member-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-member-bio {
    font-size: 14px;
    color: #555;
    text-align: left;
    margin-top: 15px;
    line-height: 1.5;
    flex-grow: 1; /* Allow bio to grow */
}

/* Contact information styles */
.team-member-contact {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-member-contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.2s ease;
}

.team-member-contact-link:hover {
    color: #315399; /* Friendly House blue color */
}

.team-member-contact-link i {
    margin-right: 8px;
    color: #bd3e26; /* Friendly House red color */
}

.team-member-contact-text {
    font-weight: 500;
}

/* Social media styles */
.team-member-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto; /* Push to the bottom of the card */
    padding-top: 20px;
}

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

.team-member-social-link:hover {
    background-color: #315399; /* Friendly House blue color */
    color: #ffffff;
    transform: translateY(-3px);
}

.team-member-social-link i {
    font-size: 16px;
}

/* Social icon specific colors on hover */
.team-member-social-link[title="Website"]:hover {
    background-color: #315399; /* Blue color for website */
}

.team-member-social-link[title="Facebook"]:hover {
    background-color: #3b5998;
}

.team-member-social-link[title="Twitter/X"]:hover {
    background-color: #1da1f2;
}

.team-member-social-link[title="LinkedIn"]:hover {
    background-color: #0077b5;
}

.team-member-social-link[title="Instagram"]:hover {
    background-color: #e1306c;
}

.team-member-social-link[title="Email"]:hover {
    background-color: #d44638; /* Gmail-like red color */
}

/* ========================================
   LIGHTBOX STYLES
   ======================================== */

.team-member-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.team-member-lightbox[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.team-member-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.team-member-lightbox-container {
    position: relative;
    background-color: #fff;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.team-member-lightbox[aria-hidden="false"] .team-member-lightbox-container {
    transform: scale(1);
}

.team-member-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-member-lightbox-close:hover {
    background-color: #bd3e26;
    color: #fff;
}

/* Navigation arrows */
.team-member-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    font-size: 20px;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.team-member-lightbox-nav:hover {
    background-color: #315399;
    color: #fff;
}

.team-member-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.team-member-lightbox-nav:disabled:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.team-member-lightbox-prev {
    left: 20px;
}

.team-member-lightbox-next {
    right: 20px;
}

/* Lightbox content */
.team-member-lightbox-content {
    padding: 40px;
}

.team-member-lightbox-header {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.team-member-lightbox-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

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

.team-member-lightbox-image.lightbox-image-circle {
    border-radius: 50%;
}

.team-member-lightbox-image.lightbox-image-circle img {
    border-radius: 50%;
}

.team-member-lightbox-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-member-lightbox-name {
    font-size: 28px;
    color: #315399;
    margin: 0 0 10px;
    line-height: 1.2;
}

.team-member-lightbox-role {
    font-size: 18px;
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-member-lightbox-company {
    font-size: 15px;
    color: #777;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-member-lightbox-position {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
}

.team-member-lightbox-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.team-member-lightbox-contact a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.2s ease;
}

.team-member-lightbox-contact a:hover {
    color: #315399;
}

.team-member-lightbox-contact i {
    margin-right: 8px;
    color: #bd3e26;
    width: 16px;
    text-align: center;
}

.team-member-lightbox-divider {
    width: 60px;
    height: 3px;
    background-color: #bd3e26;
    margin: 20px 0;
}

.team-member-lightbox-bio {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

.team-member-lightbox-bio p {
    margin: 0 0 15px;
}

.team-member-lightbox-bio p:last-child {
    margin-bottom: 0;
}

.team-member-lightbox-social {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.team-member-lightbox-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

.team-member-lightbox-social a:hover {
    transform: translateY(-3px);
}

.team-member-lightbox-social a[title="Website"]:hover {
    background-color: #315399;
    color: #fff;
}

.team-member-lightbox-social a[title="Email"]:hover {
    background-color: #d44638;
    color: #fff;
}

.team-member-lightbox-social a[title="Facebook"]:hover {
    background-color: #3b5998;
    color: #fff;
}

.team-member-lightbox-social a[title="Twitter/X"]:hover {
    background-color: #1da1f2;
    color: #fff;
}

.team-member-lightbox-social a[title="LinkedIn"]:hover {
    background-color: #0077b5;
    color: #fff;
}

.team-member-lightbox-social a[title="Instagram"]:hover {
    background-color: #e1306c;
    color: #fff;
}

/* Body class when lightbox is open */
body.team-member-lightbox-open {
    overflow: hidden;
}

/* Responsive styles */
@media screen and (max-width: 992px) {
    .team-members-row-4 .team-member {
        width: 33.333%;
    }
    
    .team-member-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .team-member-lightbox-prev {
        left: 15px;
    }

    .team-member-lightbox-next {
        right: 15px;
    }
}

@media screen and (max-width: 900px) {
    .team-member-lightbox-prev,
    .team-member-lightbox-next {
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .team-member-lightbox-prev {
        left: calc(50% - 60px);
    }
    
    .team-member-lightbox-next {
        right: calc(50% - 60px);
    }
    
    .team-member-lightbox-container {
        max-height: calc(90vh - 80px);
        margin-bottom: 80px;
    }
}

@media screen and (max-width: 768px) {
    .team-members-row-3 .team-member,
    .team-members-row-4 .team-member {
        width: 50%;
    }
    
    .team-member-lightbox-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .team-member-lightbox-image {
        width: 150px;
        height: 150px;
    }
    
    .team-member-lightbox-content {
        padding: 30px 20px;
    }
    
    .team-member-lightbox-contact {
        align-items: center;
    }
    
    .team-member-lightbox-social {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .team-members-row-3 .team-member,
    .team-members-row-4 .team-member {
        width: 100%;
    }
    
    .team-member-contact-link {
        font-size: 13px;
    }
    
    .team-member-social {
        gap: 10px;
    }
    
    .team-member-social-link {
        width: 32px;
        height: 32px;
    }
    
    .team-member-lightbox-name {
        font-size: 22px;
    }
    
    .team-member-lightbox-content {
        padding: 25px 15px;
    }
}
