/* Team Page Styles */
.team-section {
    padding: 70px 0;
    background-color: #f8f9fa;
}

/* Team Cards */
.team-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    border-radius: 16px;
    height: 100%;
    border: none;
    background-color: #fff;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

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

.team-image-container {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.team-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.team-card:hover .team-image {
    transform: scale(1.08);
}

.team-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    padding: 30px 0 15px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    z-index: 2;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--bs-primary);
    border-radius: 50%;
    margin: 0 6px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background-color: var(--bs-white);
    color: var(--bs-secondary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.team-quote {
    font-style: italic;
    color: var(--bs-gray-600);
    font-size: 1rem;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--bs-primary);
    margin: 1.5rem 0;
    line-height: 1.6;
}

.team-bio-excerpt {
    color: var(--bs-gray-700);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 1rem;    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Team Profile Page */
.team-profile-image {
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 2rem;
}

.team-profile-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

.team-profile-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.team-profile-image:hover img {
    transform: scale(1.05);
    filter: brightness(1.05) contrast(1.05);
}

.team-social-large {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 12px;
}

.social-icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--bs-primary);
    color: var(--bs-white);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.social-icon-large:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bs-secondary);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.social-icon-large:hover {
    transform: translateY(-8px);
    color: white;
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.3);
    animation: pulse 1.5s infinite;
}

.social-icon-large:hover:before {
    transform: scale(1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(var(--bs-primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0);
    }
}

.team-bio {
    color: var(--bs-gray-700);
    line-height: 1.8;
    font-size: 1.1rem;
    letter-spacing: 0.01rem;
}

.team-bio p {
    margin-bottom: 1.8rem;
}

.team-bio ul, .team-bio ol {
    margin-bottom: 1.8rem;
    padding-left: 1.5rem;
}

.team-bio ul li, .team-bio ol li {
    margin-bottom: 0.8rem;
}

.team-contact-info ul {
    list-style-type: none;
    padding: 0;
}

.team-contact-info ul li {
    margin-bottom: 0.8rem;
    color: var(--bs-gray-700);
    display: flex;
    align-items: center;
}

.team-contact-info ul li i {
    width: 25px;
    color: var(--bs-primary);
    margin-right: 10px;
    text-align: center;
}

.team-contact-info .text-primary {
    font-size: 1rem;
    font-weight: 600;
}

.related-team-section .card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.related-team-section .card:hover {
    transform: translateY(-8px);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--bs-light) 0%, #f0f2f5 100%);
    position: relative;
    overflow: hidden;
}

.cta-section:before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-radius: 50%;
    top: -150px;
    left: -150px;
}

.cta-section:after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
}

/* Card body customizations */
.team-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.team-card .card-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--bs-gray-800);
}

.team-card .card-text {
    font-size: 0.95rem;
    color: var(--bs-gray-600);
    margin-bottom: 1.2rem;
}

.team-card .btn {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.team-card .btn:hover {
    transform: translateY(-3px);
}

@media (max-width: 767.98px) {
    .team-image-container {
        height: 100%;
    }
    
    .team-image {
        height: 250px;
    }
    
    .team-profile-image {
        max-width: 90%;
        margin: 0 auto 1.5rem;
    }
    
    .team-profile-image img {
        height: 350px;
    }
    
    .team-quote {
        text-align: center;
        padding: 1rem;
    }
    
    .related-team-section .team-image-container {
        height: 100%;
        min-height: 120px;
    }
}

@media (max-width: 575.98px) {
    .team-social-large {
        justify-content: center;
    }
    
    .team-contact-info {
        text-align: center;
    }
    
    .team-contact-info ul li {
        justify-content: center;
    }
    
    .team-card {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .team-image {
        height: 220px;
    }
    
    .team-profile-image img {
        height: 300px;
    }
    
    .team-bio {
        text-align: center;
    }
}

/* Equal height cards and alignment fixes */
.team-members-section .row {
    display: flex;
    flex-wrap: wrap;
}

.team-members-section .col-md-6,
.team-members-section .col-lg-4 {
    display: flex;
    margin-bottom: 30px;
}

.team-card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.team-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* Hero section with blur effect */
.hero-section {
    position: relative;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(2px);
    z-index: -1;
}

/* Animations and additional effects */
.team-members-section .col-md-6:nth-child(odd) .team-card {
    animation: fadeInLeft 1s both;
    animation-delay: calc(0.2s * var(--animation-order, 1));
}

.team-members-section .col-md-6:nth-child(even) .team-card {
    animation: fadeInRight 1s both;
    animation-delay: calc(0.2s * var(--animation-order, 1));
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Hover overlay effect */
.team-card .card-img-top {
    position: relative;
    transition: all 0.5s ease;
}

.team-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
    pointer-events: none;
}

.team-card:hover:after {
    opacity: 1;
}

/* Custom focus styles for accessibility */
.team-card a:focus,
.social-icon:focus,
.social-icon-large:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Team intro section styling */
.team-intro-section {
    position: relative;
}

.team-intro-section:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--bs-primary);
    border-radius: 2px;
}
