/* 
 * Team Template Styles
 */

/* Grid Section */
.team-grid-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.theme-dark .team-grid-section {
    background-color: var(--thm-black);
}

/* Fallback page content */
.team-page-content {
    padding: 60px 0;
}

/* Custom gap overrides for Bootstrap rows */
.team-grid-row {
    margin-left: calc(var(--team-gap, 30px) / -2);
    margin-right: calc(var(--team-gap, 30px) / -2);
    transition: all 0.3s ease;
}

/* Team Card Item */
.team-item {
    padding-left: calc(var(--team-gap, 30px) / 2);
    padding-right: calc(var(--team-gap, 30px) / 2);
    padding-bottom: var(--team-gap, 30px);
    transition: opacity 0.30s ease, transform 0.30s ease;
}

@keyframes filterPopIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.team-item.filtering-in {
    animation: filterPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.team-item.hidden {
    display: none !important;
}

/* Filter Bar Styling */
.team-filter-container {
    text-align: center;
    margin-bottom: 45px;
}

.team-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.team-filter-item {
    padding: 10px 26px;
    border-radius: var(--thm-badge-radius, 30px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    color: #4b5563;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.team-filter-item:hover,
.team-filter-item.active {
    background: var(--thm-primary);
    color: #ffffff;
    border-color: var(--thm-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-dark .team-filter-item {
    background: var(--thm-gray-rgb);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-dark .team-filter-item:hover,
.theme-dark .team-filter-item.active {
    background: var(--thm-primary);
    color: #ffffff;
    border-color: var(--thm-primary);
}

/* Team Card */
.team-card {
    background: #fff;
    border-radius: var(--thm-card-radius, 12px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.theme-dark .team-card {
    background: var(--thm-gray-rgb);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.theme-dark .team-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Image Wrapper and Overlay */
.team-thumbnail {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1.15;
    background-color: #f3f4f6;
}

.theme-dark .team-thumbnail {
    background-color: var(--thm-black);
}

.team-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.team-card:hover .team-thumbnail img {
    transform: scale(1.05) translateZ(0);
}

/* Social Media Overlay on Hover */
.team-social-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

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

.team-social-icons {
    display: flex;
    gap: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.team-card:hover .team-social-icons {
    transform: translateY(0);
}

.team-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #111827;
    border-radius: 50%;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.team-social-icons a:hover {
    background: var(--thm-primary);
    color: #fff;
    transform: scale(1.1);
}

/* Team Member Content Details */
.team-info {
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-name {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.theme-dark .team-name {
    color: #f9fafb;
}

.team-designation {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--thm-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Direct Contact Info */
.team-contacts {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.team-contacts a {
    color: #6b7280;
    transition: color 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-dark .team-contacts a {
    color: #9ca3af;
}

.team-contacts a:hover {
    color: var(--thm-primary);
}

.team-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin-top: 5px;
}

.theme-dark .team-bio {
    color: #9ca3af;
}

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

/* Read Bio Trigger Button */
.team-read-bio-btn {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-dark .team-read-bio-btn {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.team-read-bio-link {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.theme-dark .team-read-bio-link {
    color: #f9fafb;
}

.team-read-bio-link:hover {
    color: var(--thm-primary);
}

/* -----------------------------------------------------
 * Lightbox Modal Popup Styles
 * ----------------------------------------------------- */
.team-bio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.team-bio-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.team-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.team-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 780px;
    border-radius: var(--thm-card-radius, 16px);
    position: relative;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.theme-dark .team-modal-content {
    background: var(--thm-gray-rgb);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-bio-modal.active .team-modal-content {
    transform: translateY(0);
}

/* Close Button */
.team-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    font-size: 16px;
    transition: background 0.3s ease, color 0.3s ease;
    z-index: 15;
}

.theme-dark .team-modal-close {
    background: #2b2b2b;
    color: #d1d5db;
}

.team-modal-close:hover {
    background: var(--thm-primary);
    color: #ffffff;
}

/* Modal Layout Grid */
.team-modal-grid {
    display: flex;
    flex-direction: row;
    overflow-y: auto;
}

@media (max-width: 767px) {
    .team-modal-grid {
        flex-direction: column;
    }
}

.team-modal-photo {
    width: 40%;
    min-height: 350px;
    background-color: #f3f4f6;
}

.theme-dark .team-modal-photo {
    background-color: var(--thm-black);
}

@media (max-width: 767px) {
    .team-modal-photo {
        width: 100%;
        min-height: 250px;
        height: 250px;
    }
}

.team-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-modal-body {
    width: 60%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 767px) {
    .team-modal-body {
        width: 100%;
        padding: 25px;
    }
}

.team-modal-name {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 5px 0;
}

.theme-dark .team-modal-name {
    color: #f9fafb;
}

.team-modal-designation {
    font-size: 14px;
    font-weight: 700;
    color: var(--thm-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}

.team-modal-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 14px;
}

.theme-dark .team-modal-contacts {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.team-modal-contacts a {
    color: #4b5563;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.theme-dark .team-modal-contacts a {
    color: #d1d5db;
}

.team-modal-contacts a:hover {
    color: var(--thm-primary);
}

.team-modal-bio {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 25px;
}

.theme-dark .team-modal-bio {
    color: #d1d5db;
}

/* Modal Socials */
.team-modal-socials {
    display: flex;
    gap: 12px;
}

.team-modal-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 50%;
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.theme-dark .team-modal-socials a {
    background: var(--thm-black);
    color: #cbd5e1;
}

.team-modal-socials a:hover {
    background: var(--thm-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* -----------------------------------------------------
 * Featured Member Showcase Styles
 * ----------------------------------------------------- */
/* -----------------------------------------------------
 * Featured Member Showcase Styles
 * ----------------------------------------------------- */
.team-showcase-wrapper {
    background: #ffffff;
    border-radius: var(--thm-card-radius, 20px);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 60px;
}

/* Dark theme overrides */
.theme-dark .team-showcase-wrapper {
    background: var(--thm-gray-rgb);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.team-showcase-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
}

.team-showcase-section.align-right .team-showcase-row {
    flex-direction: row-reverse;
}

.team-showcase-col {
    width: 50%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991px) {
    .team-showcase-col {
        width: 100%;
    }

    .team-showcase-section.align-right .team-showcase-row {
        flex-direction: column;
        /* Force image top on mobile always */
    }
}

/* Image Column styling */
.team-showcase-image-col {
    position: relative;
    background-color: rgba(0, 0, 0, 0.02);
}

.team-showcase-image-inner {
    width: 100%;
    height: auto;
}

.team-showcase-image-inner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Column styling */
.team-showcase-content-col {
    justify-content: center;
    padding: 40px 50px;
    position: relative;
}

.team-showcase-content-col::before {
    content: '“';
    position: absolute;
    top: -10px;
    right: 40px;
    font-size: 180px;
    font-family: Georgia, serif;
    line-height: 1;
    color: rgba(0, 0, 0, 0.025);
    pointer-events: none;
    user-select: none;
}

.theme-dark .team-showcase-content-col::before {
    color: rgba(255, 255, 255, 0.02);
}

@media (max-width: 767px) {
    .team-showcase-content-col {
        padding: 30px;
    }
}

.team-showcase-tagline {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--thm-primary);
    margin-bottom: 12px;
}

.team-showcase-name {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.2;
    color: #111827;
}

.theme-dark .team-showcase-name {
    color: #ffffff;
}

.team-showcase-designation {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 25px;
}

.theme-dark .team-showcase-designation {
    color: #9ca3af;
}

.team-showcase-bio {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #4b5563;
}

.theme-dark .team-showcase-bio {
    color: #d1d5db;
}

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

/* Contacts */
.team-showcase-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-dark .team-showcase-contacts {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.team-showcase-contacts a {
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    color: #4b5563;
}

.theme-dark .team-showcase-contacts a {
    color: #d1d5db;
}

.team-showcase-contacts a:hover {
    color: var(--thm-primary);
}

/* Social Icons */
.team-showcase-socials {
    display: flex;
    gap: 12px;
}

.team-showcase-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 15px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    background: #f3f4f6;
    color: #4b5563;
}

.theme-dark .team-showcase-socials a {
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
}

.team-showcase-socials a:hover {
    background: var(--thm-primary);
    color: #ffffff;
    transform: translateY(-2px);
}