/* main container */
.team-section {
    width: 74%;
    margin: 5em auto 0;
}

/* headline with subtle style */
.team-section-title {
    width: fit-content;
    text-align: center;
    font-size: 3.5rem;
    font-weight: 400;
    color: #000;
    font-family: "DMSerifDisplay";
    margin-bottom: 0.5rem;
    margin-inline: auto;
    position: relative;
}

.team-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 100%;
    height: 2px;
    background-color: #0980a7;
}

/* ----- CARD GRID (RESPONSIVE) ----- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2.8rem;
    justify-items: center;
    align-items: stretch;
    margin-top: 10vh;
}

/* CARD STYLE - modern, glassmorphism / clean shadow */

.about-us-team-grid .team-card {
    opacity: 0;
}

.team-card {
    overflow: hidden;
    width: 100%;
    max-width: 340px;
    text-align: left;
    cursor: default;
    
    /* opacity: 0; */
    
    transition: all 1000ms ease;
    -webkit-transition: all 1000ms ease;
    -moz-transition: all 1000ms ease;
    -ms-transition: all 1000ms ease;
    -o-transition: all 1000ms ease;
    transform: scale(0.9);
}

.team-card:hover {
    transition: all 0.6s ease;
    -webkit-transition: all 0.6s ease;
    -moz-transition: all 0.6s ease;
    -ms-transition: all 0.6s ease;
    -o-transition: all 0.6s ease;
    
    /* box-shadow: 0 30px 45px -16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.02); */
    background: #ffffff;
}

/* ---- Image wrapper (consistent cropping) ---- */
.team-card-img-wrapper {
    width: 100%;
    /* height: 15vh; */
    aspect-ratio: 1 / 1.5;
    /* padding-top: 100%; */
    position: relative;
    overflow: hidden;
    background: #d9e2e9;
}

.team-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.5s ease, filter 0.4s ease;
    display: block;
}

.team-card:hover .team-img {

    transition: all 1000ms ease;
    transform: scale(1.1);
    filter: brightness(1.02) contrast(1.02);
}

/* text content */
.team-card-info {
    margin-top: 0.75em;
    height: 100%;
    padding: 1.6rem 1.2rem 1.8rem;
    background-color: #F8F8F8;
}

.member-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: -0.3px;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.member-job {
    font-size: 1.1rem;
    font-weight: 500;
    color: #000000;
    display: inline-block;
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
    margin-top: 0.2rem;
}

.iconArrow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    width: 100%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.iconArrow .BoxIcon {
    width: 76px;
    height: 76px;
    background-color: #0980A7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1000ms ease;
    -webkit-transition: all 1000ms ease;
    -moz-transition: all 1000ms ease;
    -ms-transition: all 1000ms ease;
    -o-transition: all 1000ms ease;
    cursor: pointer;
}

.team-card:hover .iconArrow {
    opacity: 1;
    transition: all 1000ms ease;
    -webkit-transition: all 1000ms ease;
    -moz-transition: all 1000ms ease;
    -ms-transition: all 1000ms ease;
    -o-transition: all 1000ms ease;
}


.team-card:hover .team-card-info::before {
    width: 80px;
}

.team-view-all {
    display: flex;
    margin-top: 0;
    margin-bottom: 2em;
}

.team-view-all a {
    margin-inline: auto;
}

/* responsive tweaks for very small devices */
@media (max-width: 640px) {
    .team-grid {
        gap: 1.5rem;
    }
    .member-name {
        font-size: 1.4rem;
    }
    .team-section-title {
        font-size: 2rem;
    }
    .team-card-info {
        padding: 1.2rem 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .team-card {
        max-width: 100%;
    }
}

/* accessibility & smooth */
.team-card {
    -webkit-tap-highlight-color: transparent;
}

/* illustration for demo: fallback if images missing, but we use reliable placeholders */
.team-img {
    background-color: #cbdbe2;
}