/* ================== FIXED & PERFECT TEAM SECTION ================== */
.team-section {
    padding: 0px 5% 100px;
    background: #ffffff;
    text-align: center;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Title Animation */
.section-title {
    font-size: 48px;
    font-weight: 800;
    color: #0F738C;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, #0F738C, #71AE1A);
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    border-radius: 3px;
    animation: underlineGrow 1s ease 0.6s forwards;
}

.section-subtitle {
    font-size: 19px;
    color: #555;
    max-width: 800px;
    margin: 0 auto 80px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

/* Card Entrance */
.team-card {
    opacity: 0;
    transform: translateY(60px);
    animation: fadeInUp 0.8s ease forwards;
    
}

.team-card:nth-child(1) { animation-delay: 0.2s; }
.team-card:nth-child(2) { animation-delay: 0.3s; }
.team-card:nth-child(3) { animation-delay: 0.4s; }
.team-card:nth-child(4) { animation-delay: 0.5s; }
.team-card:nth-child(5) { animation-delay: 0.6s; }
.team-card:nth-child(6) { animation-delay: 0.7s; }
.team-card:nth-child(7) { animation-delay: 0.8s; }
.team-card:nth-child(8) { animation-delay: 0.9s; }

.card-inner {
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 2px solid transparent;
    padding: 40px 20px 30px;
}

/* Hover Effects */
.team-card:hover .card-inner {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 0 30px 60px rgba(15, 115, 140, 0.18);
    border-color: #0F738C;
}

.highlight-card:hover .card-inner {
    border-color: #71AE1A;
    box-shadow: 0 30px 60px rgba(113, 174, 26, 0.22);
}

/* ============ FIXED IMAGE - FACES NOW PERFECTLY VISIBLE ============ */
.member-img {
    width: 190px;
    height: 190px;
    margin: 0 auto 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 7px solid #f5f5f5;
    position: relative;
    background: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.6s ease;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;   /* This ensures head/face is never cropped */
    transition: transform 0.9s ease;
}

/* Zoom + Glow on Hover */
.team-card:hover .member-img {
    border-color: #71AE1A;
    box-shadow: 0 15px 40px rgba(113, 174, 26, 0.3);
}

.team-card:hover .member-img img {
    transform: scale(1.12);
}

/* Text Styles */
.member-info h3 {
    font-size: 25px;
    color: #222;
    margin-bottom: 6px;
    transition: color 0.4s;
}

.team-card:hover h3 {
    color: #0F738C;
}

.position {
    font-size: 17px;
    font-weight: 700;
    color: #0F738C;
    margin-bottom: 16px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.highlight-card .position {
    color: #71AE1A;
}

.desc {
    font-size: 15.5px;
    color: #555;
    line-height: 1.7;
    padding: 0 10px;
}

/* Animations */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes underlineGrow {
    to { transform: translateX(-50%) scaleX(1); }
}

/* Responsive */
@media (max-width: 992px) {
    .team-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 40px;
    }
    .member-img { width: 170px; height: 170px; }
}

@media (max-width: 640px) {
    .team-grid { grid-template-columns: 1fr; }
    .team-section { padding: 100px 5% 80px; }
    .member-img { width: 160px; height: 160px; }
}