/* === TEAM SECTION === */
/* --- Team Section --- */
.team-section {
    text-align: center;
    background: linear-gradient(135deg, #e0f2f7, #ffffff);
    padding: 60px 20px;
}

.team-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    color: #003366;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-heading {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 50px auto;
    padding: 0;
    width: fit-content;
}

.section-heading .line {
    height: 3px;
    width: 80px;
    background: #e67e22;
    border-radius: 2px;
}

.section-heading .square {
    width: 16px;
    height: 16px;
    background: #e67e22;
    margin: 0 15px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.team-photos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.team-member {
    position: relative;
    /* Ensure overflow is hidden so the name animates from outside */
    overflow: hidden;
    border-radius: 12px; /* Match image border-radius for consistency */
}

.team-photos img {
    width: 250px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease, filter 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: 4px solid #fff;
}

.team-photos img:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    filter: brightness(0.5); /* Darken the image on hover */
}

.team-member-name {
    position: absolute;
    bottom: 0;
    /* Start the name completely off to the left */
    left: 0;
    transform: translateX(-100%); /* Initially off-screen to the left */
    background: rgba(49, 52, 216, 0.7);
    color: #fff;
    padding: 8px 15px;
    /* Adjust border-radius to fit the new animation better, or keep as is */
    border-radius: 0 5px 5px 0; /* Rounded on right, straight on left for entry */
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 500;
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out, text-shadow 0.4s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.6); /* Glowing effect */
    pointer-events: none; /* Prevent name from interfering with hover */
    /* Add width to ensure consistent animation if name length varies significantly */
    width: 100%; /* Or set a max-width if preferred */
    text-align: center; /* Center text within the name overlay */
}

.team-member:hover .team-member-name {
    opacity: 1;
    transform: translateX(0); /* Move to its original position (fully visible) */
}

/* --- Responsive Adjustments for Team Section --- */
@media (max-width: 992px) {
    .team-section { padding: 50px 15px; }
    .team-section h2 { font-size: 2.2em; margin-bottom: 25px; }
    .section-heading { margin-bottom: 40px; }
    .section-heading .line { width: 60px; height: 2px; }
    .section-heading .square { width: 14px; height: 14px; margin: 0 12px; }
    .team-photos { gap: 30px; padding-top: 15px; }
    .team-photos img { width: 200px; height: 240px; }
    .team-member-name { font-size: 1em; padding: 6px 12px; }
}

@media (max-width: 768px) {
    .team-section { padding: 40px 10px; }
    .team-section h2 { font-size: 1.8em; margin-bottom: 20px; }
    .section-heading { margin-bottom: 30px; }
    .section-heading .line { width: 50px; height: 2px; }
    .section-heading .square { width: 12px; height: 12px; margin: 0 10px; }
    .team-photos { gap: 20px; padding-top: 10px; }
    .team-photos img {
        width: 180px;
        height: 220px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
        border: 3px solid #fff;
    }
    .team-photos img:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
        filter: brightness(0.5);
    }
    .team-member-name { font-size: 0.9em; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .team-section { padding: 30px 10px; }
    .team-section h2 { font-size: 1.5em; margin-bottom: 15px; }
    .section-heading { margin-bottom: 25px; }
    .section-heading .line { width: 40px; height: 2px; }
    .section-heading .square { width: 10px; height: 10px; margin: 0 8px; }
    .team-photos { gap: 15px; padding-top: 8px; padding-bottom: 0px; }
    .team-photos img {
        width: 140px;
        height: 180px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 2px solid #fff;
    }
    .team-photos img:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
        filter: brightness(0.5);
    }
    .team-member-name { font-size: 0.8em; padding: 4px 8px; }
}